bfloat16 (Brain Floating Point)

Optional width. Off unless -DVECMAT_ENABLE_BF16=ON. It does not change vm_float_t, vm_gemm, or abi.h. Include vecmat/bf16.h directly. vecmat.h does not include it. With the switch off the header is not installed, and vm_gemm_bf16f32 is not a symbol.

vm_bf16_t is bfloat16 bits in a uint16_t. VM_CPU_ARM_BF16 is defined but not probed in core; a vendor module owns the probe for its kernels. vm_bf16_from_f32 rounds ties to even. Inf stays inf. Every NaN becomes 0x7fc0.

vm_gemm_bf16f32 is row-major, no transpose:

void vm_gemm_bf16f32(
    float *c, int ldc,
    const vm_bf16_t *a, int lda,
    const vm_bf16_t *b, int ldb,
    int m, int n, int k,
    float alpha, float beta);

c is f32. a and b are bf16. Leading dimensions are in elements of their own type. This is not vm_gemm. Accumulators are f32. A long k is not offered as a bf16 dot.

vm_bf16_init() installs the scalar slot and calls the generated vm_bf16_modules_register(). A module overrides with vm_bf16_set_gemm(). vm_bf16_note() returns bf16=scalar until then. That note is not vm_cpu_note(). VECMAT_FORCE_ISA does not select this slot.