A an array of tests

This commit is contained in:
2017-05-12 12:33:51 -04:00
parent 2921430e45
commit 1eb64a13e1
5 changed files with 63 additions and 6 deletions

13
tests_ispcpp/array.ispc Normal file
View File

@@ -0,0 +1,13 @@
export void array(uniform int N, uniform integer * uniform X) {
integer *A = new integer[N/2];
foreach (i = 0 ... N/2) {
A[i] = X[i] + X[N/2 + i];
}
foreach (i = 0 ... N) {
X[i] = A[i/2];
}
delete[] A;
}