diff --git a/src/TNL/Matrices/Dense.h b/src/TNL/Matrices/Dense.h index 9c05297d152f6809a140edbbe302dcf3e394f0e2..778fd0bd4af9568c0abae2de891fd49379251144 100644 --- a/src/TNL/Matrices/Dense.h +++ b/src/TNL/Matrices/Dense.h @@ -56,7 +56,7 @@ class Dense : public Matrix< Real, Device, Index > Dense(); Dense( const IndexType rows, const IndexType columns ); - + ViewType getView(); ConstViewType getConstView() const; @@ -179,7 +179,7 @@ class Dense : public Matrix< Real, Device, Index > template< typename Real_, typename Device_, typename Index_, typename RealAllocator_ > bool operator!=( const Dense< Real_, Device_, Index_, RowMajorOrder >& matrix ) const; - + void save( const String& fileName ) const; void load( const String& fileName ); diff --git a/src/TNL/Matrices/Dense.hpp b/src/TNL/Matrices/Dense.hpp index 7a6c4becc383e4398813b1c8d4b1645ad973ad7a..49e218c779a3c80339436fff3adada73619466df 100644 --- a/src/TNL/Matrices/Dense.hpp +++ b/src/TNL/Matrices/Dense.hpp @@ -15,7 +15,7 @@ #include <TNL/Exceptions/NotImplementedError.h> namespace TNL { -namespace Matrices { +namespace Matrices { template< typename Real, typename Device, @@ -46,7 +46,7 @@ auto Dense< Real, Device, Index, RowMajorOrder, RealAllocator >:: getView() -> ViewType { - return ViewType( this->getRows(), + return ViewType( this->getRows(), this->getColumns(), this->getValues().getView(), this->segments.getView() ); @@ -77,9 +77,9 @@ Dense< Real, Device, Index, RowMajorOrder, RealAllocator >:: getSerializationType() { return String( "Matrices::Dense< " ) + - getType< RealType >() + ", " + - getType< Device >() + ", " + - getType< IndexType >() + " >"; + TNL::getSerializationType< RealType >() + ", [any_device], " + + TNL::getSerializationType< IndexType >() + + ( RowMajorOrder ? "true" : "false" ) + ", [any_allocator] >"; } template< typename Real, @@ -99,7 +99,7 @@ template< typename Real, typename Index, bool RowMajorOrder, typename RealAllocator > -void +void Dense< Real, Device, Index, RowMajorOrder, RealAllocator >:: setDimensions( const IndexType rows, const IndexType columns ) @@ -128,7 +128,7 @@ template< typename Real, typename Index, bool RowMajorOrder, typename RealAllocator > -void +void Dense< Real, Device, Index, RowMajorOrder, RealAllocator >:: setCompressedRowLengths( ConstCompressedRowLengthsVectorView rowLengths ) { @@ -322,7 +322,7 @@ template< typename Real, typename Index, bool RowMajorOrder, typename RealAllocator > -Real +Real Dense< Real, Device, Index, RowMajorOrder, RealAllocator >:: getElement( const IndexType row, const IndexType column ) const @@ -447,7 +447,7 @@ template< typename Real, typename RealAllocator > template< typename InVector, typename OutVector > -void +void Dense< Real, Device, Index, RowMajorOrder, RealAllocator >:: vectorProduct( const InVector& inVector, OutVector& outVector ) const { @@ -857,7 +857,7 @@ void Dense< Real, Device, Index, RowMajorOrder, RealAllocator >::getTranspositio << "This matrix rows: " << this->getRows() << std::endl << "That matrix columns: " << matrix.getColumns() << std::endl << "That matrix rows: " << matrix.getRows() << std::endl ); - + if( std::is_same< Device, Devices::Host >::value ) { const IndexType& rows = matrix.getRows(); diff --git a/src/TNL/Matrices/DenseMatrixView.hpp b/src/TNL/Matrices/DenseMatrixView.hpp index 08cfab8437c527a05132929aee2a3fb4a95db4f3..48c0ccdc3278f8c4d35d07b11ebe70a41b50d17f 100644 --- a/src/TNL/Matrices/DenseMatrixView.hpp +++ b/src/TNL/Matrices/DenseMatrixView.hpp @@ -15,7 +15,7 @@ #include <TNL/Exceptions/NotImplementedError.h> namespace TNL { -namespace Matrices { +namespace Matrices { template< typename Real, typename Device, @@ -50,7 +50,7 @@ auto DenseMatrixView< Real, Device, Index, RowMajorOrder >:: getView() -> ViewType { - return ViewType( this->getRows(), + return ViewType( this->getRows(), this->getColumns(), this->getValues().getView(), this->columnIndexes.getView(), @@ -82,9 +82,9 @@ DenseMatrixView< Real, Device, Index, RowMajorOrder >:: getSerializationType() { return String( "Matrices::Dense< " ) + - getType< RealType >() + ", " + - getType< Device >() + ", " + - getType< IndexType >() + " >"; + TNL::getSerializationType< RealType >() + ", [any_device], " + + TNL::getSerializationType< IndexType >() + + ( RowMajorOrder ? "true" : "false" ) + ", [any_allocator] >"; } template< typename Real, @@ -271,7 +271,7 @@ template< typename Real, typename Device, typename Index, bool RowMajorOrder > -Real +Real DenseMatrixView< Real, Device, Index, RowMajorOrder >:: getElement( const IndexType row, const IndexType column ) const @@ -783,7 +783,7 @@ void DenseMatrixView< Real, Device, Index, RowMajorOrder >::getTransposition( co << "This matrix rows: " << this->getRows() << std::endl << "That matrix columns: " << matrix.getColumns() << std::endl << "That matrix rows: " << matrix.getRows() << std::endl ); - + if( std::is_same< Device, Devices::Host >::value ) { const IndexType& rows = matrix.getRows(); diff --git a/src/TNL/Matrices/Tridiagonal_impl.h b/src/TNL/Matrices/Tridiagonal.hpp similarity index 100% rename from src/TNL/Matrices/Tridiagonal_impl.h rename to src/TNL/Matrices/Tridiagonal.hpp