Function matrix_swap_openmp (o2scl)¶
-
template<class mat_t, class mat2_t, class data_t>
void o2scl::matrix_swap_openmp(size_t M, size_t N, mat_t &v1, mat2_t &v2)¶ Swap of the first \( (M,N) \) elements in two matrices (with OpenMP)
This function swaps the elements of
v1
andv2
, one element at a time.Note
This OpenMP swap is only faster for sufficiently large vectors (depending on the nature of the actual vector type).