1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 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]); }