From 3f2316086f652deb14bf8e17b53c87fd587da397 Mon Sep 17 00:00:00 2001 From: Nick Curtis Date: Mon, 18 Nov 2019 00:49:12 -0600 Subject: [PATCH] fix complex conjugate for double-complex (#1659) The sign in the y component returned from hipConj incorrect for double-complex. Fix to match as in hipConjf above. --- include/hip/hcc_detail/hip_complex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/hip/hcc_detail/hip_complex.h b/include/hip/hcc_detail/hip_complex.h index 4acee9e235..11648ce123 100644 --- a/include/hip/hcc_detail/hip_complex.h +++ b/include/hip/hcc_detail/hip_complex.h @@ -186,7 +186,7 @@ __device__ __host__ static inline hipDoubleComplex make_hipDoubleComplex(double __device__ __host__ static inline hipDoubleComplex hipConj(hipDoubleComplex z) { hipDoubleComplex ret; ret.x = z.x; - ret.y = z.y; + ret.y = -z.y; return ret; }