Loading src/TNL/Matrices/SparseMatrixView.h +2 −2 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ class SparseMatrixView : public MatrixView< Real, Device, Index > /** * \brief The type of matrix elements. */ using RealType = Real; using RealType = std::remove_const_t< Real >; using ComputeRealType = ComputeReal; Loading Loading @@ -942,7 +942,7 @@ class SparseMatrixView : public MatrixView< Real, Device, Index > } }; } // namespace Conatiners } // namespace Matrices } // namespace TNL #include <TNL/Matrices/SparseMatrixView.hpp> src/TNL/Matrices/SparseMatrixView.hpp +5 −7 Original line number Diff line number Diff line Loading @@ -80,8 +80,8 @@ getConstView() const -> ConstViewType return ConstViewType( this->getRows(), this->getColumns(), this->getValues().getConstView(), this->getColumnsIndexes().getConstView(), this->segments.getConstView() ); this->getColumnIndexes().getConstView(), const_cast< SparseMatrixView* >( this )->segments.getView() ); } template< typename Real, Loading Loading @@ -862,9 +862,7 @@ SparseMatrixView< Real, Device, Index, MatrixType, SegmentsView, ComputeReal >:: operator==( const Matrix& m ) const { const auto& view1 = *this; // FIXME: getConstView does not work //const auto view2 = m.getConstView(); const auto view2 = m.getView(); const auto view2 = m.getConstView(); auto fetch = [=] __cuda_callable__ ( const IndexType i ) -> bool { return view1.getRow( i ) == view2.getRow( i ); Loading Loading @@ -896,7 +894,7 @@ void SparseMatrixView< Real, Device, Index, MatrixType, SegmentsView, ComputeReal >:: save( File& file ) const { MatrixView< RealType, DeviceType, IndexType >::save( file ); MatrixView< Real, Device, Index >::save( file ); file << this->columnIndexes; this->segments.save( file ); } Loading Loading
src/TNL/Matrices/SparseMatrixView.h +2 −2 Original line number Diff line number Diff line Loading @@ -98,7 +98,7 @@ class SparseMatrixView : public MatrixView< Real, Device, Index > /** * \brief The type of matrix elements. */ using RealType = Real; using RealType = std::remove_const_t< Real >; using ComputeRealType = ComputeReal; Loading Loading @@ -942,7 +942,7 @@ class SparseMatrixView : public MatrixView< Real, Device, Index > } }; } // namespace Conatiners } // namespace Matrices } // namespace TNL #include <TNL/Matrices/SparseMatrixView.hpp>
src/TNL/Matrices/SparseMatrixView.hpp +5 −7 Original line number Diff line number Diff line Loading @@ -80,8 +80,8 @@ getConstView() const -> ConstViewType return ConstViewType( this->getRows(), this->getColumns(), this->getValues().getConstView(), this->getColumnsIndexes().getConstView(), this->segments.getConstView() ); this->getColumnIndexes().getConstView(), const_cast< SparseMatrixView* >( this )->segments.getView() ); } template< typename Real, Loading Loading @@ -862,9 +862,7 @@ SparseMatrixView< Real, Device, Index, MatrixType, SegmentsView, ComputeReal >:: operator==( const Matrix& m ) const { const auto& view1 = *this; // FIXME: getConstView does not work //const auto view2 = m.getConstView(); const auto view2 = m.getView(); const auto view2 = m.getConstView(); auto fetch = [=] __cuda_callable__ ( const IndexType i ) -> bool { return view1.getRow( i ) == view2.getRow( i ); Loading Loading @@ -896,7 +894,7 @@ void SparseMatrixView< Real, Device, Index, MatrixType, SegmentsView, ComputeReal >:: save( File& file ) const { MatrixView< RealType, DeviceType, IndexType >::save( file ); MatrixView< Real, Device, Index >::save( file ); file << this->columnIndexes; this->segments.save( file ); } Loading