January 2018
Intermediate to advanced
374 pages
9h 53m
English
The first part copies the elements in chunks, resulting in the sparse destination illustrated in the following figure. Each chunk is conditionally copied in parallel, and the resulting range iterators are stored in the future for later retrieval:

template <typename SrcIt, typename DstIt, typename Pred>
auto par_copy_if_split(SrcIt first,SrcIt last,DstIt dst,Pred pred,size_t chunk_sz){
// Part #1: Perform conditional copy in parallel auto n = static_cast<size_t>(std::distance(first, ...