Template Function Pennylane::LightningQubit::Util::omp_matrixMatProd¶
Defined in File LinearAlgebra.hpp
Function Documentation¶
-
template<class T, std::size_t STRIDE = 2>
inline void Pennylane::LightningQubit::Util::omp_matrixMatProd(const std::complex<T> *m_left, const std::complex<T> *m_right, std::complex<T> *m_out, std::size_t m, std::size_t n, std::size_t k, Trans transpose)¶ Calculates matrix-matrix product using OpenMP.
Note
Consider transpose=true, to get a better performance. To transpose a matrix efficiently, check Util::Transpose
- Template Parameters
T – Floating point precision type.
STRIDE – Size of stride in the cache-blocking technique
- Parameters
m_left – Row-wise flatten matrix of shape m * k.
m_right – Row-wise flatten matrix of shape k * n.
m_out – Pre-allocated row-wise flatten matrix of shape m * n.
m – Number of rows of
m_left
.n – Number of columns of
m_right
.k – Number of rows of
m_right
.transpose – Whether use a transposed version of
m_right
.
api/function_LinearAlgebra_8hpp_1a8b30f10476cf6586c53d9c89af0d84e0
Download Python script
Download Notebook
View on GitHub