MADNESS  0.10.1
Classes | Public Member Functions | Private Types | Private Member Functions | Private Attributes | List of all members
madness::MacroTask< taskT > Class Template Reference

#include <macrotaskq.h>

Collaboration diagram for madness::MacroTask< taskT >:
Collaboration graph
[legend]

Classes

struct  io_redirect
 RAII class to redirect cout to a file. More...
 
struct  is_vector
 
struct  is_vector< std::vector< Q > >
 
class  MacroTaskInternal
 

Public Member Functions

 MacroTask (World &world, taskT &task, std::shared_ptr< MacroTaskQ > taskq_ptr=0)
 constructor takes the actual task More...
 
template<typename ... Ts>
resultT operator() (const Ts &... args)
 this mimicks the original call to the task functor, called from the universe More...
 
void set_debug (const bool value)
 
void set_name (const std::string name1)
 set a name for this task for debugging and output naming More...
 

Private Types

typedef taskT::argtupleT argtupleT
 
using partitionT = MacroTaskPartitioner::partitionT
 
typedef Cloud::recordlistT recordlistT
 
typedef taskT::resultT resultT
 

Private Member Functions

recordlistT prepare_output_records (Cloud &cloud, resultT &result)
 store the result WorldObject in the cloud and return the recordlist More...
 

Private Attributes

bool debug =false
 
std::string name ="unknown_task"
 
taskT task
 
std::shared_ptr< MacroTaskQtaskq_ptr
 
Worldworld
 

Member Typedef Documentation

◆ argtupleT

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

◆ partitionT

template<typename taskT >
using madness::MacroTask< taskT >::partitionT = MacroTaskPartitioner::partitionT
private

◆ recordlistT

template<typename taskT >
typedef Cloud::recordlistT madness::MacroTask< taskT >::recordlistT
private

◆ resultT

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

Constructor & Destructor Documentation

◆ MacroTask()

template<typename taskT >
madness::MacroTask< taskT >::MacroTask ( World world,
taskT &  task,
std::shared_ptr< MacroTaskQ taskq_ptr = 0 
)
inline

Member Function Documentation

◆ operator()()

template<typename taskT >
template<typename ... Ts>
resultT madness::MacroTask< taskT >::operator() ( const Ts &...  args)
inline

this mimicks the original call to the task functor, called from the universe

store all input to the cloud, create output Function<T,NDIM> in the universe, create the batched task and shove it into the taskq. Possibly execute the taskq.

References madness::MacroTask< taskT >::debug, madness::MacroTask< taskT >::name, madness::MacroTask< taskT >::prepare_output_records(), madness::World::size(), madness::MacroTask< taskT >::task, madness::MacroTask< taskT >::taskq_ptr, and madness::MacroTask< taskT >::world.

◆ prepare_output_records()

template<typename taskT >
recordlistT madness::MacroTask< taskT >::prepare_output_records ( Cloud cloud,
resultT result 
)
inlineprivate

store the result WorldObject in the cloud and return the recordlist

References madness::get_impl(), MADNESS_EXCEPTION, madness::Cloud::store(), and madness::MacroTask< taskT >::world.

Referenced by madness::MacroTask< taskT >::operator()().

◆ set_debug()

template<typename taskT >
void madness::MacroTask< taskT >::set_debug ( const bool  value)
inline

◆ set_name()

template<typename taskT >
void madness::MacroTask< taskT >::set_name ( const std::string  name1)
inline

set a name for this task for debugging and output naming

References madness::MacroTask< taskT >::name.

Member Data Documentation

◆ debug

template<typename taskT >
bool madness::MacroTask< taskT >::debug =false
private

◆ name

template<typename taskT >
std::string madness::MacroTask< taskT >::name ="unknown_task"
private

◆ task

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

◆ taskq_ptr

template<typename taskT >
std::shared_ptr<MacroTaskQ> madness::MacroTask< taskT >::taskq_ptr
private

◆ world

template<typename taskT >
World& madness::MacroTask< taskT >::world
private

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