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 function
identity_compute_fn
def identity_compute_fn[dtype: DType, width: SIMDLength, *, alignment: Int](idx: IndexList[Int(2)], val: SIMD[dtype, width]) -> SIMD[dtype, width]
Returns val unchanged.
Stands in for an ElementwiseComputeFn argument on code paths that
apply no compute epilogue.
Parameters:
- dtype (
DType): Element dtype ofval. - width (
SIMDLength): SIMD width ofval. - alignment (
Int): Alignment ofvalin elements.
Args:
- idx (
IndexList[Int(2)]): Output coordinates, unused. - val (
SIMD[dtype, width]): Input value.
Returns:
SIMD[dtype, width]: val.