OPALX (Object Oriented Parallel Accelerator Library for Exascale) MINIorX
OPALX
ippl::detail::meta_hess< E > Struct Template Reference

#include <IpplOperations.h>

Inheritance diagram for ippl::detail::meta_hess< E >:
Inheritance graph
Collaboration diagram for ippl::detail::meta_hess< E >:
Collaboration graph

Public Member Functions

KOKKOS_FUNCTION meta_hess (const E &u, const typename E::Mesh_t::vector_type vectors[], const typename E::Mesh_t::vector_type &hvector)
 
template<typename... Idx>
KOKKOS_INLINE_FUNCTION auto operator() (const Idx... args) const
 
KOKKOS_INLINE_FUNCTION auto operator[] (size_t i) const
 

Static Public Attributes

static constexpr unsigned dim = E::dim
 

Private Types

using Mesh_t = typename E::Mesh_t
 
using vector_type = typename Mesh_t::vector_type
 
using matrix_type = typename Mesh_t::matrix_type
 

Private Member Functions

template<size_t... row, typename... Idx>
KOKKOS_INLINE_FUNCTION constexpr void computeHessian (const std::index_sequence< row... > &is, matrix_type &hessian, const Idx... args) const
 
template<size_t row, size_t... col, typename... Idx>
KOKKOS_INLINE_FUNCTION constexpr int hessianRow (const std::index_sequence< col... > &, matrix_type &hessian, const Idx... args) const
 
template<size_t row, size_t col, typename... Idx>
KOKKOS_INLINE_FUNCTION constexpr vector_type hessianEntry (const Idx... args) const
 

Private Attributes

const E u_m
 
vector_type vectors_m [dim]
 
const vector_type hvector_m
 

Detailed Description

template<typename E>
struct ippl::detail::meta_hess< E >

Meta function of Hessian

Definition at line 518 of file IpplOperations.h.

Member Typedef Documentation

◆ matrix_type

template<typename E >
using ippl::detail::meta_hess< E >::matrix_type = typename Mesh_t::matrix_type
private

Definition at line 548 of file IpplOperations.h.

◆ Mesh_t

template<typename E >
using ippl::detail::meta_hess< E >::Mesh_t = typename E::Mesh_t
private

Definition at line 546 of file IpplOperations.h.

◆ vector_type

template<typename E >
using ippl::detail::meta_hess< E >::vector_type = typename Mesh_t::vector_type
private

Definition at line 547 of file IpplOperations.h.

Constructor & Destructor Documentation

◆ meta_hess()

template<typename E >
KOKKOS_FUNCTION ippl::detail::meta_hess< E >::meta_hess ( const E &  u,
const typename E::Mesh_t::vector_type  vectors[],
const typename E::Mesh_t::vector_type &  hvector 
)
inline

Definition at line 526 of file IpplOperations.h.

References ippl::detail::meta_hess< E >::vectors_m.

Member Function Documentation

◆ computeHessian()

template<typename E >
template<size_t... row, typename... Idx>
KOKKOS_INLINE_FUNCTION constexpr void ippl::detail::meta_hess< E >::computeHessian ( const std::index_sequence< row... > &  is,
matrix_type hessian,
const Idx...  args 
) const
inlineconstexprprivate

Utility function for computing the Hessian. Computes the rows of the matrix one by one via fold expression.

Template Parameters
row...the row indices (in practice, the sequence 0...Dim - 1)
Idx...the indices at which to access the field view
Parameters
isindex sequence (reused for row computation)
hessianmatrix in which to store the Hessian
args...the indices

Definition at line 564 of file IpplOperations.h.

Referenced by ippl::detail::meta_hess< E >::operator()().

◆ hessianEntry()

template<typename E >
template<size_t row, size_t col, typename... Idx>
KOKKOS_INLINE_FUNCTION constexpr vector_type ippl::detail::meta_hess< E >::hessianEntry ( const Idx...  args) const
inlineconstexprprivate

Utility function for computing the Hessian. Computes a single entry of the matrix

Template Parameters
rowthe row index
colthe column index
Idx...the indices at which to access the field view
Parameters
args...the indices
Returns
The entry of the Hessian at the given row and column

Definition at line 602 of file IpplOperations.h.

References ippl::apply(), ippl::detail::meta_hess< E >::dim, ippl::detail::meta_hess< E >::hvector_m, ippl::detail::meta_hess< E >::u_m, and ippl::detail::meta_hess< E >::vectors_m.

Here is the call graph for this function:

◆ hessianRow()

template<typename E >
template<size_t row, size_t... col, typename... Idx>
KOKKOS_INLINE_FUNCTION constexpr int ippl::detail::meta_hess< E >::hessianRow ( const std::index_sequence< col... > &  ,
matrix_type hessian,
const Idx...  args 
) const
inlineconstexprprivate

Utility function for computing the Hessian. Computes the entries in a single row of the matrix via fold expression.

Template Parameters
rowthe row index
col...the column indices (in practice, the sequence 0...Dim - 1)
Idx...the indices at which to access the field view
Parameters
hessianmatrix in which to store the hessian
args...the indices
Returns
An unused dummy value (required to allow use of a more performant fold expression)

Definition at line 585 of file IpplOperations.h.

◆ operator()()

template<typename E >
template<typename... Idx>
KOKKOS_INLINE_FUNCTION auto ippl::detail::meta_hess< E >::operator() ( const Idx...  args) const
inline

Definition at line 539 of file IpplOperations.h.

References ippl::detail::meta_hess< E >::computeHessian().

Here is the call graph for this function:

◆ operator[]()

KOKKOS_INLINE_FUNCTION auto ippl::detail::Expression< meta_hess< E > , N >::operator[] ( size_t  i) const
inlineinherited

Access single element of the expression

Definition at line 32 of file IpplExpressions.h.

Member Data Documentation

◆ dim

template<typename E >
constexpr unsigned ippl::detail::meta_hess< E >::dim = E::dim
staticconstexpr

Definition at line 523 of file IpplOperations.h.

Referenced by ippl::detail::meta_hess< E >::hessianEntry().

◆ hvector_m

template<typename E >
const vector_type ippl::detail::meta_hess< E >::hvector_m
private

Definition at line 552 of file IpplOperations.h.

Referenced by ippl::detail::meta_hess< E >::hessianEntry().

◆ u_m

template<typename E >
const E ippl::detail::meta_hess< E >::u_m
private

Definition at line 550 of file IpplOperations.h.

Referenced by ippl::detail::meta_hess< E >::hessianEntry().

◆ vectors_m

template<typename E >
vector_type ippl::detail::meta_hess< E >::vectors_m[dim]
private

The documentation for this struct was generated from the following file: