|
Mundy: Multibody Nonlocal Dynamics Version of the Day
|
Math-function dispatch and scalar utilities compatible with auto-diff scalar types. More...
Classes | |
| struct | mundy::passive_scalar< T > |
| Trait: underlying passive (non-AD) type of T. For arithmetic T: passive_scalar_t<T> == T. For AD types exposing T::value_type: passive_scalar_t<T> == typename T::value_type. More... | |
| struct | mundy::passive_scalar< T > |
Namespaces | |
| namespace | mundy |
Macros | |
| #define | MUNDY_MATH_DISPATCH_UNARY(func) |
| Unary: arithmetic → Kokkos::func(x); AD → ADL + using std::func. | |
| #define | MUNDY_MATH_DISPATCH_BINARY(func) |
| Binary (possibly mixed types): arithmetic → Kokkos::func(a,b); AD → ADL + using std::func. | |
Typedefs | |
| template<typename T> | |
| using | mundy::passive_scalar_t = typename passive_scalar<T>::type |
Variables | |
| template<typename T> | |
| constexpr auto | mundy::mundy_infinity_v = Kokkos::Experimental::infinity_v<passive_scalar_t<T>> |
| template<typename T> | |
| constexpr auto | mundy::mundy_epsilon_v = Kokkos::Experimental::epsilon_v<passive_scalar_t<T>> |
| template<typename T> | |
| constexpr auto | mundy::mundy_norm_min_v = Kokkos::Experimental::norm_min_v<passive_scalar_t<T>> |
For arithmetic types the dispatch routes through Kokkos (device-compatible). For all other types (AD duals, complex, ...) it uses using std::func; func(x) so that ADL finds whatever overload the AD library provides in its own namespace.
| #define MUNDY_MATH_DISPATCH_UNARY | ( | func | ) |
| #define MUNDY_MATH_DISPATCH_BINARY | ( | func | ) |