diff --git a/src/lapack/gpu/add.cu b/src/lapack/gpu/add.cu index 9e9f3e97e7..4ef3329b64 100644 --- a/src/lapack/gpu/add.cu +++ b/src/lapack/gpu/add.cu @@ -32,6 +32,20 @@ __device__ inline void addAlpha(const T& alpha, const T& a, T& b) { b = b + alpha * a; } +#ifdef DLAF_WITH_HIP +template <> +__device__ inline void addAlpha(const hipFloatComplex& alpha, const hipFloatComplex& a, + hipFloatComplex& b) { + b = b + hipCmulf(alpha, a); +} + +template <> +__device__ inline void addAlpha(const hipDoubleComplex& alpha, + const hipDoubleComplex& a, hipDoubleComplex& b) { + b = b + hipCmul(alpha, a); +} +#endif + template __device__ inline void sum(const T& /*alpha*/, const T& a, T& b) { b = b + a;