1313 * See the License for the specific language governing permissions and
1414 * limitations under the License.
1515 */
16+
1617#pragma once
1718
1819#include < cuco/detail/error.hpp>
2526namespace cuco {
2627
2728template <class T , class Allocator >
28- __host__ roaring_bitmap<T, Allocator>::roaring_bitmap(cuda::std::byte const * bitmap,
29- Allocator const & alloc,
30- cuda::stream_ref stream)
29+ roaring_bitmap<T, Allocator>::roaring_bitmap(cuda::std::byte const * bitmap,
30+ Allocator const & alloc,
31+ cuda::stream_ref stream)
3132 : allocator_{alloc},
3233 metadata_{ref_type::read_metadata (bitmap)},
3334 data_{
@@ -42,52 +43,57 @@ __host__ roaring_bitmap<T, Allocator>::roaring_bitmap(cuda::std::byte const* bit
4243
4344template <class T , class Allocator >
4445template <class InputIt , class OutputIt >
45- __host__ void roaring_bitmap<T, Allocator>::contains(InputIt first,
46- InputIt last,
47- OutputIt output,
48- cuda::stream_ref stream) const
46+ void roaring_bitmap<T, Allocator>::contains(InputIt first,
47+ InputIt last,
48+ OutputIt output,
49+ cuda::stream_ref stream) const
4950{
5051 ref_.contains (first, last, output, stream);
5152}
5253
5354template <class T , class Allocator >
5455template <class InputIt , class OutputIt >
55- __host__ void roaring_bitmap<T, Allocator>::contains_async(InputIt first,
56- InputIt last,
57- OutputIt output,
58- cuda::stream_ref stream) const noexcept
56+ void roaring_bitmap<T, Allocator>::contains_async(InputIt first,
57+ InputIt last,
58+ OutputIt output,
59+ cuda::stream_ref stream) const noexcept
5960{
6061 ref_.contains_async (first, last, output, stream);
6162}
6263
6364template <class T , class Allocator >
64- __host__ cuda::std::size_t roaring_bitmap<T, Allocator>::size() const noexcept
65+ cuda::std::size_t roaring_bitmap<T, Allocator>::size() const noexcept
6566{
6667 return ref_.size ();
6768}
6869
6970template <class T , class Allocator >
70- __host__ cuda::std::byte const * roaring_bitmap<T, Allocator>::data() const noexcept
71+ bool roaring_bitmap<T, Allocator>::empty() const noexcept
72+ {
73+ return ref_.empty ();
74+ }
75+
76+ template <class T , class Allocator >
77+ cuda::std::byte const * roaring_bitmap<T, Allocator>::data() const noexcept
7178{
7279 return ref_.data ();
7380}
7481
7582template <class T , class Allocator >
76- __host__ cuda::std::size_t roaring_bitmap<T, Allocator>::size_bytes() const noexcept
83+ cuda::std::size_t roaring_bitmap<T, Allocator>::size_bytes() const noexcept
7784{
7885 return ref_.size_bytes ();
7986}
8087
8188template <class T , class Allocator >
82- __host__ typename roaring_bitmap<T, Allocator>::allocator_type
83- roaring_bitmap<T, Allocator>::allocator() const noexcept
89+ typename roaring_bitmap<T, Allocator>::allocator_type roaring_bitmap<T, Allocator>::allocator()
90+ const noexcept
8491{
8592 return allocator_;
8693}
8794
8895template <class T , class Allocator >
89- __host__ typename roaring_bitmap<T, Allocator>::ref_type roaring_bitmap<T, Allocator>::ref()
90- const noexcept
96+ typename roaring_bitmap<T, Allocator>::ref_type roaring_bitmap<T, Allocator>::ref() const noexcept
9197{
9298 return ref_;
9399}
0 commit comments