Skip to content

Commit

Permalink
Reenabling Abstract[Block]DistMatrix::ConstructDiagonal by avoiding a…
Browse files Browse the repository at this point in the history
…ttempts to use non-static member variables as compile-time constants.
  • Loading branch information
Jack Poulson committed Aug 2, 2014
1 parent 19a9a6a commit d74f61e
Show file tree
Hide file tree
Showing 32 changed files with 4 additions and 68 deletions.
2 changes: 0 additions & 2 deletions include/El/core/BlockDistMatrix/Abstract.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@ class AbstractBlockDistMatrix
( const El::Grid& g=DefaultGrid(), Int root=0 ) const = 0;
virtual AbstractBlockDistMatrix<T>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const = 0;
/*
virtual AbstractBlockDistMatrix<T>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const = 0;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/BlockDistMatrix/CIRC_CIRC.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ class BlockDistMatrix<T,CIRC,CIRC> : public GeneralBlockDistMatrix<T,CIRC,CIRC>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
BlockDistMatrix<T,CIRC,CIRC>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
BlockDistMatrix<T,CIRC,CIRC>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/BlockDistMatrix/MC_MR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,8 @@ class BlockDistMatrix<T,MC,MR> : public GeneralBlockDistMatrix<T,MC,MR>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
BlockDistMatrix<T,MR,MC>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
BlockDistMatrix<T,MD,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/BlockDistMatrix/MC_STAR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,8 @@ class BlockDistMatrix<T,MC,STAR> : public GeneralBlockDistMatrix<T,MC,STAR>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
BlockDistMatrix<T,STAR,MC>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
BlockDistMatrix<T,MC,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/BlockDistMatrix/MD_STAR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,8 @@ class BlockDistMatrix<T,MD,STAR> : public GeneralBlockDistMatrix<T,MD,STAR>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
BlockDistMatrix<T,STAR,MD>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
BlockDistMatrix<T,MD,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/BlockDistMatrix/MR_MC.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,8 @@ class BlockDistMatrix<T,MR,MC> : public GeneralBlockDistMatrix<T,MR,MC>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
BlockDistMatrix<T,MC,MR>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
BlockDistMatrix<T,MD,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/BlockDistMatrix/MR_STAR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,8 @@ class BlockDistMatrix<T,MR,STAR> : public GeneralBlockDistMatrix<T,MR,STAR>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
BlockDistMatrix<T,STAR,MR>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
BlockDistMatrix<T,MR,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/BlockDistMatrix/STAR_MC.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,8 @@ class BlockDistMatrix<T,STAR,MC> : public GeneralBlockDistMatrix<T,STAR,MC>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
BlockDistMatrix<T,MC,STAR>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
BlockDistMatrix<T,MC,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/BlockDistMatrix/STAR_MD.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,8 @@ class BlockDistMatrix<T,STAR,MD> : public GeneralBlockDistMatrix<T,STAR,MD>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
BlockDistMatrix<T,MD,STAR>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
BlockDistMatrix<T,MD,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/BlockDistMatrix/STAR_MR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,8 @@ class BlockDistMatrix<T,STAR,MR> : public GeneralBlockDistMatrix<T,STAR,MR>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
BlockDistMatrix<T,MR,STAR>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
BlockDistMatrix<T,MR,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/BlockDistMatrix/STAR_STAR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,8 @@ class BlockDistMatrix<T,STAR,STAR> : public GeneralBlockDistMatrix<T,STAR,STAR>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
BlockDistMatrix<T,STAR,STAR>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
BlockDistMatrix<T,STAR,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/BlockDistMatrix/STAR_VC.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,8 @@ class BlockDistMatrix<T,STAR,VC> : public GeneralBlockDistMatrix<T,STAR,VC>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
BlockDistMatrix<T,VC,STAR>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
BlockDistMatrix<T,VC,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/BlockDistMatrix/STAR_VR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,8 @@ class BlockDistMatrix<T,STAR,VR> : public GeneralBlockDistMatrix<T,STAR,VR>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
BlockDistMatrix<T,VR,STAR>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
BlockDistMatrix<T,VR,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/BlockDistMatrix/VC_STAR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,8 @@ class BlockDistMatrix<T,VC,STAR> : public GeneralBlockDistMatrix<T,VC,STAR>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
BlockDistMatrix<T,STAR,VC>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
BlockDistMatrix<T,VC,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/BlockDistMatrix/VR_STAR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,10 +59,8 @@ class BlockDistMatrix<T,VR,STAR> : public GeneralBlockDistMatrix<T,VR,STAR>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
BlockDistMatrix<T,STAR,VR>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
BlockDistMatrix<T,VR,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/DistMatrix/Abstract.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@ class AbstractDistMatrix
( const El::Grid& g=DefaultGrid(), Int root=0 ) const = 0;
virtual AbstractDistMatrix<T>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const = 0;
/*
virtual AbstractDistMatrix<T>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const = 0;
*/
// TODO: ConstructPartialCol and friends?

// Assignment and reconfiguration
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/DistMatrix/CIRC_CIRC.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,8 @@ class DistMatrix<T,CIRC,CIRC> : public GeneralDistMatrix<T,CIRC,CIRC>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
DistMatrix<T,CIRC,CIRC>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
DistMatrix<T,CIRC,CIRC>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/DistMatrix/MC_MR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ class DistMatrix<T,MC,MR> : public GeneralDistMatrix<T,MC,MR>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
DistMatrix<T,MR,MC>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
DistMatrix<T,MD,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/DistMatrix/MC_STAR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ class DistMatrix<T,MC,STAR> : public GeneralDistMatrix<T,MC,STAR>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
DistMatrix<T,STAR,MC>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
DistMatrix<T,MC,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/DistMatrix/MD_STAR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,8 @@ class DistMatrix<T,MD,STAR> : public GeneralDistMatrix<T,MD,STAR>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
DistMatrix<T,STAR,MD>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
DistMatrix<T,MD,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/DistMatrix/MR_MC.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,8 @@ class DistMatrix<T,MR,MC> : public GeneralDistMatrix<T,MR,MC>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
DistMatrix<T,MC,MR>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
DistMatrix<T,MD,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/DistMatrix/MR_STAR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ class DistMatrix<T,MR,STAR> : public GeneralDistMatrix<T,MR,STAR>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
DistMatrix<T,STAR,MR>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
DistMatrix<T,MR,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/DistMatrix/STAR_MC.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,8 @@ class DistMatrix<T,STAR,MC> : public GeneralDistMatrix<T,STAR,MC>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
DistMatrix<T,MC,STAR>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
DistMatrix<T,MC,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/DistMatrix/STAR_MD.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,8 @@ class DistMatrix<T,STAR,MD> : public GeneralDistMatrix<T,STAR,MD>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
DistMatrix<T,MD,STAR>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
DistMatrix<T,MD,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/DistMatrix/STAR_MR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@ class DistMatrix<T,STAR,MR> : public GeneralDistMatrix<T,STAR,MR>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
DistMatrix<T,MR,STAR>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
DistMatrix<T,MR,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/DistMatrix/STAR_STAR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,8 @@ class DistMatrix<T,STAR,STAR> : public GeneralDistMatrix<T,STAR,STAR>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
DistMatrix<T,STAR,STAR>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
DistMatrix<T,STAR,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/DistMatrix/STAR_VC.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@ class DistMatrix<T,STAR,VC> : public GeneralDistMatrix<T,STAR,VC>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
DistMatrix<T,VC,STAR>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
DistMatrix<T,VC,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/DistMatrix/STAR_VR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@ class DistMatrix<T,STAR,VR> : public GeneralDistMatrix<T,STAR,VR>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
DistMatrix<T,VR,STAR>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
DistMatrix<T,VR,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/DistMatrix/VC_STAR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@ class DistMatrix<T,VC,STAR> : public GeneralDistMatrix<T,VC,STAR>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
DistMatrix<T,STAR,VC>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
DistMatrix<T,VC,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
2 changes: 0 additions & 2 deletions include/El/core/DistMatrix/VR_STAR.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,8 @@ class DistMatrix<T,VR,STAR> : public GeneralDistMatrix<T,VR,STAR>
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
DistMatrix<T,STAR,VR>* ConstructTranspose
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
/*
DistMatrix<T,VR,STAR>* ConstructDiagonal
( const El::Grid& g=DefaultGrid(), Int root=0 ) const override;
*/

// Assignment and reconfiguration
// ==============================
Expand Down
6 changes: 2 additions & 4 deletions src/core/BlockDistMatrix/setup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -140,14 +140,12 @@ BlockDistMatrix<T,RowDist,ColDist>* BDM::ConstructTranspose
( const El::Grid& g, Int root ) const
{ return new BlockDistMatrix<T,RowDist,ColDist>(g,root); }

// TODO: Figure out why this is okay in GCC but not Clang
/*
template<typename T>
BlockDistMatrix<T,DiagColDist<ColDist,RowDist>(),
DiagRowDist<ColDist,RowDist>()>* BDM::ConstructDiagonal
( const El::Grid& g, Int root ) const
{ return new BlockDistMatrix<T,this->UDiag,this->VDiag>(g,root); }
*/
{ return new BlockDistMatrix<T,DiagColDist<ColDist,RowDist>(),
DiagRowDist<ColDist,RowDist>()>(g,root); }

template<typename T>
template<Dist U,Dist V>
Expand Down
6 changes: 2 additions & 4 deletions src/core/DistMatrix/setup.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -117,14 +117,12 @@ DistMatrix<T,RowDist,ColDist>* DM::ConstructTranspose
( const El::Grid& g, Int root ) const
{ return new DistMatrix<T,RowDist,ColDist>(g,root); }

// TODO: Figure out why this is okay in GCC but not Clang
/*
template<typename T>
DistMatrix<T,DiagColDist<ColDist,RowDist>(),
DiagRowDist<ColDist,RowDist>()>* DM::ConstructDiagonal
( const El::Grid& g, Int root ) const
{ return new DistMatrix<T,this->UDiag,this->VDiag>(g,root); }
*/
{ return new DistMatrix<T,DiagColDist<ColDist,RowDist>(),
DiagRowDist<ColDist,RowDist>()>(g,root); }

template<typename T>
template<Dist U,Dist V>
Expand Down

0 comments on commit d74f61e

Please sign in to comment.