diff --git a/nac3artiq/demo/min_artiq.py b/nac3artiq/demo/min_artiq.py index 354d2a2a..9adf1667 100644 --- a/nac3artiq/demo/min_artiq.py +++ b/nac3artiq/demo/min_artiq.py @@ -3,13 +3,20 @@ from functools import wraps from types import SimpleNamespace from numpy import int32, int64 from typing import Generic, TypeVar +from math import floor, ceil import nac3artiq -__all__ = ["KernelInvariant", "extern", "kernel", "portable", "nac3", - "ms", "us", "ns", - "print_int32", "print_int64", - "Core", "TTLOut", "parallel", "sequential", "virtual"] + +__all__ = [ + "KernelInvariant", "virtual", + "round64", "floor64", "ceil64", + "extern", "kernel", "portable", "nac3", + "ms", "us", "ns", + "print_int32", "print_int64", + "Core", "TTLOut", + "parallel", "sequential" +] T = TypeVar('T') @@ -21,6 +28,17 @@ class KernelInvariant(Generic[T]): class virtual(Generic[T]): pass + +def round64(x): + return round(x) + +def floor64(x): + return floor(x) + +def ceil64(x): + return ceil(x) + + import device_db core_arguments = device_db.device_db["core"]["arguments"]