Skip to content

Commit

Permalink
fix return type for double complex atomics
Browse files Browse the repository at this point in the history
  • Loading branch information
upsj authored Nov 27, 2019
1 parent 035e23e commit 9081b31
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cuda/components/atomic.cuh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ __forceinline__ __device__ thrust::complex<float> atomic_add(
*
* @note It is not 'real' complex<double> atomic add operation
*/
__forceinline__ __device__ thrust::complex<float> atomic_add(
__forceinline__ __device__ thrust::complex<double> atomic_add(
thrust::complex<double> *__restrict__ address, thrust::complex<double> val)
{
cuDoubleComplex *cuaddr = reinterpret_cast<cuDoubleComplex *>(address);
Expand Down
2 changes: 1 addition & 1 deletion hip/components/atomic.hip.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ __forceinline__ __device__ thrust::complex<float> atomic_add(
*
* @note It is not 'real' complex<double> atomic add operation
*/
__forceinline__ __device__ thrust::complex<float> atomic_add(
__forceinline__ __device__ thrust::complex<double> atomic_add(
thrust::complex<double> *__restrict__ address, thrust::complex<double> val)
{
hipDoubleComplex *cuaddr = reinterpret_cast<hipDoubleComplex *>(address);
Expand Down

0 comments on commit 9081b31

Please sign in to comment.