// STREAM triad benchmark for RISC-V testing // a[i] = b[i] + s * c[i] #include #include #define DTYPE double void kernel(DTYPE* a, DTYPE* b, DTYPE* c, const DTYPE s, const int size) { // OSACA start marker will be added around this loop for(int i=0; i 1) { size = atoi(argv[1]); } printf("RISC-V STREAM triad: a[i] = b[i] + s * c[i], size=%d\n", size); // Allocate memory DTYPE* a = (DTYPE*)malloc(size * sizeof(DTYPE)); DTYPE* b = (DTYPE*)malloc(size * sizeof(DTYPE)); DTYPE* c = (DTYPE*)malloc(size * sizeof(DTYPE)); // Initialize arrays for(int i=0; i