Ejemplo n.º 1
0
BDM&
BDM::operator=( const BlockDistMatrix<T,STAR,VC>& A )
{ 
    DEBUG_ONLY(CallStackEntry cse("[VC,STAR] = [STAR,VC]"))
    std::unique_ptr<BlockDistMatrix<T,MR,MC>> 
        A_MR_MC( new BlockDistMatrix<T,MR,MC>(A) );
    std::unique_ptr<BlockDistMatrix<T,VR,STAR>> 
        A_VR_STAR( new BlockDistMatrix<T,VR,STAR>(*A_MR_MC) );
    delete A_MR_MC.release(); // lowers memory highwater
    *this = *A_VR_STAR;
    return *this;
}
Ejemplo n.º 2
0
DM& DM::operator=( const DistMatrix<T,MC,MR>& A )
{ 
    DEBUG_ONLY(CSE cse("[MR,STAR] = [MC,MR]"))
    DistMatrix<T,VC,STAR> A_VC_STAR( A );
    DistMatrix<T,VR,STAR> A_VR_STAR( this->Grid() );
    A_VR_STAR.AlignColsWith(*this);
    A_VR_STAR = A_VC_STAR;
    A_VC_STAR.Empty(); 

    *this = A_VR_STAR;
    return *this;
}
Ejemplo n.º 3
0
BDM& BDM::operator=( const DistMatrix<T,VC,STAR,BLOCK>& A )
{
    DEBUG_CSE
    DistMatrix<T,VR,STAR,BLOCK> A_VR_STAR( A );
    DistMatrix<T,MR,MC,BLOCK> A_MR_MC( this->Grid() );
    A_MR_MC.AlignRowsWith(*this);
    A_MR_MC = A_VR_STAR;
    A_VR_STAR.Empty();

    *this = A_MR_MC;
    return *this;
}
Ejemplo n.º 4
0
BDM& BDM::operator=( const DistMatrix<T,MC,MR,BLOCK>& A )
{
    EL_DEBUG_CSE
    DistMatrix<T,VC,STAR,BLOCK> A_VC_STAR( A );
    DistMatrix<T,VR,STAR,BLOCK> A_VR_STAR( this->Grid() );
    A_VR_STAR.AlignColsWith(*this);
    A_VR_STAR = A_VC_STAR;
    A_VC_STAR.Empty();

    *this = A_VR_STAR;
    return *this;
}
Ejemplo n.º 5
0
DM& DM::operator=( const DistMatrix<T,MR,STAR>& A )
{
    DEBUG_ONLY(CallStackEntry cse("[MC,STAR] = [MR,STAR]"))
    std::unique_ptr<DistMatrix<T,VR,STAR>> A_VR_STAR
    ( new DistMatrix<T,VR,STAR>(A) );
    std::unique_ptr<DistMatrix<T,VC,STAR>> A_VC_STAR
    ( new DistMatrix<T,VC,STAR>(this->Grid()) );
    A_VC_STAR->AlignColsWith(*this);
    *A_VC_STAR = *A_VR_STAR;
    delete A_VR_STAR.release(); // lowers memory highwater
    *this = *A_VC_STAR;
    return *this;
}
Ejemplo n.º 6
0
BDM& BDM::operator=( const DistMatrix<T,STAR,MC,BLOCK>& A )
{ 
    DEBUG_ONLY(CSE cse("[MC,STAR] = [STAR,MC]"))
    DistMatrix<T,MR,MC,BLOCK> A_MR_MC( A );
    DistMatrix<T,VR,STAR,BLOCK> A_VR_STAR( A_MR_MC );
    A_MR_MC.Empty();

    DistMatrix<T,VC,STAR,BLOCK> A_VC_STAR( this->Grid() );
    A_VC_STAR.AlignColsWith(*this);
    A_VC_STAR = A_VR_STAR;
    A_VR_STAR.Empty(); 

    *this = A_VC_STAR;
    return *this;
}
Ejemplo n.º 7
0
DM& DM::operator=( const DistMatrix<T,MR,STAR>& A )
{
    DEBUG_CSE
    DistMatrix<T,VR,STAR> A_VR_STAR( A );
    DistMatrix<T,VC,STAR> A_VC_STAR( A_VR_STAR );
    A_VR_STAR.Empty();

    DistMatrix<T> A_MC_MR( this->Grid() );
    A_MC_MR.AlignRowsWith( *this );
    A_MC_MR = A_VC_STAR;
    A_VC_STAR.Empty();

    *this = A_MC_MR;
    return *this;
}
Ejemplo n.º 8
0
BDM&
BDM::operator=( const BlockDistMatrix<T,MR,STAR>& A )
{ 
    DEBUG_ONLY(CallStackEntry cse("[STAR,MR] = [MR,STAR]"))
    std::unique_ptr<BlockDistMatrix<T,VR,STAR>> A_VR_STAR
    ( new BlockDistMatrix<T,VR,STAR>(A) );

    std::unique_ptr<BlockDistMatrix<T,VC,STAR>> A_VC_STAR
    ( new BlockDistMatrix<T,VC,STAR>(*A_VR_STAR) );
    delete A_VR_STAR.release(); // lowers memory highwater

    std::unique_ptr<BlockDistMatrix<T,MC,MR>> A_MC_MR
    ( new BlockDistMatrix<T,MC,MR>(this->Grid()) );
    A_MC_MR->AlignRowsWith(*this);
    *A_MC_MR = *A_VC_STAR;
    delete A_VC_STAR.release(); // lowers memory highwater

    *this = *A_MC_MR;
    return *this;
}