Callable wrapper around a compiled parser expression with N variables.
More...
#include <AMReX_Parser.H>
|
| __host__ __device__ double | operator() () const noexcept |
| | Evaluate the expression with no arguments.
|
| |
template<typename... Ts>
requires (N > 0 && sizeof...(Ts) == N && !amrex::Same<float,Ts...>::value) |
| __host__ __device__ double | operator() (Ts... var) const noexcept |
| | Evaluate the expression with N double-compatible arguments.
|
| |
template<std::same_as< float >... Ts>
requires (N > 0 && sizeof...(Ts) == N) |
| __host__ __device__ float | operator() (Ts... var) const noexcept |
| | Evaluate the expression with N float arguments.
|
| |
| __host__ __device__ double | operator() (GpuArray< double, N > const &var) const noexcept |
| | Evaluate the expression using an explicit array of inputs.
|
| |
| __host__ __device__ | operator bool () const |
| | True when a compiled executor buffer is available.
|
| |
template<
int N>
struct amrex::ParserExecutor< N >
Callable wrapper around a compiled parser expression with N variables.
Instances are returned by Parser::compile() / Parser::compileHost() and may be invoked on host or device. Device execution is available only when AMREX_USE_GPU is enabled and a device executor buffer has been created.
- Template Parameters
-
| N | Number of variables referenced in the expression. |
◆ operator bool()
True when a compiled executor buffer is available.
◆ operator()() [1/4]
Evaluate the expression with no arguments.
Enabled only for constant expressions (N == 0).
- Returns
- Expression value as double precision.
◆ operator()() [2/4]
Evaluate the expression using an explicit array of inputs.
- Parameters
-
| var | Array storing the N variables in parser variable order. |
- Returns
- Expression value promoted to double precision.
◆ operator()() [3/4]
template<typename... Ts>
requires (N > 0 && sizeof...(Ts) == N && !
amrex::Same<float,Ts...>::value)
Evaluate the expression with N double-compatible arguments.
- Parameters
-
| var | Scalar arguments supplied in parser variable order. |
- Returns
- Expression value promoted to double precision.
◆ operator()() [4/4]
template<std::same_as< float >... Ts>
requires (N > 0 && sizeof...(Ts) == N)
Evaluate the expression with N float arguments.
Returns a float when all inputs are float.
- Parameters
-
| var | Scalar arguments supplied in parser variable order. |
◆ m_device_executor
Pointer to device-visible bytecode (if copied).
◆ m_host_executor
Pointer to host-visible bytecode.
The documentation for this struct was generated from the following files: