Function matrix_transpose_openmp (o2scl)

O2scl : Function List

template<class mat_t, class mat2_t>
void o2scl::matrix_transpose_openmp(mat_t &src, mat2_t &dest)

Simple transpose (with OpenMP)

Copy the transpose of src to dest, resizing dest only if one of the two dimensions are too small.

This function will work for any classes mat_t and mat2_t which have suitably defined operator(), size(), and resize() methods.

Note

This OpenMP transpose is only faster for sufficiently large matrices (depending on the nature of the actual vector type).

template<class mat_t, class mat2_t>
void o2scl::matrix_transpose_openmp(size_t m, size_t n, mat_t &src, mat2_t &dest)

Simple transpose of the first \( (m,n) \) matrix elements (with OpenMP)

Copy the transpose of the first m rows and the first cols of the matrix src into the matrix dest

This function will work for any classes mat_t and mat2_t which has a suitably defined operator() method.

Note

This OpenMP transpose is only faster for sufficiently large matrices (depending on the nature of the actual vector type).

template<class mat_t, class data_t>
void o2scl::matrix_transpose_openmp(mat_t &src)

Simple in-place transpose (with OpenMP)

Transpose the matrix src . If the matrix is not square, only the upper-left square part of the matrix will be transposed.

This function will work for any classes mat_t and mat2_t which have suitably defined operator(), size(), and resize() methods.

Note

This OpenMP transpose is only faster for sufficiently large matrices (depending on the nature of the actual vector type).

template<class mat_t, class data_t>
void o2scl::matrix_transpose_openmp(size_t m, size_t n, mat_t &src)

Simple in-place transpose of the first \( (m,n) \) matrix elements (with OpenMP)

Copy the transpose of the first m rows and the first cols of the matrix src into the matrix dest

This function will work for any classes mat_t and mat2_t which has a suitably defined operator() method.

Note

This OpenMP transpose is only faster for sufficiently large matrices (depending on the nature of the actual vector type).

Warning

No checking is performed to ensure that the matrix has enough rows and columns to ensure that this makes sense, because not all matrix types have the same way of determining the matrix size).