product (matrix-vector)
Header: <pressio/ops.hpp>
API
namespace pressio { namespace ops{
// op(A) = A
template <
class A_type, class x_type, class y_type,
class alpha_t, class beta_t
>
void product(::pressio::nontranspose /*unused*/,
const alpha_t & alpha,
const A_type & A,
const x_type & x,
const beta_t & beta,
y_type & y);
// op(A) = A , construct result
template <
class y_type, class A_type, class x_type, class alpha_t
>
y_type product(::pressio::nontranspose mode,
const alpha_t & alpha,
const A_type & A,
const x_type & x);
// op(A) = A^T
template <
class y_type, class A_type, class x_type, class alpha_t
>
void product(::pressio::transpose /*unused*/,
const alpha_t & alpha,
const A_type & A,
const x_type & x,
const beta_t & beta,
y_type & y);
// op(A) = A^T , construct result
template <class y_type, class A_type, class x_type, class alpha_t>
y_type product(::pressio::transpose mode,
const alpha_t & alpha,
const A_type & A,
const x_type & x);
}} // end namespace pressio::ops
Description
Performs matrix-vector multiplication according to
y = beta * y + alpha * op(A) * x*op(A)indicates eitherAorA^Talpha_tandbeta_tare scalar typesx_typeandy_typeare rank-1 containersA_typeis a rank-2 containerThe following combinations of container types are supported for each
A_type:Eigen
All container types are either Eigen containers or Pressio expressions of Eigen containers,
Kokkos
All container types are either Kokkos views or Pressio expressions of Eigen views
Teuchos (does not support constructed results)
A_typeis a rank-2 Teuchos containerx_typeandy_typeare rank-1 Eigen containers
Tpetra
A_typeis a rank-2 Tpetra containerx_typeis a rank-1 Eigen, Kokkos, Teuchos, or Tpetra containery_typeis a rank-1 container. Ifx_typeis Tpetra, it may be either a Kokkos or Eigen container (or a Pressio expression of a Kokkos or Eigen container) Otherwise,y_typeis a Tpetra container or a Pressio column expression
Tpetra Block
A_typeis a rank-2 Tpetra Block containerx_typeis a rank-1 Eigen, Kokkos, Teuchos, or Tpetra Block containery_typeis a rank-1 container. Ifx_typeis a Tpetra Block vector,y_typemay be either an Eigen vector or a rank-1 Kokkos view Otherwise,y_typeis a Tpetra Block vector or column expression