Add specializable parallel ufunc.

Update test.
Some fixes.
This commit is contained in:
Siu Kwan Lam 2012-08-06 15:33:36 -07:00
commit 150f497ed0
3 changed files with 26 additions and 11 deletions

View file

@ -434,7 +434,8 @@ class CDefinition(CBuilder):
@classmethod
def define(cls, module, **kws):
functype = lc.Type.function(cls._retty_, [v for k, v in cls._argtys_])
func = module.get_or_insert_function(functype, name=cls._name_)
name = cls._name_ % kws
func = module.get_or_insert_function(functype, name=name)
if not func.is_declaration: # already defined?
raise NameError(func)