Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions include/oneapi/tbb/concurrent_map.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
Copyright (c) 2019-2021 Intel Corporation
Copyright (c) 2019-2025 Intel Corporation
Copyright (c) 2025 UXL Foundation Contributors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -26,7 +27,7 @@

namespace tbb {
namespace detail {
namespace d2 {
namespace d3 {

template<typename Key, typename Value, typename KeyCompare, typename RandomGenerator,
typename Allocator, bool AllowMultimapping>
Expand Down Expand Up @@ -68,8 +69,8 @@ template <typename Key, typename Value, typename Compare, typename Allocator>
class concurrent_multimap;

template <typename Key, typename Value, typename Compare = std::less<Key>, typename Allocator = tbb::tbb_allocator<std::pair<const Key, Value>>>
class concurrent_map : public concurrent_skip_list<map_traits<Key, Value, Compare, concurrent_geometric_level_generator<32>, Allocator, false>> {
using base_type = concurrent_skip_list<map_traits<Key, Value, Compare, concurrent_geometric_level_generator<32>, Allocator, false>>;
class concurrent_map : public concurrent_skip_list<map_traits<Key, Value, Compare, geometric_level_generator<32>, Allocator, false>> {
using base_type = concurrent_skip_list<map_traits<Key, Value, Compare, geometric_level_generator<32>, Allocator, false>>;
public:
using key_type = Key;
using mapped_type = Value;
Expand Down Expand Up @@ -218,8 +219,8 @@ void swap( concurrent_map<Key, Value, Compare, Allocator>& lhs,
}

template <typename Key, typename Value, typename Compare = std::less<Key>, typename Allocator = tbb::tbb_allocator<std::pair<const Key, Value>>>
class concurrent_multimap : public concurrent_skip_list<map_traits<Key, Value, Compare, concurrent_geometric_level_generator<32>, Allocator, true>> {
using base_type = concurrent_skip_list<map_traits<Key, Value, Compare, concurrent_geometric_level_generator<32>, Allocator, true>>;
class concurrent_multimap : public concurrent_skip_list<map_traits<Key, Value, Compare, geometric_level_generator<32>, Allocator, true>> {
using base_type = concurrent_skip_list<map_traits<Key, Value, Compare, geometric_level_generator<32>, Allocator, true>>;
public:
using key_type = Key;
using mapped_type = Value;
Expand Down Expand Up @@ -335,13 +336,13 @@ void swap( concurrent_multimap<Key, Value, Compare, Allocator>& lhs,
lhs.swap(rhs);
}

} // namespace d2
} // namespace d3
} // namespace detail

inline namespace v1 {

using detail::d2::concurrent_map;
using detail::d2::concurrent_multimap;
using detail::d3::concurrent_map;
using detail::d3::concurrent_multimap;
using detail::split;

} // inline namespace v1
Expand Down
19 changes: 10 additions & 9 deletions include/oneapi/tbb/concurrent_set.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
/*
Copyright (c) 2019-2021 Intel Corporation
Copyright (c) 2019-2025 Intel Corporation
Copyright (c) 2025 UXL Foundation Contributors

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand All @@ -25,7 +26,7 @@

namespace tbb {
namespace detail {
namespace d2 {
namespace d3 {

template<typename Key, typename KeyCompare, typename RandomGenerator, typename Allocator, bool AllowMultimapping>
struct set_traits {
Expand All @@ -52,8 +53,8 @@ template <typename Key, typename Compare, typename Allocator>
class concurrent_multiset;

template <typename Key, typename Compare = std::less<Key>, typename Allocator = tbb::tbb_allocator<Key>>
class concurrent_set : public concurrent_skip_list<set_traits<Key, Compare, concurrent_geometric_level_generator<32>, Allocator, false>> {
using base_type = concurrent_skip_list<set_traits<Key, Compare, concurrent_geometric_level_generator<32>, Allocator, false>>;
class concurrent_set : public concurrent_skip_list<set_traits<Key, Compare, geometric_level_generator<32>, Allocator, false>> {
using base_type = concurrent_skip_list<set_traits<Key, Compare, geometric_level_generator<32>, Allocator, false>>;
public:
using key_type = Key;
using value_type = typename base_type::value_type;
Expand Down Expand Up @@ -153,8 +154,8 @@ void swap( concurrent_set<Key, Compare, Allocator>& lhs,
}

template <typename Key, typename Compare = std::less<Key>, typename Allocator = tbb::tbb_allocator<Key>>
class concurrent_multiset : public concurrent_skip_list<set_traits<Key, Compare, concurrent_geometric_level_generator<32>, Allocator, true>> {
using base_type = concurrent_skip_list<set_traits<Key, Compare, concurrent_geometric_level_generator<32>, Allocator, true>>;
class concurrent_multiset : public concurrent_skip_list<set_traits<Key, Compare, geometric_level_generator<32>, Allocator, true>> {
using base_type = concurrent_skip_list<set_traits<Key, Compare, geometric_level_generator<32>, Allocator, true>>;
public:
using key_type = Key;
using value_type = typename base_type::value_type;
Expand Down Expand Up @@ -252,13 +253,13 @@ void swap( concurrent_multiset<Key, Compare, Allocator>& lhs,
lhs.swap(rhs);
}

} // namespace d2
} // namespace d3
} // namespace detail

inline namespace v1 {

using detail::d2::concurrent_set;
using detail::d2::concurrent_multiset;
using detail::d3::concurrent_set;
using detail::d3::concurrent_multiset;
using detail::split;

} // inline namespace v1
Expand Down
Loading
Loading