For the complete Mojo documentation index, see llms.txt. Markdown versions of all pages are available by appending .md to any URL (e.g. /docs/manual/basics.md).
TileCopier
Trait for copying a TileTensor from one address space to another.
Implementors move a source TileTensor in src_address_space into a
destination TileTensor in dst_address_space. The two address
spaces are advertised as compile-time fields on the implementor so
callers can introspect what a given copier is wired to do.
Implemented traits
comptime members
dst_address_space
comptime dst_address_space
Destination AddressSpace the copier writes to.
src_address_space
comptime src_address_space
Source AddressSpace the copier reads from.
Required methods
copy
copy[element_size: Int](self: _Self, dst: TileTensor[address_space=_Self.dst_address_space, linear_idx_type=dst.linear_idx_type, element_size=element_size], src: TileTensor[address_space=_Self.src_address_space, linear_idx_type=src.linear_idx_type, element_size=element_size])
Copies src into dst.
Both tensors must share the same element_size so the copy
operates on matching logical element widths.
Parameters:
- element_size (
Int): Number of scalar elements per logical element.
Args:
- dst (
TileTensor[address_space=_Self.dst_address_space, linear_idx_type=dst.linear_idx_type, element_size=element_size]): Destination tile indst_address_space. - src (
TileTensor[address_space=_Self.src_address_space, linear_idx_type=src.linear_idx_type, element_size=element_size]): Source tile insrc_address_space.