Function matrix_transpose_openmp (o2scl)¶
-
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
srctodest, resizingdestonly if one of the two dimensions are too small.This function will work for any classes
mat_tandmat2_twhich have suitably definedoperator(),size(), andresize()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
mrows and the firstcolsof the matrixsrcinto the matrixdestThis function will work for any classes
mat_tandmat2_twhich has a suitably definedoperator()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_tandmat2_twhich have suitably definedoperator(),size(), andresize()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
mrows and the firstcolsof the matrixsrcinto the matrixdestThis function will work for any classes
mat_tandmat2_twhich has a suitably definedoperator()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).