How do you set pointers which are kernel params?

Hi,

I have a kernel that I’m launching using cuSetParami, cuLaunch etc. One of the parameters to the kernel is a pointer to device memory. Right now I’m setting this using:

   CHECK_STATUS(cuParamSeti(func, 8, (int)dc), CUDA_SUCCESS);  

But this is a bit ugly and also makes the compiler crib. So I was wondering if there is a better way to do this?

Thanks,

Pramod