Skip to content

Commit 16deae1

Browse files
committed
minor bug fixed: replaced zdotc by self-implementation
1 parent 0fd13a6 commit 16deae1

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed

ChASE-MPI/blas_templates.inc

Lines changed: 0 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -189,40 +189,6 @@ double t_dot(const std::size_t n, const double* x, const std::size_t incx,
189189
return FC_GLOBAL(ddot, DDOT)(&n_, x, &incx_, y, &incy_);
190190
}
191191

192-
template <>
193-
std::complex<float> t_dot(const std::size_t n, const std::complex<float>* x,
194-
const std::size_t incx, const std::complex<float>* y,
195-
const std::size_t incy)
196-
{
197-
198-
BlasInt n_ = n;
199-
BlasInt incy_ = incy;
200-
BlasInt incx_ = incx;
201-
202-
struct complex result;
203-
result = FC_GLOBAL(cdotc, CDOTC)(&n_, x, &incx_, y, &incy_);
204-
struct complex* r = &result;
205-
return std::complex<float>(r->r, r->i);
206-
}
207-
208-
template <>
209-
std::complex<double> t_dot(const std::size_t n, const std::complex<double>* x,
210-
const std::size_t incx,
211-
const std::complex<double>* y,
212-
const std::size_t incy)
213-
{
214-
215-
BlasInt n_ = n;
216-
BlasInt incy_ = incy;
217-
BlasInt incx_ = incx;
218-
219-
struct zcomplex result;
220-
result = FC_GLOBAL(zdotc, ZDOTC)(&n_, x, &incx_, y, &incy_);
221-
struct zcomplex* r = &result;
222-
return std::complex<double>(r->r, r->i);
223-
}
224-
225-
/*
226192
// Dot is not worth the trouble to link to a blas function
227193
template <typename T>
228194
std::complex<T> t_dot(const std::size_t n, const std::complex<T>* x,
@@ -237,18 +203,6 @@ std::complex<T> t_dot(const std::size_t n, const std::complex<T>* x,
237203
return alpha;
238204
}
239205

240-
template <typename T>
241-
T t_dot(const std::size_t n, const T* x, const std::size_t incx, const T* y,
242-
const std::size_t incy) {
243-
T gamma;
244-
T alpha = 0;
245-
for (BlasInt i = 0; i < n; ++i) {
246-
alpha += (x[i * incx]) * y[i * incy];
247-
}
248-
return alpha;
249-
}
250-
*/
251-
252206
template <>
253207
double t_lange(char norm, std::size_t m, std::size_t n, double* A,
254208
std::size_t lda)

0 commit comments

Comments
 (0)