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

Function Documentation

template<class T, size_t BLOCKSIZE = 16>
static inline void Pennylane::LightningQubit::Util::CFTranspose(const T *mat, T *mat_t, size_t m, size_t n, size_t m1, size_t m2, size_t n1, size_t n2)

Calculates transpose of a matrix recursively and Cache-Friendly using blocking and Cache-optimized techniques.

Template Parameters
  • T – Floating point precision type.

  • BLOCKSIZE – Size of submatrices in the blocking technique.

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

  • mat_t – Pre-allocated data array to store the transpose of mat.

  • m – Number of rows of mat.

  • n – Number of columns of mat.

  • m1 – Index of the first row.

  • m2 – Index of the last row.

  • n1 – Index of the first column.

  • n2 – Index of the last column.