From bbcd4b376127d3887124a977fbd0b446536f7efc Mon Sep 17 00:00:00 2001 From: "Sun, Peng" Date: Tue, 25 Apr 2017 00:13:32 -0500 Subject: [PATCH] fix hip_complex.h header on NV path Change-Id: Ia95d003ca1b284bab1c76723050e6b3b89178f65 [ROCm/hip commit: 54561c8af3ac3052fefa6d8c8f6b9d18274d08fa] --- projects/hip/include/hip/nvcc_detail/hip_complex.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/hip/include/hip/nvcc_detail/hip_complex.h b/projects/hip/include/hip/nvcc_detail/hip_complex.h index 84afb13e50..20cb24460c 100644 --- a/projects/hip/include/hip/nvcc_detail/hip_complex.h +++ b/projects/hip/include/hip/nvcc_detail/hip_complex.h @@ -64,7 +64,7 @@ __device__ __host__ static inline hipFloatComplex hipCdivf(hipFloatComplex p, hi } __device__ __host__ static inline float hipCabsf(hipFloatComplex z){ - return cuCabsf(p, q); + return cuCabsf(z); } typedef cuDoubleComplex hipDoubleComplex; @@ -85,7 +85,7 @@ __device__ __host__ static inline hipDoubleComplex hipConj(hipDoubleComplex z){ return cuConj(z); } -__device__ __host__ static inline hipDoubleComplex hipCsqabs(hipDoubleComplex z){ +__device__ __host__ static inline double hipCsqabs(hipDoubleComplex z){ return cuCabs(z) * cuCabs(z); } @@ -123,7 +123,7 @@ __device__ __host__ static inline hipComplex hipCfmaf(hipComplex p, hipComplex q return cuCfmaf(p, q, r); } -__device__ __host__ static inline hipDoubleComplex hipCfma(hipComplex p, hipComplex q, hipComplex r){ +__device__ __host__ static inline hipDoubleComplex hipCfma(hipDoubleComplex p, hipDoubleComplex q, hipDoubleComplex r){ return cuCfma(p, q, r); }