2
0
mirror of https://github.com/m-labs/artiq.git synced 2024-12-28 20:53:35 +08:00

test/lit: Add smoke test for math function broadcasting

This commit is contained in:
David Nadlinger 2020-08-08 21:08:47 +01:00
parent 1c645d8857
commit 8eddb9194a

View File

@ -0,0 +1,15 @@
# RUN: %python -m artiq.compiler.testbench.embedding %s
from artiq.language.core import *
import numpy as np
@kernel
def entrypoint():
# Just make sure everything compiles.
a = np.array([1.0, 2.0, 3.0])
b = np.sin(a)
assert b.shape == a.shape
c = np.array([1.0, 2.0, 3.0])
d = np.arctan(c)
assert d.shape == c.shape