def __init__(self, ast, name=None): KernelType.__init__(self, ast, name=name) self._arg_descriptors = [] for init in self._inits: if init.name != 'arg_type': raise ParseError( "dynamo0p1.py:DynKernelType:__init__: Each meta_arg " "value must be of type 'arg_type' for the " "dynamo0.1 api, but found '{0}'.".format(init.name)) access = init.args[0].name funcspace = init.args[1].name stencil = init.args[2].name x1 = init.args[3].name x2 = init.args[4].name x3 = init.args[5].name self._arg_descriptors.append( DynDescriptor(access, funcspace, stencil, x1, x2, x3))
def __init__(self, ast, name=None): KernelType.__init__(self, ast, name=name) self._arg_descriptors = [] for init in self._inits: if init.name != 'arg': raise ParseError( "gocean0p1.py:GOKernelType:__init__: Each meta_arg value " "must be of type 'arg' for the gocean0.1 api, but found " "'{0}'.".format(init.name)) access = init.args[0].name funcspace = init.args[1].name stencil = init.args[2].name if len(init.args) != 3: raise ParseError( "gocean0p1.py:GOKernelType:__init__: 'arg' type expects " "3 arguments but found {0} in '{1}'".format( str(len(init.args)), init.args)) self._arg_descriptors.append( GODescriptor(access, funcspace, stencil))