Specifies that a parallel loop should recursively split its range until it cannot be further subdivided.

A simple_partitioner specifies that a loop template should recursively divide its range until for each subrange r, the condition !r.is_divisible() holds. This is the default behavior of the loop templates that take a range argument.

The simple_partitioner class satisfies the CopyConstructibe requirement from the ISO C++ [utility.arg.requirements] section.


When using simple_partitioner and a blocked_range for a parallel loop, make sure to specify an appropriate grain size for the blocked_range. The default grain size is 1, which may make the subranges much too small for efficient execution.

// Defined in header <tbb/partitioner.h>

namespace tbb {

   class simple_partitioner {
       simple_partitioner() = default;
       ~simple_partitioner() = default;


See also: