WarpX
Classes | Enumerations | Functions
wp_parser_y.h File Reference
#include <AMReX_GpuQualifiers.H>
#include <AMReX_GpuPrint.H>
#include <AMReX_REAL.H>
#include <AMReX_Math.H>
#include <AMReX_Print.H>
#include <cstdlib>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <type_traits>

Go to the source code of this file.

Classes

union  wp_ip
 
union  wp_vp
 
struct  wp_node
 
struct  wp_number
 
struct  wp_symbol
 
struct  wp_f1
 
struct  wp_f2
 
struct  wp_parser
 

Enumerations

enum  wp_f1_t {
  WP_SQRT = 1, WP_EXP, WP_LOG, WP_LOG10,
  WP_SIN, WP_COS, WP_TAN, WP_ASIN,
  WP_ACOS, WP_ATAN, WP_SINH, WP_COSH,
  WP_TANH, WP_ABS, WP_POW_M3, WP_POW_M2,
  WP_POW_M1, WP_POW_P1, WP_POW_P2, WP_POW_P3
}
 
enum  wp_f2_t {
  WP_POW = 1, WP_GT, WP_LT, WP_GEQ,
  WP_LEQ, WP_EQ, WP_NEQ, WP_AND,
  WP_OR, WP_HEAVISIDE, WP_MIN, WP_MAX
}
 
enum  wp_node_t {
  WP_NUMBER = 1, WP_SYMBOL, WP_ADD, WP_SUB,
  WP_MUL, WP_DIV, WP_NEG, WP_F1,
  WP_F2, WP_ADD_VP, WP_ADD_PP, WP_SUB_VP,
  WP_SUB_PP, WP_MUL_VP, WP_MUL_PP, WP_DIV_VP,
  WP_DIV_PP, WP_NEG_P
}
 

Functions

void wp_defexpr (struct wp_node *body)
 
struct wp_nodewp_newnumber (amrex_real d)
 
struct wp_symbolwp_makesymbol (char *name)
 
struct wp_nodewp_newsymbol (struct wp_symbol *sym)
 
struct wp_nodewp_newnode (enum wp_node_t type, struct wp_node *l, struct wp_node *r)
 
struct wp_nodewp_newf1 (enum wp_f1_t ftype, struct wp_node *l)
 
struct wp_nodewp_newf2 (enum wp_f2_t ftype, struct wp_node *l, struct wp_node *r)
 
void yyerror (char const *s,...)
 
struct wp_parserwp_parser_new (void)
 
void wp_parser_delete (struct wp_parser *parser)
 
struct wp_parserwp_parser_dup (struct wp_parser *source)
 
struct wp_nodewp_parser_ast_dup (struct wp_parser *parser, struct wp_node *src, int move)
 
void wp_parser_regvar (struct wp_parser *parser, char const *name, amrex_real *p)
 
void wp_parser_regvar_gpu (struct wp_parser *parser, char const *name, int i)
 
void wp_parser_setconst (struct wp_parser *parser, char const *name, amrex_real c)
 
void wp_ast_optimize (struct wp_node *node)
 
size_t wp_ast_size (struct wp_node *node)
 
void wp_ast_print (struct wp_node *node)
 
void wp_ast_depth (struct wp_node *node, int *n)
 
void wp_ast_regvar (struct wp_node *node, char const *name, amrex_real *p)
 
void wp_ast_regvar_gpu (struct wp_node *node, char const *name, int i)
 
void wp_ast_setconst (struct wp_node *node, char const *name, amrex_real c)
 
template<typename T , std::enable_if_t< std::is_floating_point< T >::value, int > = 0>
AMREX_GPU_HOST_DEVICE T wp_call_f1 (enum wp_f1_t type, T a)
 
template<typename T , std::enable_if_t< std::is_floating_point< T >::value, int > = 0>
AMREX_GPU_HOST_DEVICE T wp_call_f2 (enum wp_f2_t type, T a, T b)
 

Enumeration Type Documentation

◆ wp_f1_t

enum wp_f1_t
Enumerator
WP_SQRT 
WP_EXP 
WP_LOG 
WP_LOG10 
WP_SIN 
WP_COS 
WP_TAN 
WP_ASIN 
WP_ACOS 
WP_ATAN 
WP_SINH 
WP_COSH 
WP_TANH 
WP_ABS 
WP_POW_M3 
WP_POW_M2 
WP_POW_M1 
WP_POW_P1 
WP_POW_P2 
WP_POW_P3 

◆ wp_f2_t

enum wp_f2_t
Enumerator
WP_POW 
WP_GT 
WP_LT 
WP_GEQ 
WP_LEQ 
WP_EQ 
WP_NEQ 
WP_AND 
WP_OR 
WP_HEAVISIDE 
WP_MIN 
WP_MAX 

◆ wp_node_t

enum wp_node_t
Enumerator
WP_NUMBER 
WP_SYMBOL 
WP_ADD 
WP_SUB 
WP_MUL 
WP_DIV 
WP_NEG 
WP_F1 
WP_F2 
WP_ADD_VP 
WP_ADD_PP 
WP_SUB_VP 
WP_SUB_PP 
WP_MUL_VP 
WP_MUL_PP 
WP_DIV_VP 
WP_DIV_PP 
WP_NEG_P 

Function Documentation

◆ wp_ast_depth()

void wp_ast_depth ( struct wp_node node,
int *  n 
)

◆ wp_ast_optimize()

void wp_ast_optimize ( struct wp_node node)

◆ wp_ast_print()

void wp_ast_print ( struct wp_node node)

◆ wp_ast_regvar()

void wp_ast_regvar ( struct wp_node node,
char const *  name,
amrex_real *  p 
)

◆ wp_ast_regvar_gpu()

void wp_ast_regvar_gpu ( struct wp_node node,
char const *  name,
int  i 
)

◆ wp_ast_setconst()

void wp_ast_setconst ( struct wp_node node,
char const *  name,
amrex_real  c 
)

◆ wp_ast_size()

size_t wp_ast_size ( struct wp_node node)

◆ wp_call_f1()

template<typename T , std::enable_if_t< std::is_floating_point< T >::value, int > = 0>
AMREX_GPU_HOST_DEVICE T wp_call_f1 ( enum wp_f1_t  type,
a 
)

◆ wp_call_f2()

template<typename T , std::enable_if_t< std::is_floating_point< T >::value, int > = 0>
AMREX_GPU_HOST_DEVICE T wp_call_f2 ( enum wp_f2_t  type,
a,
b 
)

◆ wp_defexpr()

void wp_defexpr ( struct wp_node body)

◆ wp_makesymbol()

struct wp_symbol* wp_makesymbol ( char *  name)

◆ wp_newf1()

struct wp_node* wp_newf1 ( enum wp_f1_t  ftype,
struct wp_node l 
)

◆ wp_newf2()

struct wp_node* wp_newf2 ( enum wp_f2_t  ftype,
struct wp_node l,
struct wp_node r 
)

◆ wp_newnode()

struct wp_node* wp_newnode ( enum wp_node_t  type,
struct wp_node l,
struct wp_node r 
)

◆ wp_newnumber()

struct wp_node* wp_newnumber ( amrex_real  d)

◆ wp_newsymbol()

struct wp_node* wp_newsymbol ( struct wp_symbol sym)

◆ wp_parser_ast_dup()

struct wp_node* wp_parser_ast_dup ( struct wp_parser parser,
struct wp_node src,
int  move 
)

◆ wp_parser_delete()

void wp_parser_delete ( struct wp_parser parser)

◆ wp_parser_dup()

struct wp_parser* wp_parser_dup ( struct wp_parser source)

◆ wp_parser_new()

struct wp_parser* wp_parser_new ( void  )

◆ wp_parser_regvar()

void wp_parser_regvar ( struct wp_parser parser,
char const *  name,
amrex_real *  p 
)

◆ wp_parser_regvar_gpu()

void wp_parser_regvar_gpu ( struct wp_parser parser,
char const *  name,
int  i 
)

◆ wp_parser_setconst()

void wp_parser_setconst ( struct wp_parser parser,
char const *  name,
amrex_real  c 
)

◆ yyerror()

void yyerror ( char const *  s,
  ... 
)