- Main Page
- Tutorials
- Functions
- Release Notes
- Examples

Functions
accum
Complete List of ArrayFire Functions ArrayFire Functions by Category » Vector Algorithms » | Inclusive scan operations

Perform exclusive sum along specified dimension. More...

## Functions
AFAPI array | accum (const array &in, const int dim=0)
| C++ Interface exclusive sum (cumulative sum) of an array. More...
AFAPI af_err | af_accum (af_array *out, const af_array in, const int dim)
| C Interface exclusive sum (cumulative sum) of an array. More...

## Detailed Description

Perform exclusive sum along specified dimension.

This function performs the operation across all batches present in the input simultaneously.

## Function Documentation

AFAPI array af::accum | ( | const array & | in,
|  | const int | dim = `0`
| ) |  |

C++ Interface exclusive sum (cumulative sum) of an array.

Parameters

  [in] | in | is the input array
  [in] | dim | The dimension along which exclusive sum is performed

Returns
  the output containing exclusive sums of the input

Examples:
  binary_thresholding.cpp.

AFAPI af_err af_accum | ( | af_array * | out,
|  | const af_array | in,
|  | const int | dim
| ) |  |

C Interface exclusive sum (cumulative sum) of an array.

Parameters

  [out] | out | will contain exclusive sums of the input
  [in] | in | is the input array
  [in] | dim | The dimension along which exclusive sum is performed

Returns
  AF_SUCCESS if the execution completes properly