MADNESS 0.10.1
madness::LeafOpRef< T, NDIM > Struct Template Reference

#include <leafop.h>

Public Member Functions

 LeafOpRef ()=default
 LeafOpRef (const LeafOpBase< T, NDIM > &b)
 LeafOpRef (const LeafOpRef &)=default
bool do_pre_screening () const
LeafOpRef & operator= (const LeafOpRef &)=default
bool post_screening (const Key< NDIM > &key, const GenTensor< T > &coeff) const
bool pre_screening (const Key< NDIM > &key) const
template<typename Archive>
void serialize (Archive &ar)
bool special_refinement_needed (const Key< NDIM > &key) const

Public Attributes

const LeafOpBase< T, NDIM > * base = nullptr

Detailed Description

template<typename T, std::size_t NDIM>
struct madness::LeafOpRef< T, NDIM >

Value-type adapter that satisfies the existing concept used by composite_product_op_NS (do_pre_screening, pre_screening, special_refinement_needed, post_screening, serialize) by forwarding to a LeafOpBase<T,NDIM> through a pointer.

Lifetime: the caller must keep the LeafOpBase alive for the duration of the composite_product / composite_inner call. This matches MADNESS's existing convention (Leaf_op holds a raw FunctionImpl pointer the same way).

Constructor & Destructor Documentation

◆ LeafOpRef() [1/3]

template<typename T, std::size_t NDIM>
madness::LeafOpRef< T, NDIM >::LeafOpRef ( )
default

Referenced by LeafOpRef(), and operator=().

◆ LeafOpRef() [2/3]

template<typename T, std::size_t NDIM>
madness::LeafOpRef< T, NDIM >::LeafOpRef ( const LeafOpBase< T, NDIM > & b)
inlineexplicit

References b, and base.

◆ LeafOpRef() [3/3]

template<typename T, std::size_t NDIM>
madness::LeafOpRef< T, NDIM >::LeafOpRef ( const LeafOpRef< T, NDIM > & )
default

References LeafOpRef().

Member Function Documentation

◆ do_pre_screening()

template<typename T, std::size_t NDIM>
bool madness::LeafOpRef< T, NDIM >::do_pre_screening ( ) const
inline

References base.

◆ operator=()

template<typename T, std::size_t NDIM>
LeafOpRef & madness::LeafOpRef< T, NDIM >::operator= ( const LeafOpRef< T, NDIM > & )
default

References LeafOpRef().

◆ post_screening()

template<typename T, std::size_t NDIM>
bool madness::LeafOpRef< T, NDIM >::post_screening ( const Key< NDIM > & key,
const GenTensor< T > & coeff ) const
inline

References base.

◆ pre_screening()

template<typename T, std::size_t NDIM>
bool madness::LeafOpRef< T, NDIM >::pre_screening ( const Key< NDIM > & key) const
inline

References base.

◆ serialize()

template<typename T, std::size_t NDIM>
template<typename Archive>
void madness::LeafOpRef< T, NDIM >::serialize ( Archive & ar)
inline

Pointer serialization: archive the bit pattern via uintptr_t. This is only meaningful for in-process tasks (the leaf_op must live in the same address space across the task boundary), which matches the existing MADNESS convention (Leaf_op already holds a raw FunctionImpl pointer).

References base.

◆ special_refinement_needed()

template<typename T, std::size_t NDIM>
bool madness::LeafOpRef< T, NDIM >::special_refinement_needed ( const Key< NDIM > & key) const
inline

References base.

Member Data Documentation

◆ base

template<typename T, std::size_t NDIM>
const LeafOpBase<T, NDIM>* madness::LeafOpRef< T, NDIM >::base = nullptr

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