GEMV#

namespace librapid
namespace linalg#

Functions

template<typename Int, typename Alpha, typename A, typename X, typename Beta, typename Y>
void gemv(bool trans, Int m, Int n, Alpha alpha, A *a, Int lda, X *x, Int incX, Beta beta, Y *y, Int incY, backend::CPU backend = backend::CPU())

General matrix-vector multiplication.

Computes \( y = \alpha \mathrm{op}(\mathbf{A}) \mathbf{x} + \beta \mathbf{y} \) for matrix \( \mathbf{A} \) and vectors \( \mathbf{x} \) and \( \mathbf{y} \)

Template Parameters
  • Int – Integer type

  • Alpha – Alpha scaling factor

  • A – Matrix type

  • X – First vector type

  • Beta – Beta scaling factor

  • Y – Second vector type

Parameters
  • trans – If true, \( \mathrm{op}(\mathbf{A}) = \mathbf{A}^T \), otherwise \( \mathrm{op}(\mathbf{A}) = \mathbf{A} \)

  • m – Number of rows in \( \mathbf{A} \)

  • n – Number of columns in \( \mathbf{A} \)

  • alpha – Scaling factor for \( \mathrm{op}(\mathbf{A}) \mathbf{x} \)

  • a – Pointer to matrix \( \mathbf{A} \)

  • lda – Leading dimension of \( \mathbf{A} \)

  • x – Pointer to vector \( \mathbf{x} \)

  • incX – Increment of \( \mathbf{x} \)

  • beta – Scaling factor for \( \mathbf{y} \)

  • y – Pointer to vector \( \mathbf{y} \)

  • incY – Increment of \( \mathbf{y} \)

  • backend – Backend to use for computation

template<typename Int, typename Alpha, typename A, typename X, typename Beta, typename Y>
void gemv(bool trans, Int m, Int n, Alpha alpha, A *a, Int lda, X *x, Int incX, Beta beta, Y *y, Int incY, backend::CUDA)