Пример #1
0
        def _visit_homogenous_space(self, node):
            offset_versions = []

            # so that we can apply all of the spaces simultaneously
            for space in node.space.spaces:
                cp = copy.deepcopy(node.body)
                shifter = StencilShifter(space.low)
                output = [shifter.visit(part) for part in cp]
                offset_versions.extend(output)
            low = Vector((0,) * node.space.ndim)
            high = node.space.spaces[0].high - node.space.spaces[0].low
            stride = node.space.spaces[0].stride
            return IterationSpace(
                space=NDSpace([Space(low, high, stride)]),
                body=offset_versions
            )