summaryrefslogtreecommitdiffstats
path: root/Tests/ISPC/ObjectLibrary/extra.ispc
diff options
context:
space:
mode:
authorRobert Maynard <robert.maynard@kitware.com>2020-06-30 14:13:53 (GMT)
committerRobert Maynard <robert.maynard@kitware.com>2020-08-28 15:21:31 (GMT)
commite783bf8aa6f90ddb1458c7b1a78c5d0225c1496a (patch)
treeb59fe2e01365d0ec14d79f38be8bede5afde6a62 /Tests/ISPC/ObjectLibrary/extra.ispc
parent34cc6acc81758e29f8c88607c21ab11d8807f87c (diff)
downloadCMake-e783bf8aa6f90ddb1458c7b1a78c5d0225c1496a.zip
CMake-e783bf8aa6f90ddb1458c7b1a78c5d0225c1496a.tar.gz
CMake-e783bf8aa6f90ddb1458c7b1a78c5d0225c1496a.tar.bz2
ISPC: Support ISPC header generation byproducts and parallel builds
Diffstat (limited to 'Tests/ISPC/ObjectLibrary/extra.ispc')
-rw-r--r--Tests/ISPC/ObjectLibrary/extra.ispc12
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/ISPC/ObjectLibrary/extra.ispc b/Tests/ISPC/ObjectLibrary/extra.ispc
new file mode 100644
index 0000000..5a4a442
--- /dev/null
+++ b/Tests/ISPC/ObjectLibrary/extra.ispc
@@ -0,0 +1,12 @@
+
+export void extra(uniform float vin[], uniform float vout[],
+ uniform int count) {
+ foreach (index = 0 ... count) {
+ float v = vin[index];
+ if (v < 3.)
+ v = v * v;
+ else
+ v = sqrt(v);
+ vout[index] = v;
+ }
+}