MADNESS 0.10.1
|
partition one (two) vectors into 1D (2D) batches. More...
#include <macrotaskpartitioner.h>
Public Types | |
typedef std::list< std::pair< Batch, double > > | partitionT |
Public Member Functions | |
MacroTaskPartitioner () | |
virtual | ~MacroTaskPartitioner () |
virtual double | compute_priority (const Batch &batch) const |
partitionT | do_1d_partition (const std::size_t vsize, const std::string policy) const |
partitionT | do_2d_partition (const std::size_t vsize, const std::size_t v2size, const std::string policy) const |
outer product of 2 1d-partitionings – result batches correspond to first input batches | |
virtual partitionT | do_partitioning (const std::size_t &vsize1, const std::size_t &vsize2, const std::string policy) const |
override this if you want your own partitioning | |
template<typename tupleT > | |
partitionT | partition_tasks (const tupleT &argtuple) const |
this will be called by MacroTask, it will always partition first (and possibly second) vector of arguments | |
MacroTaskPartitioner & | set_dimension (const std::size_t &n) |
MacroTaskPartitioner & | set_max_batch_size (const long &n) |
MacroTaskPartitioner & | set_min_batch_size (const long &n) |
MacroTaskPartitioner & | set_nsubworld (const long &n) |
MacroTaskPartitioner & | set_policy (const std::string &n) |
Public Attributes | |
std::size_t | dimension = 1 |
partition one or two vectors | |
std::size_t | max_batch_size = 10 |
maximum batch size (for memory management) | |
std::size_t | min_batch_size =5 |
minimum batch size | |
std::size_t | nsubworld =1 |
number of worlds (try to have enough batches for all worlds) | |
std::string | policy = "guided" |
how to partition the batches | |
Friends | |
class | Batch |
partition one (two) vectors into 1D (2D) batches.
derive from this class and override the \it{do_partitioning} method if you want to implement your custom partitioner
typedef std::list<std::pair<Batch,double> > madness::MacroTaskPartitioner::partitionT |
|
inline |
|
inlinevirtual |
|
inlinevirtual |
Reimplemented in madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::MacroTaskPartitionerExchange.
References madness::Batch::size_of_input().
Referenced by do_1d_partition(), and do_2d_partition().
|
inline |
References compute_priority(), MADNESS_EXCEPTION, max_batch_size, min_batch_size, nsubworld, and policy.
Referenced by do_2d_partition(), and do_partitioning().
|
inline |
outer product of 2 1d-partitionings – result batches correspond to first input batches
[begin1,end1) <– [begin1,end1) [begin2,end2)
References compute_priority(), do_1d_partition(), and policy.
Referenced by do_partitioning().
|
inlinevirtual |
override this if you want your own partitioning
Reimplemented in madness::MacroTaskMp2ConstantPart::ConstantPartPartitioner, madness::MacroTaskConstantPart::ConstantPartPartitioner, madness::MacroTaskMp2UpdatePair::UpdatePairPartitioner, madness::MacroTaskIteratePair::IteratePairPartitioner, madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::MacroTaskPartitionerExchange, and madness::Coulomb< T, NDIM >::MacroTaskCoulomb::MacroTaskPartitionerCoulomb.
References dimension, do_1d_partition(), do_2d_partition(), and policy.
Referenced by partition_tasks().
|
inline |
this will be called by MacroTask, it will always partition first (and possibly second) vector of arguments
References dimension, do_partitioning(), MADNESS_EXCEPTION, madness::name(), and policy.
Referenced by test_partitioner().
|
inline |
References dimension.
Referenced by madness::MacroTaskMp2UpdatePair::UpdatePairPartitioner::UpdatePairPartitioner(), and test_partitioner().
|
inline |
References max_batch_size.
|
inline |
References min_batch_size.
|
inline |
References nsubworld.
Referenced by test_partitioner().
|
inline |
References policy.
|
friend |
std::size_t madness::MacroTaskPartitioner::dimension = 1 |
partition one or two vectors
Referenced by madness::MP3::MacroTaskMP3::Partitioner::Partitioner(), do_partitioning(), partition_tasks(), and set_dimension().
std::size_t madness::MacroTaskPartitioner::max_batch_size = 10 |
maximum batch size (for memory management)
Referenced by madness::MP3::MacroTaskMP3::Partitioner::Partitioner(), do_1d_partition(), and set_max_batch_size().
std::size_t madness::MacroTaskPartitioner::min_batch_size =5 |
minimum batch size
Referenced by madness::MP3::MacroTaskMP3::Partitioner::Partitioner(), do_1d_partition(), and set_min_batch_size().
std::size_t madness::MacroTaskPartitioner::nsubworld =1 |
number of worlds (try to have enough batches for all worlds)
Referenced by do_1d_partition(), and set_nsubworld().
std::string madness::MacroTaskPartitioner::policy = "guided" |
how to partition the batches
Referenced by do_1d_partition(), do_2d_partition(), do_partitioning(), partition_tasks(), and set_policy().