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

immut_tile_tensor_1d

def immut_tile_tensor_1d[mut: Bool, dtype: DType, origin: Origin[mut=mut], //](ptr: Pointer[Scalar[dtype], origin], size: Int) -> TileTensor[dtype, Layout[TypeList[Int64](), TypeList[ComptimeInt[Int(1)]]()], ImmutAnyOrigin]

Views size contiguous elements at ptr as an ImmutTileTensor1D.

Parameters:

  • ​mut (Bool): Mutability of ptr's origin (inferred).
  • ​dtype (DType): Element type of the viewed memory (inferred).
  • ​origin (Origin[mut=mut]): Origin of ptr (inferred).

Args:

Returns:

TileTensor[dtype, Layout[TypeList[Int64](), TypeList[ComptimeInt[Int(1)]]()], ImmutAnyOrigin]: An immutable, untracked-origin 1-D view over the elements.

Was this page helpful?