Template Function Pennylane::LightningQubit::Util::omp_matrixMatProd

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.