$ for vl in 16 32 64; do $A64_QEMU -cpu max,sme-default-vector-length=$vl -L $A64_SYSROOT ./bin/05_sme; done
what it printed on the machine that wrote this lab
SME present. streaming VL = 128 bits -> ZA tile is 4 x 4 f32
trace of outer(x, ones) over the tile = 10 (expected sum 1..4 = 10)
SME present. streaming VL = 256 bits -> ZA tile is 8 x 8 f32
trace of outer(x, ones) over the tile = 36 (expected sum 1..8 = 36)
SME present. streaming VL = 512 bits -> ZA tile is 16 x 16 f32
trace of outer(x, ones) over the tile = 136 (expected sum 1..16 = 136)
$ a64run -cpu cortex-a57 ./bin/05_sme
what it printed on the machine that wrote this lab
no SME on this CPU (HWCAP2_SME clear); nothing to run
Read it: x = (1, 2, 3, ...), y = (1, 1, 1, ...); outer(x, y)[r][c] = x[r]
so the trace (diagonal sum) is 1 + 2 + ... + N with N = SVL / 32 bits.
10, 36, 136 at N = 4, 8, 16: the single fmopa did the whole N x N
product each time, and the code never mentioned N.