9 Replies Latest reply on Jul 9, 2011 12:23 PM by Jawed

    The parameter orders of OCL kernel programs

    haibo031031

      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.