#include <Kokkos_MathematicalFunctions.hpp>
#include <tuple>
Go to the source code of this file.
|
| template<typename View , typename Coords , size_t... Idx> |
| KOKKOS_INLINE_FUNCTION constexpr decltype(auto) | ippl::apply_impl (const View &view, const Coords &coords, const std::index_sequence< Idx... > &) |
| |
| template<typename View , typename Coords > |
| KOKKOS_INLINE_FUNCTION constexpr decltype(auto) | ippl::apply (const View &view, const Coords &coords) |
| |
|
template<typename E1 , size_t N1, typename E2 , size_t N2> |
| KOKKOS_INLINE_FUNCTION detail::meta_cross< E1, E2 > | ippl::cross (const detail::Expression< E1, N1 > &u, const detail::Expression< E2, N2 > &v) |
| |
|
template<typename E1 , size_t N1, typename E2 , size_t N2> |
| KOKKOS_INLINE_FUNCTION detail::meta_dot< E1, E2 > | ippl::dot (const detail::Expression< E1, N1 > &u, const detail::Expression< E2, N2 > &v) |
| |
◆ DefineBinaryOperation
| #define DefineBinaryOperation |
( |
|
fun, |
|
|
|
name, |
|
|
|
op1, |
|
|
|
op2 |
|
) |
| |
Macro to overload C++ operators for the Scalar, BareField and Vector class.
- Parameters
-
| fun | name of the expression template function |
| name | overloaded operator |
| op1 | operation for single index access |
| op2 | operation for multiple indices access |
◆ DefineUnaryOperation
| #define DefineUnaryOperation |
( |
|
fun, |
|
|
|
name, |
|
|
|
op1, |
|
|
|
op2 |
|
) |
| |
Value: template <typename E> \
struct fun : public detail::Expression<fun<E>, sizeof(E)> { \
constexpr static unsigned dim = E::dim; \
using value_type = typename E::value_type; \
\
KOKKOS_FUNCTION \
fun(const E& u) \
: u_m(u) {} \
\
KOKKOS_INLINE_FUNCTION auto operator[](size_t i) const { return op1; } \
\
template <typename... Args> \
KOKKOS_INLINE_FUNCTION auto operator()(Args... args) const { \
return op2; \
} \
\
private: \
const E u_m; \
}; \
\
template <typename E, size_t N> \
KOKKOS_INLINE_FUNCTION fun<E> name(const detail::Expression<E, N>& u) { \
return fun<E>(*static_cast<const E*>(&u)); \
}