CnC
 All Classes Namespaces Functions Variables Typedefs Enumerator Friends Groups Pages
Classes | Enumerations | Functions | Variables
CnC Namespace Reference

CnC API. More...

Classes

class  step_collection
 A step collection is logical set of step instances. More...
class  tag_collection
 A tag collection is a set of tags of the same type. It is used to prescribe steps. By default, tags are not stored. More...
class  item_collection
 An item collection is a mapping from tags to items. More...
class  context
 CnC context bringing together collections (for steps, items and tags). More...
struct  debug
 Debugging interface providing tracing and timing capabilities. More...
class  tuner_base
struct  step_tuner
 Default (NOP) implementations of the step_tuner interface. More...
struct  pfor_tuner
 Default (NOP) implementations of the pfor_tuner interface. More...
class  cancel_tuner
 Step tuner with convenient cancelation capabilities. More...
struct  item_tuner
 Default implementations of the item-tuner interface for item-collections. More...
struct  hashmap_tuner
 The tuner base for hashmap-based item-tuners. More...
struct  vector_tuner
 The tuner base for vector-based item-tuners. More...
struct  tag_tuner
struct  preserve_tuner
struct  dist_cnc_init
class  serializable
class  explicitly_serializable
 Specifies serialization category: explicit serialization via a "serialize" function. More...
class  bitwise_serializable
 simple structs/classes are bitwise serializable. More...
class  chunk
 Serialization of arrays with and without automatic memory handling. More...
class  serializer
 Handles serilialization of data-objects. More...
class  default_partitioner
 Interface for partitioners: configuring how ranges are partitioned. More...
class  tag_partitioner

Enumerations

enum  {
  COMPUTE_ON_LOCAL = -2, COMPUTE_ON_ROUND_ROBIN = -3, COMPUTE_ON_ALL = -4, COMPUTE_ON_ALL_OTHERS = -5,
  PRODUCER_UNKNOWN = -6, PRODUCER_LOCAL = -7, CONSUMER_UNKNOWN = -8, CONSUMER_LOCAL = -9,
  CONSUMER_ALL = -10, CONSUMER_ALL_OTHERS = -11, NO_GETCOUNT = Internal::item_properties::NO_GET_COUNT, AFFINITY_HERE = Internal::scheduler_i::AFFINITY_HERE
}

Functions

template<class Index , class Functor >
void parallel_for (Index first, Index last, Index incr, const Functor &f)
 Execute f( i ) for every i in {first <= i=first+step*x < last and 0 <= x}.
template<class T >
explicitly_serializable serializer_category (const T *)
 CNC_BITWISE_SERIALIZABLE (bool)
 bool is bitwise serializable
 CNC_BITWISE_SERIALIZABLE (char)
 char is bitwise serializable
 CNC_BITWISE_SERIALIZABLE (signed char)
 signed char is bitwise serializable
 CNC_BITWISE_SERIALIZABLE (unsigned char)
 unsigend char is bitwise serializable
 CNC_BITWISE_SERIALIZABLE (short)
 short is bitwise serializable
 CNC_BITWISE_SERIALIZABLE (int)
 int is bitwise serializable
 CNC_BITWISE_SERIALIZABLE (long)
 long is bitwise serializable
 CNC_BITWISE_SERIALIZABLE (unsigned long long)
 unsigned long long is bitwise serializable
 CNC_BITWISE_SERIALIZABLE (float)
 float is bitwise serializable
 CNC_BITWISE_SERIALIZABLE (double)
 double is bitwise serializable
 CNC_BITWISE_SERIALIZABLE (long double)

Variables

const int CNC_Success = 0
 Steps return CNC_Success if execution was successful.
const int CNC_Failure = 1
 Steps return CNC_Failure if execution failed.

Detailed Description

CnC API.


Enumeration Type Documentation

anonymous enum
Enumerator:
COMPUTE_ON_LOCAL 

let tuner::compute_on return COMPUTE_ON_NO if the step should be executed locally

COMPUTE_ON_ROUND_ROBIN 

let tuner::compute_on return COMPUTE_ON_ROUND_ROBIN to let the scheduler distribute it in a round-robin fashion

COMPUTE_ON_ALL 

let tuner::compute_on return COMPUTE_ON_ALL if the step should be executed on all processes, as well as locally

COMPUTE_ON_ALL_OTHERS 

let tuner::compute_on return COMPUTE_ON_ALL_OTHERS if the step should be executed on all processes, but not locally

PRODUCER_UNKNOWN 

producer process of dependent item is unknown

PRODUCER_LOCAL 

producer process of dependent item is local process

CONSUMER_UNKNOWN 

consumer process of given item is unkown

CONSUMER_LOCAL 

consumer process of given item is the local process

CONSUMER_ALL 

all processes consume given item

CONSUMER_ALL_OTHERS 

all processes but this consume given item

NO_GETCOUNT 

no get-count specified

AFFINITY_HERE 

default affinity to current thread

Definition at line 48 of file default_tuner.h.

{
COMPUTE_ON_LOCAL = -2, ///< let tuner::compute_on return COMPUTE_ON_NO if the step should be executed locally
COMPUTE_ON_ROUND_ROBIN = -3, ///< let tuner::compute_on return COMPUTE_ON_ROUND_ROBIN to let the scheduler distribute it in a round-robin fashion
COMPUTE_ON_ALL = -4, ///< let tuner::compute_on return COMPUTE_ON_ALL if the step should be executed on all processes, as well as locally
COMPUTE_ON_ALL_OTHERS = -5, ///< let tuner::compute_on return COMPUTE_ON_ALL_OTHERS if the step should be executed on all processes, but not locally
PRODUCER_UNKNOWN = -6, ///< producer process of dependent item is unknown
PRODUCER_LOCAL = -7, ///< producer process of dependent item is local process
CONSUMER_UNKNOWN = -8, ///< consumer process of given item is unkown
CONSUMER_LOCAL = -9, ///< consumer process of given item is the local process
CONSUMER_ALL = -10, ///< all processes consume given item
CONSUMER_ALL_OTHERS = -11, ///< all processes but this consume given item
NO_GETCOUNT = Internal::item_properties::NO_GET_COUNT, ///< no get-count specified
AFFINITY_HERE = Internal::scheduler_i::AFFINITY_HERE ///< default affinity to current thread
};

Function Documentation

void CnC::parallel_for ( Index  first,
Index  last,
Index  incr,
const Functor &  f 
)

Execute f( i ) for every i in {first <= i=first+step*x < last and 0 <= x}.

For different values of i, function execution might occur in parallel. Returns functor object ocne all iterations have been executed. Type Index must support operator+. Executes on the local process only. No distribution to other processes supported.

Parameters:
firststarting index of parallel iteration
lastiteration stops before reaching last
incrincrement index by this value in each iteration
ffunction to be executed
tunerdefaults to pfor_tuner<>