Skip to main content

Mojo module

functional

Implements higher-order functions.

You can import these APIs from the algorithm package. For example:

from std.algorithm import map

comptime values

stencil

comptime stencil = _stencil_impl_cpu

CPU implementation of stencil computation.

stencil_gpu

comptime stencil_gpu = _stencil_impl_gpu

GPU implementation of stencil computation.

Functions

  • elementwise: Executes func[width, rank](indices), possibly as sub-tasks, for a suitable combination of width and indices so as to cover shape. Returns when all sub-tasks have completed.

Was this page helpful?