CnC
 All Classes Namespaces Functions Variables Typedefs Enumerator Friends Groups Pages
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 >
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 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 were it is needed.
template<typename Tag >
int produced_on (const Tag &tag) const
 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.

Additional Inherited Members

- Static Public Member Functions inherited from tuner_base
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

Detailed Description

template<template< typename T, typename I > 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 398 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 were it is needed.

Parameters:
tagthe tag which identifies the item

Definition at line 434 of file default_tuner.h.

{
}
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.

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

Definition at line 418 of file default_tuner.h.

{
return NO_GETCOUNT;
}
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 447 of file default_tuner.h.

{
}

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