forked from M-Labs/artiq
language/core: make *64 functions return int64
This commit is contained in:
parent
aec2168974
commit
cef423d547
|
@ -8,6 +8,8 @@ from inspect import getfullargspec, getmodule
|
||||||
from types import SimpleNamespace
|
from types import SimpleNamespace
|
||||||
from math import floor, ceil
|
from math import floor, ceil
|
||||||
|
|
||||||
|
from numpy import int32, int64
|
||||||
|
|
||||||
from artiq.language import import_cache
|
from artiq.language import import_cache
|
||||||
|
|
||||||
|
|
||||||
|
@ -42,13 +44,13 @@ def ConstGeneric(name, constraint):
|
||||||
return TypeVar(name, _ConstGenericMarker, constraint)
|
return TypeVar(name, _ConstGenericMarker, constraint)
|
||||||
|
|
||||||
def round64(x):
|
def round64(x):
|
||||||
return round(x)
|
return int64(round(x))
|
||||||
|
|
||||||
def floor64(x):
|
def floor64(x):
|
||||||
return floor(x)
|
return int64(floor(x))
|
||||||
|
|
||||||
def ceil64(x):
|
def ceil64(x):
|
||||||
return ceil(x)
|
return int64(ceil(x))
|
||||||
|
|
||||||
|
|
||||||
# Delay NAC3 analysis until all referenced variables are supposed to exist on the CPython side.
|
# Delay NAC3 analysis until all referenced variables are supposed to exist on the CPython side.
|
||||||
|
|
Loading…
Reference in New Issue