Does a Matlab CUDA Toolbox exist? Where I can find it?
There are some CUDA-Mexfile examples avalaible on the web?

THey have Jacket and a toolbox for Matlab

Thanks alot, but I need to use CUDA-Enabled mex files, not the jacket engine…ag%3A%22cuda%22

Does anyone have a successfull experience on writing and compiling cuda mex files under MS VS 2008? I have at least two problems:

  1. When I have 2 files ( and I can’t link it, because linker outputs that all my functions in allready declared in cudamex.obj
  2. If I make a single file, it compiles and linkes but after running in matlab error arises that mex-file can’t find some module. Using Dependency Walker, I’ve found that the missing file is msvcr90.dll. Putting this file in the folder with mex-file didn’t help, matlab reports thar dll init failed.

on number 1. : You probably #include “” in ?

Yes, but this code successfully compiles and then runs from matlab.

Thus if I type “nvmex -g -f nvmexopts.bat -I’C:\ProgramData\NVIDIA Corporation\NVIDIA GPU Computing SDK\C\common\inc’ -LC:\cuda\lib -lcudart” and then run cudamex, everything fine. But if I compile from VS, I have mentioned problems.

I’ll be investigating how to compile a mex file from within VS in the next week, as I am splitting up a very big mex file with lots of kernels into seperate compilation units. I think I will then need to compile from within VS (I will also try to see if I can get cmake to do it for me, as I also run linux). If I find anything I’ll post it here.

I think I’ve found solution. File shuld be excluded from build, but should be included in Project properties->Cuda build rule->General->Source dependences. Also manifest generation should be enabled.

This thread may also be of interest: