forked from M-Labs/artiq
language: add floor64 and ceil64
This commit is contained in:
parent
12c39aaaae
commit
e34f4cc99b
|
@ -6,12 +6,14 @@ from typing import Generic, TypeVar
|
|||
from functools import wraps
|
||||
from inspect import getfullargspec, getmodule
|
||||
from types import SimpleNamespace
|
||||
from math import floor, ceil
|
||||
|
||||
from artiq.language import import_cache
|
||||
|
||||
|
||||
__all__ = [
|
||||
"KernelInvariant", "virtual", "round64",
|
||||
"KernelInvariant", "virtual",
|
||||
"round64", "floor64", "ceil64",
|
||||
"extern", "kernel", "portable", "nac3", "rpc",
|
||||
"parallel", "sequential",
|
||||
"set_watchdog_factory", "watchdog", "TerminationRequested"
|
||||
|
@ -30,6 +32,12 @@ class virtual(Generic[T]):
|
|||
def round64(x):
|
||||
return round(x)
|
||||
|
||||
def floor64(x):
|
||||
return floor(x)
|
||||
|
||||
def ceil64(x):
|
||||
return ceil(x)
|
||||
|
||||
|
||||
_allow_registration = True
|
||||
# Delay NAC3 analysis until all referenced variables are supposed to exist on the CPython side.
|
||||
|
|
Loading…
Reference in New Issue