BDM& BDM::operator=( const DistMatrix<T,STAR,VR,BLOCK>& A ) { DEBUG_ONLY(CSE cse("[MR,MC] = [STAR,VR]")) DistMatrix<T,STAR,VC,BLOCK> A_STAR_VC( A ); *this = A_STAR_VC; return *this; }
DM& DM::operator=( const DistMatrix<T,STAR,VR>& A ) { DEBUG_CSE DistMatrix<T,STAR,VC> A_STAR_VC( A ); *this = A_STAR_VC; return *this; }
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; }
DM& DM::operator=( const DistMatrix<T,MR,MC>& A ) { DEBUG_ONLY(CSE cse("[STAR,VR] = [MR,MC]")) DistMatrix<T,STAR,VC> A_STAR_VC( A ); *this = A_STAR_VC; return *this; }
BDM& BDM::operator=( const DistMatrix<T,STAR,VR,BLOCK>& A ) { EL_DEBUG_CSE DistMatrix<T,STAR,VC,BLOCK> A_STAR_VC( A ); *this = A_STAR_VC; return *this; }
BDM& BDM::operator=( const DistMatrix<T,STAR,VR,BLOCK>& A ) { DEBUG_CSE DistMatrix<T,STAR,VC,BLOCK> A_STAR_VC(this->Grid()); A_STAR_VC.AlignRowsWith(*this); *this = A_STAR_VC = A; return *this; }
DM& DM::operator=( const DistMatrix<T,MR,STAR>& A ) { DEBUG_ONLY(CSE cse("[STAR,VR] = [MR,STAR]")) DistMatrix<T,MR,MC> A_MR_MC( A ); DistMatrix<T,STAR,VC> A_STAR_VC( A_MR_MC ); A_MR_MC.Empty(); *this = A_STAR_VC; return *this; }
DM& DM::operator=( const DistMatrix<T,MR,STAR>& A ) { DEBUG_CSE DistMatrix<T,MR,MC> A_MR_MC( A ); DistMatrix<T,STAR,VC> A_STAR_VC( A_MR_MC ); A_MR_MC.Empty(); *this = A_STAR_VC; return *this; }
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; }
BDM& BDM::operator=( const DistMatrix<T,STAR,MC,BLOCK>& A ) { DEBUG_ONLY(CSE cse("[MC,MR] = [STAR,MC]")) DistMatrix<T,STAR,VC,BLOCK> A_STAR_VC( A ); DistMatrix<T,STAR,VR,BLOCK> A_STAR_VR( this->Grid() ); A_STAR_VR.AlignWith( *this ); A_STAR_VR = A_STAR_VC; A_STAR_VC.Empty(); *this = A_STAR_VR; return *this; }
DM& DM::operator=( const DistMatrix<T,MR,STAR>& A ) { DEBUG_ONLY(CallStackEntry cse("[STAR,VR] = [MR,STAR]")) std::unique_ptr<DistMatrix<T,MR,MC>> A_MR_MC( new DistMatrix<T,MR,MC>(A) ); std::unique_ptr<DistMatrix<T,STAR,VC>> A_STAR_VC( new DistMatrix<T,STAR,VC>(*A_MR_MC) ); delete A_MR_MC.release(); // lowers memory highwater *this = *A_STAR_VC; return *this; }
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; }
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; }
BDM& BDM::operator=( const DistMatrix<T,STAR,VR,BLOCK>& A ) { DEBUG_ONLY(CSE cse("[MR,STAR] = [STAR,VR]")) DistMatrix<T,STAR,VC,BLOCK> A_STAR_VC( A ); DistMatrix<T,MR, MC,BLOCK> A_MR_MC( this->Grid() ); A_MR_MC.AlignColsWith(*this); A_MR_MC = A_STAR_VC; A_STAR_VC.Empty(); *this = A_MR_MC; return *this; }
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; }
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; }