Mojo trait
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[dst.dtype, dst.LayoutType, dst.origin, address_space=_Self.dst_address_space, linear_idx_type=dst.linear_idx_type, element_size=element_size], src: TileTensor[src.dtype, src.LayoutType, src.origin, 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): Destination tile indst_address_space. - src (
TileTensor): Source tile insrc_address_space.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!