I have installed cuda 4.1 on my MacBook pro. Does anybody have an idea on how to integrate matlab’s mex files and cuda?
To be more precise, I want to know how to compile a mex file containing a cuda kernel under OS X (and/or linux).
I’ve googled a bit and found two approaches.
The approach found here converts a .cu file to a .cpp file using nvcc and subsequently uses the mex compiler
to compile the .cpp file. Unfortunately this method didn’t work for me and produced a whole bunch of errors while compiling the generated .cpp file.
Another method which uses “nvmex”(a modified version of mex which supports .cu files) can be found here. However this seems to be outdated
and unsupported with newer versions of cuda. Infact I was unable to find the download location of the “nvmex” file that the solution refers to.
Any idea on how to accomplish this with latest versions of cuda?