Add test for polymorphic non-exported function

This commit is contained in:
2017-04-26 22:33:03 -04:00
parent 717aec388b
commit 128b40ce3c
2 changed files with 18 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
floating saxpy_helper(floating scale,
floating<0> x,
floating<0> y) {
return scale * x + y;
}
export void saxpy(uniform int N,
uniform floating<0> scale,
uniform floating<1> X[],
uniform floating<1> Y[],
uniform floating<2> result[])
{
foreach (i = 0 ... N) {
result[i] = saxpy_helper(scale, X[i], Y[i]);
}
}