CUDA3.0: OpenCL compile error for built-in type "size_t"

Today I installed CUDA3.0 toolkit, so that I have failed to compile error for “size_t” type.
“size_t” is ,according to specific doc, built-in scalar data type. Is it nVidia’s driver bug??

Could you paste some code? Where are you trying to use size_t?

thanks for replying.

I have tried to compile follow code.

[codebox]__kernel

void example(

__read_only image2d_t src,

__read_only image2d_t prd,

__global int* dst,

size_t pitch)

{

...

}

[/codebox]

then, i have failed with follow message.

[codebox]:xxx: error: __kernel function cannot have argument of type ‘size_t’

    size_t pitch)

            ^

[/codebox]

Ah, see that’s illegal. You can’t use size_t as a kernel argument:

Chapter 6.8, point ‘k’

What to do instead then? Use uint, for example?

Yup. Make sure you don’t mess up word length (ex. with a 64 bit host and 32 bit device).

oops, I forgot this ristrictions. (but size_t can be used on previous OpenCL version.)

I’ gona use uint instead of size_t.