packages/MC/mc/Fission_Matrix_Processor.cc
//---------------------------------------------------------------------------//
// PRIVATE FUNCTIONS
//---------------------------------------------------------------------------//
/*!
 * \brief Parallel merge/sort of global graph.
 */
PRIVATE FUNCTIONS
\brief Parallel merge/sort of global graph.
PRIVATE FUNCTIONS \ brief Parallel merge / sort of global graph .
void Fission_Matrix_Processor::reduce()
{
    if (d_type == INTERNAL)
    {
        receive_and_merge(d_children[0]);
        if (d_children[1] != NONE)
        {
            receive_and_merge(d_children[1]);
        }
    }
    if (d_parent != NONE)
    {
        int size = d_graph.size();
        profugus::send(&size, 1, d_parent, 800);
        profugus::send(&d_graph[0].first, 2 * size, d_parent, 801);
    }
}
void Fission_Matrix_Processor :: reduce ( ) { if ( d_type == INTERNAL ) { receive_and_merge ( d_children [ 0 ] ) ; if ( d_children [ 1 ] != NONE ) { receive_and_merge ( d_children [ 1 ] ) ; } } if ( d_parent != NONE ) { int size = d_graph . size ( ) ; profugus :: send ( & size , 1 , d_parent , 800 ) ; profugus :: send ( & d_graph [ 0 ] . first , 2 * size , d_parent , 801 ) ; } }
PRIVATE FUNCTIONS
 \brief Parallel merge/sort of global graph.
PRIVATE FUNCTIONS \ brief Parallel merge / sort of global graph .
// if this is an internal node wait get data from children // always receive from at least the left child if this is an internal // node // check to see if we need to receive from the right child, which may // not exist // send the graph to the parent // number of elements in the graph