Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tnl-dev
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
TNL
tnl-dev
Commits
d92d27f6
There was an error fetching the commit references. Please try again later.
Commit
d92d27f6
authored
4 years ago
by
Tomáš Oberhuber
Browse files
Options
Downloads
Patches
Plain Diff
Added offsets getter to CSR segments.
parent
37d96efc
No related branches found
No related tags found
1 merge request
!89
To/matrices adaptive csr
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/TNL/Algorithms/Segments/CSR.h
+4
-0
4 additions, 0 deletions
src/TNL/Algorithms/Segments/CSR.h
src/TNL/Algorithms/Segments/CSR.hpp
+22
-0
22 additions, 0 deletions
src/TNL/Algorithms/Segments/CSR.hpp
with
26 additions
and
0 deletions
src/TNL/Algorithms/Segments/CSR.h
+
4
−
0
View file @
d92d27f6
...
@@ -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.
...
...
This diff is collapsed.
Click to expand it.
src/TNL/Algorithms/Segments/CSR.hpp
+
22
−
0
View file @
d92d27f6
...
@@ -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
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment