Skip to content

Commit 1ec7f1d

Browse files
authored
Fix thrust_math failed on gpu test for fp64 (#206)
Signed-off-by: Ni, Wenhui <[email protected]>
1 parent c949d68 commit 1ec7f1d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

features/feature_case/thrust/thrust-math.cu

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@
1212

1313
__global__ void complex_math_kernel(float * res)
1414
{
15-
auto c = thrust::polar(11.48569, 1.33698);
15+
auto c = thrust::polar(11.48569f, 1.33698f);
1616

1717
c = thrust::log10(c);
1818
c = thrust::sqrt(c);
19-
c = thrust::pow(1.0, c);
20-
c = thrust::pow(c, 1.0);
19+
c = thrust::pow(1.0f, c);
20+
c = thrust::pow(c, 1.0f);
2121
c = thrust::pow(c, c);
2222
c = thrust::sin(c);
2323
c = thrust::cos(c);
@@ -40,12 +40,12 @@ __global__ void complex_math_kernel(float * res)
4040

4141
void complex_math(float * res)
4242
{
43-
auto c = thrust::polar(11.48569, 1.33698);
43+
auto c = thrust::polar(11.48569f, 1.33698f);
4444

4545
c = thrust::log10(c);
4646
c = thrust::sqrt(c);
47-
c = thrust::pow(1.0, c);
48-
c = thrust::pow(c, 1.0);
47+
c = thrust::pow(1.0f, c);
48+
c = thrust::pow(c, 1.0f);
4949
c = thrust::pow(c, c);
5050
c = thrust::sin(c);
5151
c = thrust::cos(c);

0 commit comments

Comments
 (0)