Computes the logical { outer, inner } shape of a matrix param from its
dependsOn and dims — inner doubles as the minimum valid value for
whichever ld* field it depends on. Returns null for non-matrix specs
(no ld* in dependsOn).
dependsOn has a trans* field and "k" → Level 3 matrix whose shape
swaps between (dim1,k)/(k,dim1) with its own trans flag, where dim1 is
whichever of "m"/"n" appears first in dependsOn — e.g. ["m","k", "lda","transA"] (sgemm's A) is (m,k)/(k,m); ["k","n","ldb","transB"]
(sgemm's B) is (k,n)/(n,k); ["n","k","lda","trans"] (ssyrk's A, no
separate m — its own n plays that role) is (n,k)/(k,n) — the array's own
order carries the distinction, not the specific field/ld names, since a
field name alone (e.g. "ldb") isn't enough — ssyr2k's B also depends
on "ldb" but is (n,k)-shaped like an A, not (k,n)-shaped like sgemm's B.
dependsOn has "m" and "n" (no trans) → plain matrix: m×n
(row-major) or n×m (column-major) — sgemv/ssyr2/etc.'s A, sgemm's C.
dependsOn has "n" alone → symmetric: square n×n (ssymv/ssyr's A).
dependsOn has "side" (and "m"/"n") → symmetric whose order is
picked by dims.side at read time — m ('left') or n ('right') —
e.g. ssymm's A. Square either way, so layout doesn't affect the shape.
Shared by ndArrayLen (array sizing) and buildArb (fixtures, to chain
ld* in [inner, inner+pad]) so the two never drift apart.
Computes the logical
{ outer, inner }shape of a matrix param from itsdependsOnanddims—innerdoubles as the minimum valid value for whicheverld*field it depends on. Returnsnullfor non-matrix specs (nold*independsOn).dependsOnhas atrans*field and"k"→ Level 3 matrix whose shape swaps between (dim1,k)/(k,dim1) with its own trans flag, wheredim1is whichever of"m"/"n"appears first independsOn— e.g.["m","k", "lda","transA"](sgemm's A) is (m,k)/(k,m);["k","n","ldb","transB"](sgemm's B) is (k,n)/(n,k);["n","k","lda","trans"](ssyrk's A, no separate m — its own n plays that role) is (n,k)/(k,n) — the array's own order carries the distinction, not the specific field/ld names, since a field name alone (e.g."ldb") isn't enough — ssyr2k's B also depends on"ldb"but is (n,k)-shaped like an A, not (k,n)-shaped like sgemm's B.dependsOnhas"m"and"n"(no trans) → plain matrix: m×n (row-major) or n×m (column-major) — sgemv/ssyr2/etc.'s A, sgemm's C.dependsOnhas"n"alone → symmetric: square n×n (ssymv/ssyr's A).dependsOnhas"side"(and"m"/"n") → symmetric whose order is picked bydims.sideat read time — m ('left') or n ('right') — e.g. ssymm's A. Square either way, so layout doesn't affect the shape.Shared by
ndArrayLen(array sizing) andbuildArb(fixtures, to chainld*in[inner, inner+pad]) so the two never drift apart.