|
MADNESS 0.10.1
|


Public Member Functions | |
| MacroTaskInternal (const taskT &task, const std::pair< Batch, double > &batch_prio, const recordlistT &inputrecords, const recordlistT &outputrecords, const long owner_slot=-1) | |
| 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 | |
| void | cleanup () override |
| void | copy_operands_into_subworld (World &subworld, Cloud &cloud, argtupleT &batched_argtuple, const MacroTaskInfo &policy, const bool debug) |
| Bring the operand coefficients into the subworld, unless the task does that itself. | |
| void | finalize_stage1 (World &subworld, World *nodeworld, Cloud &) override |
| void | finalize_stage2 (World &subworld, World *nodeworld, Cloud &cloud) override |
| std::pair< long, MacroTaskInternal * > | find_next_owned_task (const MacroTaskBase::taskqT &taskq, const long element) const |
| the next task in taskq that this task's subworld also owns, or {-1, nullptr} | |
| std::string | get_name () const |
| resultT | get_output (World &subworld, Cloud &cloud) const |
| return the WorldObjects or the result functions living in the universe | |
| void | prefetch_for_next_task (World &subworld, const argtupleT &argtuple, MacroTaskBase::taskqT &taskq, const long element) |
| called by the MacroTaskQ when the task is scheduled | |
| 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, const MacroTaskInfo policy) override |
| bool | wants_node_local_reduction () const override |
| Bridge the framework's virtual finalize to the task's hooks. | |
Public Member Functions inherited from madness::MacroTaskIntermediate< MacroTask > | |
| MacroTaskIntermediate () | |
| ~MacroTaskIntermediate () | |
Public Member Functions inherited from madness::MacroTaskBase | |
| MacroTaskBase () | |
| virtual | ~MacroTaskBase () |
| long | get_owner_slot () const |
| double | get_priority () const |
| bool | is_complete () const |
| bool | is_owned_by (const long slot) const |
| an unowned task may be run by any subworld, an owned one only by its own | |
| bool | is_running () const |
| bool | is_waiting () const |
| std::string | print_priority_and_status_to_string () const |
| void | set_complete () |
| void | set_owner_slot (const long owner) |
| 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, NDIM > | pointer2WorldObject (const std::shared_ptr< FunctionImpl< T, NDIM > > impl) |
| template<typename T > | |
| static ScalarResult< T > | pointer2WorldObject (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 | |
| long | owner_slot =-1 |
| the subworld that should run this task; -1 means any | |
| 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 |
|
private |
|
private |
|
inline |
|
inline |
accumulate the result of the task into the final result living in the universe
|
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.
|
inlineoverridevirtual |
Reimplemented from madness::MacroTaskIntermediate< MacroTask >.
References madness::MacroTask< taskT >::MacroTaskInternal::task.
|
inline |
Bring the operand coefficients into the subworld, unless the task does that itself.
References madness::arg(), madness::copy(), madness::Cloud::copy_time, madness::MacroTask< taskT >::debug, madness::f, madness::MacroTask< taskT >::MacroTaskInternal::get_name(), madness::print(), madness::MacroTaskInfo::storage_policy, madness::MacroTaskInfo::StoreFunctionViaPointer, madness::MacroTaskInfo::StorePointerToFunction, madness::MacroTask< taskT >::MacroTaskInternal::task, madness::unary_tuple_loop(), and madness::wall_time().
Referenced by madness::MacroTask< taskT >::MacroTaskInternal::run().
|
inlineoverridevirtual |
Reimplemented from madness::MacroTaskBase.
References madness::MacroTask< taskT >::MacroTaskInternal::task.
|
inlineoverridevirtual |
Reimplemented from madness::MacroTaskBase.
References madness::MacroTask< taskT >::MacroTaskInternal::get_output(), and madness::MacroTask< taskT >::MacroTaskInternal::task.
|
inline |
the next task in taskq that this task's subworld also owns, or {-1, nullptr}
A task that prefetches needs to know which batch it will be asked for next. With owner-pinned scheduling that is decidable locally: the queue order is fixed and ownership is already assigned, so the next owned entry is just the next match.
References madness::MacroTaskBase::get_owner_slot(), madness::MacroTaskBase::is_owned_by(), and madness::MacroTaskBase::owner_slot.
Referenced by madness::MacroTask< taskT >::MacroTaskInternal::prefetch_for_next_task().
|
inline |
References madness::name(), and madness::MacroTask< taskT >::MacroTaskInternal::task.
Referenced by madness::MacroTask< taskT >::MacroTaskInternal::copy_operands_into_subworld(), madness::MacroTask< taskT >::MacroTaskInternal::print_me(), madness::MacroTask< taskT >::MacroTaskInternal::print_me_as_table(), and madness::MacroTask< taskT >::MacroTaskInternal::run().
|
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::unary_tuple_loop().
Referenced by madness::MacroTask< taskT >::MacroTaskInternal::finalize_stage2(), and madness::MacroTask< taskT >::MacroTaskInternal::run().
|
inlinestatic |
References madness::Function< T, NDIM >::set_impl().
Referenced by madness::MacroTask< taskT >::MacroTaskInternal::get_output().
|
inlinestatic |
|
inlinestatic |
References madness::set_impl().
|
inlinestatic |
|
inline |
called by the MacroTaskQ when the task is scheduled
Let this task start the transfer its successor will need. Called before the task body so the request overlaps this task's compute. The successor is the next task in the queue this rank owns; a task that declares no prefetch hook does nothing here.
References madness::MacroTask< taskT >::MacroTaskInternal::find_next_owned_task(), and madness::MacroTask< taskT >::MacroTaskInternal::task.
Referenced by madness::MacroTask< taskT >::MacroTaskInternal::run().
|
inlineoverridevirtual |
Reimplemented from madness::MacroTaskBase.
References madness::MacroTask< taskT >::MacroTaskInternal::get_name(), madness::print(), and madness::MacroTask< taskT >::MacroTaskInternal::task.
|
inlineoverridevirtual |
Reimplemented from madness::MacroTaskBase.
References madness::MacroTask< taskT >::MacroTaskInternal::get_name(), madness::name(), madness::print(), madness::MacroTaskBase::print_priority_and_status_to_string(), and madness::MacroTask< taskT >::MacroTaskInternal::task.
Referenced by madness::MacroTask< taskT >::MacroTaskInternal::run().
|
inlineoverridevirtual |
Implements madness::MacroTaskBase.
References madness::binary_tuple_loop(), bufsize, madness::MacroTask< taskT >::MacroTaskInternal::copy_operands_into_subworld(), madness::cpu_time(), madness::MacroTask< taskT >::debug, madness::io_redirect::Discard, e(), madness::io_redirect::File, madness::MacroTask< taskT >::MacroTaskInternal::get_name(), madness::MacroTask< taskT >::MacroTaskInternal::get_output(), madness::get_rss_usage_in_GB(), madness::World::id(), madness::MacroTask< taskT >::MacroTaskInternal::inputrecords, madness::Cloud::load(), MADNESS_EXCEPTION, madness::MacroTask< taskT >::MacroTaskInternal::prefetch_for_next_task(), madness::print(), madness::MacroTask< taskT >::MacroTaskInternal::print_me_as_table(), madness::MacroTask< taskT >::MacroTaskInternal::task, and madness::wall_time().
|
inlineoverridevirtual |
Bridge the framework's virtual finalize to the task's hooks.
A task that does not accumulate its own output has nothing to finalize, so the guard keeps every existing task on the queue's own accumulation path.
Reimplemented from madness::MacroTaskBase.
References madness::MacroTask< taskT >::MacroTaskInternal::task.
|
private |
Referenced by madness::MacroTask< taskT >::MacroTaskInternal::run().
|
private |
Referenced by madness::MacroTask< taskT >::MacroTaskInternal::get_output().
| taskT madness::MacroTask< taskT >::MacroTaskInternal::task |
Referenced by madness::MacroTask< taskT >::MacroTaskInternal::cleanup(), madness::MacroTask< taskT >::MacroTaskInternal::copy_operands_into_subworld(), madness::MacroTask< taskT >::MacroTaskInternal::finalize_stage1(), madness::MacroTask< taskT >::MacroTaskInternal::finalize_stage2(), madness::MacroTask< taskT >::MacroTaskInternal::get_name(), madness::MacroTask< taskT >::MacroTaskInternal::prefetch_for_next_task(), madness::MacroTask< taskT >::MacroTaskInternal::print_me(), madness::MacroTask< taskT >::MacroTaskInternal::print_me_as_table(), madness::MacroTask< taskT >::MacroTaskInternal::run(), and madness::MacroTask< taskT >::MacroTaskInternal::wants_node_local_reduction().