11#ifndef TLAPACK_BLAS_AXPY_HH
12#define TLAPACK_BLAS_AXPY_HH
30 class T = type_t<vectorY_t>,
31 disable_if_allow_optblas_t<pair<alpha_t, T>,
33 pair<vectorY_t, T> > = 0>
39 const idx_t n = size(
x);
44 for (idx_t i = 0; i < n; ++i)
48#ifdef TLAPACK_USE_LAPACKPP
53 class T = type_t<vectorY_t>,
54 enable_if_allow_optblas_t<pair<alpha_t, T>,
56 pair<vectorY_t, T> > = 0>
57void axpy(
const alpha_t alpha,
const vectorX_t& x, vectorY_t& y)
60 auto x_ = legacy_vector(x);
61 auto y_ = legacy_vector(y);
67 if (alpha == alpha_t(0))
69 "Infs and NaNs in x will not propagate to y on output");
71 return ::blas::axpy(n, alpha, x_.ptr, x_.inc, y_.ptr, y_.inc);
#define TLAPACK_SCALAR
Macro for tlapack::concepts::Scalar compatible with C++17.
Definition concepts.hpp:915
#define TLAPACK_LEGACY_VECTOR
Macro for tlapack::concepts::LegacyVector compatible with C++17.
Definition concepts.hpp:954
#define TLAPACK_VECTOR
Macro for tlapack::concepts::Vector compatible with C++17.
Definition concepts.hpp:906
void axpy(const alpha_t &alpha, const vectorX_t &x, vectorY_t &y)
Add scaled vector, .
Definition axpy.hpp:34
#define tlapack_check_false(cond)
Throw an error if cond is true.
Definition exceptionHandling.hpp:113
#define tlapack_warning(info, detailedInfo)
Warning handler.
Definition exceptionHandling.hpp:156
typename traits::real_type_traits< Types..., int >::type real_type
The common real type of the list of types.
Definition scalar_type_traits.hpp:113