Function vector_copy_openmp (o2scl)¶
-
template<class vec_t, class vec2_t>
void o2scl::vector_copy_openmp(const vec_t &src, vec2_t &dest)¶ Simple vector copy (with OpenMP)
Copy
srctodest, resizingdestonly if it is too small to holdsrc.size()elements.This function will work for any classes
vec_tandvec2_twhich have suitably definedoperator[],size(), andresize()methods.Note
This OpenMP copy is only faster for sufficiently large vectors (depending on the nature of the actual vector type).
-
template<class vec_t, class vec2_t>
void o2scl::vector_copy_openmp(size_t N, const vec_t &src, vec2_t &dest)¶ Simple vector copy of the first N elements (with OpenMP)
Copy the first
Nelements ofsrctodest. It is assumed that the memory allocation fordesthas already been performed.This function will work for any class
vec2_twhich has an operator[] which returns a reference to the corresponding element and classvec_twith an operator[] which returns either a reference or the value of the corresponding element.Note
This OpenMP copy is only faster for sufficiently large vectors (depending on the nature of the actual vector type).