| array | segsum (const array &input, const array &keys) |
| Segmented sum. | |
| array | accum (const array &input, int dim=-1, af_op_t op=SUM_T, bool isupcast=false) |
| accumulated sum | |
| array af::segsum | ( | const array & | input, |
| const array & | keys | ||
| ) |
Segmented sum.
| [in] | input | values to sum (treated as vector) |
| [in] | keys | The vector denoting segments |
| array af::accum | ( | const array & | input, |
| int | dim = -1, |
||
| af_op_t | op = SUM_T, |
||
| bool | isupcast = false |
||
| ) |
accumulated sum
| [in] | input | |
| [in] | dim | dimension along which to operate (-1 indicates first nonsingleton dimension) |
| [in] | op | accumulation type: SUM_T addition, PROD_T multiplication |
| [in] | isupcast | perform internal accumulation in double-precision if true (default false) |