IPPL (Independent Parallel Particle Layer)
IPPL
Loading...
Searching...
No Matches
IpplOperations.h File Reference
#include <Kokkos_MathematicalFunctions.hpp>
#include <tuple>
Include dependency graph for IpplOperations.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  ippl::ExtractExpressionRank
struct  ippl::detail::meta_cross< E1, E2 >
struct  ippl::detail::meta_dot< E1, E2 >
struct  ippl::detail::meta_grad< E >
struct  ippl::detail::meta_div< E >
struct  ippl::detail::meta_laplace< E >
struct  ippl::detail::meta_curl< E >
struct  ippl::detail::meta_hess< E >

Namespaces

namespace  ippl
namespace  ippl::detail

Macros

#define DefineUnaryOperation(fun, name, op1, op2)
#define DefineBinaryOperation(fun, name, op1, op2)

Functions

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)

Macro Definition Documentation

◆ DefineBinaryOperation

#define DefineBinaryOperation ( fun,
name,
op1,
op2 )

Macro to overload C++ operators for the Scalar, BareField and Vector class.

Parameters
funname of the expression template function
nameoverloaded operator
op1operation for single index access
op2operation for multiple indices access

Definition at line 130 of file IpplOperations.h.

◆ 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)); \
}

Definition at line 69 of file IpplOperations.h.