1 #ifndef AMREX_IPARSER_EXE_H_
2 #define AMREX_IPARSER_EXE_H_
3 #include <AMReX_Config.H>
11 #ifndef AMREX_IPARSER_STACK_SIZE
12 #define AMREX_IPARSER_STACK_SIZE 16
15 #define AMREX_IPARSER_LOCAL_IDX0 1000
16 #define AMREX_IPARSER_GET_DATA(i) ((i)>=1000) ? pstack[(i)-1000] : x[i]
255 auto b = pstack.
top();
263 auto b = pstack.
top();
271 auto b = pstack.
top();
279 auto v = pstack.
top();
287 auto v = pstack.
top();
289 pstack.
top() = v / pstack.
top();
295 pstack.
top() = -pstack.
top();
307 auto v = pstack.
top();
315 auto v = pstack.
top();
470 pstack.
top() = d / pstack.
top();
477 auto cond = pstack.
top();
499 int& max_stack_size,
int& stack_size, Vector<char*>& local_variables);
505 std::size_t exe_size = 0;
510 stack_size -=
static_cast<int>(local_variables.
size())+1;
517 std::size_t exe_size = 0;
518 int max_stack_size = 0;
#define AMREX_ALWAYS_ASSERT_WITH_MESSAGE(EX, MSG)
Definition: AMReX_BLassert.H:49
#define AMREX_FORCE_INLINE
Definition: AMReX_Extension.H:119
#define AMREX_GPU_HOST_DEVICE
Definition: AMReX_GpuQualifiers.H:20
Array4< int const > offset
Definition: AMReX_HypreMLABecLap.cpp:1089
#define AMREX_IPARSER_GET_DATA(i)
Definition: AMReX_IParser_Exe.H:16
Long size() const noexcept
Definition: AMReX_Vector.H:50
@ max
Definition: AMReX_ParallelReduce.H:17
Definition: AMReX_Amr.cpp:49
void iparser_compile(struct amrex_iparser *parser, char *p)
Definition: AMReX_IParser_Exe.H:515
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE long long iparser_exe_eval(const char *p, long long const *x)
Definition: AMReX_IParser_Exe.H:231
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE long long iparser_call_f1(enum iparser_f1_t, long long a)
Definition: AMReX_IParser_Y.H:185
iparser_f1_t
Definition: AMReX_IParser_Y.H:22
iparser_exe_t
Definition: AMReX_IParser_Exe.H:24
@ IPARSER_EXE_F2_F
Definition: AMReX_IParser_Exe.H:35
@ IPARSER_EXE_NEG_P
Definition: AMReX_IParser_Exe.H:46
@ IPARSER_EXE_SYMBOL
Definition: AMReX_IParser_Exe.H:27
@ IPARSER_EXE_ADD
Definition: AMReX_IParser_Exe.H:28
@ IPARSER_EXE_DIV_PP
Definition: AMReX_IParser_Exe.H:45
@ IPARSER_EXE_SUB_PP
Definition: AMReX_IParser_Exe.H:43
@ IPARSER_EXE_NEG
Definition: AMReX_IParser_Exe.H:33
@ IPARSER_EXE_MUL_VP
Definition: AMReX_IParser_Exe.H:39
@ IPARSER_EXE_MUL_PN
Definition: AMReX_IParser_Exe.H:54
@ IPARSER_EXE_ADD_PP
Definition: AMReX_IParser_Exe.H:42
@ IPARSER_EXE_ADD_VP
Definition: AMReX_IParser_Exe.H:37
@ IPARSER_EXE_DIV_VN
Definition: AMReX_IParser_Exe.H:51
@ IPARSER_EXE_SUB_VP
Definition: AMReX_IParser_Exe.H:38
@ IPARSER_EXE_DIV_B
Definition: AMReX_IParser_Exe.H:32
@ IPARSER_EXE_DIV_VP
Definition: AMReX_IParser_Exe.H:40
@ IPARSER_EXE_MUL_VN
Definition: AMReX_IParser_Exe.H:49
@ IPARSER_EXE_NULL
Definition: AMReX_IParser_Exe.H:25
@ IPARSER_EXE_MUL_PP
Definition: AMReX_IParser_Exe.H:44
@ IPARSER_EXE_DIV_PV
Definition: AMReX_IParser_Exe.H:41
@ IPARSER_EXE_MUL
Definition: AMReX_IParser_Exe.H:30
@ IPARSER_EXE_SUB_PN
Definition: AMReX_IParser_Exe.H:53
@ IPARSER_EXE_SUB
Definition: AMReX_IParser_Exe.H:29
@ IPARSER_EXE_SUB_VN
Definition: AMReX_IParser_Exe.H:48
@ IPARSER_EXE_IF
Definition: AMReX_IParser_Exe.H:56
@ IPARSER_EXE_JUMP
Definition: AMReX_IParser_Exe.H:57
@ IPARSER_EXE_F2_B
Definition: AMReX_IParser_Exe.H:36
@ IPARSER_EXE_DIV_PN
Definition: AMReX_IParser_Exe.H:55
@ IPARSER_EXE_F1
Definition: AMReX_IParser_Exe.H:34
@ IPARSER_EXE_ADD_PN
Definition: AMReX_IParser_Exe.H:52
@ IPARSER_EXE_DIV_F
Definition: AMReX_IParser_Exe.H:31
@ IPARSER_EXE_NUMBER
Definition: AMReX_IParser_Exe.H:26
@ IPARSER_EXE_ADD_VN
Definition: AMReX_IParser_Exe.H:47
@ IPARSER_EXE_DIV_NV
Definition: AMReX_IParser_Exe.H:50
void iparser_compile_exe_size(struct iparser_node *node, char *&p, std::size_t &exe_size, int &max_stack_size, int &stack_size, Vector< char * > &local_variables)
Definition: AMReX_IParser_Exe.cpp:19
iparser_f2_t
Definition: AMReX_IParser_Y.H:26
AMREX_GPU_HOST_DEVICE AMREX_FORCE_INLINE long long iparser_call_f2(enum iparser_f2_t type, long long a, long long b)
Definition: AMReX_IParser_Y.H:192
std::size_t iparser_exe_size(struct amrex_iparser *parser, int &max_stack_size, int &stack_size)
Definition: AMReX_IParser_Exe.H:502
Definition: AMReX_IParser_Exe.H:198
int i
Definition: AMReX_IParser_Exe.H:200
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:199
Definition: AMReX_IParser_Exe.H:144
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:145
int i2
Definition: AMReX_IParser_Exe.H:147
int i1
Definition: AMReX_IParser_Exe.H:146
Definition: AMReX_IParser_Exe.H:173
long long v
Definition: AMReX_IParser_Exe.H:175
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:174
Definition: AMReX_IParser_Exe.H:114
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:115
int i
Definition: AMReX_IParser_Exe.H:116
long long v
Definition: AMReX_IParser_Exe.H:117
Definition: AMReX_IParser_Exe.H:74
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:75
Definition: AMReX_IParser_Exe.H:91
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:92
Definition: AMReX_IParser_Exe.H:87
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:88
Definition: AMReX_IParser_Exe.H:193
long long v
Definition: AMReX_IParser_Exe.H:195
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:194
Definition: AMReX_IParser_Exe.H:214
int i
Definition: AMReX_IParser_Exe.H:216
bool reverse
Definition: AMReX_IParser_Exe.H:217
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:215
Definition: AMReX_IParser_Exe.H:162
int i1
Definition: AMReX_IParser_Exe.H:164
int i2
Definition: AMReX_IParser_Exe.H:165
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:163
Definition: AMReX_IParser_Exe.H:138
int i
Definition: AMReX_IParser_Exe.H:140
long long v
Definition: AMReX_IParser_Exe.H:141
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:139
Definition: AMReX_IParser_Exe.H:188
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:189
long long v
Definition: AMReX_IParser_Exe.H:190
Definition: AMReX_IParser_Exe.H:132
int i
Definition: AMReX_IParser_Exe.H:134
long long v
Definition: AMReX_IParser_Exe.H:135
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:133
Definition: AMReX_IParser_Exe.H:99
iparser_f1_t ftype
Definition: AMReX_IParser_Exe.H:101
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:100
Definition: AMReX_IParser_Exe.H:109
iparser_f2_t ftype
Definition: AMReX_IParser_Exe.H:111
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:110
Definition: AMReX_IParser_Exe.H:104
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:105
iparser_f2_t ftype
Definition: AMReX_IParser_Exe.H:106
Definition: AMReX_IParser_Exe.H:220
int offset
Definition: AMReX_IParser_Exe.H:222
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:221
Definition: AMReX_IParser_Exe.H:225
int offset
Definition: AMReX_IParser_Exe.H:227
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:226
Definition: AMReX_IParser_Exe.H:209
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:210
int i
Definition: AMReX_IParser_Exe.H:211
Definition: AMReX_IParser_Exe.H:156
int i1
Definition: AMReX_IParser_Exe.H:158
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:157
int i2
Definition: AMReX_IParser_Exe.H:159
Definition: AMReX_IParser_Exe.H:183
long long v
Definition: AMReX_IParser_Exe.H:185
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:184
Definition: AMReX_IParser_Exe.H:126
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:127
long long v
Definition: AMReX_IParser_Exe.H:129
int i
Definition: AMReX_IParser_Exe.H:128
Definition: AMReX_IParser_Exe.H:83
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:84
Definition: AMReX_IParser_Exe.H:168
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:169
int i
Definition: AMReX_IParser_Exe.H:170
Definition: AMReX_IParser_Exe.H:95
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:96
Definition: AMReX_IParser_Exe.H:60
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:61
Definition: AMReX_IParser_Exe.H:64
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:65
long long v
Definition: AMReX_IParser_Exe.H:66
Definition: AMReX_IParser_Exe.H:203
long long sign
Definition: AMReX_IParser_Exe.H:206
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:204
int i
Definition: AMReX_IParser_Exe.H:205
Definition: AMReX_IParser_Exe.H:150
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:151
int i2
Definition: AMReX_IParser_Exe.H:153
int i1
Definition: AMReX_IParser_Exe.H:152
Definition: AMReX_IParser_Exe.H:178
long long v
Definition: AMReX_IParser_Exe.H:180
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:179
Definition: AMReX_IParser_Exe.H:120
long long v
Definition: AMReX_IParser_Exe.H:123
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:121
int i
Definition: AMReX_IParser_Exe.H:122
Definition: AMReX_IParser_Exe.H:78
long long sign
Definition: AMReX_IParser_Exe.H:80
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:79
Definition: AMReX_IParser_Exe.H:69
int i
Definition: AMReX_IParser_Exe.H:71
enum iparser_exe_t type
Definition: AMReX_IParser_Exe.H:70
Definition: AMReX_Stack.H:8
constexpr void push(T v)
Definition: AMReX_Stack.H:10
constexpr void pop()
Definition: AMReX_Stack.H:11
constexpr T const & top() const
Definition: AMReX_Stack.H:14
Definition: AMReX_IParser_Y.H:153
struct iparser_node * ast
Definition: AMReX_IParser_Y.H:156