diff --git a/include/El/blas_like/level1/Concatenate.hpp b/include/El/blas_like/level1/Concatenate.hpp index 24ac8d31ea..2c0fa933af 100644 --- a/include/El/blas_like/level1/Concatenate.hpp +++ b/include/El/blas_like/level1/Concatenate.hpp @@ -2,8 +2,8 @@ Copyright (c) 2009-2016, Jack Poulson All rights reserved. - This file is part of Elemental and is under the BSD 2-Clause License, - which can be found in the LICENSE file in the root directory, or at + This file is part of Elemental and is under the BSD 2-Clause License, + which can be found in the LICENSE file in the root directory, or at http://opensource.org/licenses/BSD-2-Clause */ #ifndef EL_BLAS_CONCATENATE_HPP @@ -55,9 +55,9 @@ void VCat template inline void HCat -( const ElementalMatrix& A, - const ElementalMatrix& B, - ElementalMatrix& CPre ) +( const AbstractDistMatrix& A, + const AbstractDistMatrix& B, + AbstractDistMatrix& CPre ) { DEBUG_CSE if( A.Height() != B.Height() ) @@ -79,9 +79,9 @@ inline void HCat template void VCat -( const ElementalMatrix& A, - const ElementalMatrix& B, - ElementalMatrix& CPre ) +( const AbstractDistMatrix& A, + const AbstractDistMatrix& B, + AbstractDistMatrix& CPre ) { DEBUG_CSE if( A.Width() != B.Width() ) @@ -104,22 +104,22 @@ void VCat template void HCat ( const SparseMatrix& A, - const SparseMatrix& B, + const SparseMatrix& B, SparseMatrix& C ) { DEBUG_CSE if( A.Height() != B.Height() ) - LogicError("Incompatible heights for HCat"); + LogicError("Incompatible heights for HCat"); const Int m = A.Height(); const Int nA = A.Width(); const Int nB = B.Width(); - + const Int numEntriesA = A.NumEntries(); const Int numEntriesB = B.NumEntries(); C.Resize( m, nA+nB ); Zero( C ); - C.Reserve( numEntriesA+numEntriesB ); + C.Reserve( numEntriesA+numEntriesB ); for( Int e=0; e void VCat ( const SparseMatrix& A, - const SparseMatrix& B, + const SparseMatrix& B, SparseMatrix& C ) { DEBUG_CSE if( A.Width() != B.Width() ) - LogicError("Incompatible widths for VCat"); + LogicError("Incompatible widths for VCat"); const Int mA = A.Height(); const Int mB = B.Height(); const Int n = A.Width(); - + const Int numEntriesA = A.NumEntries(); const Int numEntriesB = B.NumEntries(); C.Resize( mA+mB, n ); Zero( C ); - C.Reserve( numEntriesA+numEntriesB ); + C.Reserve( numEntriesA+numEntriesB ); for( Int e=0; e void HCat ( const DistSparseMatrix& A, - const DistSparseMatrix& B, + const DistSparseMatrix& B, DistSparseMatrix& C ) { DEBUG_CSE if( A.Height() != B.Height() ) - LogicError("Incompatible heights for HCat"); + LogicError("Incompatible heights for HCat"); /* if( A.Comm() != B.Comm() ) LogicError("A and B had different communicators"); @@ -170,13 +170,13 @@ void HCat const Int m = A.Height(); const Int nA = A.Width(); const Int nB = B.Width(); - + const Int numEntriesA = A.NumLocalEntries(); const Int numEntriesB = B.NumLocalEntries(); C.SetComm( A.Comm() ); C.Resize( m, nA+nB ); Zero( C ); - C.Reserve( numEntriesA+numEntriesB ); + C.Reserve( numEntriesA+numEntriesB ); const Int firstLocalRow = C.FirstLocalRow(); for( Int e=0; e void VCat ( const DistSparseMatrix& A, - const DistSparseMatrix& B, + const DistSparseMatrix& B, DistSparseMatrix& C ) { DEBUG_CSE if( A.Width() != B.Width() ) - LogicError("Incompatible widths for VCat"); + LogicError("Incompatible widths for VCat"); /* if( A.Comm() != B.Comm() ) LogicError("A and B had different communicators"); @@ -202,7 +202,7 @@ void VCat const Int mA = A.Height(); const Int mB = B.Height(); const Int n = A.Width(); - + const Int numEntriesA = A.NumLocalEntries(); const Int numEntriesB = B.NumLocalEntries(); C.SetComm( A.Comm() ); @@ -296,13 +296,13 @@ void VCat const Matrix& B, \ Matrix& C ); \ EL_EXTERN template void HCat \ - ( const ElementalMatrix& A, \ - const ElementalMatrix& B, \ - ElementalMatrix& C ); \ + ( const AbstractDistMatrix& A, \ + const AbstractDistMatrix& B, \ + AbstractDistMatrix& C ); \ EL_EXTERN template void VCat \ - ( const ElementalMatrix& A, \ - const ElementalMatrix& B, \ - ElementalMatrix& C ); \ + ( const AbstractDistMatrix& A, \ + const AbstractDistMatrix& B, \ + AbstractDistMatrix& C ); \ EL_EXTERN template void HCat \ ( const SparseMatrix& A, \ const SparseMatrix& B, \ diff --git a/include/El/blas_like/level1/decl.hpp b/include/El/blas_like/level1/decl.hpp index 57fbe00afd..4abb487de8 100644 --- a/include/El/blas_like/level1/decl.hpp +++ b/include/El/blas_like/level1/decl.hpp @@ -380,9 +380,9 @@ void HCat Matrix& C ); template void HCat -( const ElementalMatrix& A, - const ElementalMatrix& B, - ElementalMatrix& C ); +( const AbstractDistMatrix& A, + const AbstractDistMatrix& B, + AbstractDistMatrix& C ); template void HCat ( const SparseMatrix& A, @@ -408,9 +408,9 @@ void VCat Matrix& C ); template void VCat -( const ElementalMatrix& A, - const ElementalMatrix& B, - ElementalMatrix& C ); +( const AbstractDistMatrix& A, + const AbstractDistMatrix& B, + AbstractDistMatrix& C ); template void VCat ( const SparseMatrix& A, @@ -2013,7 +2013,11 @@ void UpdateMappedDiagonal function func, Int offset=0 ); template void UpdateMappedDiagonal -( DistMatrix& A, const ElementalMatrix& d, +( DistMatrix& A, const AbstractDistMatrix& d, + function func, Int offset=0 ); +template +void UpdateMappedDiagonal +( DistMatrix& A, const AbstractDistMatrix& d, function func, Int offset=0 ); template