C++
C#
VB
JScript
All

# parallel_copy

Copyright (C) 2005 IENT-RWTH Aachen

template<class RanIt,class OutIt> OutIt parallel_copy(RanIt begin,RanIt end,OutIt out,int grain)
template<class G1,class G2> void parallel_copy(const Vector<G1> &X, Vector<G2> &Y,int grain)
template<class G1,class G2> void parallel_copy(const Vector<G1> &X, Vector<G2> &Y)
template<class G1,class G2> void parallel_copy(const Matrix<G1> &X, Matrix<G2> &Y,int grain)
template<class G1,class G2> void parallel_copy(const Matrix<G1> &X, Matrix<G2> &Y)

Assigns the values of elements from a source range to a destination range.

Parameters

begin | Random access iterator addressing the position of the first element in the source range.
end | Random access iterator addressing the position one past the final element in the source range.
out | Random access iterator addressing the position of the first element in the destination range.
grain | Number of iteration for a reasonable chunk to deal out to a thread. If no value given, the range is subdivided in num_threads() chunks.
X | Source range.
Y | Destination range.

Returns

An output iterator addressing the position that is one past the final element in the destination range

Example

    DenseMatrix<ucharImage::index_type>::self M;
    gmt::parallel_copy(motion<8,8>(X,Y,32,32),M,X.ncols()/8);

See Also

parallel_for, parallel_reduce