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 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 of val.
  • ​width (SIMDLength): SIMD width of val.
  • ​alignment (Int): Alignment of val in elements.

Args:

Returns:

SIMD[dtype, width]: val.

Was this page helpful?