BLAS++ 2024.05.31
BLAS C++ API
Loading...
Searching...
No Matches
trmv: Triangular matrix-vector multiply

\(x = Ax\) More...

Functions

template<typename TA , typename TX >
void blas::trmv (blas::Layout layout, blas::Uplo uplo, blas::Op trans, blas::Diag diag, int64_t n, TA const *A, int64_t lda, TX *x, int64_t incx)
 Triangular matrix-vector multiply:
 
void blas::trmv (blas::Layout layout, blas::Uplo uplo, blas::Op trans, blas::Diag diag, int64_t n, float const *A, int64_t lda, float *x, int64_t incx)
 CPU, float version.
 
void blas::trmv (blas::Layout layout, blas::Uplo uplo, blas::Op trans, blas::Diag diag, int64_t n, double const *A, int64_t lda, double *x, int64_t incx)
 CPU, double version.
 
void blas::trmv (blas::Layout layout, blas::Uplo uplo, blas::Op trans, blas::Diag diag, int64_t n, std::complex< float > const *A, int64_t lda, std::complex< float > *x, int64_t incx)
 CPU, complex<float> version.
 
void blas::trmv (blas::Layout layout, blas::Uplo uplo, blas::Op trans, blas::Diag diag, int64_t n, std::complex< double > const *A, int64_t lda, std::complex< double > *x, int64_t incx)
 CPU, complex<double> version.
 

Detailed Description

\(x = Ax\)

Function Documentation

◆ trmv()

template<typename TA , typename TX >
void blas::trmv ( blas::Layout  layout,
blas::Uplo  uplo,
blas::Op  trans,
blas::Diag  diag,
int64_t  n,
TA const *  A,
int64_t  lda,
TX *  x,
int64_t  incx 
)

Triangular matrix-vector multiply:

\[ x = op(A) x, \]

where \(op(A)\) is one of \(op(A) = A\), \(op(A) = A^T\), or \(op(A) = A^H\), x is a vector, and A is an n-by-n, unit or non-unit, upper or lower triangular matrix.

Generic implementation for arbitrary data types.

Parameters
[in]layoutMatrix storage, Layout::ColMajor or Layout::RowMajor.
[in]uploWhat part of the matrix A is referenced, the opposite triangle being assumed to be zero.
  • Uplo::Lower: A is lower triangular.
  • Uplo::Upper: A is upper triangular.
[in]transThe operation to be performed:
  • Op::NoTrans: \(x = A x\),
  • Op::Trans: \(x = A^T x\),
  • Op::ConjTrans: \(x = A^H x\).
[in]diagWhether A has a unit or non-unit diagonal:
  • Diag::Unit: A is assumed to be unit triangular. The diagonal elements of A are not referenced.
  • Diag::NonUnit: A is not assumed to be unit triangular.
[in]nNumber of rows and columns of the matrix A. n >= 0.
[in]AThe n-by-n matrix A, stored in an lda-by-n array [RowMajor: n-by-lda].
[in]ldaLeading dimension of A. lda >= max(1, n).
[in,out]xThe n-element vector x, in an array of length (n-1)*abs(incx) + 1.
[in]incxStride between elements of x. incx must not be zero. If incx < 0, uses elements of x in reverse order: x(n-1), ..., x(0).