mirror of https://github.com/m-labs/artiq.git
language/core: make KernelFunctionInfo private
This commit is contained in:
parent
3249b8ad3e
commit
f5167f21fb
|
@ -72,7 +72,7 @@ class AutoContext:
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
KernelFunctionInfo = namedtuple("KernelFunctionInfo", "core_name k_function")
|
_KernelFunctionInfo = namedtuple("_KernelFunctionInfo", "core_name k_function")
|
||||||
|
|
||||||
|
|
||||||
def kernel(arg):
|
def kernel(arg):
|
||||||
|
@ -80,14 +80,14 @@ def kernel(arg):
|
||||||
def real_decorator(k_function):
|
def real_decorator(k_function):
|
||||||
def run_on_core(exp, *k_args, **k_kwargs):
|
def run_on_core(exp, *k_args, **k_kwargs):
|
||||||
getattr(exp, arg).run(k_function, ((exp,) + k_args), k_kwargs)
|
getattr(exp, arg).run(k_function, ((exp,) + k_args), k_kwargs)
|
||||||
run_on_core.k_function_info = KernelFunctionInfo(
|
run_on_core.k_function_info = _KernelFunctionInfo(
|
||||||
core_name=arg, k_function=k_function)
|
core_name=arg, k_function=k_function)
|
||||||
return run_on_core
|
return run_on_core
|
||||||
return real_decorator
|
return real_decorator
|
||||||
else:
|
else:
|
||||||
def run_on_core(exp, *k_args, **k_kwargs):
|
def run_on_core(exp, *k_args, **k_kwargs):
|
||||||
exp.core.run(arg, ((exp,) + k_args), k_kwargs)
|
exp.core.run(arg, ((exp,) + k_args), k_kwargs)
|
||||||
run_on_core.k_function_info = KernelFunctionInfo(
|
run_on_core.k_function_info = _KernelFunctionInfo(
|
||||||
core_name="core", k_function=arg)
|
core_name="core", k_function=arg)
|
||||||
return run_on_core
|
return run_on_core
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue