PandA-2024.02
gemm.h
Go to the documentation of this file.
1 
10 #ifndef _GEMM_H
11 # define _GEMM_H
12 
13 /* Default to LARGE_DATASET. */
14 # if !defined(MINI_DATASET) && !defined(SMALL_DATASET) && !defined(MEDIUM_DATASET) && !defined(LARGE_DATASET) && !defined(EXTRALARGE_DATASET)
15 # define LARGE_DATASET
16 # endif
17 
18 # if !defined(NI) && !defined(NJ) && !defined(NK)
19 /* Define sample dataset sizes. */
20 # ifdef MINI_DATASET
21 # define NI 20
22 # define NJ 25
23 # define NK 30
24 # endif
25 
26 # ifdef SMALL_DATASET
27 # define NI 60
28 # define NJ 70
29 # define NK 80
30 # endif
31 
32 # ifdef MEDIUM_DATASET
33 # define NI 200
34 # define NJ 220
35 # define NK 240
36 # endif
37 
38 # ifdef LARGE_DATASET
39 # define NI 1000
40 # define NJ 1100
41 # define NK 1200
42 # endif
43 
44 # ifdef EXTRALARGE_DATASET
45 # define NI 2000
46 # define NJ 2300
47 # define NK 2600
48 # endif
49 
50 
51 #endif /* !(NI NJ NK) */
52 
53 # define _PB_NI POLYBENCH_LOOP_BOUND(NI,ni)
54 # define _PB_NJ POLYBENCH_LOOP_BOUND(NJ,nj)
55 # define _PB_NK POLYBENCH_LOOP_BOUND(NK,nk)
56 
57 
58 /* Default data type */
59 # if !defined(DATA_TYPE_IS_INT) && !defined(DATA_TYPE_IS_FLOAT) && !defined(DATA_TYPE_IS_DOUBLE)
60 # define DATA_TYPE_IS_DOUBLE
61 # endif
62 
63 #ifdef DATA_TYPE_IS_INT
64 # define DATA_TYPE int
65 # define DATA_PRINTF_MODIFIER "%d "
66 #endif
67 
68 #ifdef DATA_TYPE_IS_FLOAT
69 # define DATA_TYPE float
70 # define DATA_PRINTF_MODIFIER "%0.2f "
71 # define SCALAR_VAL(x) x##f
72 # define SQRT_FUN(x) sqrtf(x)
73 # define EXP_FUN(x) expf(x)
74 # define POW_FUN(x,y) powf(x,y)
75 # endif
76 
77 #ifdef DATA_TYPE_IS_DOUBLE
78 # define DATA_TYPE double
79 # define DATA_PRINTF_MODIFIER "%0.2lf "
80 # define SCALAR_VAL(x) x
81 # define SQRT_FUN(x) sqrt(x)
82 # define EXP_FUN(x) exp(x)
83 # define POW_FUN(x,y) pow(x,y)
84 # endif
85 
86 #endif /* !_GEMM_H */

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