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 package
algorithm
High performance data operations: parallelization, reduction, memory.
The algorithm package provides high-performance primitives for data-parallel
operations that run on both CPUs and accelerators. It includes tools for
parallelization (distributing work across multiple cores), elementwise and
stencil traversal, and reductions (aggregating values). These building blocks
enable efficient computational kernels without manual SIMD intrinsics or thread
management. The std.algorithm package retains the non-accelerator algorithms,
such as vectorization and tiling.
Use this package for large datasets, numerical algorithms, or compute-intensive code. For element-wise operations on small data, standard loops may be simpler.
Packagesβ
- β
backend: Provides CPU and GPU backend implementations for thealgorithmpackage.
Modulesβ
- β
functional: Implements higher-order functions. - β
memory: Implementsunsafe_parallel_memcpy. - β
reduction: Implements SIMD reductions.