https://llvm.org/bugs/show_bug.cgi?id=26497
Bug ID: 26497 Summary: [CUDA] call to pow is ambiguous Product: clang Version: trunk Hardware: PC OS: Linux Status: NEW Severity: normal Priority: P Component: C++ Assignee: unassignedclangb...@nondot.org Reporter: wujing...@gmail.com CC: dgre...@apple.com, llvm-bugs@lists.llvm.org Classification: Unclassified Is this intended? // pow.cu using namespace std; __global__ void foo(double* dd) { dd[0] = pow(dd[1], dd[2]); } $ clang++ pow.cu -c pow.cu:4:11: error: call to 'pow' is ambiguous dd[0] = pow(dd[1], dd[2]); ^~~ /usr/local/cuda/include/math_functions_dbl_ptx3.hpp:350:41: note: candidate function __MATH_FUNCTIONS_DBL_PTX3_DECL__ double pow(double a, double b) ^ /usr/local/google/home/jingyue/Work/llvm/install-git/bin/../lib/clang/3.9.0/include/__clang_cuda_cmath.h:186:19: note: candidate function __DEVICE__ double pow(double base, double exp) { return ::pow(base, exp); } ^ /usr/local/google/home/jingyue/Work/llvm/install-git/bin/../lib/clang/3.9.0/include/__clang_cuda_cmath.h:187:19: note: candidate function __DEVICE__ double pow(double base, int iexp) { return ::powi(base, iexp); } ^ /usr/local/google/home/jingyue/Work/llvm/install-git/bin/../lib/clang/3.9.0/include/__clang_cuda_cmath.h:184:18: note: candidate function __DEVICE__ float pow(float base, float exp) { return ::powf(base, exp); } ^ /usr/local/google/home/jingyue/Work/llvm/install-git/bin/../lib/clang/3.9.0/include/__clang_cuda_cmath.h:185:18: note: candidate function __DEVICE__ float pow(float base, int iexp) { return ::powif(base, iexp); } ^ 1 error generated. -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs