A cooperative matrix is a value type parameterized by tile size (M×N), scalar element type T, and a role R. The role determines how the matrix participates in a multiply-accumulate operation (A * B + C):
A: Left operand. Shape is M×K.B: Right operand. Shape is K×N.C: Accumulator/result. Shape is M×N.
Important: Roles are part of the type and are not interchangeable. You must use combinations of (M, N, T, R) that are explicitly supported by the hardware, which can be queried via Adapter::cooperative_matrix_properties.
// Example: 8x8 single-precision tiles
alias CoopMatA = coop_mat8x8<f32, A>;
alias CoopMatB = coop_mat8x8<f32, B>;
alias CoopMatC = coop_mat8x8<f32, C>;
// Example: 16x16 mixed precision (f16 inputs, f32 accumulator)
alias CoopMat16x16A = coop_mat16x16<f16, A>;
alias CoopMat16x16B = coop_mat16x16<f16, B>;
alias CoopMat16x16C = coop_mat16x16<f32, C>;