Template Function Pennylane::LightningQubit::Util::vecMatrixProd(const T *, const T *, T *, std::size_t, std::size_t)

Function Documentation

template<class T>
inline void Pennylane::LightningQubit::Util::vecMatrixProd(const T *v_in, const T *mat, T *v_out, std::size_t m, std::size_t n)

Calculates vector-matrix product.

Template Parameters

T – Floating point precision type.

Parameters
  • v_in – Data array repr. a vector of shape m * 1.

  • mat – Data array repr. a flatten (row-wise) matrix m * n.

  • v_out – Pre-allocated data array to store the result that is mat_t \times v_in where mat_t is transposed of mat.

  • m – Number of rows of mat.

  • n – Number of columns of mat.