Skip to main content

Crate strided_perm

Crate strided_perm 

Source
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§

BilateralFusionPlan
Validated result of fusing adjacent dimensions that are contiguous in both source and destination layouts.

Enums§

FusionPlanError
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.