本文整理汇总了C++中tbb::concurrent_vector::begin方法的典型用法代码示例。如果您正苦于以下问题:C++ concurrent_vector::begin方法的具体用法?C++ concurrent_vector::begin怎么用?C++ concurrent_vector::begin使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类tbb::concurrent_vector
的用法示例。
在下文中一共展示了concurrent_vector::begin方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: operator
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);
}
}
示例2: Vector
Vector(const Vector &orig)
: isize(orig.isize) {
this->isize = orig.isize;
data_m.resize(orig.data_m.size());
#if defined(ATL_CONCURRENCY_ENABLED)
for (int i = 0; i < data_m.size(); i++) {
data_m[i] = orig.data_m[i];
}
#else
data_m.insert(data_m.begin(), orig.data_m.begin(), orig.data_m.end());
#endif
}
示例3: defined
Vector& operator=(const Vector &other) {
this->isize = other.isize;
data_m.resize(other.data_m.size());
#if defined(ATL_CONCURRENCY_ENABLED)
for (int i = 0; i < data_m.size(); i++) {
data_m[i] = other.data_m[i];
}
#else
data_m.insert(data_m.begin(), other.data_m.begin(), other.data_m.end());
#endif
return *this;
}
示例4: operator
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));
}
示例5: do_sort
void MR::do_sort(tbb::concurrent_vector<Pair> &vec) {
tbb::parallel_sort(vec.begin(), vec.end(), compare);
}