|
CnC
|
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 tuner interface. 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 } |
Functions | |
| template<class Index , class Functor > | |
| Functor | parallel_for (Index first, Index last, Index incr, const Functor &f, bool gets_items=true) |
| 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. | |
CnC API.
| anonymous enum |
Definition at line 47 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
};
| Functor CnC::parallel_for | ( | Index | first, |
| Index | last, | ||
| Index | incr, | ||
| const Functor & | f, | ||
| bool | gets_items = true |
||
| ) |
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.
| first | starting index of parallel iteration |
| last | iteration stops before reaching last |
| incr | increment index by this value in each iteration |
| f | function to be executed |
| gets_items | true (default) if function gets items, false otherwise (might perform better) |
1.7.3