Module Sarek_coopmat_scale

The scale operands of Sarek_ir_types.coopmat_op.CM_scale_add, in one place.

CM_scale_add is the only cooperative-matrix statement that reads plain buffers through several index expressions (up to four scales). Every pass that renames buffers, rewrites expressions or collects the arrays a kernel reads must see all of them; these functions are how it does so, so that a pass cannot forget the offset's second scale. Every function is the identity (or empty) on the other members of Sarek_ir_types.coopmat_op.

The scales of the statement, in the order row, col, off_row, off_col (absent ones skipped).

val buffers : Sarek_ir_types.coopmat_op -> string list

The scale buffers the statement reads (it writes none).

The scale index expressions.

Rewrite every scale buffer name with buf and index with expr.

map ~buf:Fun.id ~expr:f.

val fold_exprs : ('a -> Sarek_ir_types.expr -> 'a) -> 'a -> Sarek_ir_types.coopmat_op -> 'a

Fold over exprs.