Template Function Pennylane::Util::omp_matrixMatProd¶
Defined in File LinearAlgebra.hpp
Function Documentation¶
-
template<class T, size_t STRIDE = 2>
inline void Pennylane::Util::omp_matrixMatProd(const std::complex<T> *m_left, const std::complex<T> *m_right, std::complex<T> *m_out, size_t m, size_t n, 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_1a27219f843ef00f40e354aef1208cf8d1
Download Python script
Download Notebook
View on GitHub