CnC
|
Default implementations of the item-tuner interface for item-collections. More...
Inherits tuner_base.
Classes | |
struct | item_allocator |
Class which manages item creation/uncreation.. More... | |
struct | table_type |
Defines the type of the internal data store. More... | |
Public Member Functions | |
template<typename Tag , typename Item , typename Coll > | |
void | init_table (TT< Tag, Item, Coll > &stbl) const |
Initialize the internal storage. More... | |
template<typename Tag > | |
int | get_count (const Tag &tag) const |
Allows specifying the number of gets to the given item. More... | |
template<typename Tag > | |
int | consumed_on (const Tag &tag) const |
Tells the scheduler on which process(es) this item is going to be consumed. More... | |
template<typename Tag > | |
int | produced_on (const Tag &tag) const |
Tells the scheduler on which process(es) this item is going to be produced. More... | |
Additional Inherited Members | |
![]() | |
static int | myPid () |
static int | numProcs () |
template<typename Ctxt > | |
static int | numThreads (const Ctxt &ctxt) |
returns number of threads used by scheduler in given context | |
Default implementations of the item-tuner interface for item-collections.
Usually you will not need to use this directly for anything else than documentation and interface.
Definition at line 435 of file default_tuner.h.
|
inline |
Tells the scheduler on which process(es) this item is going to be consumed.
return process id where the item will be consumed (get), or CONSUMER_UNKNOWN (default) or std::vector<int>, containing all ids of consuming processes. To indicate that the consumer processes are unknown, return an empty vector. The vector must contain special values like CONSUMER_LOCAL. If not CnC::CONSUMER_UKNOWN (or empty vector), this declaration will overwrite what the step-tuner might declare in depends. Providing this method leads to the most efficient communication pattern for to getting the data to where it is needed.
tag | the tag which identifies the item |
Definition at line 496 of file default_tuner.h.
|
inline |
Allows specifying the number of gets to the given item.
After get_count() many 'get()'s the item can be removed from the collection. By default, the item is not removed until the collection is deleted. Gets by the environment are ignored, use CnC::NO_GETCOUNT for items which are consumed by the environment.
tag | the tag which identifies the item |
Definition at line 479 of file default_tuner.h.
|
inline |
Initialize the internal storage.
Can be used to configure the storage table. Called in the collection constructor.
Definition at line 467 of file default_tuner.h.
|
inline |
Tells the scheduler on which process(es) this item is going to be produced.
return process id where the item will be produced. If unknown return CnC::PRODUCER_UNKNOWN. return PRODUCER_LOCAL if local process is the owner. Implementing this method reduces the communication cost for locating and sending data. Implementing item_tuner::consumed_on is more efficient, but might be more complicated. Will be evaluated only if item_tuner::consumed_on returns CnC::CONSUMER_UNKNOWN
tag | the tag which identifies the item |
Definition at line 510 of file default_tuner.h.