Load(graph);
Import(graph);
conf := SparseDefaultConf;
opts := conf.getOpts(V(1));
opts.vec := true;
i := Ind(3);
ts := TSparse(TArray(TInt, 3), TSemiring_Boolean(TInt));
fdataofs := FDataOfs(ts, 3, 0);
md := MakeDiag(fdataofs);
eye := I(i);
sid := SUM(eye, md);
matmul := MatMul(3,3);
spmv := matmul * sid;
spmv2 := Rewrite(spmv, RulesIDiag, opts);
spmv3 := Rewrite(spmv2, RulesMatMul, opts);
rt := RandomRuleTree(last, opts);
srt := SumsRuleTree(rt, opts);
srt2 := Rewrite(Copy(srt), RulesSigSPMV2, opts);
cs := CodeSums(PushBFSKernel(last), opts);
PrintCode("spmv", cs, opts);