From 5875d98e6fd75091b2da189fc751f18c3744c220 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. [ROCm/clr commit: cae9b13020f61c81fd46167fbe1e28d180dd3990] --- projects/clr/hipamd/include/hip/hcc_detail/hip_complex.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/clr/hipamd/include/hip/hcc_detail/hip_complex.h b/projects/clr/hipamd/include/hip/hcc_detail/hip_complex.h index 4acee9e235..11648ce123 100644 --- a/projects/clr/hipamd/include/hip/hcc_detail/hip_complex.h +++ b/projects/clr/hipamd/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; }