Mojo 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.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!
😔 What went wrong?