11#ifndef TLAPACK_BLAS_SYR_HH
12#define TLAPACK_BLAS_SYR_HH
52 const idx_t n = nrows(
A);
60 for (idx_t j = 0; j < n; ++j) {
62 for (idx_t i = 0; i <= j; ++i)
63 A(i, j) +=
x[i] *
tmp;
67 for (idx_t j = 0; j < n; ++j) {
69 for (idx_t i = j; i < n; ++i)
70 A(i, j) +=
x[i] *
tmp;
75#ifdef TLAPACK_USE_LAPACKPP
87 auto A_ = legacy_matrix(
A);
88 auto x_ = legacy_vector(
x);
94 return ::blas::syr((::blas::Layout)L, (::blas::Uplo)
uplo, n,
alpha,
x_.ptr,
#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_LEGACY_MATRIX
Macro for tlapack::concepts::LegacyMatrix compatible with C++17.
Definition concepts.hpp:951
#define TLAPACK_VECTOR
Macro for tlapack::concepts::Vector compatible with C++17.
Definition concepts.hpp:906
#define TLAPACK_MATRIX
Macro for tlapack::concepts::Matrix compatible with C++17.
Definition concepts.hpp:896
void syr(Uplo uplo, const alpha_t &alpha, const vectorX_t &x, matrixA_t &A)
Symmetric matrix rank-1 update:
Definition syr.hpp:45
#define tlapack_check_false(cond)
Throw an error if cond is true.
Definition exceptionHandling.hpp:113
Concept for types that represent tlapack::Uplo.
Sort the numbers in D in increasing order (if ID = 'I') or in decreasing order (if ID = 'D' ).
Definition arrayTraits.hpp:15
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
Uplo
Definition types.hpp:50
@ Upper
0 <= i <= j, 0 <= j <= n.
@ Lower
0 <= i <= m, 0 <= j <= i.
Layout
Definition types.hpp:29