inline void DistMatrix<T,MD,STAR,Int>::LockedAttach ( Int height, Int width, Int colAlignmentVC, const T* buffer, Int ldim, const elem::Grid& grid ) { #ifndef RELEASE PushCallStack("[MD,* ]::LockedAttach"); #endif this->Empty(); this->grid_ = &grid; this->height_ = height; this->width_ = width; this->diagPath_ = grid.DiagPath(colAlignmentVC); this->colAlignment_ = grid.DiagPathRank(colAlignmentVC); this->viewing_ = true; this->lockedView_ = true; if( this->Participating() ) { this->colShift_ = Shift( grid.DiagPathRank(), this->colAlignment_, grid.LCM() ); const Int localHeight = LocalLength(height,this->colShift_,grid.LCM()); this->localMatrix_.LockedAttach( localHeight, width, buffer, ldim ); } else this->colShift_ = 0; #ifndef RELEASE PopCallStack(); #endif }
inline DistMatrix<T,MD,STAR,Int>::DistMatrix ( Int height, Int width, Int colAlignmentVC, T* buffer, Int ldim, const elem::Grid& g ) : AbstractDistMatrix<T,Int> (height,width,g.DiagPathRank(colAlignmentVC),0, (g.InGrid() && g.DiagPath()==g.DiagPath(colAlignmentVC) ? Shift(g.DiagPathRank(),g.DiagPathRank(colAlignmentVC),g.LCM()) : 0),0, (g.InGrid() && g.DiagPath()==g.DiagPath(colAlignmentVC) ? LocalLength(height,g.DiagPathRank(),g.DiagPathRank(colAlignmentVC),g.LCM()) : 0),width,buffer,ldim,g), diagPath_(g.DiagPath(colAlignmentVC)) { }
inline DistMatrix<T,MD,STAR,Int>::DistMatrix ( bool constrainedColAlignment, Int colAlignmentVC, const elem::Grid& g ) : AbstractDistMatrix<T,Int> (0,0,constrainedColAlignment,false,g.DiagPathRank(colAlignmentVC),0, (g.InGrid() && g.DiagPath()==g.DiagPath(colAlignmentVC) ? Shift(g.DiagPathRank(),g.DiagPathRank(colAlignmentVC),g.LCM()) : 0),0, 0,0,g), diagPath_(g.DiagPath(colAlignmentVC)) { }
inline DistMatrix<T,MD,STAR,Int>::DistMatrix ( Int height, Int width, const elem::Grid& g ) : AbstractDistMatrix<T,Int> (height,width,false,false,0,0, (g.InGrid() && g.DiagPath()==0 ? g.DiagPathRank() : 0),0, (g.InGrid() && g.DiagPath()==0 ? LocalLength(height,g.DiagPathRank(),0,g.LCM()) : 0),width,g), diagPath_(0) { }
void DistMatrix<T,MD,STAR>::LockedAttach ( Int height, Int width, Int colAlignmentVC, const T* buffer, Int ldim, const elem::Grid& grid ) { #ifndef RELEASE CallStackEntry entry("[MD,* ]::LockedAttach"); #endif this->Empty(); this->grid_ = &grid; this->height_ = height; this->width_ = width; this->diagPath_ = grid.DiagPath(colAlignmentVC); this->colAlignment_ = grid.DiagPathRank(colAlignmentVC); this->viewType_ = LOCKED_VIEW; this->SetColShift(); if( this->Participating() ) { const Int localHeight = Length(height,this->colShift_,grid.LCM()); this->matrix_.LockedAttach_( localHeight, width, buffer, ldim ); } }