Commit 683b9817 authored by Jakub Klinkovský's avatar Jakub Klinkovský
Browse files

Fixed ChunkedEllpack::getRow method

parent 52eda548
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -82,6 +82,7 @@ public:
   typedef ChunkedEllpack< Real, Devices::Cuda, Index > CudaType;
   typedef Sparse< Real, Device, Index > BaseType;
   typedef typename BaseType::MatrixRow MatrixRow;
   typedef SparseRow< const RealType, const IndexType > ConstMatrixRow;

   ChunkedEllpack();

@@ -193,7 +194,7 @@ public:
   MatrixRow getRow( const IndexType rowIndex );

   __cuda_callable__
   const MatrixRow getRow( const IndexType rowIndex ) const;
   ConstMatrixRow getRow( const IndexType rowIndex ) const;

   template< typename Vector >
   __cuda_callable__
+3 −3
Original line number Diff line number Diff line
@@ -936,7 +936,7 @@ getRow( const IndexType rowIndex )
{
   const IndexType rowOffset = this->rowPointers[ rowIndex ];
   const IndexType rowLength = this->rowPointers[ rowIndex + 1 ] - rowOffset;
   return MatrixRow( &this->columns[ rowOffset ],
   return MatrixRow( &this->columnIndexes[ rowOffset ],
                     &this->values[ rowOffset ],
                     rowLength,
                     1 );
@@ -946,13 +946,13 @@ template< typename Real,
          typename Device,
          typename Index >
__cuda_callable__
const typename ChunkedEllpack< Real, Device, Index >::MatrixRow
typename ChunkedEllpack< Real, Device, Index >::ConstMatrixRow
ChunkedEllpack< Real, Device, Index >::
getRow( const IndexType rowIndex ) const
{
   const IndexType rowOffset = this->rowPointers[ rowIndex ];
   const IndexType rowLength = this->rowPointers[ rowIndex + 1 ] - rowOffset;
   return MatrixRow( &this->columns[ rowOffset ],
   return MatrixRow( &this->columnIndexes[ rowOffset ],
                     &this->values[ rowOffset ],
                     rowLength,
                     1 );