Beispiel #1
0
DistMap::DistMap( Int numSources, mpi::Comm comm )
: numSources_(numSources)
{ 
    if( comm == mpi::COMM_WORLD )
        comm_ = comm;
    else
        mpi::Dup( comm, comm_ );
    InitializeLocalData();
}
Beispiel #2
0
DistMultiVec<T>::DistMultiVec( Int height, Int width, mpi::Comm comm )
: height_(height), width_(width)
{ 
    if( comm == mpi::COMM_WORLD )
        comm_ = comm;
    else
        mpi::Dup( comm, comm_ );
    InitializeLocalData();
}
Beispiel #3
0
DistGraph::DistGraph( Int numSources, Int numTargets, mpi::Comm comm )
: numSources_(numSources), numTargets_(numTargets),
  commSize_(mpi::Size(comm)), commRank_(mpi::Rank(comm))
{ 
    if( comm == mpi::COMM_WORLD )
        comm_ = comm;
    else
        mpi::Dup( comm, comm_ );
    InitializeLocalData();
}
Beispiel #4
0
DistMap::DistMap( mpi::Comm comm )
: numSources_(0),
  commSize_(mpi::Size(comm)), commRank_(mpi::Rank(comm))
{ 
    if( comm == mpi::COMM_WORLD )
        comm_ = comm;
    else
        mpi::Dup( comm, comm_ );
    InitializeLocalData();
}
Beispiel #5
0
DistMultiVec<T>::DistMultiVec( mpi::Comm comm )
: height_(0), width_(0),
  commSize_(mpi::Size(comm)), commRank_(mpi::Rank(comm))
{ 
    if( comm == mpi::COMM_WORLD )
        comm_ = comm;
    else
        mpi::Dup( comm, comm_ );
    InitializeLocalData();
}
Beispiel #6
0
void DistMultiVec<T>::Resize( Int height, Int width )
{
    if( height_ == height && width == width_ )
        return;

    height_ = height;
    width_ = width;
    InitializeLocalData();

    SwapClear( remoteUpdates_ );
}
Beispiel #7
0
void DistMultiVec<T>::SetComm( mpi::Comm comm )
{ 
    if( comm == comm_ )
        return;

    if( comm_ != mpi::COMM_WORLD )
        mpi::Free( comm_ );
    if( comm == mpi::COMM_WORLD )
        comm_ = comm;
    else
        mpi::Dup( comm, comm_ );

    InitializeLocalData();
}
Beispiel #8
0
void DistGraph::Resize( Int numSources, Int numTargets )
{
    if( numSources_ == numSources && numTargets == numTargets_ )
        return;

    frozenSparsity_ = false;

    numSources_ = numSources;
    numTargets_ = numTargets;

    InitializeLocalData();

    SwapClear( remoteSources_ );
    SwapClear( remoteTargets_ );
}
Beispiel #9
0
void DistMultiVec<T>::Resize( Int height, Int width )
{
    height_ = height;
    width_ = width;
    InitializeLocalData();
}