Skip to content
Snippets Groups Projects
Commit d92d27f6 authored by Tomáš Oberhuber's avatar Tomáš Oberhuber
Browse files

Added offsets getter to CSR segments.

parent 37d96efc
No related branches found
No related tags found
1 merge request!89To/matrices adaptive csr
...@@ -96,6 +96,10 @@ class CSR ...@@ -96,6 +96,10 @@ class CSR
__cuda_callable__ __cuda_callable__
SegmentViewType getSegmentView( const IndexType segmentIdx ) const; SegmentViewType getSegmentView( const IndexType segmentIdx ) const;
const OffsetsHolder& getOffsets() const;
OffsetsHolder& getOffsets();
/*** /***
* \brief Go over all segments and for each segment element call * \brief Go over all segments and for each segment element call
* function 'f' with arguments 'args'. The return type of 'f' is bool. * function 'f' with arguments 'args'. The return type of 'f' is bool.
......
...@@ -201,6 +201,28 @@ getSegmentView( const IndexType segmentIdx ) const -> SegmentViewType ...@@ -201,6 +201,28 @@ getSegmentView( const IndexType segmentIdx ) const -> SegmentViewType
return SegmentViewType( offsets[ segmentIdx ], offsets[ segmentIdx + 1 ] - offsets[ segmentIdx ] ); return SegmentViewType( offsets[ segmentIdx ], offsets[ segmentIdx + 1 ] - offsets[ segmentIdx ] );
} }
template< typename Device,
typename Index,
typename Kernel,
typename IndexAllocator >
auto
CSR< Device, Index, Kernel, IndexAllocator >::
getOffsets() const -> const OffsetsHolder&
{
return this->offsets;
}
template< typename Device,
typename Index,
typename Kernel,
typename IndexAllocator >
auto
CSR< Device, Index, Kernel, IndexAllocator >::
getOffsets() -> OffsetsHolder&
{
return this->offsets;
}
template< typename Device, template< typename Device,
typename Index, typename Index,
typename Kernel, typename Kernel,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment