MADNESS
0.10.1
|
#include <lbdeux.h>
Public Member Functions | |
LBNodeDeux () | |
LBNodeDeux (const LBNodeDeux< NDIM > &other) | |
void | add (double cost, bool got_kids) |
Accumulates cost into this node. More... | |
void | deleter (const treeT &tree, const keyT &key) |
Logically deletes this node by setting cost to -1. More... | |
double | get_total_cost () const |
bool | has_children () const |
LBNodeDeux< NDIM > & | operator= (const LBNodeDeux< NDIM > &other) |
void | partition (const treeT &tree, const keyT &key, double avg) |
Descends tree deleting all except internal nodes and sub-tree parents. More... | |
template<typename Archive > | |
void | serialize (Archive &ar) |
void | sum (const treeT &tree, const keyT &child, double value) |
Accumulates cost up the tree from children. More... | |
Private Types | |
typedef Key< NDIM > | keyT |
typedef LBNodeDeux< NDIM > | nodeT |
typedef WorldContainer< keyT, nodeT > | treeT |
Private Member Functions | |
int | index (const keyT &key) |
Computes index of child key in this node using last bit of translations. More... | |
Private Attributes | |
double | child_cost [nchild] |
bool | gotkids |
double | my_cost |
AtomicInt | nsummed |
double | total_cost |
Static Private Attributes | |
static const int | nchild = (1<<NDIM) |
|
private |
|
private |
|
private |
|
inline |
|
inline |
|
inline |
Accumulates cost into this node.
References madness::LBNodeDeux< NDIM >::gotkids, madness::LBNodeDeux< NDIM >::my_cost, and madness::LBNodeDeux< NDIM >::total_cost.
Referenced by madness::LoadBalanceDeux< NDIM >::add_op< T, costT >::operator()().
|
inline |
Logically deletes this node by setting cost to -1.
Cannot actually erase this node from the container since the send() handler is holding an accessor to it.
References madness::LBNodeDeux< NDIM >::has_children(), madness::LBNodeDeux< NDIM >::my_cost, task(), and madness::LBNodeDeux< NDIM >::total_cost.
Referenced by madness::LBNodeDeux< NDIM >::partition().
|
inline |
References madness::LBNodeDeux< NDIM >::total_cost.
Referenced by madness::LoadBalanceDeux< NDIM >::sum().
|
inline |
|
inlineprivate |
Computes index of child key in this node using last bit of translations.
References d(), NDIM, and madness::Key< NDIM >::translation().
Referenced by madness::LBNodeDeux< NDIM >::partition(), and madness::LBNodeDeux< NDIM >::sum().
|
inline |
|
inline |
Descends tree deleting all except internal nodes and sub-tree parents.
References madness::LBNodeDeux< NDIM >::child_cost, madness::LBNodeDeux< NDIM >::deleter(), madness::LBNodeDeux< NDIM >::has_children(), madness::LBNodeDeux< NDIM >::index(), madness::LBNodeDeux< NDIM >::nchild, madness::swap(), task(), and madness::LBNodeDeux< NDIM >::total_cost.
Referenced by madness::LoadBalanceDeux< NDIM >::load_balance().
|
inline |
References madness::archive::wrap_opaque().
|
inline |
Accumulates cost up the tree from children.
References madness::LBNodeDeux< NDIM >::child_cost, madness::LBNodeDeux< NDIM >::index(), madness::Key< NDIM >::level(), madness::LBNodeDeux< NDIM >::nchild, madness::LBNodeDeux< NDIM >::nsummed, madness::Key< NDIM >::parent(), task(), and madness::LBNodeDeux< NDIM >::total_cost.
Referenced by madness::LoadBalanceDeux< NDIM >::sum().
|
private |
|
private |
|
private |
|
staticprivate |
|
private |
|
private |