MADNESS 0.10.1
madness::MacroTask< taskT > Class Template Reference

#include <macrotaskq.h>

Collaboration diagram for madness::MacroTask< taskT >:

Classes

struct  is_vector
struct  is_vector< std::vector< Q > >
class  MacroTaskInternal

Public Member Functions

 MacroTask (World &world, taskT &task)
 constructor takes the task, but no arguments to the task
 MacroTask (World &world, taskT &task, const MacroTaskQFactory factory)
 constructor takes task and a taskq factory for customization, immediate execution
 MacroTask (World &world, taskT &task, std::shared_ptr< MacroTaskQ > taskq_ptr)
 constructor takes the task, and a taskq, execution is not immediate
std::shared_ptr< MacroTaskQ > get_taskq () const
template<typename ... Ts>
resultT operator() (const Ts &... args)
 this mimicks the original call to the task functor, called from the universe
MacroTask & set_debug (const bool value)

Private Types

typedef taskT::argtupleT argtupleT
template<typename Q, typename ResT>
using has_accumulate_locally_t
 true if: task.accumulate_locally(subworld, result_subworld)
template<typename Q>
using has_finalize_stage1_t
 true if: task.finalize_stage1(subworld, nodeworld)
template<typename Q, typename ResT>
using has_finalize_stage2_t
 true if: task.finalize_stage2(subworld, nodeworld, universe_result)
template<typename T, typename argtupleT>
using has_member_compute_priority = madness::meta::is_detected<member_compute_priority_t, T, argtupleT>
template<typename Q>
using has_prepare_owner_assignment_t
 true if: task.prepare_owner_assignment(partition, nsubworld)
template<typename Q, typename ArgTuple>
using has_store_batches_t
 true if: task.store_batches(world, subworld, cloud, argtuple, nsubworld)
template<typename Q, typename VecT>
using has_sym_pipeline_advance_t
 true if: task.sym_pipeline_advance(subworld, ket, next_col, next_row, has_next)
template<typename Q>
using has_wants_node_local_reduction_t
 true if: task.wants_node_local_reduction()
template<typename T, typename argtupleT>
using member_compute_priority_t = decltype(std::declval<T>().compute_priority(std::declval<Batch&>(), std::declval<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 pointers to the result WorldObject in the cloud and return the recordlist

Private Attributes

bool debug =false
bool immediate_execution =false
taskT task
std::shared_ptr< MacroTaskQ > taskq_ptr
World & world

Static Private Attributes

template<typename Q, typename ResT>
static constexpr bool has_accumulate_locally_v
template<typename Q>
static constexpr bool has_finalize_stage1_v
template<typename Q, typename ResT>
static constexpr bool has_finalize_stage2_v
template<typename Q>
static constexpr bool has_prepare_owner_assignment_v
template<typename Q, typename ArgTuple>
static constexpr bool has_store_batches_v
template<typename Q, typename VecT>
static constexpr bool has_sym_pipeline_advance_v
template<typename Q>
static constexpr bool has_wants_node_local_reduction_v

Member Typedef Documentation

◆ argtupleT

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

◆ has_accumulate_locally_t

template<typename taskT>
template<typename Q, typename ResT>
using madness::MacroTask< taskT >::has_accumulate_locally_t
private
Initial value:
decltype(std::declval<Q&>().accumulate_locally(
std::declval<World&>(), std::declval<const ResT&>()))

true if: task.accumulate_locally(subworld, result_subworld)

◆ has_finalize_stage1_t

template<typename taskT>
template<typename Q>
using madness::MacroTask< taskT >::has_finalize_stage1_t
private
Initial value:
decltype(std::declval<Q&>().finalize_stage1(std::declval<World&>(),
std::declval<World*>()))

true if: task.finalize_stage1(subworld, nodeworld)

◆ has_finalize_stage2_t

template<typename taskT>
template<typename Q, typename ResT>
using madness::MacroTask< taskT >::has_finalize_stage2_t
private
Initial value:
decltype(std::declval<Q&>().finalize_stage2(std::declval<World&>(),
std::declval<World*>(),
std::declval<ResT&>()))

true if: task.finalize_stage2(subworld, nodeworld, universe_result)

◆ has_member_compute_priority

template<typename taskT>
template<typename T, typename argtupleT>
using madness::MacroTask< taskT >::has_member_compute_priority = madness::meta::is_detected<member_compute_priority_t, T, argtupleT>
private

◆ has_prepare_owner_assignment_t

template<typename taskT>
template<typename Q>
using madness::MacroTask< taskT >::has_prepare_owner_assignment_t
private
Initial value:
decltype(std::declval<Q&>().prepare_owner_assignment(
std::declval<const MacroTaskPartitioner::partitionT&>(), 0L))
static const double L
Definition rk.cc:46

true if: task.prepare_owner_assignment(partition, nsubworld)

◆ has_store_batches_t

template<typename taskT>
template<typename Q, typename ArgTuple>
using madness::MacroTask< taskT >::has_store_batches_t
private
Initial value:
decltype(std::declval<Q&>().store_batches(
std::declval<World&>(), std::declval<World&>(), std::declval<Cloud&>(),
std::declval<const ArgTuple&>(), 0L))

true if: task.store_batches(world, subworld, cloud, argtuple, nsubworld)

◆ has_sym_pipeline_advance_t

template<typename taskT>
template<typename Q, typename VecT>
using madness::MacroTask< taskT >::has_sym_pipeline_advance_t
private
Initial value:
decltype(std::declval<Q&>().sym_pipeline_advance(
std::declval<World&>(), std::declval<const VecT&>(),
std::declval<const Batch_1D&>(), std::declval<const Batch_1D&>(), true))

true if: task.sym_pipeline_advance(subworld, ket, next_col, next_row, has_next)

◆ has_wants_node_local_reduction_t

template<typename taskT>
template<typename Q>
using madness::MacroTask< taskT >::has_wants_node_local_reduction_t
private
Initial value:
decltype(std::declval<const Q&>().wants_node_local_reduction())

true if: task.wants_node_local_reduction()

◆ member_compute_priority_t

template<typename taskT>
template<typename T, typename argtupleT>
using madness::MacroTask< taskT >::member_compute_priority_t = decltype(std::declval<T>().compute_priority(std::declval<Batch&>(), std::declval<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() [1/3]

template<typename taskT>
madness::MacroTask< taskT >::MacroTask ( World & world,
taskT & task )
inlineexplicit

constructor takes the task, but no arguments to the task

References MacroTask(), immediate_execution, task, and world.

Referenced by MacroTask(), MacroTask(), and set_debug().

◆ MacroTask() [2/3]

template<typename taskT>
madness::MacroTask< taskT >::MacroTask ( World & world,
taskT & task,
const MacroTaskQFactory factory )
inlineexplicit

constructor takes task and a taskq factory for customization, immediate execution

References MacroTask(), immediate_execution, task, and world.

◆ MacroTask() [3/3]

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

constructor takes the task, and a taskq, execution is not immediate

References debug, immediate_execution, task, taskq_ptr, madness::MacroTaskInfo::to_cloud_storage_policy(), and world.

Member Function Documentation

◆ get_taskq()

template<typename taskT>
std::shared_ptr< MacroTaskQ > madness::MacroTask< taskT >::get_taskq ( ) const
inline

◆ 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 debug, madness::Future< void >::value, has_prepare_owner_assignment_v, has_store_batches_v, immediate_execution, prepare_output_records(), madness::print(), madness::MacroTaskPartitioner::recompute_priorities(), task, taskq_ptr, and world.

◆ prepare_output_records()

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

◆ set_debug()

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

Member Data Documentation

◆ debug

◆ has_accumulate_locally_v

template<typename taskT>
template<typename Q, typename ResT>
bool madness::MacroTask< taskT >::has_accumulate_locally_v
staticconstexprprivate

◆ has_finalize_stage1_v

template<typename taskT>
template<typename Q>
bool madness::MacroTask< taskT >::has_finalize_stage1_v
staticconstexprprivate

◆ has_finalize_stage2_v

template<typename taskT>
template<typename Q, typename ResT>
bool madness::MacroTask< taskT >::has_finalize_stage2_v
staticconstexprprivate

◆ has_prepare_owner_assignment_v

template<typename taskT>
template<typename Q>
bool madness::MacroTask< taskT >::has_prepare_owner_assignment_v
staticconstexprprivate

◆ has_store_batches_v

template<typename taskT>
template<typename Q, typename ArgTuple>
bool madness::MacroTask< taskT >::has_store_batches_v
staticconstexprprivate

◆ has_sym_pipeline_advance_v

template<typename taskT>
template<typename Q, typename VecT>
bool madness::MacroTask< taskT >::has_sym_pipeline_advance_v
staticconstexprprivate

◆ has_wants_node_local_reduction_v

template<typename taskT>
template<typename Q>
bool madness::MacroTask< taskT >::has_wants_node_local_reduction_v
staticconstexprprivate

◆ immediate_execution

template<typename taskT>
bool madness::MacroTask< taskT >::immediate_execution =false
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

Referenced by MacroTask(), get_taskq(), and operator()().

◆ world

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

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