Rank: 114022 based on 0 downloads (last 30 days) and 0 file submitted
photo

Takashi

E-mail
Company/University
University of Tokyo

Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Takashi
Updated File Comments Rating
28 Nov 2011 CUDA MEX Compile CUDA from within MATLAB! Just write cuda_mex filename.cu and it is ready. Author: Haim Avron

Hi,
I had some troubles when I used it on windows7(x64), Matlab R2011a(x64) and Visual C++ 2010 express with WinSDK7.1, but I could get over it. I had to add a slight modification to Eddie's advice. Thanks Haim and Eddie!!

Modify cuda_mex.pl modification as written above.
Add
$ARCH = "win64";
before the command (line 184)
$ENV{'ARCH'} = $ARCH;

Also, you need to comment out the entire block in the setup_cuda_mex.m titled as
%% Process mex.pl
to prevent further renewal of mex_cuda.pl

vcvarsamd64.bat should be created as written above. You have to slightly change it for use with VS2010Ex and SDK7.1.

Finally, you have to move the cudamexopts.bat to the C:\Users\(USER\AppData\Roaming\MathWorks\MATLAB.
Funny thing is that Matlab R2011a create an additional folder, named R2011a, in above folder and put cudamexopts.bat to the directory, which is not recognized by cuda_mex. So this caused the error message saying 'option file not found'. You just move it to the upper directory and things will go perfectly well.

Contact us