Skip to content

Commit 109f969

Browse files
authored
Merge pull request #49177 from fwyzard/PortablHostCollection_without_alpaka
Add PortableHostCollection constructor for code that does not use alpaka
2 parents 479a74e + 100861c commit 109f969

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

DataFormats/Portable/interface/PortableHostCollection.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,9 @@ class PortableHostCollection {
4747
assert(reinterpret_cast<uintptr_t>(buffer_->data()) % Layout::alignment == 0);
4848
}
4949

50+
// constructor for code that does not use alpaka explicitly, using the global "host" object returned by cms::alpakatools::host()
51+
PortableHostCollection(int32_t elements) : PortableHostCollection(elements, cms::alpakatools::host()) {}
52+
5053
// non-copyable
5154
PortableHostCollection(PortableHostCollection const&) = delete;
5255
PortableHostCollection& operator=(PortableHostCollection const&) = delete;

0 commit comments

Comments
 (0)