diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2020-07-28 18:52:36 (GMT) |
---|---|---|
committer | Robert Maynard <robert.maynard@kitware.com> | 2020-09-04 12:37:07 (GMT) |
commit | a020787a9b7ede3aa490345bd446e469fb1713d2 (patch) | |
tree | f96ef2b1d84515fda4288ffaf39e9abfb8c9cc1a /Tests/ISPC/ObjectGenex/simple.ispc | |
parent | 5a1750017e65727660167ae1953746a3fd3d2c7b (diff) | |
download | CMake-a020787a9b7ede3aa490345bd446e469fb1713d2.zip CMake-a020787a9b7ede3aa490345bd446e469fb1713d2.tar.gz CMake-a020787a9b7ede3aa490345bd446e469fb1713d2.tar.bz2 |
ISPC: Support generation for multiple instruction sets
Diffstat (limited to 'Tests/ISPC/ObjectGenex/simple.ispc')
-rw-r--r-- | Tests/ISPC/ObjectGenex/simple.ispc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/Tests/ISPC/ObjectGenex/simple.ispc b/Tests/ISPC/ObjectGenex/simple.ispc new file mode 100644 index 0000000..a76b76c --- /dev/null +++ b/Tests/ISPC/ObjectGenex/simple.ispc @@ -0,0 +1,12 @@ + +export void simple(uniform float vin[], uniform float vout[], + uniform int count) { + foreach (index = 0 ... count) { + float v = vin[index]; + if (v < M_PI) + v = v * v; + else + v = sqrt(v); + vout[index] = v; + } +} |