some help regarding , mex n cuda compliations...

hey,
i was making mex-cuda function for median calculation on an array…
queries

  1. i have a file test1 that has code regarding mex and cuda initalization and memory copy … What would be the extenion of the file … (.C Or .cu) , and will it be complied in NVMEX…

  2. i have a cuda kernal file that has basic kernal … wht would be the extension of that file (expected to be .cu) , and will that be complied in NVMEX or i have to complle that in NVCC complier.

3.how will the both files be linked (mex-cuda) (cuda) together to run together…

  1. i have config win7,matlab 7.0.1, 8800gt card, micrsoft visual studio 2009 …
    but after nemerious hit n trail i am not able to config for a helloworld …
    plz help … . .

i am really lost in compilation part :( . i have jst 2 week of cuda experience …

ny suggestion welcomed . .
thanks…

I would suggest taking a look at the procedure in

http://www.orangeowlsolutions.com/archives/498

describing how the compile mexfiles using CUDA under Visual Studio. There is also a downloadable Visual Studio sample project.

The procedure has been tested for CUDA 5.0, Visual Studio 2010 and Matlab 2010a, but perhaps it could be of interest also to people using other versions of the above products.

The above procedure works for me with MATLAB 2012b and Visual Studio 2010 x64.