-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove Thread-local storage from CHOLMOD and SPQR #206
Conversation
@IanButterworth does this fix the issue? |
Codecov Report
@@ Coverage Diff @@
## main #206 +/- ##
==========================================
+ Coverage 92.06% 92.13% +0.06%
==========================================
Files 11 11
Lines 7161 7160 -1
==========================================
+ Hits 6593 6597 +4
+ Misses 568 563 -5
📣 Codecov can now indicate which changes are the most critical in Pull Requests. Learn more |
end | ||
|
||
function getcommon() | ||
return get!(task_local_storage(), :cholmod_common, newcommon())::Ref{cholmod_common} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this not be
get!(newcommon, task_local_storage(), :cholmod_common)::Ref{cholmod_common}
? As it is now a new object is created for every call.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The docs say it's collection, key, default
right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's another method where you can give a function/type as a first arg. Note that Fredrik's suggestion gives the type but doesn't evaluate it
See #204
This PR takes the path of least resistance and just uses
task_local_storage
. The part that most needs review is the addition of a call tocholmod_l_finish
. This is attached to thecholmod_common
object which is lazily created in each task (which uses CHOLMOD).I think this is correct, but I'm not 100% certain on the lifetime of
task_local_storage
.