Loading src/TNL/Matrices/Dense.h +8 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,14 @@ public: void setValue( const RealType& v ); __cuda_callable__ Real& operator()( const IndexType row, const IndexType column ); __cuda_callable__ const Real& operator()( const IndexType row, const IndexType column ) const; __cuda_callable__ bool setElementFast( const IndexType row, const IndexType column, Loading src/TNL/Matrices/Dense_impl.h +28 −1 Original line number Diff line number Diff line Loading @@ -151,6 +151,33 @@ void Dense< Real, Device, Index >::setValue( const Real& value ) } template< typename Real, typename Device, typename Index > __cuda_callable__ Real& Dense< Real, Device, Index >::operator()( const IndexType row, const IndexType column ) { TNL_ASSERT( row >= 0 && row < this->getRows() && column >= 0 && column < this->getColumns(), printf( " row = %d, column = %d, this->getRows = %d, this->getColumns() = %d \n", row, column, this->getRows(), this->getColumns() ) ); return this->values.operator[]( this->getElementIndex( row, column ) ); } template< typename Real, typename Device, typename Index > __cuda_callable__ const Real& Dense< Real, Device, Index >::operator()( const IndexType row, const IndexType column ) const { TNL_ASSERT( row >= 0 && row < this->getRows() && column >= 0 && column < this->getColumns(), printf( " row = %d, column = %d, this->getRows = %d, this->getColumns() = %d \n", row, column, this->getRows(), this->getColumns() ) ); return this->values.operator[]( this->getElementIndex( row, column ) ); } template< typename Real, typename Device, typename Index > Loading Loading
src/TNL/Matrices/Dense.h +8 −0 Original line number Diff line number Diff line Loading @@ -87,6 +87,14 @@ public: void setValue( const RealType& v ); __cuda_callable__ Real& operator()( const IndexType row, const IndexType column ); __cuda_callable__ const Real& operator()( const IndexType row, const IndexType column ) const; __cuda_callable__ bool setElementFast( const IndexType row, const IndexType column, Loading
src/TNL/Matrices/Dense_impl.h +28 −1 Original line number Diff line number Diff line Loading @@ -151,6 +151,33 @@ void Dense< Real, Device, Index >::setValue( const Real& value ) } template< typename Real, typename Device, typename Index > __cuda_callable__ Real& Dense< Real, Device, Index >::operator()( const IndexType row, const IndexType column ) { TNL_ASSERT( row >= 0 && row < this->getRows() && column >= 0 && column < this->getColumns(), printf( " row = %d, column = %d, this->getRows = %d, this->getColumns() = %d \n", row, column, this->getRows(), this->getColumns() ) ); return this->values.operator[]( this->getElementIndex( row, column ) ); } template< typename Real, typename Device, typename Index > __cuda_callable__ const Real& Dense< Real, Device, Index >::operator()( const IndexType row, const IndexType column ) const { TNL_ASSERT( row >= 0 && row < this->getRows() && column >= 0 && column < this->getColumns(), printf( " row = %d, column = %d, this->getRows = %d, this->getColumns() = %d \n", row, column, this->getRows(), this->getColumns() ) ); return this->values.operator[]( this->getElementIndex( row, column ) ); } template< typename Real, typename Device, typename Index > Loading