MADNESS 0.10.1
madness::FunctionImpl< T, NDIM >::recursive_apply_op_vec< opT, LDIM > Struct Template Reference

recursive part of recursive_apply for a vector of matched pairs More...

#include <funcimpl.h>

Collaboration diagram for madness::FunctionImpl< T, NDIM >::recursive_apply_op_vec< opT, LDIM >:

Public Types

typedef CoeffTracker< T, LDIM > ctL
typedef recursive_apply_op_vec< opT, LDIM > this_type

Public Member Functions

 recursive_apply_op_vec ()=default
 recursive_apply_op_vec (const recursive_apply_op_vec &other)
 recursive_apply_op_vec (implT *result, const std::vector< ctL > &iafs, const std::vector< ctL > &iags, const opT *apply_op)
Future< this_type > activate () const
std::pair< bool, coeffT > finalize (const double kernel_norm, const keyT &key, const coeffT &coeff) const
 sole purpose is to wait for the kernel norm, wrap it and send it back to caller
this_type forward_ctor (implT *r, const std::vector< Future< ctL > > &f_futures, const std::vector< Future< ctL > > &g_futures, const opT *apply_op1)
this_type make_child (const keyT &child) const
std::pair< bool, coeffT > operator() (const Key< NDIM > &key) const
 make the summed NS-coefficients and send off the application of the operator
bool randomize () const
template<typename Archive>
void serialize (const Archive &ar)

Public Attributes

opT * apply_op
std::vector< ctL > iafs
std::vector< ctL > iags
implT * result

Detailed Description

template<typename T, std::size_t NDIM>
template<typename opT, std::size_t LDIM>
struct madness::FunctionImpl< T, NDIM >::recursive_apply_op_vec< opT, LDIM >

recursive part of recursive_apply for a vector of matched pairs

Handles Σ_i f_i(1) * g_i(2) in a single tree traversal, accumulating outer products with immediate truncation.

Member Typedef Documentation

◆ ctL

template<typename T, std::size_t NDIM>
template<typename opT, std::size_t LDIM>
typedef CoeffTracker<T,LDIM> madness::FunctionImpl< T, NDIM >::recursive_apply_op_vec< opT, LDIM >::ctL

◆ this_type

template<typename T, std::size_t NDIM>
template<typename opT, std::size_t LDIM>
typedef recursive_apply_op_vec<opT,LDIM> madness::FunctionImpl< T, NDIM >::recursive_apply_op_vec< opT, LDIM >::this_type

Constructor & Destructor Documentation

◆ recursive_apply_op_vec() [1/3]

template<typename T, std::size_t NDIM>
template<typename opT, std::size_t LDIM>
madness::FunctionImpl< T, NDIM >::recursive_apply_op_vec< opT, LDIM >::recursive_apply_op_vec ( )
default

Referenced by recursive_apply_op_vec().

◆ recursive_apply_op_vec() [2/3]

template<typename T, std::size_t NDIM>
template<typename opT, std::size_t LDIM>
madness::FunctionImpl< T, NDIM >::recursive_apply_op_vec< opT, LDIM >::recursive_apply_op_vec ( implT * result,
const std::vector< ctL > & iafs,
const std::vector< ctL > & iags,
const opT * apply_op )
inline

References apply_op, iafs, iags, MADNESS_ASSERT, NDIM, and result.

◆ recursive_apply_op_vec() [3/3]

template<typename T, std::size_t NDIM>
template<typename opT, std::size_t LDIM>
madness::FunctionImpl< T, NDIM >::recursive_apply_op_vec< opT, LDIM >::recursive_apply_op_vec ( const recursive_apply_op_vec< opT, LDIM > & other)
inline

Member Function Documentation

◆ activate()

template<typename T, std::size_t NDIM>
template<typename opT, std::size_t LDIM>
Future< this_type > madness::FunctionImpl< T, NDIM >::recursive_apply_op_vec< opT, LDIM >::activate ( ) const
inline

activate all CoeffTrackers using fan-in: all 2N futures are registered as dependencies and the forward_ctor task fires only when all are resolved

References apply_op, forward_ctor(), iafs, iags, result, and madness::detail::wrap_mem_fn().

◆ finalize()

template<typename T, std::size_t NDIM>
template<typename opT, std::size_t LDIM>
std::pair< bool, coeffT > madness::FunctionImpl< T, NDIM >::recursive_apply_op_vec< opT, LDIM >::finalize ( const double kernel_norm,
const keyT & key,
const coeffT & coeff ) const
inline

sole purpose is to wait for the kernel norm, wrap it and send it back to caller

References madness::Key< NDIM >::level(), result, and madness::FunctionImpl< T, NDIM >::thresh.

◆ forward_ctor()

template<typename T, std::size_t NDIM>
template<typename opT, std::size_t LDIM>
this_type madness::FunctionImpl< T, NDIM >::recursive_apply_op_vec< opT, LDIM >::forward_ctor ( implT * r,
const std::vector< Future< ctL > > & f_futures,
const std::vector< Future< ctL > > & g_futures,
const opT * apply_op1 )
inline

Referenced by activate().

◆ make_child()

template<typename T, std::size_t NDIM>
template<typename opT, std::size_t LDIM>
this_type madness::FunctionImpl< T, NDIM >::recursive_apply_op_vec< opT, LDIM >::make_child ( const keyT & child) const
inline

◆ operator()()

template<typename T, std::size_t NDIM>
template<typename opT, std::size_t LDIM>
std::pair< bool, coeffT > madness::FunctionImpl< T, NDIM >::recursive_apply_op_vec< opT, LDIM >::operator() ( const Key< NDIM > & key) const
inline

make the summed NS-coefficients and send off the application of the operator

Forms Σ_i outer(f_i, g_i) with immediate truncation after each addition

Returns
a pair<bool,coeffT>(is_leaf,coeffT())

References apply_op, madness::Key< NDIM >::break_apart(), madness::FunctionImpl< T, NDIM >::do_apply_directed_screening(), madness::finalize(), madness::FunctionDefaults< NDIM >::get_thresh(), iafs, iags, madness::outer(), p(), madness::FunctionImpl< T, NDIM >::reduce(), result, and s0.

◆ randomize()

template<typename T, std::size_t NDIM>
template<typename opT, std::size_t LDIM>
bool madness::FunctionImpl< T, NDIM >::recursive_apply_op_vec< opT, LDIM >::randomize ( ) const
inline

◆ serialize()

template<typename T, std::size_t NDIM>
template<typename opT, std::size_t LDIM>
template<typename Archive>
void madness::FunctionImpl< T, NDIM >::recursive_apply_op_vec< opT, LDIM >::serialize ( const Archive & ar)
inline

References apply_op, iafs, iags, and result.

Member Data Documentation

◆ apply_op

template<typename T, std::size_t NDIM>
template<typename opT, std::size_t LDIM>
opT* madness::FunctionImpl< T, NDIM >::recursive_apply_op_vec< opT, LDIM >::apply_op

◆ iafs

template<typename T, std::size_t NDIM>
template<typename opT, std::size_t LDIM>
std::vector<ctL> madness::FunctionImpl< T, NDIM >::recursive_apply_op_vec< opT, LDIM >::iafs

◆ iags

template<typename T, std::size_t NDIM>
template<typename opT, std::size_t LDIM>
std::vector<ctL> madness::FunctionImpl< T, NDIM >::recursive_apply_op_vec< opT, LDIM >::iags

◆ result

template<typename T, std::size_t NDIM>
template<typename opT, std::size_t LDIM>
implT* madness::FunctionImpl< T, NDIM >::recursive_apply_op_vec< opT, LDIM >::result

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