Skip to main content

function

cumsum

cumsum(dst: Buffer[type, size, address_space], src: Buffer[type, size, address_space])

Computes the cumulative sum of all elements in a buffer. dst[i] = src[i] + src[i-1] + ... + src[0].

Args:

  • dst (Buffer[type, size, address_space]): The buffer that stores the result of cumulative sum operation.
  • src (Buffer[type, size, address_space]): The buffer of elements for which the cumulative sum is computed.