本文整理汇总了Python中numba.compiler.Flags.__name__方法的典型用法代码示例。如果您正苦于以下问题:Python Flags.__name__方法的具体用法?Python Flags.__name__怎么用?Python Flags.__name__使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类numba.compiler.Flags
的用法示例。
在下文中一共展示了Flags.__name__方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: autogenerate
# 需要导入模块: from numba.compiler import Flags [as 别名]
# 或者: from numba.compiler.Flags import __name__ [as 别名]
def autogenerate(cls):
test_flags = ['fastmath', ] # TODO: add 'auto_parallel' ?
# generate all the combinations of the flags
test_flags = sum([list(combinations(test_flags, x)) for x in range( \
len(test_flags)+1)], [])
flag_list = [] # create Flag class instances
for ft in test_flags:
flags = Flags()
flags.set('nrt')
flags.set('error_model', 'numpy')
flags.__name__ = '_'.join(ft+('usecase',))
for f in ft:
flags.set(f)
flag_list.append(flags)
# main loop covering all the modes and use-cases
for dtype in ('complex64', 'float64', 'float32', 'int32', ):
for vlen in vlen2cpu:
for flags in flag_list:
for mode in "scalar", "range", "prange", "numpy":
cls._inject_test(dtype, mode, vlen, flags)
# mark important
if sys.version_info[0] > 2:
for n in ( "test_int32_range4_usecase", # issue #3016
):
setattr(cls, n, tag("important")(getattr(cls, n)))