pub unsafe fn pack_b<T: TropicalScalar>(
k: usize,
n: usize,
b: *const T,
ldb: usize,
layout: Layout,
trans: Transpose,
packed: *mut T,
nr: usize,
)Expand description
Pack a panel of matrix B into a contiguous buffer.
The packed format stores nc columns in row-major order within
blocks of nr columns.
§Layout
For B with dimensions k×n:
Original B (row-major, k=3, n=6, nr=4):
[ b00 b01 b02 b03 b04 b05 ]
[ b10 b11 b12 b13 b14 b15 ]
[ b20 b21 b22 b23 b24 b25 ]
Packed (row-major within k×nr blocks):
Block 0 (cols 0-3): b00 b01 b02 b03 | b10 b11 b12 b13 | b20 b21 b22 b23
Block 1 (cols 4-5): b04 b05 0 0 | b14 b15 0 0 | b24 b25 0 0§Safety
bmust point to valid memory for at leastk * ldborldb * nelementspackedmust have capacity for at least((n + nr - 1) / nr) * nr * kelements