各位大哥,小弟想自己在Linux下用CUDA写个程序,其中用到了原子函数atomicAdd, 但这个函数要求sm_11以上的计算能力的设备,我的显卡可以,而且我包含了头文件,但不知道怎么在Makefile中加入参数 -arch sm_11,Makefie如下:
###Add source files here
EXECUTABLE :=atomicAdd
###Cuda source files (compiled with cudacc)
CUFILES :=atomicAdd.cu
###CUDA dependency files
#CU_DEPS :=
###C/C++ source files (compiled with gcc/c++)
#CCFILES :=
###ADDITIONAL LIBRARIES needed by the project
#USECUFFT := 1
#USECUDPP := 1
Rules and targets
include …/…/common/common.mk
谢谢各位大哥