parallel_for_each テンプレート関数

概要

std::for_each の並列バージョン。

ヘッダー

#include "tbb/parallel_for_each.h"

構文

template<typename InputIterator, typename Func> 
void parallel_for_each (InputIterator first, InputIterator last, 
                        const Func& f
                        [, task_group_context& group]);

説明

parallel_for_each(first,last,f) は、f を範囲 [first,last) 内のすべてのイテレーターの逆参照の結果に並列に適用します。 PPL との互換性のために提供されており、"フィーダー" 機能のない parallel_do(first,last,f) と等価です。

group 引数が指定されている場合、アルゴリズムのタスクはこのグループで実行されます。 デフォルトでは、アルゴリズムは自身がバインドされているグループで実行されます。