Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef __COMMONMM_H__
#define __COMMONMM_H_
#define FIELD_LENGTH 128
//char filename[FIELD_LENGTH];
enum spmv_target { use_cpu, use_mkl, use_mic, use_mkl_mic, use_mic_rowcyclic };
char *target_str[] = { "CPU", "MKL", "MIC", "MKL_MIC", "MIC_ROWCYCLIC" };
enum enum_datastructure { DS_ICSR, DS_CSR };
char *str_datastructure[] = { "ICSR", "CSR" };
char *str_algorithm[] = { "OUTER", "INNER" };
__declspec(target(mic)) int datastructure;
typedef int csi;
typedef double csv;
__declspec(target(mic)) csv zero = 0.0;
__declspec(target(mic)) int use_sparse_c;
__declspec(target(mic)) int size_dacc;
__declspec(target(mic)) csv* dacc;
typedef struct csr_t {
csi m;
csi n;
csi nzmax;
csi nr;
csi* r;
csi* p;
csi* j;
csv* x;
int numInMats; // number of input matrices stored in this struct
int numRows;
int nnonempty_rows;
int numCols;
int totalnnz;
// int totalnnzmax;
int* nItems; // nnz of each matrix
int* pirow;
int size_pirow;
int* pnr;
int* h_rowDelimiters;
int size_h_rowDelimiters;
int* h_cols;
csv* h_val;
char filename[FIELD_LENGTH];
} csr;
#endif