-
Notifications
You must be signed in to change notification settings - Fork 0
Extract transpose-flip helper in bgemm_blas.rs #127
Copy link
Copy link
Open
Description
Summary
strided-einsum2/src/bgemm_blas.rs lines 408-437: when C is row-major, the GEMM is rewritten as C^T = B^T * A^T with inline transpose flag flipping logic. This is correct but adds cognitive load as an inline closure within do_batch.
Proposal
Extract the transpose-flip logic into a standalone helper function:
fn flip_transpose(t: CBLAS_TRANSPOSE) -> CBLAS_TRANSPOSE {
match t {
CblasNoTrans => CblasTrans,
CblasTrans => CblasNoTrans,
other => other,
}
}And separate the col-major vs row-major C dispatch into clearly named branches.
Risk
Low. Purely cosmetic refactoring for readability.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels