Results 1 to 2 of 2

Thread: clEnqueueWriteBuffer is blocking, even with blocking_write set to CL_FALSE?

  1. #1
    Newbie
    Join Date
    Dec 2018
    Posts
    1

    clEnqueueWriteBuffer is blocking, even with blocking_write set to CL_FALSE?

    In my Windows c++ application, I am executing the following lines of code:

    Code :
    clEnqueueWriteBuffer(OpenCLMaster::commandQueues[0], constraintsBuffer, CL_FALSE, 0, constraintsSize, &constraintsArr[0], 0, NULL, NULL);

    constraintsArr is a float8 array with approximately 1 million values. Even though blocking_write is set to CL_FALSE, the call to "clEnqueueWriteBuffer" takes approximately 11ms to complete.

    If I change blocking_write to CL_TRUE, the call still takes 11ms to complete. It seems that the value I'm passing to blocking_write is being ignored. Is blocking_write a platform-specific argument? Why is the function call not returning immediately?

  2. #2
    Senior Member
    Join Date
    Dec 2011
    Posts
    266
    With CL_TRUE it must block; with CL_FALSE it is allowed to not block. But it might still block. It depends on your platform and device, which you did not mention.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Proudly hosted by Digital Ocean