Base function in Cuda kernels

Please quote your code, this will help us help you!