0

Currently I have a kernel that is supposed to take a flattened array of bytes and transform render some image, I have all of this implemented, however, I have a line of code that never returns

ret = CL.clEnqueueReadBuffer(this.commandQueue, this.finalImageBuffer, CL.CL_TRUE, 0, this.outputSize, Pointer.to(this.outArray), 0, null, null);

why would it never return, that's my question.

Thanks in advance

  • You have it set as a blocking read. If you set it to CL.CL_FALSE, does it return? – Simon Goater Nov 23 '22 at 10:56
  • Hello Simon, it does return, as it should, however, I need a blocking call, because I need a fully rendered image output. – Mostafa Ahmed Asaad Nov 23 '22 at 11:07
  • Why would such a call get stuck in an infinite loop, if I could get the reason, I could debug much more consciously. – Mostafa Ahmed Asaad Nov 23 '22 at 11:09
  • Yes, you'll need to change it back of course. It sounds like it's waiting for some previous command in the command queue to finish then. Your problem might be elsewhere in your code. – Simon Goater Nov 23 '22 at 11:09
  • Simon, that seems to be the issue, calling ```CL.clFinish()``` seems to get stuck when I call it before my reading call. Will start tracing that lead and see where it goes, thanks – Mostafa Ahmed Asaad Nov 23 '22 at 11:56

0 Answers0