예제 #1
0
BDM& BDM::operator=( const DistMatrix<T,STAR,MR,BLOCK>& A )
{ 
    DEBUG_ONLY(CSE cse("[STAR,VC] = [STAR,MR]"))
    DistMatrix<T,STAR,VR,BLOCK> A_STAR_VR( A );
    *this = A_STAR_VR;
    return *this;
}
예제 #2
0
파일: STAR_VC.cpp 프로젝트: sg0/Elemental
BDM& BDM::operator=( const BlockDistMatrix<T,MC,MR>& A )
{
    DEBUG_ONLY(CallStackEntry cse("[STAR,VC] = [MC,MR]"))
    BlockDistMatrix<T,STAR,VR> A_STAR_VR( A );
    *this = A_STAR_VR;
    return *this;
}
예제 #3
0
DM& DM::operator=( const DistMatrix<T,STAR,MC>& A )
{
    DEBUG_CSE
    const Grid& grid = A.Grid();
    if( grid.Height() == grid.Width() )
    {
        const int gridDim = grid.Height();
        const int transposeRank =
            A.ColOwner(this->RowShift()) + gridDim*this->ColOwner(A.RowShift());
        copy::Exchange( A, *this, transposeRank, transposeRank, grid.VCComm() );
    }
    else
    {
        DistMatrix<T,STAR,VC> A_STAR_VC( A );
        DistMatrix<T,STAR,VR> A_STAR_VR( this->Grid() );
        A_STAR_VR.AlignRowsWith(*this);
        A_STAR_VR = A_STAR_VC;
        A_STAR_VC.Empty();

        DistMatrix<T> A_MC_MR( A_STAR_VR );
        A_STAR_VR.Empty();

        *this = A_MC_MR;
    }
    return *this;
}
예제 #4
0
DM& DM::operator=( const DistMatrix<T,MC,MR>& A )
{ 
    DEBUG_ONLY(CSE cse("[STAR,VC] = [MC,MR]"))
    DistMatrix<T,STAR,VR> A_STAR_VR( A );
    *this = A_STAR_VR;
    return *this;
}
예제 #5
0
BDM& BDM::operator=( const DistMatrix<T,STAR,VC,BLOCK>& A )
{ 
    DEBUG_ONLY(CSE cse("[MC,MR] = [STAR,VC]"))
    DistMatrix<T,STAR,VR,BLOCK> A_STAR_VR(this->Grid());
    A_STAR_VR.AlignWith( *this );
    A_STAR_VR = A;
    *this = A_STAR_VR;
    return *this;
}
예제 #6
0
BDM& BDM::operator=( const DistMatrix<T,MC,STAR,BLOCK>& A )
{
    DEBUG_ONLY(CSE cse("[STAR,VC] = [MC,STAR]"))
    DistMatrix<T,MC,MR,BLOCK> A_MC_MR( A );
    DistMatrix<T,STAR,VR,BLOCK> A_STAR_VR( A_MC_MR );
    A_MC_MR.Empty(); 
    *this = A_STAR_VR;
    return *this;
}
예제 #7
0
DM& DM::operator=( const DistMatrix<T,STAR,VC>& A )
{
    DEBUG_CSE
    DistMatrix<T,STAR,VR> A_STAR_VR(this->Grid());
    A_STAR_VR.AlignRowsWith(*this);
    A_STAR_VR = A;
    *this = A_STAR_VR;
    return *this;
}
예제 #8
0
DM& DM::operator=( const DistMatrix<T,VC,STAR>& A )
{ 
    DEBUG_ONLY(CSE cse("[STAR,VC] = [VC,STAR]"))
    DistMatrix<T> A_MC_MR( A );
    DistMatrix<T> A_STAR_VR( A_MC_MR );
    A_MC_MR.Empty(); 
    *this = A_STAR_VR;
    return *this;
}
예제 #9
0
DM& DM::operator=( const DistMatrix<T,MC,STAR>& A )
{ 
    DEBUG_ONLY(CallStackEntry cse("[STAR,VC] = [MC,STAR]"))
    std::unique_ptr<DistMatrix<T,MC,MR>> A_MC_MR( new DistMatrix<T,MC,MR>(A) );
    std::unique_ptr<DistMatrix<T,STAR,VR>> A_STAR_VR
    ( new DistMatrix<T,STAR,VR>(*A_MC_MR) );
    delete A_MC_MR.release(); // lowers memory highwater
    *this = *A_STAR_VR;
    return *this;
}
예제 #10
0
BDM&
BDM::operator=( const BlockDistMatrix<T,STAR,VC>& A )
{ 
    DEBUG_ONLY(CallStackEntry cse("[STAR,MR] = [STAR,VC]"))
    BlockDistMatrix<T,STAR,VR> A_STAR_VR(this->Grid());
    A_STAR_VR.AlignRowsWith(*this);
    A_STAR_VR = A;
    *this = A_STAR_VR;
    return *this;
}
예제 #11
0
DM& DM::operator=( const DistMatrix<T,STAR,MR>& A )
{ 
    DEBUG_CSE
    DistMatrix<T,STAR,VR> A_STAR_VR( A );
    DistMatrix<T,STAR,VC> A_STAR_VC( this->Grid() );
    A_STAR_VC.AlignRowsWith(*this);
    A_STAR_VC = A_STAR_VR;
    A_STAR_VR.Empty();
    *this = A_STAR_VC;
    return *this;
}
예제 #12
0
파일: MC_STAR.cpp 프로젝트: ifzz/Elemental
BDM& BDM::operator=( const DistMatrix<T,STAR,VC,BLOCK>& A )
{ 
    DEBUG_ONLY(CSE cse("[MC,STAR] = [STAR,VC]"))
    DistMatrix<T,STAR,VR,BLOCK> A_STAR_VR( A );
    DistMatrix<T,MC,  MR,BLOCK> A_MC_MR( this->Grid() );
    A_MC_MR.AlignColsWith(*this);
    A_MC_MR = A_STAR_VR;
    A_STAR_VR.Empty();
    *this = A_MC_MR;
    return *this;
}
예제 #13
0
DM& DM::operator=( const DistMatrix<T,MR,MC>& A )
{ 
    DEBUG_ONLY(CSE cse("[STAR,MR] = [MR,MC]"))
    DistMatrix<T,STAR,VC> A_STAR_VC( A );
    DistMatrix<T,STAR,VR> A_STAR_VR( this->Grid() );
    A_STAR_VR.AlignRowsWith(*this);
    A_STAR_VR = A_STAR_VC;
    A_STAR_VC.Empty(); 

    *this = A_STAR_VR;
    return *this;
}
예제 #14
0
BDM& BDM::operator=( const DistMatrix<T,STAR,MR,BLOCK>& A )
{
    DEBUG_ONLY(CSE cse("[MR,MC] = [STAR,MR]"))
    DistMatrix<T,STAR,VR,BLOCK> A_STAR_VR( A );
    DistMatrix<T,STAR,VC,BLOCK> A_STAR_VC( this->Grid() );
    A_STAR_VR.AlignRowsWith(*this);
    A_STAR_VC = A_STAR_VR;
    A_STAR_VR.Empty();

    *this = A_STAR_VC;
    return *this;
}
예제 #15
0
BDM& BDM::operator=( const DistMatrix<T,MC,MR,BLOCK>& A )
{
    EL_DEBUG_CSE
    DistMatrix<T,STAR,VR,BLOCK> A_STAR_VR( A );
    DistMatrix<T,STAR,VC,BLOCK> A_STAR_VC( this->Grid() );
    A_STAR_VC.AlignRowsWith(*this);
    A_STAR_VC = A_STAR_VR;
    A_STAR_VR.Empty();

    *this = A_STAR_VC;
    return *this;
}
예제 #16
0
DM& DM::operator=( const DistMatrix<T,STAR,VC>& A )
{
    DEBUG_ONLY(CallStackEntry cse("[MC,STAR] = [STAR,VC]"))
    std::unique_ptr<DistMatrix<T,STAR,VR>> 
        A_STAR_VR( new DistMatrix<T,STAR,VR>(A) );
    std::unique_ptr<DistMatrix<T,MC,MR>> 
        A_MC_MR( new DistMatrix<T,MC,MR>(this->Grid()) );
    A_MC_MR->AlignColsWith(*this);
    *A_MC_MR = *A_STAR_VR;
    delete A_STAR_VR.release(); // lowers memory highwater
    *this = *A_MC_MR;
    return *this;
}
예제 #17
0
inline void
WriteLPS
( const DistMatrix<Complex<double>,VC,STAR>& L,
  const DistMatrix<Complex<double>,VC,STAR>& S,
  Int N0, Int N1, Int plane,
  bool tv=true,
  FileFormat format=ASCII_MATLAB )
{
    DEBUG_ONLY(CallStackEntry cse("WriteLPS"))
    Matrix<Complex<double>> B( N0, N1, N0 );
    Complex<double>* BBuf = B.Buffer();

    // Split the timesteps among processes
    DistMatrix<Complex<double>,STAR,VR> A_STAR_VR( L );
    const int rowShift = A_STAR_VR.RowShift();
    const int rowStride = A_STAR_VR.RowStride();
    const int localWidth = A_STAR_VR.LocalWidth();
    for( Int tLoc=0; tLoc<localWidth; ++tLoc )
    {
        const Int t = rowShift + tLoc*rowStride;
        const Complex<double>* LBuf = A_STAR_VR.LockedBuffer(0,tLoc);
        for( Int j=0; j<N1; ++j )
            for( Int i=0; i<N0; ++i )    
                BBuf[i+j*N0] = LBuf[j+i*N1];

        std::ostringstream os;
        if( tv )
            os << "L-" << plane << "-tv-" << t;
        else
            os << "L-" << plane << "-temporal-" << t;
        Write( B, os.str(), format );
    }
    A_STAR_VR = S;
    for( Int tLoc=0; tLoc<localWidth; ++tLoc )
    {
        const Int t = rowShift + tLoc*rowStride;
        const Complex<double>* SBuf = A_STAR_VR.LockedBuffer(0,tLoc);
        for( Int j=0; j<N1; ++j )
            for( Int i=0; i<N0; ++i )    
                BBuf[i+j*N0] = SBuf[j+i*N1];

        std::ostringstream os;
        if( tv )
            os << "S-" << plane << "-tv-" << t;
        else
            os << "S-" << plane << "-temporal-" << t;
        Write( B, os.str(), format );
    }
}
예제 #18
0
파일: STAR_MC.cpp 프로젝트: ifzz/Elemental
DM& DM::operator=( const DistMatrix<T,MC,STAR>& A )
{ 
    DEBUG_ONLY(CSE cse("[STAR,MC] = [MC,STAR]"))
    DistMatrix<T> A_MC_MR( A );
    DistMatrix<T,STAR,VR> A_STAR_VR( A_MC_MR );
    A_MC_MR.Empty(); 

    DistMatrix<T,STAR,VC> A_STAR_VC( this->Grid() );
    A_STAR_VC.AlignRowsWith(*this);
    A_STAR_VC = A_STAR_VR;
    A_STAR_VR.Empty();

    *this = A_STAR_VC;
    return *this;
}
예제 #19
0
BDM&
BDM::operator=( const BlockDistMatrix<T,MR,MC>& A )
{ 
    DEBUG_ONLY(CallStackEntry cse("[STAR,MR] = [MR,MC]"))
    std::unique_ptr<BlockDistMatrix<T,STAR,VC>> A_STAR_VC
    ( new BlockDistMatrix<T,STAR,VC>(A) );

    std::unique_ptr<BlockDistMatrix<T,STAR,VR>> A_STAR_VR
    ( new BlockDistMatrix<T,STAR,VR>(this->Grid()) );
    A_STAR_VR->AlignRowsWith(*this);
    *A_STAR_VR = *A_STAR_VC;
    delete A_STAR_VC.release(); // lowers memory highwater

    *this = *A_STAR_VR;
    return *this;
}