cancel
Showing results for 
Search instead for 
Did you mean: 

OpenCL

arunad
Journeyman III

data parallel program using opencl

i am new to opencl and trying to execute data parallel programm and there are no debug error but few warnings were there and me not able to understand the output its returning some garbage value i am not getting what is error.

ill attach the code please explain whats wrong with code

0 Kudos
Reply
4 Replies
wayne_static
Adept II

Re: data parallel program using opencl

Hello,

Your code makes use of kernel file "parallel.cl" but you haven't attached it. Could you please attach it too?

0 Kudos
Reply
arunad
Journeyman III

Re: data parallel program using opencl

Hello,

Thanks for the reply and there was silly mistake now me getting output and here is kernel code.

_kernel void dataParallel(__global float* A, __global float* B, __global float* C)

{

int base = 4*get_global_id(0);

C[base+0] = A[base+0] + B[base+0];

C[base+1] = A[base+1] - B[base+1];

C[base+2] = A[base+2] * B[base+2];

C[base+3] = A[base+3] / B[base+3];

}

0 Kudos
Reply
wayne_static
Adept II

Re: data parallel program using opencl

Okay no problem. So does it mean your problem is now solved?

0 Kudos
Reply
arunad
Journeyman III

Re: data parallel program using opencl

Thanks a lot .Hope me you'll help in future if problems incur

0 Kudos
Reply