The Khronos Group - a non-profit industry consortium to develop, publish and promote open standard, royalty-free media authoring and acceleration standards for desktop and handheld devices, combined with conformance qualification programs for platform and device interoperability.

If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Your clSetKernelArg for index 25 is wrong. The sizeof should be of cl_mem, not float.

A subbuffer is just a buffer that uses a parent buffer for storage. It can have an offset within the larger buffer and a smaller size. So after you create your first buffer you could create a subbuffer within it. Typical applications are for distributing work across multiple GPUs. What did you have in mind?

The variable cpuPortion and theRest are in byte, but my original buffer is float, how take it the first half of my array?? I need to convert 1 float to byte and then multiply it per 10000!!!
You understand me???

Right, you understand that the cl_buffer_region is in bytes. Seems to me both cpuPortion and theRest should be set to 10000 * sizeof(float).

For your kernel argument you'd put whichever buffer you want the kernel to run. Since both buffer_entrada and M_subbufferCPU1 start at the same place, either could be used if you're only accessing 10000 elements.