Hi all,

I’ve been trying to run in Matlab a program written in CUDA. I managed to solve some problems but ended up with the following errors:

nvmex -f nvmexopts.bat knn_cublas_without_indexes.cu -IC:\CUDA\include -LC:\CUDA\lib\x64 -lcufft -lcudart -lcuda -lcublas -D_CRT_SECURE_NO_DEPRECATE

abdelali target arch: win64

knn_cublas_without_indexes.cu

C:/Program Files/MATLAB/R2010b/bin/knn_cublas_without_indexes.cu(244): error: argument of type “unsigned int *” is incompatible with parameter of type “size_t *”

C:/Program Files/MATLAB/R2010b/bin/knn_cublas_without_indexes.cu(244): error: argument of type “unsigned int *” is incompatible with parameter of type “size_t *”

C:/Program Files/MATLAB/R2010b/bin/knn_cublas_without_indexes.cu(249): error: more than one instance of overloaded function “min” matches the argument list:

function “min(int, int)”

function “min(int, unsigned int)”

function “min(unsigned long long, unsigned long long)”

function “min(long long, unsigned long long)”

argument types are: (int, unsigned long long)

C:/Program Files/MATLAB/R2010b/bin/knn_cublas_without_indexes.cu(284): error: more than one instance of overloaded function “min” matches the argument list:

function “min(int, int)”

function “min(unsigned int, int)”

function “min(unsigned long long, unsigned long long)”

function “min(unsigned long long, long long)”

argument types are: (size_t, int)

4 errors detected in the compilation of “C:/Users/JOOPED~1/AppData/Local/Temp/tmpxft_00001364_00000000-6_knn_cublas_without_indexes.cpp1.ii”.

C:\PROGRA~1\MATLAB\R2010B\BIN\NVMEX.PL: Error: Compile of ‘knn_cublas_without_indexes.cu’ failed.

??? Error using ==> nvmex at 206

Unable to complete successfully.

My system is Windows 7 Professional x64, Matlab R2010b x64.

I can’t figure out the problem as I am not very experienced with CUDA, does anyone know how to solve this? I’ll appreciate the help.