From 16deae1747ca7408864e6b6e709d3c9850ea85ad Mon Sep 17 00:00:00 2001 From: Xinzhe Wu Date: Fri, 10 Mar 2023 13:39:53 +0100 Subject: [PATCH] minor bug fixed: replaced zdotc by self-implementation --- ChASE-MPI/blas_templates.inc | 46 ------------------------------------ 1 file changed, 46 deletions(-) diff --git a/ChASE-MPI/blas_templates.inc b/ChASE-MPI/blas_templates.inc index c47e2a08..4ad2cc8d 100644 --- a/ChASE-MPI/blas_templates.inc +++ b/ChASE-MPI/blas_templates.inc @@ -189,40 +189,6 @@ double t_dot(const std::size_t n, const double* x, const std::size_t incx, return FC_GLOBAL(ddot, DDOT)(&n_, x, &incx_, y, &incy_); } -template <> -std::complex t_dot(const std::size_t n, const std::complex* x, - const std::size_t incx, const std::complex* y, - const std::size_t incy) -{ - - BlasInt n_ = n; - BlasInt incy_ = incy; - BlasInt incx_ = incx; - - struct complex result; - result = FC_GLOBAL(cdotc, CDOTC)(&n_, x, &incx_, y, &incy_); - struct complex* r = &result; - return std::complex(r->r, r->i); -} - -template <> -std::complex t_dot(const std::size_t n, const std::complex* x, - const std::size_t incx, - const std::complex* y, - const std::size_t incy) -{ - - BlasInt n_ = n; - BlasInt incy_ = incy; - BlasInt incx_ = incx; - - struct zcomplex result; - result = FC_GLOBAL(zdotc, ZDOTC)(&n_, x, &incx_, y, &incy_); - struct zcomplex* r = &result; - return std::complex(r->r, r->i); -} - -/* // Dot is not worth the trouble to link to a blas function template std::complex t_dot(const std::size_t n, const std::complex* x, @@ -237,18 +203,6 @@ std::complex t_dot(const std::size_t n, const std::complex* x, return alpha; } -template -T t_dot(const std::size_t n, const T* x, const std::size_t incx, const T* y, - const std::size_t incy) { - T gamma; - T alpha = 0; - for (BlasInt i = 0; i < n; ++i) { - alpha += (x[i * incx]) * y[i * incy]; - } - return alpha; -} -*/ - template <> double t_lange(char norm, std::size_t m, std::size_t n, double* A, std::size_t lda)