commit5e6f06cf59Author: Aaron Gutierrez <gutierrez.aaron.m@gmail.com> Date: Thu May 11 15:42:11 2017 -0400 Fixed issue with aliasing local variables ISPC++ now produces valid code, or an appropriate error message, for all of my test cases. commitbfe723e1b7Author: Aaron Gutierrez <gutierrez.aaron.m@gmail.com> Date: Thu May 11 03:09:38 2017 -0400 Actually copy the AST. Type replacement works except for function parameters. commitf65b3e6300Author: Aaron Gutierrez <gutierrez.aaron.m@gmail.com> Date: Thu May 11 01:19:50 2017 -0400 [WIP] Remove cases for ForeachStmt and SymbolExpr commit2e28640860Merge:6a91c5dd020107Author: Aaron Gutierrez <gutierrez.aaron.m@gmail.com> Date: Wed May 10 23:13:40 2017 -0400 Merge branch 'master' into copy_ast commit6a91c5d5acAuthor: Aaron Gutierrez <gutierrez.aaron.m@gmail.com> Date: Wed May 10 11:11:39 2017 -0400 Attempt to replicate AST when expanding polytypes
24 lines
388 B
C++
24 lines
388 B
C++
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
|
|
#include "hello.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;
|
|
}
|