Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dune-istl
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD 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
Show more breadcrumbs
Patrick Jaap
dune-istl
Commits
aa9408f1
Commit
aa9408f1
authored
1 year ago
by
Carsten Gräser
Browse files
Options
Downloads
Patches
Plain Diff
[doc] Document thread safety guarantees of MatrixIndexSet
parent
107a54a8
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
dune/istl/matrixindexset.hh
+11
-1
11 additions, 1 deletion
dune/istl/matrixindexset.hh
with
11 additions
and
1 deletion
dune/istl/matrixindexset.hh
+
11
−
1
View file @
aa9408f1
...
...
@@ -28,6 +28,10 @@ namespace Dune {
* The default value for maxVectorSize works well and ensures
* that the slow std::set fallback is only used for very
* dense rows.
*
* This class is thread safe in the sense that concurrent calls
* to all const methods and furthermore to add(row,col) with different
* rows in each thread are safe.
*/
class
MatrixIndexSet
{
...
...
@@ -98,7 +102,13 @@ namespace Dune {
indices_
.
resize
(
rows_
,
FlatSet
());
}
/** \brief Add an index to the index set */
/**
* \brief Add an index to the index set
*
* It is safe to call add(row, col) for different rows in concurrent threads,
* but it is not safe to do concurrent calls for the same row, even for different
* columns.
*/
void
add
(
size_type
row
,
size_type
col
)
{
return
std
::
visit
(
Dune
::
overload
(
// If row is stored as set, call insert directly
...
...
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