Hi everyone, I wanted to ask if anyone have run some C code containing cuda code on matlab?
I have read the documentation on mathworks website but i still cant quite wrap my head around it. I do understand that it is two main type of ways you could do this either executing a cuda kernel by constructing a object with the function
parallel.gpu.CUDAKernel
Or by constructing a mex file out of a .cu file. There are some things though i do not understand when using these two methods. Using the mex approach should I use another ide like Visual Studio to compile a .cu file first before compiling the mex file in matlab? If so how can I compile the .cu file without a main() function in the .cu file, I always get errors when i try to compile it that way in VS, or is it okay to have a main function in the .cu file and pass the pointers to the gpu arrays to the main function?
For the cuda kernel approach, should i compile the kernel in VS, and in that case how?
Thanks for the help!