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) -> ImmutTileTensor1D[dtype]
Views size contiguous elements at ptr as an ImmutTileTensor1D.
Parameters:
- mut (
Bool): Mutability ofptr's origin (inferred). - dtype (
DType): Element type of the viewed memory (inferred). - origin (
Origin[mut=mut]): Origin ofptr(inferred).
Args:
- ptr (
Pointer[Scalar[dtype], origin]): Pointer to the first element. - size (
Int): Number of elements.
Returns:
ImmutTileTensor1D[dtype]: An immutable, untracked-origin 1-D view over the elements.
def immut_tile_tensor_1d[dtype: DType, //](tensor: TileTensor[dtype, Engine=tensor.Engine, linear_idx_type=tensor.linear_idx_type]) -> ImmutTileTensor1D[dtype]
Views the contiguous elements of tensor as an ImmutTileTensor1D.
Parameters:
- dtype (
DType): Element type of the tensor (inferred).
Args:
- tensor (
TileTensor[dtype, Engine=tensor.Engine, linear_idx_type=tensor.linear_idx_type]): Tensor whose elements are viewed as one flat dimension.
Returns:
ImmutTileTensor1D[dtype]: An immutable, untracked-origin 1-D view over the elements.