(self, indices)
return open_lines, close_lines
Returns a tuple (open_lines, close_lines) containing lists of codelines
Returns a tuple (open_lines, close_lines) containing lists of codelines
Returns a tuple ( open_lines close_lines ) containing lists of codelines
def _get_loop_opening_ending(self, indices):
        """Returns a tuple (open_lines, close_lines) containing lists of codelines
        """
        open_lines = []
        close_lines = []
        loopstart = "for (int %(var)s=%(start)s; %(var)s<%(end)s; %(var)s++){"
        for i in indices:
            # C arrays start at 0 and end at dimension-1
            open_lines.append(loopstart % {
                'var': self._print(i.label),
                'start': self._print(i.lower),
                'end': self._print(i.upper + 1)})
            close_lines.append("}")
        return open_lines, close_lines
def _get_loop_opening_ending ( self , indices ) : open_lines = [ ] close_lines = [ ] loopstart = "for (int %(var)s=%(start)s; %(var)s<%(end)s; %(var)s++){" for i in indices : # C arrays start at 0 and end at dimension-1 open_lines . append ( loopstart % { 'var' : self . _print ( i . label ) , 'start' : self . _print ( i . lower ) , 'end' : self . _print ( i . upper + 1 ) } ) close_lines . append ( "}" ) return open_lines , close_lines