Loading src/TNL/Matrices/Matrix.h +6 −4 Original line number Diff line number Diff line Loading @@ -76,14 +76,16 @@ public: __cuda_callable__ IndexType getColumns() const; virtual void setElement( const IndexType row, //virtual TODO: uncomment void setElement( const IndexType row, const IndexType column, const RealType& value ) = 0; const RealType& value );// = 0; virtual void addElement( const IndexType row, //virtual TODO: uncomment void addElement( const IndexType row, const IndexType column, const RealType& value, const RealType& thisElementMultiplicator = 1.0 ) = 0; const RealType& thisElementMultiplicator = 1.0 );// = 0; virtual Real getElement( const IndexType row, const IndexType column ) const = 0; Loading src/TNL/Matrices/Multidiagonal.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -707,7 +707,7 @@ operator=( const Multidiagonal< Real_, Device_, Index_, RowMajorOrder_, RealAllo //// // Copy matrix elements from the buffer to the matrix auto f2 = [=] __cuda_callable__ ( IndexType rowIdx, IndexType localIdx, IndexType& columnIndex, RealType& value ) mutable { auto f2 = [=] __cuda_callable__ ( const IndexType rowIdx, const IndexType localIdx, const IndexType columnIndex, RealType& value ) mutable { const IndexType bufferIdx = ( rowIdx - baseRow ) * maxRowLength + localIdx; value = thisValuesBuffer_view[ bufferIdx ]; }; Loading src/TNL/Matrices/MultidiagonalMatrixView.h +4 −4 Original line number Diff line number Diff line Loading @@ -30,10 +30,10 @@ class MultidiagonalMatrixView : public MatrixView< Real, Device, Index > using DeviceType = Device; using IndexType = Index; using BaseType = MatrixView< Real, Device, Index >; using DiagonalsShiftsType = Containers::Vector< IndexType, DeviceType, IndexType >; using DiagonalsShiftsView = typename DiagonalsShiftsType::ViewType; using HostDiagonalsShiftsType = Containers::Vector< IndexType, Devices::Host, IndexType >; using HostDiagonalsShiftsView = typename DiagonalsShiftsType::ViewType; //using DiagonalsShiftsType = Containers::Vector< IndexType, DeviceType, IndexType >; using DiagonalsShiftsView = Containers::VectorView< IndexType, DeviceType, IndexType >; //using HostDiagonalsShiftsType = Containers::Vector< IndexType, Devices::Host, IndexType >; using HostDiagonalsShiftsView = Containers::VectorView< IndexType, Devices::Host, IndexType >; using IndexerType = details::MultidiagonalMatrixIndexer< IndexType, RowMajorOrder >; using ValuesViewType = typename BaseType::ValuesView; using ViewType = MultidiagonalMatrixView< Real, Device, Index, RowMajorOrder >; Loading src/TNL/Matrices/MultidiagonalMatrixView.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -398,7 +398,7 @@ forRows( IndexType first, IndexType last, Function& function ) const { const IndexType columnIdx = rowIdx + diagonalsShifts_view[ localIdx ]; if( columnIdx >= 0 && columnIdx < columns ) function( rowIdx, localIdx, columnIdx, values_view[ indexer.getGlobalIndex( rowIdx, localIdx, 0 ) ] ); function( rowIdx, localIdx, columnIdx, values_view[ indexer.getGlobalIndex( rowIdx, localIdx ) ] ); } }; Algorithms::ParallelFor< DeviceType >::exec( first, last, f ); Loading Loading
src/TNL/Matrices/Matrix.h +6 −4 Original line number Diff line number Diff line Loading @@ -76,14 +76,16 @@ public: __cuda_callable__ IndexType getColumns() const; virtual void setElement( const IndexType row, //virtual TODO: uncomment void setElement( const IndexType row, const IndexType column, const RealType& value ) = 0; const RealType& value );// = 0; virtual void addElement( const IndexType row, //virtual TODO: uncomment void addElement( const IndexType row, const IndexType column, const RealType& value, const RealType& thisElementMultiplicator = 1.0 ) = 0; const RealType& thisElementMultiplicator = 1.0 );// = 0; virtual Real getElement( const IndexType row, const IndexType column ) const = 0; Loading
src/TNL/Matrices/Multidiagonal.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -707,7 +707,7 @@ operator=( const Multidiagonal< Real_, Device_, Index_, RowMajorOrder_, RealAllo //// // Copy matrix elements from the buffer to the matrix auto f2 = [=] __cuda_callable__ ( IndexType rowIdx, IndexType localIdx, IndexType& columnIndex, RealType& value ) mutable { auto f2 = [=] __cuda_callable__ ( const IndexType rowIdx, const IndexType localIdx, const IndexType columnIndex, RealType& value ) mutable { const IndexType bufferIdx = ( rowIdx - baseRow ) * maxRowLength + localIdx; value = thisValuesBuffer_view[ bufferIdx ]; }; Loading
src/TNL/Matrices/MultidiagonalMatrixView.h +4 −4 Original line number Diff line number Diff line Loading @@ -30,10 +30,10 @@ class MultidiagonalMatrixView : public MatrixView< Real, Device, Index > using DeviceType = Device; using IndexType = Index; using BaseType = MatrixView< Real, Device, Index >; using DiagonalsShiftsType = Containers::Vector< IndexType, DeviceType, IndexType >; using DiagonalsShiftsView = typename DiagonalsShiftsType::ViewType; using HostDiagonalsShiftsType = Containers::Vector< IndexType, Devices::Host, IndexType >; using HostDiagonalsShiftsView = typename DiagonalsShiftsType::ViewType; //using DiagonalsShiftsType = Containers::Vector< IndexType, DeviceType, IndexType >; using DiagonalsShiftsView = Containers::VectorView< IndexType, DeviceType, IndexType >; //using HostDiagonalsShiftsType = Containers::Vector< IndexType, Devices::Host, IndexType >; using HostDiagonalsShiftsView = Containers::VectorView< IndexType, Devices::Host, IndexType >; using IndexerType = details::MultidiagonalMatrixIndexer< IndexType, RowMajorOrder >; using ValuesViewType = typename BaseType::ValuesView; using ViewType = MultidiagonalMatrixView< Real, Device, Index, RowMajorOrder >; Loading
src/TNL/Matrices/MultidiagonalMatrixView.hpp +1 −1 Original line number Diff line number Diff line Loading @@ -398,7 +398,7 @@ forRows( IndexType first, IndexType last, Function& function ) const { const IndexType columnIdx = rowIdx + diagonalsShifts_view[ localIdx ]; if( columnIdx >= 0 && columnIdx < columns ) function( rowIdx, localIdx, columnIdx, values_view[ indexer.getGlobalIndex( rowIdx, localIdx, 0 ) ] ); function( rowIdx, localIdx, columnIdx, values_view[ indexer.getGlobalIndex( rowIdx, localIdx ) ] ); } }; Algorithms::ParallelFor< DeviceType >::exec( first, last, f ); Loading