MADNESS 0.10.1
Public Member Functions | Static Public Member Functions | Public Attributes | Private Types | Private Attributes | List of all members
madness::MacroTask< taskT >::MacroTaskInternal Class Reference
Inheritance diagram for madness::MacroTask< taskT >::MacroTaskInternal:
Inheritance graph
[legend]
Collaboration diagram for madness::MacroTask< taskT >::MacroTaskInternal:
Collaboration graph
[legend]

Public Member Functions

 MacroTaskInternal (const taskT &task, const std::pair< Batch, double > &batch_prio, const recordlistT &inputrecords, const recordlistT &outputrecords)
 
template<typename resultT1 , std::size_t I = 0>
std::enable_if< is_tuple< resultT1 >::value, void >::type accumulate_into_final_result (World &subworld, resultT1 &final_result, const resultT1 &tmp_result, const argtupleT &argtuple)
 accumulate the result of the task into the final result living in the universe
 
template<typename resultT1 >
std::enable_if< notis_tuple< resultT1 >::value, void >::type accumulate_into_final_result (World &subworld, resultT1 &result, const resultT1 &result_tmp, const argtupleT &argtuple)
 accumulate the result of the task into the final result living in the universe
 
template<typename tupleT , typename tupleR , typename opT , std::size_t I = 0>
void binary_tuple_loop (tupleT &tuple1, tupleR &tuple2, opT &op) const
 loop over the tuple elements of both tuples and execute the operation op on each element pair
 
void cleanup () override
 
std::string get_name () const
 
resultT get_output (World &subworld, Cloud &cloud)
 return the WorldObjects or the result functions living in the universe
 
void print_me (std::string s="") const override
 
void print_me_as_table (std::string s="") const override
 
void run (World &subworld, Cloud &cloud, MacroTaskBase::taskqT &taskq, const long element, const bool debug) override
 
template<typename tupleT , typename opT , std::size_t I = 0>
void unary_tuple_loop (tupleT &tuple, opT &op) const
 
- Public Member Functions inherited from madness::MacroTaskIntermediate< MacroTask >
 MacroTaskIntermediate ()
 
 ~MacroTaskIntermediate ()
 
- Public Member Functions inherited from madness::MacroTaskBase
 MacroTaskBase ()
 
virtual ~MacroTaskBase ()
 
double get_priority () const
 
bool is_complete () const
 
bool is_running () const
 
bool is_waiting () const
 
std::string print_priority_and_status_to_string () const
 
void set_complete ()
 
void set_priority (const double p)
 
void set_running ()
 
void set_waiting ()
 

Static Public Member Functions

template<typename T , std::size_t NDIM>
static Function< T, NDIMpointer2WorldObject (const std::shared_ptr< FunctionImpl< T, NDIM > > impl)
 
template<typename T >
static ScalarResult< Tpointer2WorldObject (const std::shared_ptr< ScalarResultImpl< T > > sr_impl)
 
template<typename T , std::size_t NDIM>
static std::vector< Function< T, NDIM > > pointer2WorldObject (const std::vector< std::shared_ptr< FunctionImpl< T, NDIM > > > v_impl)
 
template<typename T >
static std::vector< ScalarResult< T > > pointer2WorldObject (const std::vector< std::shared_ptr< ScalarResultImpl< T > > > v_sr_impl)
 

Public Attributes

taskT task
 
- Public Attributes inherited from madness::MacroTaskBase
double priority =1.0
 
enum madness::MacroTaskBase::Status stat =Unknown
 

Private Types

typedef decay_tuple< typename taskT::argtupleT > argtupleT
 
typedef taskT::resultT resultT
 

Private Attributes

recordlistT inputrecords
 
recordlistT outputrecords
 

Additional Inherited Members

- Public Types inherited from madness::MacroTaskBase
enum  Status { Running , Waiting , Complete , Unknown }
 
typedef std::vector< std::shared_ptr< MacroTaskBase > > taskqT
 

Member Typedef Documentation

◆ argtupleT

template<typename taskT >
typedef decay_tuple<typename taskT::argtupleT> madness::MacroTask< taskT >::MacroTaskInternal::argtupleT
private

◆ resultT

template<typename taskT >
typedef taskT::resultT madness::MacroTask< taskT >::MacroTaskInternal::resultT
private

Constructor & Destructor Documentation

◆ MacroTaskInternal()

template<typename taskT >
madness::MacroTask< taskT >::MacroTaskInternal::MacroTaskInternal ( const taskT &  task,
const std::pair< Batch, double > &  batch_prio,
const recordlistT inputrecords,
const recordlistT outputrecords 
)
inline

Member Function Documentation

◆ accumulate_into_final_result() [1/2]

template<typename taskT >
template<typename resultT1 , std::size_t I = 0>
std::enable_if< is_tuple< resultT1 >::value, void >::type madness::MacroTask< taskT >::MacroTaskInternal::accumulate_into_final_result ( World subworld,
resultT1 &  final_result,
const resultT1 &  tmp_result,
const argtupleT argtuple 
)
inline

accumulate the result of the task into the final result living in the universe

◆ accumulate_into_final_result() [2/2]

template<typename taskT >
template<typename resultT1 >
std::enable_if< notis_tuple< resultT1 >::value, void >::type madness::MacroTask< taskT >::MacroTaskInternal::accumulate_into_final_result ( World subworld,
resultT1 &  result,
const resultT1 &  result_tmp,
const argtupleT argtuple 
)
inline

accumulate the result of the task into the final result living in the universe

References madness::change_tree_state(), madness::compressed, madness::gaxpy(), madness::reconstructed, and madness::TT_FULL.

◆ binary_tuple_loop()

template<typename taskT >
template<typename tupleT , typename tupleR , typename opT , std::size_t I = 0>
void madness::MacroTask< taskT >::MacroTaskInternal::binary_tuple_loop ( tupleT &  tuple1,
tupleR &  tuple2,
opT &  op 
) const
inline

loop over the tuple elements of both tuples and execute the operation op on each element pair

References op().

Referenced by madness::MacroTask< taskT >::MacroTaskInternal::run().

◆ cleanup()

template<typename taskT >
void madness::MacroTask< taskT >::MacroTaskInternal::cleanup ( )
inlineoverridevirtual

◆ get_name()

template<typename taskT >
std::string madness::MacroTask< taskT >::MacroTaskInternal::get_name ( ) const
inline

◆ get_output()

template<typename taskT >
resultT madness::MacroTask< taskT >::MacroTaskInternal::get_output ( World subworld,
Cloud cloud 
)
inline

return the WorldObjects or the result functions living in the universe

read the pointers to the universe WorldObjects from the cloud, convert them to actual WorldObjects and return them

References madness::Cloud::consuming_load(), doit(), MADNESS_EXCEPTION, madness::MacroTask< taskT >::MacroTaskInternal::outputrecords, madness::MacroTask< taskT >::MacroTaskInternal::pointer2WorldObject(), and madness::MacroTask< taskT >::MacroTaskInternal::unary_tuple_loop().

Referenced by madness::MacroTask< taskT >::MacroTaskInternal::run().

◆ pointer2WorldObject() [1/4]

template<typename taskT >
template<typename T , std::size_t NDIM>
static Function< T, NDIM > madness::MacroTask< taskT >::MacroTaskInternal::pointer2WorldObject ( const std::shared_ptr< FunctionImpl< T, NDIM > >  impl)
inlinestatic

◆ pointer2WorldObject() [2/4]

template<typename taskT >
template<typename T >
static ScalarResult< T > madness::MacroTask< taskT >::MacroTaskInternal::pointer2WorldObject ( const std::shared_ptr< ScalarResultImpl< T > >  sr_impl)
inlinestatic

◆ pointer2WorldObject() [3/4]

template<typename taskT >
template<typename T , std::size_t NDIM>
static std::vector< Function< T, NDIM > > madness::MacroTask< taskT >::MacroTaskInternal::pointer2WorldObject ( const std::vector< std::shared_ptr< FunctionImpl< T, NDIM > > >  v_impl)
inlinestatic

References madness::set_impl().

◆ pointer2WorldObject() [4/4]

template<typename taskT >
template<typename T >
static std::vector< ScalarResult< T > > madness::MacroTask< taskT >::MacroTaskInternal::pointer2WorldObject ( const std::vector< std::shared_ptr< ScalarResultImpl< T > > >  v_sr_impl)
inlinestatic

◆ print_me()

template<typename taskT >
void madness::MacroTask< taskT >::MacroTaskInternal::print_me ( std::string  s = "") const
inlineoverridevirtual

◆ print_me_as_table()

template<typename taskT >
void madness::MacroTask< taskT >::MacroTaskInternal::print_me_as_table ( std::string  s = "") const
inlineoverridevirtual

◆ run()

template<typename taskT >
void madness::MacroTask< taskT >::MacroTaskInternal::run ( World subworld,
Cloud cloud,
MacroTaskBase::taskqT taskq,
const long  element,
const bool  debug 
)
inlineoverridevirtual

◆ unary_tuple_loop()

template<typename taskT >
template<typename tupleT , typename opT , std::size_t I = 0>
void madness::MacroTask< taskT >::MacroTaskInternal::unary_tuple_loop ( tupleT &  tuple,
opT &  op 
) const
inline

Member Data Documentation

◆ inputrecords

template<typename taskT >
recordlistT madness::MacroTask< taskT >::MacroTaskInternal::inputrecords
private

◆ outputrecords

template<typename taskT >
recordlistT madness::MacroTask< taskT >::MacroTaskInternal::outputrecords
private

◆ task

template<typename taskT >
taskT madness::MacroTask< taskT >::MacroTaskInternal::task

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