-
Notifications
You must be signed in to change notification settings - Fork 175
[DFT] Allow the descriptor to be modified and recommitted #282
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
Changes from all commits
2519504
45de231
5c39e07
1691ba2
351a195
b1404b5
447dc7d
d2bade9
843c41f
e70414c
4259829
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -28,7 +28,13 @@ namespace dft { | |
|
|
||
| template <precision prec, domain dom> | ||
| void descriptor<prec, dom>::commit(sycl::queue &queue) { | ||
| pimpl_.reset(detail::create_commit(*this, queue)); | ||
| if (!pimpl_ || pimpl_->get_queue() != queue) { | ||
| if (pimpl_) { | ||
| pimpl_->get_queue().wait(); | ||
| } | ||
| pimpl_.reset(detail::create_commit(*this, queue)); | ||
FMarno marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
| pimpl_->commit(values_); | ||
FMarno marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe it's worth adding a
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've added a tests to show that there is a wait on the old queue here 088fa08
Because of all this I can't think of how to test that reliably. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thank you for that. I think you're right for every bullet point you mentioned and I'm sorry if my original suggestion generated complications/misunderstanding on the testing scope. Those changes look fine to me.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ok, that's interesting. I think this should work because objects like
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've added a test for that in 8d0a608 |
||
| template void descriptor<precision::SINGLE, domain::COMPLEX>::commit(sycl::queue &); | ||
| template void descriptor<precision::SINGLE, domain::REAL>::commit(sycl::queue &); | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.