Function arm_nn_size_add

Function Documentation

static int64_t arm_nn_size_add(const int64_t acc, const int64_t addend)

Add to a running buffer-size product, reporting overflow as -1.

Companion to arm_nn_size_mul() for the sizers that append a fixed slack term.

Note

Same sentinel caveat as arm_nn_size_mul() - see its note for the full split, including why the four SVDF f32/f16 staging queries use this -1 family rather than the 0-returning arm_nn_checked_size_mul() / arm_nn_size_to_i32_or_zero() family that most other float sizers use.

Parameters:
  • acc[in] Running product, or -1 if an earlier step already overflowed.

  • addend[in] Value to add. Must be non-negative.

Returns:

acc + addend, or -1 if acc is already -1 or the sum exceeds INT32_MAX.