diff options
author | Robert Maynard <robert.maynard@kitware.com> | 2020-12-10 21:08:24 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2020-12-14 18:13:09 (GMT) |
commit | c9a50f35565dcc1df8bd82126ecced95e60c29e4 (patch) | |
tree | ede35e80def43d76af7378632f05115c0b43bea7 /Tests/ISPC/CustomHeaderSuffix/main.cxx | |
parent | 6aff058ab4a2d54a316dbaa536572ad71efb8b51 (diff) | |
download | CMake-c9a50f35565dcc1df8bd82126ecced95e60c29e4.zip CMake-c9a50f35565dcc1df8bd82126ecced95e60c29e4.tar.gz CMake-c9a50f35565dcc1df8bd82126ecced95e60c29e4.tar.bz2 |
ISPC: Generated Headers suffix configurable with a better default
The target property `ISPC_HEADER_SUFFIX` and associated global
variable now can control the suffix used when generating the
C/C++ interoperability ISPC headers.
In addition the default suffix is now "_ispc.h" which matches the
common convention that the ISPC compiler team uses and recommends.
Diffstat (limited to 'Tests/ISPC/CustomHeaderSuffix/main.cxx')
-rw-r--r-- | Tests/ISPC/CustomHeaderSuffix/main.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/Tests/ISPC/CustomHeaderSuffix/main.cxx b/Tests/ISPC/CustomHeaderSuffix/main.cxx new file mode 100644 index 0000000..4f1c9be --- /dev/null +++ b/Tests/ISPC/CustomHeaderSuffix/main.cxx @@ -0,0 +1,15 @@ +#include <stdio.h> + +#include "simple.ispc.h" + +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]); +} |