Stop using tohost/fromhost registers
[riscv-tests.git] / benchmarks / mt-vvadd / vvadd.c
1 // See LICENSE for license details.
2
3 #include "stdlib.h"
4 #include "dataset.h"
5
6 //--------------------------------------------------------------------------
7 // vvadd function
8
9 void __attribute__((noinline)) vvadd(int coreid, int ncores, size_t n, const data_t* x, const data_t* y, data_t* z)
10 {
11 size_t i;
12
13 // interleave accesses
14 for (i = coreid; i < n; i+=ncores)
15 {
16 z[i] = x[i] + y[i];
17 }
18 }