aboutsummaryrefslogtreecommitdiff
path: root/mt/vvadd2.c
blob: 937a2e92823f5e6660f492a71679aee45cbaeeb1 (plain)
1
2
3
4
5
6
7
8
9
10
11
#include "stdlib.h"
#include "dataset.h"

void __attribute__((noinline)) vvadd(int coreid, int ncores, size_t n, const data_t* x, const data_t* y, data_t* z)
{
   size_t i;
   for (i = coreid; i < n; i += 2*ncores) {
      z[i] = x[i] + y[i];
      z[i+ncores] = x[i+ncores] + y[i+ncores];
   }
}