(XXX: arrived 20 minutes late. Only seem to have missed explanation of generic programming...Tough beans -- I am not likely to take notes on things about generic programming in general.) TBB uses a "pseudo-signature style" to communicate Concepts for template parameters to its constructs. They list the signatures of methods the template type must support. This is actually different from the style STL dudes use. Now that we're done with generic programming, let's talk about parallel_for. The signature: void parallel_for(const Range & r, const Body & b); Body expresses "how to to the work" (the loop body). Range is the current chunk of work. If range is "not too big", apply Body over Range in one thread. Otherwise, split the range and recurse. The array is "inside" the Body. (o rly? I missed that first time around.) Body is a closure that encapsulates the "old" serial loop body. The Body concept: Body::Body(const Body &) Body::~Body() void Body::operator(Range & r) const //EFFECTS: apply Body over Range The Range is part of a hierarchy of concepts: a Range is Splittable. TBB does a few things for us here: 1) Dividing work into nice sizes. 2) Manages a "right-sized" thread pool. The Splittable concept (is kinda cool): class split {}; Splittable::Splittable(Splittable & s, split) //The splitting constructor //EFF: Creates a new Splittable with the "right half" of s and modifies // s to be only its "left half". The Range concept: R::R(const R & r) R::~R bool R::empty() const bool R::is_divisible() const //EFF: true iff you can split the range. // Range with 1 element: not divisible but not empty. // Range with 0 elements: not divisible and not empty. R::R(R & r, split) //see Splittable A specific Body may impose additional requirements on the Range. Question: why take two arguments instead of a single "divisible unit of work"? The reason: parallel_for has insights into the performance of the running program and might make decisions about splitting or not splitting that the programmer didn't anticipate, so parallel_for needs access to the Range concept.