PandA-2024.02
adi.h
Go to the documentation of this file.
1 
10 #ifndef _ADI_H
11 # define _ADI_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(TSTEPS) && !defined(N)
19 /* Define sample dataset sizes. */
20 # ifdef MINI_DATASET
21 # define TSTEPS 20
22 # define N 20
23 # endif
24 
25 # ifdef SMALL_DATASET
26 # define TSTEPS 40
27 # define N 60
28 # endif
29 
30 # ifdef MEDIUM_DATASET
31 # define TSTEPS 100
32 # define N 200
33 # endif
34 
35 # ifdef LARGE_DATASET
36 # define TSTEPS 500
37 # define N 1000
38 # endif
39 
40 # ifdef EXTRALARGE_DATASET
41 # define TSTEPS 1000
42 # define N 2000
43 # endif
44 
45 
46 #endif /* !(TSTEPS N) */
47 
48 # define _PB_TSTEPS POLYBENCH_LOOP_BOUND(TSTEPS,tsteps)
49 # define _PB_N POLYBENCH_LOOP_BOUND(N,n)
50 
51 
52 /* Default data type */
53 # if !defined(DATA_TYPE_IS_INT) && !defined(DATA_TYPE_IS_FLOAT) && !defined(DATA_TYPE_IS_DOUBLE)
54 # define DATA_TYPE_IS_DOUBLE
55 # endif
56 
57 #ifdef DATA_TYPE_IS_INT
58 # define DATA_TYPE int
59 # define DATA_PRINTF_MODIFIER "%d "
60 # define SCALAR_VAL(x) ((int)x)
61 #endif
62 
63 #ifdef DATA_TYPE_IS_FLOAT
64 # define DATA_TYPE float
65 # define DATA_PRINTF_MODIFIER "%0.2f "
66 # define SCALAR_VAL(x) x##f
67 # define SQRT_FUN(x) sqrtf(x)
68 # define EXP_FUN(x) expf(x)
69 # define POW_FUN(x,y) powf(x,y)
70 # endif
71 
72 #ifdef DATA_TYPE_IS_DOUBLE
73 # define DATA_TYPE double
74 # define DATA_PRINTF_MODIFIER "%0.2lf "
75 # define SCALAR_VAL(x) x
76 # define SQRT_FUN(x) sqrt(x)
77 # define EXP_FUN(x) exp(x)
78 # define POW_FUN(x,y) pow(x,y)
79 # endif
80 
81 #endif /* !_ADI_H */

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