Hands-On GPU:Accelerated Computer Vision with OpenCV and CUDA
上QQ阅读APP看书,第一时间看更新

Passing parameters to CUDA functions

The gpuAdd kernel function of the variable addition program is very similar to the normal C function. So, like normal C functions, the kernel functions can also be passed parameters by value or by reference. Hence, in this section, we will see both the methods to pass parameters for CUDA kernels.