Skip to content

Commit

Permalink
continuous GPU reading happens only when updateInterval > 0
Browse files Browse the repository at this point in the history
[trigger-nightly-build]
  • Loading branch information
olepoeschl committed Nov 3, 2023
1 parent 1e2c3be commit 124f62d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/de/nqueensfaf/impl/GPUSolver.java
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,8 @@ private void runDevice(MemoryStack stack, IntBuffer errBuf, Device device) {
// wait for kernel to finish and continuously read results from device
IntBuffer eventStatusBuf = stack.mallocInt(1);
while (true) {
readResults(device);
if(config.updateInterval > 0)
readResults(device);
checkCLError(clGetEventInfo(device.xEvent, CL_EVENT_COMMAND_EXECUTION_STATUS, eventStatusBuf, null));
if (eventStatusBuf.get(0) == CL_COMPLETE) {
if (ptr >= device.constellations.size()) {
Expand Down

0 comments on commit 124f62d

Please sign in to comment.