7 #ifndef WARPX_PARSER_WRAPPER_H_ 8 #define WARPX_PARSER_WRAPPER_H_ 13 #include <AMReX_Gpu.H> 26 template <
typename... Ts>
28 std::enable_if_t<
sizeof...(Ts) == N
29 and amrex::Same<amrex::Real,Ts...>::value,
31 operator() (Ts... var)
const noexcept
34 #if AMREX_DEVICE_COMPILE 36 amrex::GpuArray<amrex::Real,N> l_var{var...};
37 return wp_ast_eval<0>(m_gpu_parser_ast, l_var.data());
49 struct wp_node * m_gpu_parser_ast =
nullptr;
~ParserWrapper()
Definition: WarpXParserWrapper.H:71
The ParserWrapper struct is constructed to safely use the GpuParser class that can essentially be tho...
Definition: WarpXParserWrapper.H:63
HostDeviceParser< N > getParser(ParserWrapper< N > const *parser_wrapper)
Definition: WarpXParserWrapper.H:85
HostDeviceParser< N > getParser() const
Definition: WarpXParserWrapper.H:75
AMREX_GPU_HOST_DEVICE std::enable_if_t< sizeof...(Ts)==N and amrex::Same< amrex::Real, Ts... >::value, amrex::Real > operator()(Ts... var) const noexcept
Definition: WarpXParserWrapper.H:31
Definition: wp_parser_y.h:91
void clear()
Definition: GpuParser.H:163
GpuParser< N > const * m_gpu_parser
Definition: WarpXParserWrapper.H:51
Definition: GpuParser.H:23
The HostDeviceParser struct is non-owning and is suitable for being value captured by device lamba...
Definition: WarpXParserWrapper.H:24