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
1 changed files with 15 additions and 0 deletions

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