summaryrefslogtreecommitdiff
path: root/Tests/ISPC/DynamicLibrary/extra.ispc
diff options
context:
space:
mode:
Diffstat (limited to 'Tests/ISPC/DynamicLibrary/extra.ispc')
-rw-r--r--Tests/ISPC/DynamicLibrary/extra.ispc12
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/ISPC/DynamicLibrary/extra.ispc b/Tests/ISPC/DynamicLibrary/extra.ispc
new file mode 100644
index 0000000000..5a4a442499
--- /dev/null
+++ b/Tests/ISPC/DynamicLibrary/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;
+ }
+}