Public Types | |
| typedef Tag | tag_type |
| the tag type | |
Public Member Functions | |
| template<class Derived> | |
| tag_collection (context< Derived > *ctxt, bool preserveTags=false) | |
| constructor which registers collection with given context | |
| void | put (const Tag &t) |
| prescribe the associated step. If we are preserving tags for this collection, make a copy of the tag and store it in the collection. | |
| void | put_range (const Range &r) |
| prescribe an entire range of tags | |
| template<typename Step, typename Tuner, typename Arg> | |
| error_type | prescribe (const Step &s, const Tuner &t, Arg &arg) |
| Declare the prescription relationship between a tag collection and a step collection. | |
| const_iterator | begin () const |
| returns begin() as in STL containers | |
| const_iterator | end () const |
| returns end() as in STL containers | |
| void | reset () |
| removes all of the tag instances from the collection | |
| size_t | size () |
| returns number of elements in collection | |
| bool | empty () |
| returns true if size()==0, false otherwise | |
Tag must provide copy and default constructors and the assigment operator.
If Tag is not convertable into size_t, a suitable hash_compare class must be provided which satisifies the requirements for tbb::concurrent_hash_map. The default cnc_tag_hash_compare works for types that can be converted to size_t and have an operator==. You can provide a specialized template for cnc_tag_hash_compare or specify and implement your own compatible class.
Definition at line 62 of file cnc.h.
| tag_collection | ( | context< Derived > * | ctxt, | |
| bool | preserveTags = false | |||
| ) | [inline] |
| void put | ( | const Tag & | t | ) |
prescribe the associated step. If we are preserving tags for this collection, make a copy of the tag and store it in the collection.
| t | the tag to be put |
| void put_range | ( | const Range & | r | ) |
prescribe an entire range of tags
| r | A range, which is potentially splittible through a partitioner. Following the TBB range/splittable concept, extended by STL container requirements, a range R must provide the following interface:
| |
| part | optionally a partitioner can be specified, |
| error_type prescribe | ( | const Step & | s, | |
| const Tuner & | t, | |||
| Arg & | arg | |||
| ) | [inline] |
Declare the prescription relationship between a tag collection and a step collection.
| s | class representing step collection. s is required to provide the following const method, where Arg a is the optional parameter described below. int execute( const Tag & tag, Arg & a ) const; | |
| tuner | You can use default_tuner or define your own tuner to specify the scheduling priority for the excution of a step, and also the data dependencies for the step. | |
| arg | This argument will be the parameter passed to Step::execute and the tuner methods. The object must exist as long as instances of the given step might be executed. Usually arg will be the containing context. |
| const_iterator begin | ( | ) | const |
returns begin() as in STL containers
| const_iterator end | ( | ) | const |
returns end() as in STL containers
1.5.6