MADNESS
0.10.1
|
Internal implementation of distributed container to facilitate shallow copy. More...
#include <worlddc.h>
Classes | |
struct | P2Op |
Public Types | |
typedef internal_containerT::accessor | accessor |
typedef internal_containerT::const_accessor | const_accessor |
typedef WorldContainerIterator< internal_const_iteratorT > | const_iterator |
typedef WorldContainerIterator< internal_const_iteratorT > | const_iteratorT |
typedef const pairT | const_pairT |
typedef WorldContainerImpl< keyT, valueT, hashfunT > | implT |
typedef internal_containerT::const_iterator | internal_const_iteratorT |
typedef ConcurrentHashMap< keyT, valueT, hashfunT > | internal_containerT |
typedef internal_containerT::iterator | internal_iteratorT |
typedef WorldContainerIterator< internal_iteratorT > | iterator |
typedef WorldContainerIterator< internal_iteratorT > | iteratorT |
typedef std::pair< const keyT, valueT > | pairT |
Public Types inherited from madness::WorldObject< WorldContainerImpl< keyT, valueT, hashfunT > > | |
typedef WorldObject< WorldContainerImpl< keyT, valueT, hashfunT > > | objT |
Public Member Functions | |
WorldContainerImpl (World &world, const std::shared_ptr< WorldDCPmapInterface< keyT >> &pm, const hashfunT &hf) | |
virtual | ~WorldContainerImpl () |
iterator | begin () |
const_iterator | begin () const |
void | clear () |
iterator | end () |
const_iterator | end () const |
void | erase (const keyT &key) |
template<typename InIter > | |
void | erase (InIter first, InIter last) |
template<typename InIter > | |
void | erase (InIter it) |
bool | find (accessor &acc, const keyT &key) |
Future< iterator > | find (const keyT &key) |
Future< const_iterator > | find (const keyT &key) const |
bool | find (const_accessor &acc, const keyT &key) const |
hashfunT & | get_hash () const |
std::shared_ptr< WorldDCPmapInterface< keyT > > & | get_pmap () |
const std::shared_ptr< WorldDCPmapInterface< keyT > > & | get_pmap () const |
void | insert (const pairT &datum) |
bool | insert_acc (accessor &acc, const keyT &key) |
bool | insert_const_acc (const_accessor &acc, const keyT &key) |
bool | is_local (const keyT &key) const |
template<typename memfunT > | |
itemfun (const keyT &key, memfunT memfun) | |
template<typename memfunT , typename arg1T > | |
itemfun (const keyT &key, memfunT memfun, const arg1T &arg1) | |
template<typename memfunT , typename arg1T , typename arg2T > | |
itemfun (const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2) | |
template<typename memfunT , typename arg1T , typename arg2T , typename arg3T > | |
itemfun (const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3) | |
template<typename memfunT , typename arg1T , typename arg2T , typename arg3T , typename arg4T > | |
itemfun (const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3, const arg4T &arg4) | |
template<typename memfunT , typename arg1T , typename arg2T , typename arg3T , typename arg4T , typename arg5T > | |
itemfun (const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3, const arg4T &arg4, const arg5T &arg5) | |
template<typename memfunT , typename arg1T , typename arg2T , typename arg3T , typename arg4T , typename arg5T , typename arg6T > | |
itemfun (const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3, const arg4T &arg4, const arg5T &arg5, const arg6T &arg6) | |
template<typename memfunT , typename arg1T , typename arg2T , typename arg3T , typename arg4T , typename arg5T , typename arg6T , typename arg7T > | |
itemfun (const keyT &key, memfunT memfun, const arg1T &arg1, const arg2T &arg2, const arg3T &arg3, const arg4T &arg4, const arg5T &arg5, const arg6T &arg6, const arg7T &arg7) | |
ProcessID | owner (const keyT &key) const |
bool | probe (const keyT &key) const |
void | redistribute_phase1 (const std::shared_ptr< WorldDCPmapInterface< keyT >> &newpmap) |
void | redistribute_phase2 () |
void | redistribute_phase3 () |
void | replicate (bool fence) |
void | reset_pmap_to_local () |
std::size_t | size () const |
Public Member Functions inherited from madness::WorldObject< WorldContainerImpl< keyT, valueT, hashfunT > > | |
WorldObject (const WorldObject &other) | |
WorldObject (World &world) | |
Constructor that associates an object (via the derived class) with a globally unique ID. More... | |
virtual | ~WorldObject () |
World & | get_world () const |
Returns a reference to the world . More... | |
const uniqueidT & | id () const |
Returns the globally unique object ID. More... | |
WorldObject & | operator= (const WorldObject &)=delete |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7, const a8T &a8) const |
detail::task_result_type< memfnT >::futureT | send (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7, const a8T &a8, const a9T &a9) const |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7, const a8T &a8, const a9T &a9, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5,a6,a7,a8,a9) . More... | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7, const a8T &a8, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5,a6,a7,a8) . More... | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const a7T &a7, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5,a6,a7) . More... | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const a6T &a6, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5,a6) . More... | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const a5T &a5, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4,a5) . More... | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const a4T &a4, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3,a4) . More... | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const a3T &a3, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2,a3) . More... | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const a2T &a2, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1,a2) . More... | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const a1T &a1, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)(a1) . More... | |
detail::task_result_type< memfnT >::futureT | task (ProcessID dest, memfnT memfn, const TaskAttributes &attr=TaskAttributes()) const |
Sends task to derived class method returnT (this->*memfn)() . More... | |
Public Member Functions inherited from madness::WorldObjectBase | |
virtual | ~WorldObjectBase ()=default |
Public Member Functions inherited from madness::WorldDCRedistributeInterface< keyT > | |
virtual | ~WorldDCRedistributeInterface () |
Private Member Functions | |
WorldContainerImpl () | |
void | find_failure_handler (const RemoteReference< FutureImpl< iterator >> &ref) |
Handles unsuccessful find response. More... | |
void | find_handler (ProcessID requestor, const keyT &key, const RemoteReference< FutureImpl< iterator >> &ref) |
Handles find request. More... | |
void | find_success_handler (const RemoteReference< FutureImpl< iterator >> &ref, const pairT &datum) |
Handles successful find response. More... | |
Private Attributes | |
internal_containerT | local |
Locally owned data. More... | |
const ProcessID | me |
My MPI rank. More... | |
std::vector< keyT > * | move_list |
Tempoary used to record data that needs redistributing. More... | |
std::shared_ptr< WorldDCPmapInterface< keyT > > | pmap |
Function/class to map from keys to owning process. More... | |
Friends | |
class | WorldContainer< keyT, valueT, hashfunT > |
Additional Inherited Members | |
Protected Member Functions inherited from madness::WorldObject< WorldContainerImpl< keyT, valueT, hashfunT > > | |
void | process_pending () |
To be called from derived constructor to process pending messages. More... | |
Internal implementation of distributed container to facilitate shallow copy.
typedef internal_containerT::accessor madness::WorldContainerImpl< keyT, valueT, hashfunT >::accessor |
typedef internal_containerT::const_accessor madness::WorldContainerImpl< keyT, valueT, hashfunT >::const_accessor |
typedef WorldContainerIterator<internal_const_iteratorT> madness::WorldContainerImpl< keyT, valueT, hashfunT >::const_iterator |
typedef WorldContainerIterator<internal_const_iteratorT> madness::WorldContainerImpl< keyT, valueT, hashfunT >::const_iteratorT |
typedef const pairT madness::WorldContainerImpl< keyT, valueT, hashfunT >::const_pairT |
typedef WorldContainerImpl<keyT, valueT, hashfunT> madness::WorldContainerImpl< keyT, valueT, hashfunT >::implT |
typedef internal_containerT::const_iterator madness::WorldContainerImpl< keyT, valueT, hashfunT >::internal_const_iteratorT |
typedef ConcurrentHashMap<keyT, valueT, hashfunT> madness::WorldContainerImpl< keyT, valueT, hashfunT >::internal_containerT |
typedef internal_containerT::iterator madness::WorldContainerImpl< keyT, valueT, hashfunT >::internal_iteratorT |
typedef WorldContainerIterator<internal_iteratorT> madness::WorldContainerImpl< keyT, valueT, hashfunT >::iterator |
typedef WorldContainerIterator<internal_iteratorT> madness::WorldContainerImpl< keyT, valueT, hashfunT >::iteratorT |
typedef std::pair<const keyT, valueT> madness::WorldContainerImpl< keyT, valueT, hashfunT >::pairT |
|
private |
|
inline |
|
inlinevirtual |
|
inline |
|
inline |
|
inline |
|
inline |
References madness::ConcurrentHashMap< keyT, valueT, hashfunT >::end(), and madness::WorldContainerImpl< keyT, valueT, hashfunT >::local.
Referenced by madness::WorldContainerImpl< keyT, valueT, hashfunT >::erase(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::find_failure_handler(), and madness::WorldContainerImpl< keyT, valueT, hashfunT >::replicate().
|
inline |
|
inline |
References madness::WorldContainerImpl< keyT, valueT, hashfunT >::local, MADNESS_ASSERT, madness::WorldContainerImpl< keyT, valueT, hashfunT >::me, madness::WorldContainerImpl< keyT, valueT, hashfunT >::owner(), madness::WorldObject< WorldContainerImpl< keyT, valueT, hashfunT > >::send(), and madness::ConcurrentHashMap< keyT, valueT, hashfunT >::try_erase().
Referenced by madness::WorldContainerImpl< keyT, valueT, hashfunT >::erase().
|
inline |
|
inline |
|
inline |
|
inline |
References madness::ConcurrentHashMap< keyT, valueT, hashfunT >::find(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::find_handler(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::local, madness::WorldContainerImpl< keyT, valueT, hashfunT >::me, madness::WorldContainerImpl< keyT, valueT, hashfunT >::owner(), madness::Future< T >::remote_ref(), and madness::WorldObject< WorldContainerImpl< keyT, valueT, hashfunT > >::send().
|
inline |
|
inline |
|
inlineprivate |
Handles unsuccessful find response.
References madness::WorldContainerImpl< keyT, valueT, hashfunT >::end(), and madness::f.
Referenced by madness::WorldContainerImpl< keyT, valueT, hashfunT >::find_handler().
|
inlineprivate |
Handles find request.
References madness::ConcurrentHashMap< keyT, valueT, hashfunT >::end(), madness::ConcurrentHashMap< keyT, valueT, hashfunT >::find(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::find_failure_handler(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::find_success_handler(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::local, and madness::WorldObject< WorldContainerImpl< keyT, valueT, hashfunT > >::send().
Referenced by madness::WorldContainerImpl< keyT, valueT, hashfunT >::find().
|
inlineprivate |
Handles successful find response.
References madness::f.
Referenced by madness::WorldContainerImpl< keyT, valueT, hashfunT >::find_handler().
|
inline |
|
inline |
|
inline |
|
inline |
References madness::ConcurrentHashMap< keyT, valueT, hashfunT >::insert(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::local, madness::WorldContainerImpl< keyT, valueT, hashfunT >::me, madness::WorldContainerImpl< keyT, valueT, hashfunT >::owner(), and madness::WorldObject< WorldContainerImpl< keyT, valueT, hashfunT > >::send().
Referenced by madness::WorldContainerImpl< keyT, valueT, hashfunT >::P2Op::operator()(), and madness::WorldContainerImpl< keyT, valueT, hashfunT >::replicate().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
References madness::WorldContainerImpl< keyT, valueT, hashfunT >::pmap.
Referenced by madness::WorldContainerImpl< keyT, valueT, hashfunT >::erase(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::find(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::insert(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::insert_acc(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::insert_const_acc(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::is_local(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::P2Op::operator()(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::probe(), and madness::WorldContainerImpl< keyT, valueT, hashfunT >::redistribute_phase1().
|
inline |
References madness::ConcurrentHashMap< keyT, valueT, hashfunT >::end(), madness::ConcurrentHashMap< keyT, valueT, hashfunT >::find(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::local, madness::WorldContainerImpl< keyT, valueT, hashfunT >::me, and madness::WorldContainerImpl< keyT, valueT, hashfunT >::owner().
|
inlinevirtual |
Implements madness::WorldDCRedistributeInterface< keyT >.
References madness::ConcurrentHashMap< keyT, valueT, hashfunT >::begin(), madness::ConcurrentHashMap< keyT, valueT, hashfunT >::end(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::local, madness::WorldContainerImpl< keyT, valueT, hashfunT >::me, madness::WorldContainerImpl< keyT, valueT, hashfunT >::move_list, madness::WorldContainerImpl< keyT, valueT, hashfunT >::owner(), and madness::WorldContainerImpl< keyT, valueT, hashfunT >::pmap.
|
inlinevirtual |
|
inlinevirtual |
|
inline |
replicates this WorldContainer on all ProcessIDs and generates a ProcessMap where all nodes are local
References madness::WorldContainerImpl< keyT, valueT, hashfunT >::begin(), madness::WorldGopInterface::broadcast_serializable(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::end(), madness::WorldGopInterface::fence(), madness::WorldObject< WorldContainerImpl< keyT, valueT, hashfunT > >::get_world(), madness::World::gop, madness::WorldContainerImpl< keyT, valueT, hashfunT >::insert(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::pmap, madness::World::rank(), madness::World::size(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::size(), and madness::WorldObject< WorldContainerImpl< keyT, valueT, hashfunT > >::world.
|
inline |
|
inlinevirtual |
|
friend |
|
private |
Locally owned data.
Referenced by madness::WorldContainerImpl< keyT, valueT, hashfunT >::begin(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::clear(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::end(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::erase(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::find(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::find_handler(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::get_hash(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::insert(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::insert_acc(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::insert_const_acc(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::itemfun(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::P2Op::operator()(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::probe(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::redistribute_phase1(), and madness::WorldContainerImpl< keyT, valueT, hashfunT >::size().
|
private |
My MPI rank.
Referenced by madness::WorldContainerImpl< keyT, valueT, hashfunT >::erase(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::find(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::insert(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::insert_acc(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::insert_const_acc(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::is_local(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::probe(), and madness::WorldContainerImpl< keyT, valueT, hashfunT >::redistribute_phase1().
|
private |
Tempoary used to record data that needs redistributing.
Referenced by madness::WorldContainerImpl< keyT, valueT, hashfunT >::redistribute_phase1(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::redistribute_phase2(), and madness::WorldContainerImpl< keyT, valueT, hashfunT >::redistribute_phase3().
|
private |
Function/class to map from keys to owning process.
Referenced by madness::WorldContainerImpl< keyT, valueT, hashfunT >::WorldContainerImpl(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::~WorldContainerImpl(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::get_pmap(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::owner(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::redistribute_phase1(), madness::WorldContainerImpl< keyT, valueT, hashfunT >::replicate(), and madness::WorldContainerImpl< keyT, valueT, hashfunT >::reset_pmap_to_local().