tag_partitioner Class Template Reference

Inherits CnC::default_partitioner< grainSize >.

List of all members.

Public Types

typedef range_is_tag_type split_type

Public Member Functions

template<typename Range, typename StepInstance>
void divide_and_originate (Range &range, StepInstance &si) const
 divide given range into in arbitrary number of ranges of type Range


Detailed Description

template<int grainSize = 0>
class CnC::tag_partitioner< grainSize >

Use this instead of default_partitioner if your tag is self-dividing (e.g. a range) and you want to use the partitioning mechanism through cnC::tag_collection::put_range

Definition at line 173 of file default_partitioner.h.


Member Typedef Documentation

typedef range_is_tag_type split_type

set to range_is_tag_type if tag is self-dividing, e.g. if the range-type is also the tag-type as passed to the step set to range_is_range_type if tag is undivisible, e.g. if range-type != step_type

Reimplemented from default_partitioner.

Definition at line 178 of file default_partitioner.h.


Member Function Documentation

void divide_and_originate ( Range &  range,
StepInstance &  si 
) const [inline]

divide given range into in arbitrary number of ranges of type Range

Call si.originate_range( r ) for each new range. The original - but modified - range is treated as unsplittable afterwards. It must *not* be passed to originate_range! If tag-types are self-dividing (e.g. if range-type == tag-type) you can call "originate" instead of "originate_range" for leaves of the recursive range-tree.

The aggregated set of the members of the sub-ranges applied to "t.originate[_range]" must equal the set of member in given range. Overlapping ranges or gaps may lead to arbitrary effects.

Parameters:
range the original range to split, may be altered
si opaque object, call t.Put( r, splittable ) for all sub-ranges

Reimplemented from default_partitioner.

Definition at line 204 of file default_partitioner.h.

00205     {
00206         divide_and_originate( range, si, grain_size( range.size() ) );
00207     }


The documentation for this class was generated from the following file:

Generated on Tue Aug 31 15:30:28 2010 for CnC by  doxygen 1.5.6