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 strided_exec::Exec placement token as its last
parameter and splits the permutation within that budget. A copy of at most
MINTHREADLENGTH elements runs on the calling thread whatever the budget,
because a fan-out costs more than the copy. 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.
Constants§
- BLOCK_
MEMORY_ SIZE - CACHE_
LINE_ SIZE - MINTHREADLENGTH
- Minimum number of elements for a copy to fan out.
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]. - plan_
bilateral_ fusion - Plan bilateral dimension fusion for source and destination layouts.