[llvm-bugs] [Bug 26497] New: [CUDA] call to pow is ambiguous
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Feb 5 11:12:03 PST 2016
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: unassignedclangbugs at nondot.org
Reporter: wujingyue at gmail.com
CC: dgregor at apple.com, llvm-bugs at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20160205/50085d5b/attachment.html>
More information about the llvm-bugs
mailing list