haibo031031

The parameter orders of OCL kernel programs

Discussion created by haibo031031 on Jun 29, 2011
Latest reply on Jul 9, 2011 by Jawed

Hello, I have written two kernel programs listed as follows:

------------------------------------------------------------------------------------------------
(1) __kernel void initialize_variables(int n, __global float* input, __global float* output){}
(2) __kernel void initialize_variables(__global float* input, __global float* output, int n){}
------------------------------------------------------------------------------------------------

The first kernel canot work properly (it cannot find the correct address of input/output), while the second can work properly. The difference lies in the orders of parameters.

My testbed is Intel920 and AMD APP v2.4.

Btw, both kernels can work properly on GPUs (HD5870).

Could anybody tell me the reasons?Thanks.

 

 

Outcomes