mirror of
https://github.com/m-labs/artiq.git
synced 2024-12-24 19:04:02 +08:00
language/core: add round64
This commit is contained in:
parent
02798d1996
commit
71825f5ae0
@ -30,6 +30,9 @@ for _op_name in (
|
||||
op_method = getattr(int, "__" + _op_name + "__")
|
||||
setattr(int64, "__i" + _op_name + "__", _make_int64_op_method(op_method))
|
||||
|
||||
def round64(x):
|
||||
return int64(round(x))
|
||||
|
||||
def _make_kernel_ro(value):
|
||||
return isinstance(value, (int, float, str, units.Quantity))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user