MADNESS 0.10.1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
madness::BinSorter< T, inserterT > Class Template Reference

A parallel bin sort across MPI processes. More...

#include <binsorter.h>

Inheritance diagram for madness::BinSorter< T, inserterT >:
Inheritance graph
[legend]
Collaboration diagram for madness::BinSorter< T, inserterT >:
Collaboration graph
[legend]

Public Member Functions

 BinSorter (World &world, inserterT inserter, int bufsize=0)
 Constructs the sorter object.
 
virtual ~BinSorter ()
 
void finish ()
 Invoke to complete the sort, flush all buffers, and ensure communication/processing is complete.
 
void insert (ProcessID p, const T &value)
 Application calls this to add a value to the bin for process p.
 
- Public Member Functions inherited from madness::WorldObject< BinSorter< T, inserterT > >
 WorldObject (const WorldObject &other)
 
 WorldObject (World &world)
 Constructor that associates an object (via the derived class) with a globally unique ID.
 
virtual ~WorldObject ()
 
Worldget_world () const
 Returns a reference to the world.
 
const uniqueidTid () const
 Returns the globally unique object ID.
 
WorldObjectoperator= (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).
 
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).
 
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).
 
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).
 
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).
 
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).
 
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).
 
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).
 
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).
 
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)().
 
- Public Member Functions inherited from madness::WorldObjectBase
virtual ~WorldObjectBase ()=default
 

Private Member Functions

void flush (int owner)
 
void sorter (const std::vector< T > &v)
 

Private Attributes

std::vector< T > * bins
 
std::size_t bufsize
 
inserterT inserter
 
Worldpworld
 

Additional Inherited Members

- Public Types inherited from madness::WorldObject< BinSorter< T, inserterT > >
typedef WorldObject< BinSorter< T, inserterT > > objT
 
- Protected Member Functions inherited from madness::WorldObject< BinSorter< T, inserterT > >
void process_pending ()
 To be called from derived constructor to process pending messages.
 

Detailed Description

template<typename T, typename inserterT>
class madness::BinSorter< T, inserterT >

A parallel bin sort across MPI processes.

Constructor & Destructor Documentation

◆ BinSorter()

template<typename T , typename inserterT >
madness::BinSorter< T, inserterT >::BinSorter ( World world,
inserterT  inserter,
int  bufsize = 0 
)
inline

Constructs the sorter object.

Parameters
[in]worldThe world object that must persist during the existence of this object
[in]inserterUser provides this routine to process an item of data on remote end
[in]bufsizeSize of bin (in units of T) ... default value is as large as possible

References madness::BinSorter< T, inserterT >::bufsize, madness::RMI::max_msg_len(), madness::WorldObject< BinSorter< T, inserterT > >::process_pending(), madness::World::size(), T(), and madness::WorldObject< BinSorter< T, inserterT > >::world.

◆ ~BinSorter()

template<typename T , typename inserterT >
virtual madness::BinSorter< T, inserterT >::~BinSorter ( )
inlinevirtual

Member Function Documentation

◆ finish()

template<typename T , typename inserterT >
void madness::BinSorter< T, inserterT >::finish ( )
inline

Invoke to complete the sort, flush all buffers, and ensure communication/processing is complete.

References madness::WorldGopInterface::fence(), madness::BinSorter< T, inserterT >::flush(), madness::World::gop, madness::BinSorter< T, inserterT >::pworld, and madness::World::size().

◆ flush()

template<typename T , typename inserterT >
void madness::BinSorter< T, inserterT >::flush ( int  owner)
inlineprivate

◆ insert()

template<typename T , typename inserterT >
void madness::BinSorter< T, inserterT >::insert ( ProcessID  p,
const T value 
)
inline

Application calls this to add a value to the bin for process p.

References madness::BinSorter< T, inserterT >::bins, madness::BinSorter< T, inserterT >::bufsize, madness::BinSorter< T, inserterT >::flush(), and p().

Referenced by main().

◆ sorter()

template<typename T , typename inserterT >
void madness::BinSorter< T, inserterT >::sorter ( const std::vector< T > &  v)
inlineprivate

Member Data Documentation

◆ bins

template<typename T , typename inserterT >
std::vector<T>* madness::BinSorter< T, inserterT >::bins
private

◆ bufsize

template<typename T , typename inserterT >
std::size_t madness::BinSorter< T, inserterT >::bufsize
private

◆ inserter

template<typename T , typename inserterT >
inserterT madness::BinSorter< T, inserterT >::inserter
private

◆ pworld

template<typename T , typename inserterT >
World* madness::BinSorter< T, inserterT >::pworld
private

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