PandA-2024.02
fdtd-2d.h
Go to the documentation of this file.
1 
10 #ifndef _FDTD_2D_H
11 # define _FDTD_2D_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(TMAX) && !defined(NX) && !defined(NY)
19 /* Define sample dataset sizes. */
20 # ifdef MINI_DATASET
21 # define TMAX 20
22 # define NX 20
23 # define NY 30
24 # endif
25 
26 # ifdef SMALL_DATASET
27 # define TMAX 40
28 # define NX 60
29 # define NY 80
30 # endif
31 
32 # ifdef MEDIUM_DATASET
33 # define TMAX 100
34 # define NX 200
35 # define NY 240
36 # endif
37 
38 # ifdef LARGE_DATASET
39 # define TMAX 500
40 # define NX 1000
41 # define NY 1200
42 # endif
43 
44 # ifdef EXTRALARGE_DATASET
45 # define TMAX 1000
46 # define NX 2000
47 # define NY 2600
48 # endif
49 
50 
51 #endif /* !(TMAX NX NY) */
52 
53 # define _PB_TMAX POLYBENCH_LOOP_BOUND(TMAX,tmax)
54 # define _PB_NX POLYBENCH_LOOP_BOUND(NX,nx)
55 # define _PB_NY POLYBENCH_LOOP_BOUND(NY,ny)
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 /* !_FDTD_2D_H */

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