Mundy: Multibody Nonlocal Dynamics Version of the Day
Loading...
Searching...
No Matches
mundy::KokkosBackend< ExecSpace > Struct Template Reference

Backend for Kokkos single process execution. More...

#include <solver_backends.hpp>

Public Types

using exec_space = ExecSpace

Static Public Member Functions

template<class Vector>
static MUNDY_SUPPRESS_GPU_CALL_FROM_HOST_WARNINGS_PUSH auto make_vector_like (const Vector &q)
template<class LinearOp>
static auto make_domain_vector (const LinearOp &op)
template<class LinearOp>
static auto make_range_vector (const LinearOp &op)
template<class Vector>
static Vector make_vector (size_t size)
 An uninitialized Vector of the given size.
template<class LinearOp>
static MUNDY_SUPPRESS_GPU_CALL_FROM_HOST_WARNINGS_POP auto make_workspace (const LinearOp &op)
template<class Vector>
static size_t size (Vector &x)
template<class LinearOp>
static size_t domain_size (LinearOp &op)
template<class LinearOp>
static size_t domain_size (LinearOp &op)
template<class LinearOp>
static size_t domain_size (LinearOp &)
template<class LinearOp>
static size_t range_size (LinearOp &op)
template<class LinearOp>
static size_t range_size (LinearOp &op)
template<class LinearOp>
static size_t range_size (LinearOp &)
template<class Vector>
static decltype(auto) vector_data (Vector &x, size_t i)
template<class Vector>
static auto subvector (const Vector &x, size_t begin, size_t end)
 The entries [begin, end) of x, aliasing its storage.
template<class DestVector, class SrcVector>
static void deep_copy (DestVector &dest, const SrcVector &src)
template<class LinearOp, class XVector, class YVector>
static void apply (const LinearOp &op, const XVector &x, YVector &y)
template<typename LinearOp, class XVector, class YVector>
static void apply (const LinearOp &op, const XVector &x, YVector &y)
template<class LinearOp, class XVector, class YVector, class Workspace>
static void apply (const LinearOp &op, const XVector &x, YVector &y, Workspace &workspace)
 Dispatch to the matching apply_impl overload below, invalidating the workspace exactly once first.
template<class Scalar, class LinearOp, class XVector, class YVector>
static void apply (Scalar alpha, const LinearOp &op, const XVector &x, Scalar beta, YVector &y)
template<class Scalar, class LinearOp, class XVector, class YVector>
static void apply (Scalar alpha, const LinearOp &op, const XVector &x, Scalar beta, YVector &y)
template<class Scalar, class LinearOp, class XVector, class YVector, class Workspace>
static void apply (Scalar alpha, const LinearOp &op, const XVector &x, Scalar beta, YVector &y, Workspace &workspace)
template<class Scalar, class LinearOp, class XVector, class YVector, class Workspace>
static void apply (Scalar alpha, const LinearOp &op, const XVector &x, Scalar beta, YVector &y, Workspace &workspace)
template<class Scalar, class XVector, class YVector>
static void axpby (const Scalar alpha, const XVector &x, const Scalar beta, YVector &y)
template<class XVector, class YVector, class ZVector>
static void elementwise_mul (const XVector &x, const YVector &y, ZVector &z)
 z := x .* y, elementwise.
template<class XVector, class YVector, class ZVector>
static void elementwise_div (const XVector &x, const YVector &y, ZVector &z)
 z := x ./ y, elementwise.
template<typename Wrapper, class Scalar, class XVector, class YVector, class ZVector>
static void wrapped_axpbyz (const Scalar alpha, const XVector &x, const Scalar beta, const YVector &y, ZVector &z, const Wrapper &wrapper)
template<class ReductionScalar, class XVector, class YVector>
static ReductionScalar dot (const XVector &x, const YVector &y)
template<class ReductionScalar, class XVector, class YVector>
static ReductionScalar diff_dot (const XVector &x, const YVector &y)
template<class ReductionScalar, class X1Vector, class X2Vector, class Y1Vector, class Y2Vector>
static ReductionScalar diff_dot (const X1Vector &x1, const X2Vector &x2, const Y1Vector &y1, const Y2Vector &y2)
template<typename ReductionScalar, typename Functor>
static void reduce_max (size_t n, const Functor &func, ReductionScalar &result)
template<typename ReductionScalar, typename Functor, class Vector>
static void reduce_max (const Vector &, size_t n, const Functor &func, ReductionScalar &result)

Static Public Attributes

static constexpr bool has_static_sizes = false
template<class Op>
static constexpr bool is_native_matrix
 Whether Op is one of this backend's native matrices: a dense rank-2 view or a sparse matrix.

Detailed Description

template<typename ExecSpace>
struct mundy::KokkosBackend< ExecSpace >

Applies matrix views, dense (a rank-2 Kokkos::View) or sparse (a KokkosSparse::CrsMatrix), and operators that provide their own apply.

Member Typedef Documentation

◆ exec_space

template<typename ExecSpace>
using mundy::KokkosBackend< ExecSpace >::exec_space = ExecSpace

Member Function Documentation

◆ make_vector_like()

template<typename ExecSpace>
template<class Vector>
MUNDY_SUPPRESS_GPU_CALL_FROM_HOST_WARNINGS_PUSH auto mundy::KokkosBackend< ExecSpace >::make_vector_like ( const Vector & q)
inlinestatic

◆ make_domain_vector()

template<typename ExecSpace>
template<class LinearOp>
auto mundy::KokkosBackend< ExecSpace >::make_domain_vector ( const LinearOp & op)
inlinestatic

◆ make_range_vector()

template<typename ExecSpace>
template<class LinearOp>
auto mundy::KokkosBackend< ExecSpace >::make_range_vector ( const LinearOp & op)
inlinestatic

◆ make_vector()

template<typename ExecSpace>
template<class Vector>
Vector mundy::KokkosBackend< ExecSpace >::make_vector ( size_t size)
inlinestatic

◆ make_workspace()

template<typename ExecSpace>
template<class LinearOp>
MUNDY_SUPPRESS_GPU_CALL_FROM_HOST_WARNINGS_POP auto mundy::KokkosBackend< ExecSpace >::make_workspace ( const LinearOp & op)
inlinestatic

◆ size()

template<typename ExecSpace>
template<class Vector>
size_t mundy::KokkosBackend< ExecSpace >::size ( Vector & x)
inlinestatic

◆ domain_size() [1/3]

template<typename ExecSpace>
template<class LinearOp>
size_t mundy::KokkosBackend< ExecSpace >::domain_size ( LinearOp & op)
inlinestatic

◆ domain_size() [2/3]

template<typename ExecSpace>
template<class LinearOp>
size_t mundy::KokkosBackend< ExecSpace >::domain_size ( LinearOp & op)
inlinestatic

◆ domain_size() [3/3]

template<typename ExecSpace>
template<class LinearOp>
size_t mundy::KokkosBackend< ExecSpace >::domain_size ( LinearOp & )
inlinestatic

◆ range_size() [1/3]

template<typename ExecSpace>
template<class LinearOp>
size_t mundy::KokkosBackend< ExecSpace >::range_size ( LinearOp & op)
inlinestatic

◆ range_size() [2/3]

template<typename ExecSpace>
template<class LinearOp>
size_t mundy::KokkosBackend< ExecSpace >::range_size ( LinearOp & op)
inlinestatic

◆ range_size() [3/3]

template<typename ExecSpace>
template<class LinearOp>
size_t mundy::KokkosBackend< ExecSpace >::range_size ( LinearOp & )
inlinestatic

◆ vector_data()

template<typename ExecSpace>
template<class Vector>
decltype(auto) mundy::KokkosBackend< ExecSpace >::vector_data ( Vector & x,
size_t i )
inlinestatic

◆ subvector()

template<typename ExecSpace>
template<class Vector>
auto mundy::KokkosBackend< ExecSpace >::subvector ( const Vector & x,
size_t begin,
size_t end )
inlinestatic

◆ deep_copy()

template<typename ExecSpace>
template<class DestVector, class SrcVector>
void mundy::KokkosBackend< ExecSpace >::deep_copy ( DestVector & dest,
const SrcVector & src )
inlinestatic

◆ apply() [1/7]

template<typename ExecSpace>
template<class LinearOp, class XVector, class YVector>
void mundy::KokkosBackend< ExecSpace >::apply ( const LinearOp & op,
const XVector & x,
YVector & y )
inlinestatic

◆ apply() [2/7]

template<typename ExecSpace>
template<typename LinearOp, class XVector, class YVector>
void mundy::KokkosBackend< ExecSpace >::apply ( const LinearOp & op,
const XVector & x,
YVector & y )
inlinestatic

◆ apply() [3/7]

template<typename ExecSpace>
template<class LinearOp, class XVector, class YVector, class Workspace>
void mundy::KokkosBackend< ExecSpace >::apply ( const LinearOp & op,
const XVector & x,
YVector & y,
Workspace & workspace )
inlinestatic

◆ apply() [4/7]

template<typename ExecSpace>
template<class Scalar, class LinearOp, class XVector, class YVector>
void mundy::KokkosBackend< ExecSpace >::apply ( Scalar alpha,
const LinearOp & op,
const XVector & x,
Scalar beta,
YVector & y )
inlinestatic

◆ apply() [5/7]

template<typename ExecSpace>
template<class Scalar, class LinearOp, class XVector, class YVector>
void mundy::KokkosBackend< ExecSpace >::apply ( Scalar alpha,
const LinearOp & op,
const XVector & x,
Scalar beta,
YVector & y )
inlinestatic

◆ apply() [6/7]

template<typename ExecSpace>
template<class Scalar, class LinearOp, class XVector, class YVector, class Workspace>
void mundy::KokkosBackend< ExecSpace >::apply ( Scalar alpha,
const LinearOp & op,
const XVector & x,
Scalar beta,
YVector & y,
Workspace & workspace )
inlinestatic

◆ apply() [7/7]

template<typename ExecSpace>
template<class Scalar, class LinearOp, class XVector, class YVector, class Workspace>
void mundy::KokkosBackend< ExecSpace >::apply ( Scalar alpha,
const LinearOp & op,
const XVector & x,
Scalar beta,
YVector & y,
Workspace & workspace )
inlinestatic

◆ axpby()

template<typename ExecSpace>
template<class Scalar, class XVector, class YVector>
void mundy::KokkosBackend< ExecSpace >::axpby ( const Scalar alpha,
const XVector & x,
const Scalar beta,
YVector & y )
inlinestatic

◆ elementwise_mul()

template<typename ExecSpace>
template<class XVector, class YVector, class ZVector>
void mundy::KokkosBackend< ExecSpace >::elementwise_mul ( const XVector & x,
const YVector & y,
ZVector & z )
inlinestatic

◆ elementwise_div()

template<typename ExecSpace>
template<class XVector, class YVector, class ZVector>
void mundy::KokkosBackend< ExecSpace >::elementwise_div ( const XVector & x,
const YVector & y,
ZVector & z )
inlinestatic

◆ wrapped_axpbyz()

template<typename ExecSpace>
template<typename Wrapper, class Scalar, class XVector, class YVector, class ZVector>
void mundy::KokkosBackend< ExecSpace >::wrapped_axpbyz ( const Scalar alpha,
const XVector & x,
const Scalar beta,
const YVector & y,
ZVector & z,
const Wrapper & wrapper )
inlinestatic

◆ dot()

template<typename ExecSpace>
template<class ReductionScalar, class XVector, class YVector>
ReductionScalar mundy::KokkosBackend< ExecSpace >::dot ( const XVector & x,
const YVector & y )
inlinestatic

◆ diff_dot() [1/2]

template<typename ExecSpace>
template<class ReductionScalar, class XVector, class YVector>
ReductionScalar mundy::KokkosBackend< ExecSpace >::diff_dot ( const XVector & x,
const YVector & y )
inlinestatic

◆ diff_dot() [2/2]

template<typename ExecSpace>
template<class ReductionScalar, class X1Vector, class X2Vector, class Y1Vector, class Y2Vector>
ReductionScalar mundy::KokkosBackend< ExecSpace >::diff_dot ( const X1Vector & x1,
const X2Vector & x2,
const Y1Vector & y1,
const Y2Vector & y2 )
inlinestatic

◆ reduce_max() [1/2]

template<typename ExecSpace>
template<typename ReductionScalar, typename Functor>
void mundy::KokkosBackend< ExecSpace >::reduce_max ( size_t n,
const Functor & func,
ReductionScalar & result )
inlinestatic

◆ reduce_max() [2/2]

template<typename ExecSpace>
template<typename ReductionScalar, typename Functor, class Vector>
void mundy::KokkosBackend< ExecSpace >::reduce_max ( const Vector & ,
size_t n,
const Functor & func,
ReductionScalar & result )
inlinestatic

Member Data Documentation

◆ has_static_sizes

template<typename ExecSpace>
bool mundy::KokkosBackend< ExecSpace >::has_static_sizes = false
staticconstexpr

◆ is_native_matrix

template<typename ExecSpace>
template<class Op>
bool mundy::KokkosBackend< ExecSpace >::is_native_matrix
staticconstexpr
Initial value:
=
false