Ajay Shah <[email protected]> writes:

> Hello, 
> I was wondering how you would get multiple outputs from a single kernel. For 
> example, how would you return c and d from the following kernel. 
> thanks, 
> Ajay
> ------------------------------------
> Kernel: part2.cl
> __kernel void part1(__global float* a, __global float* b, __global float* c, 
> __global float* d){    unsigned int i = get_global_id(0);
>     d[i] = (a[i] + b[i]);    c[i] = 
> a[i]*b[i]}---------------------------------------
>

Well, your kernel updates c and d. Getting these results means you have
to copy them off the compute device and back to the host, where you can
use them. See the example in the docs.

HTH,
Andreas

_______________________________________________
PyOpenCL mailing list
[email protected]
http://lists.tiker.net/listinfo/pyopencl

Reply via email to