CnC
 All Classes Namespaces Functions Variables Typedefs Enumerator Friends
Classes | Public Member Functions
item_tuner< TT > Struct Template Reference

Default implementations of the item-tuner interface for item-collections. More...

List of all members.

Classes

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.
template<typename Tag >
int get_count (const Tag &tag) const
 Allows specifying the number of gets to the given item.
template<typename Tag >
int consumed_on (const Tag &tag) const
 Tells the scheduler on which process(es) this item is going to be consumed.
template<typename Tag >
int produced_on (const Tag &tag) const
 Tells the scheduler on which process(es) this item is going to be produced.

Detailed Description

template<template< typename T, typename I, typename A > class TT>
struct CnC::item_tuner< TT >

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 434 of file default_tuner.h.


Member Function Documentation

int consumed_on ( const Tag &  tag) const [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.

Parameters:
tagthe tag which identifies the item

Definition at line 481 of file default_tuner.h.

        {
            return CONSUMER_UNKNOWN;
        }
int get_count ( const Tag &  tag) const [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.

Parameters:
tagthe tag which identifies the item
Returns:
number of expected gets to this item, or CNC::NO_GETCOUNT

Definition at line 464 of file default_tuner.h.

        {
            return NO_GETCOUNT;
        }
void init_table ( TT< Tag, Item, Coll > &  stbl) const [inline]

Initialize the internal storage.

Can be used to configure the storage table. Called in the collection constructor.

Definition at line 452 of file default_tuner.h.

        {}
int produced_on ( const Tag &  tag) const [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

Parameters:
tagthe tag which identifies the item

Definition at line 495 of file default_tuner.h.

        {
            return PRODUCER_UNKNOWN;
        }

The documentation for this struct was generated from the following file:
 All Classes Namespaces Functions Variables Typedefs Enumerator Friends