void operator()( const tbb::concurrent_vector<int>::range_type& range ) const {
     for( iterator i=range.begin(); i!=range.end(); ++i ) {
         if( *i!=0 )
             std::printf("ERROR for v[%ld]\n", long(i-base));
         *i = int(i-base);
     }
 }
 void operator()( const tbb::concurrent_vector<int>::const_range_type& range ) const {
     for( iterator i=range.begin(); i!=range.end(); ++i )
         if( *i != int(i-base) )
             REPORT("ERROR for v[%ld]\n", long(i-base));
 }
Пример #3
0
void MR::do_sort(tbb::concurrent_vector<Pair> &vec) {
  tbb::parallel_sort(vec.begin(), vec.end(), compare);
}