在cud代碼中使用atomicMin(&a,b)原子操作編譯時出現未定義錯誤
原因是代碼是在1.0架構下進行編譯的,編譯參數爲compute_10
and sm_10
右鍵工程在Configuration Properties/CUDA C/C++/Device中將Code Generation改爲compute_20,sm_20(在2.0架構下進行編譯)後可正常編譯
在cud代碼中使用atomicMin(&a,b)原子操作編譯時出現未定義錯誤
原因是代碼是在1.0架構下進行編譯的,編譯參數爲compute_10
and sm_10
右鍵工程在Configuration Properties/CUDA C/C++/Device中將Code Generation改爲compute_20,sm_20(在2.0架構下進行編譯)後可正常編譯
1、Verify You Have a CUDA-Capable GPU lspci | grep -i nvidia 2、Verify Yo