def loops(self) -> List[OP.Loop]: loops = flattern(program.loops for program in self.programs) return uniqueBy(loops, lambda l: l.kernel)
def consts(self) -> List[OP.Const]: consts = flattern(program.consts for program in self.programs) return uniqueBy(consts, lambda c: c.ptr)
def indirectIdxs(self) -> List[Arg]: return uniqueBy(self.indirects, lambda a: (a.map, a.idx))
def indirectMaps(self) -> List[Arg]: return uniqueBy(self.indirects, lambda a: a.map)
def indirectVars(self) -> List[Arg]: return uniqueBy(self.indirects, lambda a: a.var)
def uniqueVars(self) -> List[Arg]: return uniqueBy(self.args, lambda a: a.var)