For the complete documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /get-started.md).
Mojo module
reduction
Implements SIMD reductions.
You can import these APIs from the algorithm package. For example:
from max.algorithm import map_reduceFunctions
-
cumsum: Computes the cumulative sum of all elements in a buffer. dst[i] = src[i] + src[i-1] + ... + src[0]. -
map_reduce: Performs a vectorized map-reduce operation over a sequence. -
max: Computes the max element in a buffer. -
mean: Computes the mean value of the elements in a buffer. -
min: Computes the min element in a buffer. -
product: Computes the product of the buffer elements. -
reduce: Computes a custom reduction of buffer elements. -
sum: Computes the sum of buffer elements. -
variance: Given a mean, computes the variance of elements in a buffer.