IMPORTANT: To view this page as Markdown, append `.md` to the URL (e.g. /get-started.md). For the complete documentation index, see llms.txt.
Skip to main content
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

reduce_op

Reduction monoid traits — the device-agnostic author surface.

A reduction algorithm is authored as a struct conforming to ReduceOp: inlined state fields, __init__ (identity), accumulate[w] (SIMD-tile fold), join (sequential combine), and optionally join_parallel[R: Reducer] (parallel combine). How participants cooperate and how the parallel scope is defined live in the Reducer impls.

Traits​

  • ​ReduceOp: Trait for an associative reduction monoid (identity + associative join).
  • ​Reducer: Parallel scalar reducer over the closed set of associative ops.

Was this page helpful?