MADNESS  0.10.1
Public Member Functions | Public Attributes | List of all members
madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::MacroTaskPartitionerExchange Class Reference

custom partitioning for the exchange operator in exchangeoperator.h More...

Inheritance diagram for madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::MacroTaskPartitionerExchange:
Inheritance graph
[legend]
Collaboration diagram for madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::MacroTaskPartitionerExchange:
Collaboration graph
[legend]

Public Member Functions

 MacroTaskPartitionerExchange (const bool symmetric)
 
double compute_priority (const Batch &batch) const override
 compute the priority of this task for non-dumb scheduling More...
 
partitionT do_partitioning (const std::size_t &vsize1, const std::size_t &vsize2, const std::string policy) const override
 override this if you want your own partitioning More...
 
- Public Member Functions inherited from madness::MacroTaskPartitioner
 MacroTaskPartitioner ()
 
virtual ~MacroTaskPartitioner ()
 
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 More...
 
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 More...
 
MacroTaskPartitionerset_dimension (const std::size_t &n)
 
MacroTaskPartitionerset_max_batch_size (const long &n)
 
MacroTaskPartitionerset_min_batch_size (const long &n)
 
MacroTaskPartitionerset_nsubworld (const long &n)
 
MacroTaskPartitionerset_policy (const std::string &n)
 

Public Attributes

bool symmetric = false
 
- Public Attributes inherited from madness::MacroTaskPartitioner
std::size_t dimension = 1
 partition one or two vectors More...
 
std::size_t max_batch_size = 10
 maximum batch size (for memory management) More...
 
std::size_t min_batch_size =5
 minimum batch size More...
 
std::size_t nsubworld =1
 number of worlds (try to have enough batches for all worlds) More...
 
std::string policy = "guided"
 how to partition the batches More...
 

Additional Inherited Members

- Public Types inherited from madness::MacroTaskPartitioner
typedef std::list< std::pair< Batch, double > > partitionT
 

Detailed Description

template<typename T, std::size_t NDIM>
template<typename T, std::size_t NDIM>
class madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::MacroTaskPartitionerExchange

custom partitioning for the exchange operator in exchangeoperator.h

arguments are: result[i] += sum_k vket[k] \int 1/r vbra[k] f[i] with f and vbra being batched, result and vket being passed on as a whole

Constructor & Destructor Documentation

◆ MacroTaskPartitionerExchange()

template<typename T , std::size_t NDIM>
template<typename T , std::size_t NDIM>
madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::MacroTaskPartitionerExchange::MacroTaskPartitionerExchange ( const bool  symmetric)
inline

Member Function Documentation

◆ compute_priority()

template<typename T , std::size_t NDIM>
template<typename T , std::size_t NDIM>
double madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::MacroTaskPartitionerExchange::compute_priority ( const Batch batch) const
inlineoverridevirtual

compute the priority of this task for non-dumb scheduling

Returns
the priority as double number (no limits)

Reimplemented from madness::MacroTaskPartitioner.

References madness::Batch::input, and MADNESS_CHECK.

◆ do_partitioning()

template<typename T , std::size_t NDIM>
template<typename T , std::size_t NDIM>
partitionT madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::MacroTaskPartitionerExchange::do_partitioning ( const std::size_t &  vsize1,
const std::size_t &  vsize2,
const std::string  policy 
) const
inlineoverridevirtual

override this if you want your own partitioning

Reimplemented from madness::MacroTaskPartitioner.

References madness::_().

Member Data Documentation

◆ symmetric

template<typename T , std::size_t NDIM>
template<typename T , std::size_t NDIM>
bool madness::Exchange< T, NDIM >::ExchangeImpl< T, NDIM >::MacroTaskExchangeSimple::MacroTaskPartitionerExchange::symmetric = false

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