Files
CMake/Tests/ISPC/DynamicLibrary/simple.cxx
Robert Maynard c9a50f3556 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.
2020-12-14 13:13:09 -05:00

24 lines
361 B
C++

#include <stdio.h>
#include "simple_ispc.h"
#ifdef _WIN32
# define EXPORT __declspec(dllexport)
#else
# define EXPORT
#endif
EXPORT int simple()
{
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: extra(%f) = %f\n", i, vin[i], vout[i]);
return 0;
}