-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
Add a zeroInitialise()
method to portable objects and collections
#45861
Add a zeroInitialise()
method to portable objects and collections
#45861
Conversation
cms-bot internal usage |
erase()
method to the Portable objects and collections
5904f72
to
2c4f848
Compare
enable gpu |
please test |
@makortel could you review this ? |
A new Pull Request was created by @fwyzard for master. It involves the following packages:
@fwyzard, @makortel can you please review it and eventually sign? Thanks. cms-bot commands are listed here |
+1 Size: This PR adds an extra 32KB to repository Comparison SummarySummary:
GPU Comparison SummarySummary:
|
2c4f848
to
4f051dd
Compare
erase()
method to the Portable objects and collectionszeroInitialise()
Portable objects and collections
zeroInitialise()
Portable objects and collectionszeroInitialise()
method to portable objects and collections
please test |
-code-checks Logs: https://cmssdt.cern.ch/SDT/code-checks/cms-sw-PR-45861/41623
Code check has found code style and quality issues which could be resolved by applying following patch(s)
|
4f051dd
to
146b187
Compare
please test |
+1 Size: This PR adds an extra 28KB to repository Comparison SummarySummary:
GPU Comparison SummarySummary:
|
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.
Looks good to me
@@ -70,6 +70,12 @@ class PortableDeviceCollection { | |||
ConstBuffer buffer() const { return *buffer_; } | |||
ConstBuffer const_buffer() const { return *buffer_; } | |||
|
|||
// erases the data in the Buffer by writing zeros (bytes containing '\0') to it | |||
template <typename TQueue, typename = std::enable_if_t<alpaka::isQueue<TQueue>>> | |||
void zeroInitialise(TQueue&& queue) { |
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.
Not for this PR, but should the constructor overload(s) be updated to use forwarding reference for the TDev
and TQueue
?
+heterogeneous |
This pull request is fully signed and it will be integrated in one of the next master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @rappoccio, @mandrenguyen, @sextonkennedy, @antoniovilela (and backports should be raised in the release meeting by the corresponding L2) |
+1 |
PR description:
Add a
zeroInitialise()
method to thePortableObject
andPortableCollection
templates that erases the data in theBuffer
by writing zeros (bytes containing'\0'
) to it:on the host,
zeroInitialise()
can be called without arguments to execute immediately, or with a queue to be run asynchronously;on the device,
zeroInitialise()
requires a queue and can only be run asynchronously.Extend the tests in
DataFormats/PortableTestObjects
andHeterogeneousCore/AlpakaTest
to validate the new functionality.PR validation:
The update unit tests pass on CPU and NVIDIA GPUs.