<html>
<head>
<base href="https://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - [CUDA] call to pow is ambiguous"
href="https://llvm.org/bugs/show_bug.cgi?id=26497">26497</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>[CUDA] call to pow is ambiguous
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>wujingyue@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvm-bugs@lists.llvm.org
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>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.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>