2#ifndef MADNESS_WORLD_BINSORTER_H__INCLUDED
3#define MADNESS_WORLD_BINSORTER_H__INCLUDED
13 template <
typename T,
typename inserterT>
21 if (
bins[owner].size())
27 for(
typename std::vector<T>::const_iterator it =
v.begin(); it !=
v.end(); ++it) {
58 for (
int i=0; i<
pworld->size(); i++) {
66 for (
int i=0; i<
pworld->size(); i++) {
This header should include pretty much everything needed for the parallel runtime.
virtual ~BinSorter()
Definition binsorter.h:57
void finish()
Invoke to complete the sort, flush all buffers, and ensure communication/processing is complete.
Definition binsorter.h:65
BinSorter(World &world, inserterT inserter, int bufsize=0)
Constructs the sorter object.
Definition binsorter.h:38
void insert(ProcessID p, const T &value)
Application calls this to add a value to the bin for process p.
Definition binsorter.h:73
void flush(int owner)
Definition binsorter.h:20
inserterT inserter
Definition binsorter.h:16
std::vector< T > * bins
Definition binsorter.h:18
std::size_t bufsize
Definition binsorter.h:17
World * pworld
Definition binsorter.h:15
void sorter(const std::vector< T > &v)
Definition binsorter.h:26
static std::size_t max_msg_len()
Returns the size of recv buffers, in bytes.
Definition worldrmi.h:329
WorldObject(const WorldObject &other)
Definition world_object.h:500
void process_pending()
Definition world_object.h:787
detail::task_result_type< memfnT >::futureT send(ProcessID dest, memfnT memfn) const
Definition world_object.h:858
A parallel world class.
Definition world.h:134
char * p(char *buf, const char *name, int k, int initial_level, double thresh, int order)
Definition derivatives.cc:72
static const double v
Definition hatom_sf_dirac.cc:20
Defines madness::MadnessException for exception handling.
#define MADNESS_ASSERT(condition)
Assert a condition that should be free of side-effects since in release builds this might be a no-op.
Definition madness_exception.h:134
Namespace for all elements and tools of MADNESS.
Definition DFConvergence.h:9
const Future< void > Future< void >::value
Definition future.cc:44
World & world
Memoized reference to the world to which this object belongs.
Definition world_object.h:348
Defines and implements WorldObject.
int ProcessID
Used to clearly identify process number/rank.
Definition worldtypes.h:43