|
HClib
0.3
Documentation for Habanero-C Library API
|
Accumulator API for reductions. More...
Data Structures | |
| struct | accum_t |
| Opaque type for accumulators. More... | |
| struct | accumed_t |
| Accumed clause. User-level data-structure to represent an accumulator clause. More... | |
Enumerations | |
| enum | accum_op_t { ACCUM_OP_NONE, ACCUM_OP_PLUS, ACCUM_OP_PROD, ACCUM_OP_MIN, ACCUM_OP_MAX, ACCUM_OP_LAND, ACCUM_OP_BAND, ACCUM_OP_LOR, ACCUM_OP_BOR, ACCUM_OP_LXOR, ACCUM_OP_BXOR } |
| Runtime-supported accumulator operations. | |
| enum | accum_mode_t { ACCUM_MODE_SEQ, ACCUM_MODE_LAZY, ACCUM_MODE_REC } |
| Accumulators' reduction modes. To specify the accumulation strategy an accumulator is backed by. | |
Functions | |
| void | accum_register (accum_t **accs, int n) |
| Register a list of accumulators in the current finish scope. More... | |
| accum_t * | accum_create_int (accum_op_t op, accum_mode_t mode, int init) |
| Allocate and initialize an 'int' accumulator. More... | |
| int | accum_get_int (accum_t *acc) |
| Get the value of an accumulator. More... | |
| void | accum_put_int (accum_t *acc, int v) |
| Contribute a value to an accumulator. More... | |
| accum_t * | accum_create_double (accum_op_t op, accum_mode_t mode, double init) |
| Allocate and initialize a 'double' accumulator. More... | |
| double | accum_get_double (accum_t *acc) |
| Get the value of an accumulator. More... | |
| void | accum_put_double (accum_t *acc, double v) |
| Contribute a value to an accumulator. More... | |
| void | accum_destroy (accum_t *acc) |
| Destroy an accumulator. More... | |
Accumulator API for reductions.
| accum_t* accum_create_double | ( | accum_op_t | op, |
| accum_mode_t | mode, | ||
| double | init | ||
| ) |
Allocate and initialize a 'double' accumulator.
| [in] | op | Operation to apply on reduction |
| [in] | mode | Accumulator backend implementation |
| [in] | init | Initial value of the accumulator |
Definition at line 853 of file accumulator.c.
| accum_t* accum_create_int | ( | accum_op_t | op, |
| accum_mode_t | mode, | ||
| int | init | ||
| ) |
Allocate and initialize an 'int' accumulator.
| [in] | op | Operation to apply on reduction |
| [in] | mode | Accumulator backend implementation |
| [in] | init | Initial value of the accumulator |
Definition at line 619 of file accumulator.c.
| void accum_destroy | ( | accum_t * | acc | ) |
Destroy an accumulator.
| [in] | acc | The accumulator to destroy |
Definition at line 987 of file accumulator.c.
| double accum_get_double | ( | accum_t * | acc | ) |
Get the value of an accumulator.
| [in] | acc | The accumulator to get the value from |
Definition at line 963 of file accumulator.c.
| int accum_get_int | ( | accum_t * | acc | ) |
Get the value of an accumulator.
| [in] | acc | The accumulator to get the value from |
Definition at line 933 of file accumulator.c.
| void accum_put_double | ( | accum_t * | acc, |
| double | v | ||
| ) |
Contribute a value to an accumulator.
| [in] | acc | The accumulator to put a value |
| [in] | v | The value to accumulate |
Definition at line 968 of file accumulator.c.
| void accum_put_int | ( | accum_t * | acc, |
| int | v | ||
| ) |
Contribute a value to an accumulator.
| [in] | acc | The accumulator to put a value |
| [in] | v | The value to accumulate |
Definition at line 938 of file accumulator.c.
| void accum_register | ( | accum_t ** | accs, |
| int | n | ||
| ) |
Register a list of accumulators in the current finish scope.
| [in] | accs | The accumulator list to register |
| [in] | v | The size of the list Warning/Limitation: this overwrites currently registered accum |
Definition at line 973 of file accumulator.c.
1.8.3.1