Expand description
Cache-efficient tensor permutation / transpose.
This crate provides optimized copy and permutation operations for strided
multidimensional arrays. It is designed as a single-responsibility crate
sitting between strided-view (data structures) and strided-kernel
(general map/reduce/broadcast operations).
§Dependency graph
strided-view -> strided-perm -> strided-kernel§Threading
Every copy takes a threadteam::Exec placement token as its last
parameter and splits the permutation within that budget. The width is
decided by the token: the serial time of the copy
(copy_ns_per_element times its elements) against the dispatch cost of one
section (Exec::width_for), so a copy too small to repay a fan-out runs on the
calling thread whatever the budget. The crate never reaches a global
pool; pass Exec::serial() for a copy on the calling thread.
Structs§
- Bilateral
Fusion Plan - Validated result of fusing adjacent dimensions that are contiguous in both source and destination layouts.
Enums§
- Fusion
Plan Error - Failure while validating or constructing a bilateral fusion plan.
- Host
Class - The class of the machine, keyed by the kernel dispatch it will take.
Constants§
Functions§
- copy_
into - Copy elements from source to destination:
dest[i] = src[i]. - copy_
into_ col_ major - Copy elements to a col-major destination.
- copy_
into_ uninit - Copy elements into an uninitialized destination:
dest[i] = src[i]. - copy_
ns_ per_ element - Serial throughput of a copy in nanoseconds per element on this host
(
copy_ns_per_element_ofofHostClass::detect). - copy_
ns_ per_ element_ of - Serial throughput of a copy in nanoseconds per element, of a host class.
- plan_
bilateral_ fusion - Plan bilateral dimension fusion for source and destination layouts.