I am getting an error while trying to compile CUDA code with the -std=c++11
flag.
error: more than one instance of overloaded function "isnan" matches the argument list:
function "isnan(float)"
function "std::isnan(float)"
argument types are: (r32)
(r32
is a typedef
for float
)
I found this question, in which the answer suggests to simply not specify C++11 to fix the problem, which I can not do because I am using some features of C++11 like constexpr
and lambdas. Is there a way of compiling with C++11 features turned on, and still resolve this ambiguity?
I am using the following command to compile:
nvcc -I/my/include/path/1 -I/usr/local/cuda/include src/myfile.cu -o build/myfile.o -arch=sm_61 -c --compiler-options -fPIC -Xcudafe -std=c++11
the compiler version is:
nvcc: NVIDIA (R) Cuda compiler driver
Copyright (c) 2005-2016 NVIDIA Corporation
Built on Tue_Jan_10_13:22:03_CST_2017
Cuda compilation tools, release 8.0, V8.0.61
Any help or suggestion would be greatly appreciated. Thanks!
Aucun commentaire:
Enregistrer un commentaire