-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcommon.h
More file actions
66 lines (53 loc) · 1.39 KB
/
common.h
File metadata and controls
66 lines (53 loc) · 1.39 KB
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
54
55
56
57
58
59
60
61
62
63
64
65
#include <time.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <math.h>
#include <sys/time.h>
#include <mm_malloc.h>
#include <x86intrin.h>
#include <immintrin.h>
#include <nmmintrin.h>
#include <omp.h>
//#include "mkl.h"
//#include "mkl_spblas.h"
#ifndef MKL_INT
#define MKL_INT int
#endif
#ifndef MAT_VAL_TYPE
#define MAT_VAL_TYPE float
#endif
#ifndef MAT_PTR_TYPE
#define MAT_PTR_TYPE int
#endif
// SpMV 200, SpTRSV 200, SpGEMM 3
// SpMM 20, SpTRSV 10
#ifndef BENCH_REPEAT
#define BENCH_REPEAT 20
#endif
// ---------------------------------------
// --- MKL regular routines ---
// CSR-SpMV and COO-SpMV, use 1t 2t 4t 8t 16t 32t 64t, set NTHREADS_MAX = 64
// CSC-SpMV, CSR-SpTRSV, COO-SpTRSV and CSC-SpTRSV, use 1t, set NTHREADS_MAX = 1
// CSR-SpADD and CSR-SpGEMM, use 1t 2t 4t 8t 16t 32t 64t, set NTHREADS_MAX = 64
//
// --- MKL inspector-executor routines ---
// CSR-SpMV, COO-SpMV, CSR-SpTRSV and CSC-SpTRSV, use 1t 2t 4t 8t 16t 32t 64t, set NTHREADS_MAX = 64
// CSC-SpMV, COO-SpTRSV, use 1t, set NTHREADS_MAX = 1
// CSR-SpADD and CSR-SpGEMM, use 1t 2t 4t 8t 16t 32t 64t, set NTHREADS_MAX = 64
// ---------------------------------------
#ifndef NTHREADS_MAX
#define NTHREADS_MAX 1
#endif
#ifndef NCOL_RHS
#define NCOL_RHS 8
#endif
#ifndef TEST_SPMV
#define TEST_SPMV 0
#endif
#ifndef TEST_SPTRSV
#define TEST_SPTRSV 1
#endif
#ifndef TEST_SPGEMM
#define TEST_SPGEMM 0
#endif