Results 1 to 2 of 2

Thread: how to obtain part of buffer when a kernel is working with the buffer

  1. #1
    Junior Member
    Join Date
    Oct 2013
    Posts
    18

    how to obtain part of buffer when a kernel is working with the buffer

    for example, i have this code:
    clEnqueueTask(queue,kernel_1,0,NULL,NULL);
    clEnqueueTask(queue,kernel_2,0,NULL,NULL);

    clEnqueueReadBuffer(queue, buffer_1, CL_TRUE, NULL, length * sizeof(float), salida_1, NULL, NULL, NULL);
    clEnqueueReadBuffer(queue, buffer_1, CL_TRUE, NULL, length * sizeof(float), salida_2, NULL, NULL, NULL);

    I need know how to obtain a partial part of buffer_1 and buffer_2 when opencl is working on kernel_1 and kernel_2.

    for example, length=13000000 and i need take 10000 elements first.

  2. #2
    Senior Member
    Join Date
    Dec 2011
    Posts
    126
    Read up on OpenCL "SubBuffer" objects. They will allow you to obtain just a portion of the buffer.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •