diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2020-07-16 19:18:55 (GMT) |
---|---|---|
committer | Robert Maynard <robert.maynard@kitware.com> | 2020-08-28 15:21:31 (GMT) |
commit | 34cc6acc81758e29f8c88607c21ab11d8807f87c (patch) | |
tree | 38effcd493f057f6148f4d8f58262dfb27afaa24 /Tests/ISPC/TryCompile/main.cxx | |
parent | 419d70d49000e10c36d9615574ff03513f2edf0d (diff) | |
download | CMake-34cc6acc81758e29f8c88607c21ab11d8807f87c.zip CMake-34cc6acc81758e29f8c88607c21ab11d8807f87c.tar.gz CMake-34cc6acc81758e29f8c88607c21ab11d8807f87c.tar.bz2 |
Add ISPC compiler support to CMake
Diffstat (limited to 'Tests/ISPC/TryCompile/main.cxx')
-rw-r--r-- | Tests/ISPC/TryCompile/main.cxx | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/Tests/ISPC/TryCompile/main.cxx b/Tests/ISPC/TryCompile/main.cxx new file mode 100644 index 0000000..c8d1ed6 --- /dev/null +++ b/Tests/ISPC/TryCompile/main.cxx @@ -0,0 +1,19 @@ +#include <stdio.h> + +namespace ispc { +extern "C" { +void simple(float*, float*, int); +} +} + +int main() +{ + float vin[16], vout[16]; + for (int i = 0; i < 16; ++i) + vin[i] = i; + + ispc::simple(vin, vout, 16); + + for (int i = 0; i < 16; ++i) + printf("%d: simple(%f) = %f\n", i, vin[i], vout[i]); +} |