python regex-based preprocessor proof of concept

This commit is contained in:
2017-04-18 22:28:48 -04:00
parent d6cf38a929
commit 4182fa2967
4 changed files with 226 additions and 0 deletions

23
tests_ispcpp/hello.cpp Normal file
View File

@@ -0,0 +1,23 @@
#include <stdlib.h>
#include <stdio.h>
#include "hello.ispc.h"
int main() {
float A[100];
float B[100];
double result[100];
for (int i=0; i<100; i++) {
A[i] = 100 - i;
B[i] = i*i;
}
ispc::saxpy(100, 3.1415926535, (float*)&A, (float*)&B, (double*)&result);
for (int i=0; i<100; i++) {
printf("%.6f\n", result[i]);
}
return 0;
}