PDA

View Full Version : using opencl kernel function parameter & ptxas ptx problem



phoebe0105
05-05-2010, 05:13 AM
opencl kernel function include a lot of parameters.

And I want to control the parameter.

Some parameters are cl_mem, another parametsers are cl_int or cl_long in opencl application program.
Then opencl kernel is received the data.

And then I control a kernel source code to use parameter.

For example,

void subrectEncode32(
__global int* resDestoffset,
__global ulong *dest,
__global ulong *subrectData,
const int w, const int h,
ulong bg, int mono)
{
int sum;
int yH = get_group_id(0);
int xW = get_local_id(0);

if(mono == 1) // ptxas ptx input error
sum = w+h;
else
sum = w;

for(int i = yH; i < h; i++) // also ptxas ptx input error
{
//test code...
}
}

I want to comparison the parameter and integer.
And I want to use add number to parameters.

What is my problem? Advise to me..