PandA-2024.02
spmv.c
Go to the documentation of this file.
1 /*
2 Based on algorithm described here:
3 http://www.cs.berkeley.edu/~mhoemmen/matrix-seminar/slides/UCB_sparse_tutorial_1.pdf
4 */
5 
6 #include "spmv.h"
7 
8 void ellpack(TYPE nzval[N*L], int32_t cols[N*L], TYPE vec[N], TYPE out[N])
9 {
10  int i, j;
11  TYPE Si;
12 
13  ellpack_1 : for (i=0; i<N; i++) {
14  TYPE sum = out[i];
15  ellpack_2 : for (j=0; j<L; j++) {
16  Si = nzval[j + i*L] * vec[cols[j + i*L]];
17  sum += Si;
18  }
19  out[i] = sum;
20  }
21 }
void ellpack(TYPE nzval[N *L], int32_t cols[N *L], TYPE vec[N], TYPE out[N])
Definition: spmv.c:8
#define TYPE
Definition: backprop.h:21
int sum
Definition: dotproduct.h:3
#define N
Definition: dfdiv.c:60
#define L
Definition: spmv.h:13

Generated on Mon Feb 12 2024 13:02:50 for PandA-2024.02 by doxygen 1.8.13