c++ - How to have a matrix as paramater when working with CUDA and Matlab -
I'm trying to explain that the matrix from matlux should be used to separate the C ++ queue file (* I want to process in different threads! I definitely do not want to divide the matrix in different threads! I want each thread to have the same matrix!
I Something tried to do this:
_global_ zero radial average (int * image [] []) {...} However It does not work. I am getting the following error:
kernel.cu (8): Error: In the compilation of "C: / User / Admin ~" in an array like this 1 error There are no elements 1 / AppData / Loca / Temp / tmpxft_00000c44_00000000-8_kernel.cpp1.ii ". Can you think of any way to do this? Or is it possible? < / P>
BTW: I am not using any libraries for C ++, only CUDA-AP
Matlab The correct way to define a kernel to pass the matrix is clearly shown on the page (sometimes) linked to your question.
In summary, define such a kernel (matlab gpuArray is automatically passed as a device pointer in the kernel): < Code> __ global radial average (int * image) {...} After you retrieve the kernel by using the CUDAKernel toolbox, your Matlab Create an integer gpuArray from the matrix, and pass it to the kernel function.
Comments
Post a Comment