| /oneTBB/src/tbb/ |
| H A D | small_object_pool.cpp | 33 void* __TBB_EXPORTED_FUNC allocate(d1::small_object_pool*& allocator, std::size_t number_of_bytes, … in allocate() argument 36 return pool->allocate_impl(allocator, number_of_bytes); in allocate() 39 void* __TBB_EXPORTED_FUNC allocate(d1::small_object_pool*& allocator, std::size_t number_of_bytes) { in allocate() argument 43 return pool->allocate_impl(allocator, number_of_bytes); in allocate() 46 void* small_object_pool_impl::allocate_impl(d1::small_object_pool*& allocator, std::size_t number_o… in allocate_impl() argument 66 allocator = this; in allocate_impl() 73 void __TBB_EXPORTED_FUNC deallocate(d1::small_object_pool& allocator, void* ptr, std::size_t number… in deallocate() argument 74 auto pool = static_cast<small_object_pool_impl*>(&allocator); in deallocate() 79 void __TBB_EXPORTED_FUNC deallocate(d1::small_object_pool& allocator, void* ptr, std::size_t number… in deallocate() argument 81 auto pool = static_cast<small_object_pool_impl*>(&allocator); in deallocate()
|
| /oneTBB/test/conformance/ |
| H A D | conformance_concurrent_set.cpp | 34 using Allocator = LocalCountingAllocator<std::allocator<Key>>; 48 using test_allocator_type = std::allocator<int>; in test_member_types() 96 std::allocator<int> allocator; in test_deduction_guides() local 101 TSet set3(vc.begin(), vc.end(), allocator); in test_deduction_guides() 102 …static_assert(std::is_same_v<decltype(set3), TSet<int, std::less<int>, decltype(allocator)>>, "Wro… in test_deduction_guides() 104 TSet set4(vc.begin(), vc.end(), compare, allocator); in test_deduction_guides() 105 …static_assert(std::is_same_v<decltype(set4), TSet<int, decltype(compare), decltype(allocator)>>, "… in test_deduction_guides() 115 TSet set7(init_list, allocator); in test_deduction_guides() 116 …static_assert(std::is_same_v<decltype(set7), TSet<int, std::less<int>, decltype(allocator)>>, "Wro… in test_deduction_guides() 118 TSet set8(init_list, compare, allocator); in test_deduction_guides() [all …]
|
| H A D | conformance_concurrent_map.cpp | 38 using Allocator = LocalCountingAllocator<std::allocator<std::pair<const Key, Mapped>>>; 66 using test_allocator_type = std::allocator<std::pair<const int, int>>; in test_member_types() 116 std::allocator<std::pair<const int, int>> allocator; in test_deduction_guides() local 120 TMap map3(v.begin(), v.end(), allocator); in test_deduction_guides() 121 …static_assert(std::is_same_v<decltype(map3), TMap<int, int, std::less<int>, decltype(allocator)> >… in test_deduction_guides() 123 TMap map4(v.begin(), v.end(), compare, allocator); in test_deduction_guides() 124 …td::is_same_v<decltype(map4), TMap<int, int, decltype(compare), decltype(allocator)> >, "WRONG\n"); in test_deduction_guides() 134 TMap map7(init, allocator); in test_deduction_guides() 135 …static_assert(std::is_same_v<decltype(map7), TMap<int, int, std::less<int>, decltype(allocator)> >… in test_deduction_guides() 137 TMap map8(init, compare, allocator); in test_deduction_guides() [all …]
|
| H A D | conformance_allocators.cpp | 36 Allocator allocator; variable 37 AssertSameType(allocator.max_size(), typename std::allocator_traits<Allocator>::size_type(0)); 40 …REQUIRE_MESSAGE((allocator.max_size() * typename std::allocator_traits<Allocator>::size_type(sizeo…
|
| H A D | conformance_concurrent_priority_queue.cpp | 139 template <typename Allocator = std::allocator<MoveOperationTracker>> 390 std::allocator<int> a; in test_ctors_dtor_accessors() 569 TQueue qva(v.begin(), v.end(), std::allocator<ComplexType>()); in TestDeductionGuides() 571 std::allocator<ComplexType>>>::value); in TestDeductionGuides() 580 std::allocator<ComplexType>>>::value); in TestDeductionGuides() 587 TQueue qla(l, std::allocator<ComplexType>()); in TestDeductionGuides() 589 std::allocator<ComplexType>>>::value); in TestDeductionGuides() 596 TQueue qlca(l, LessA<ComplexType>(true), std::allocator<ComplexType>()); in TestDeductionGuides() 598 std::allocator<ComplexType>>>::value); in TestDeductionGuides() 605 TQueue qca(qva, std::allocator<ComplexType>()); in TestDeductionGuides() [all …]
|
| H A D | conformance_concurrent_queue.cpp | 1213 allocator() : m_unique_id( 0 ) {} in allocator() function in allocator 1214 allocator(size_t unique_id) { m_unique_id = unique_id; } in allocator() function in allocator 1216 ~allocator() { in ~allocator() 1222 allocator(const allocator<U>& a) noexcept { in allocator() function in allocator 1228 struct rebind { typedef allocator<U> other; }; 1230 friend bool operator==(const allocator& lhs, const allocator& rhs) { in operator ==() 1306 CQ src_queue( allocator<T>(0) ); in TestMoveConstructors() 1320 CQ dst_queue( std::move(src_queue), allocator<T>(1) ); in TestMoveConstructors() 1334 CQ dst_queue2( std::move(dst_queue), allocator<T>(1) ); in TestMoveConstructors() 1451 TQueue q4(q2, std::allocator<ComplexType>()); in TestDeductionGuides() [all …]
|
| H A D | conformance_concurrent_hash_map.cpp | 1063 map_type::allocator_type allocator; in TestHashCompareConstructors() local 1066 map_type map2(compare, allocator); in TestHashCompareConstructors() 1069 map_type map4(1, compare, allocator); in TestHashCompareConstructors() 1076 map_type map8({}, compare, allocator); in TestHashCompareConstructors() 1099 Allocator allocator; in TestDeductionGuides() local 1110 TMap m3(v.begin(), v.end(), compare, allocator); in TestDeductionGuides() 1114 TMap m4(v.begin(), v.end(), allocator); in TestDeductionGuides() 1126 TMap m7(l, compare, allocator); in TestDeductionGuides() 1130 TMap m8(l, allocator); in TestDeductionGuides() 1138 TMap m10(m4, allocator); in TestDeductionGuides() [all …]
|
| H A D | conformance_concurrent_vector.cpp | 242 using allocator_t = StaticSharedCountingAllocator<std::allocator<move_support_tests::Foo>>; in TestResizeAndCopy() 290 using allocator_t = StaticCountingAllocator<std::allocator<move_support_tests::FooWithAssign>>; in TestCopyAssignment() 292 StaticCountingAllocator<std::allocator<move_support_tests::FooWithAssign>> init_alloc; in TestCopyAssignment() 735 using MyAllocator = StaticCountingAllocator<std::allocator<move_support_tests::Foo>>; in TestConcurrentGrowToAtLeastImpl() 972 using MyAllocator = StaticCountingAllocator<std::allocator<move_support_tests::Foo> >; in TestConcurrentGrowBy() 1072 vector_type victim(arena_allocator_fixture.allocator); in test_ex_move_assignment_memory_failure() 1101 vector_type victim(arena_allocator_fixture.allocator); in test_ex_move_assignment_element_ctor_exception() 1151 using vector_t = oneapi::tbb::concurrent_vector<foo_t, std::allocator<foo_t> >; 1228 TVector v2(v.begin(), v.end(), std::allocator<ComplexType>()); in TestDeductionGuides() 1230 TVector<ComplexType, std::allocator<ComplexType>>>::value); in TestDeductionGuides() [all …]
|
| /oneTBB/doc/main/tbb_userguide/ |
| H A D | Which_Dynamic_Libraries_to_Use.rst | 8 scalable memory allocator library as 15 use the scalable allocator library if it is present otherwise it reverts 17 in applications that choose to omit the scalable memory allocator 22 with or without the oneTBB scalable memory allocator library. 35 … - |full_name| scalable memory allocator library. See **Scalable Memory Allocator**. 39 …- Uses the scalable allocator library if it is present, otherwise it reverts to using ``mal…
|
| H A D | Allocator_Configuration.rst | 7 The oneTBB memory allocator provides the following API functions and 11 - the ``scalable_allocation_command`` function instructs the allocator 17 set certain parameters for the memory allocator, such as an option to 23 Some of the memory allocator parameters can also be set via system 27 allocator binaries. The following environment variables are recognized:
|
| H A D | Memory_Allocation.rst | 8 allocator templates that are similar to the STL template class 9 std::allocator. Two templates, ``scalable_allocator<T>`` and 42 You can use these allocator templates as the *allocator* argument to STL 61 The scalable memory allocator also provides a set of functions
|
| H A D | Scalable_Memory_Allocator.rst | 9 general support and the other with a scalable memory allocator. The 13 or only the scalable memory allocator, or both. See the links below for
|
| /oneTBB/doc/main/reference/scalable_memory_pools/ |
| H A D | memory_pool_cls.rst | 9 …ass template for scalable memory allocation from memory blocks provided by an underlying allocator. 19 The memory is obtained as big chunks from an underlying allocator specified by the template 20 argument. The latter must satisfy the subset of the allocator requirements from the [allocator.requ… 25 If the underlying allocator refers to another scalable memory pool, the inner pool (or pools) 65 …**Effects**: Constructs a memory pool with an instance of underlying memory allocator of type ``Al… 78 oneapi::tbb::memory_pool<std::allocator<char> > my_pool;
|
| H A D | memory_pool_allocator_cls.rst | 9 A class template that provides a memory pool with a C++ allocator interface. 18 ``memory_pool_allocator`` meets the allocator requirements from the [allocator.requirements] ISO C+… 97 **Effects**: Constructs a memory pool allocator serviced by ``memory_pool`` instance pool. 103 **Effects**: Constructs a memory pool allocator serviced by ``fixed_pool`` instance pool.
|
| /oneTBB/test/tbb/ |
| H A D | test_concurrent_priority_queue.cpp | 190 …using allocator_data_type = AllocatorAwareData<std::scoped_allocator_adaptor<std::allocator<int>>>; in test_scoped_allocator() 191 using basic_allocator_type = std::scoped_allocator_adaptor<std::allocator<allocator_data_type>>; in test_scoped_allocator() 195 allocator_type allocator; in test_scoped_allocator() local 196 allocator_data_type data1(1, allocator); in test_scoped_allocator() 197 allocator_data_type data2(1, allocator); in test_scoped_allocator() 199 container_type c1(allocator); in test_scoped_allocator() 200 container_type c2(allocator); in test_scoped_allocator()
|
| H A D | test_concurrent_vector.cpp | 206 using allocator_type = std::scoped_allocator_adaptor<std::allocator<allocator_data_type>>; in test_scoped_allocator() 209 allocator_type allocator; in test_scoped_allocator() local 210 allocator_data_type data1(1, allocator); in test_scoped_allocator() 211 allocator_data_type data2(2, allocator); in test_scoped_allocator() 215 container_type c1(allocator), c2(allocator); in test_scoped_allocator() 319 tbb::concurrent_vector< Type, std::allocator<Type> > c8( my_vec.size() ); in operator ()() 340 tbb::concurrent_vector< Type, std::allocator<Type> > c4; in TypeTester() 346 std::allocator<Type> allocator; in TypeTester() local 347 tbb::concurrent_vector< Type, std::allocator<Type> > c9(vec.size(), vec[1], allocator); in TypeTester() 350 tbb::concurrent_vector< Type, std::allocator<Type> > c10(c1.begin(), c1.end(), allocator); in TypeTester() [all …]
|
| H A D | test_concurrent_hash_map.cpp | 290 … LocalCountingAllocator<std::allocator<Value>>>; in TypeTester() 309 LocalCountingAllocator<std::allocator<Value>> allocator; in TypeTester() local 310 ch_map_debug_alloc c11( lst.begin(), lst.end(), allocator ); in TypeTester() 398 allocator_type allocator; in TestScopedAllocator() local 399 allocator_data_type key1(1, allocator), key2(2, allocator); in TestScopedAllocator() 400 allocator_data_type data1(1, allocator), data2(data1, allocator); in TestScopedAllocator() 401 hash_map_type map1(allocator), map2(allocator); in TestScopedAllocator() 432 hash_map_type map3(allocator); in TestScopedAllocator() 771 using allocator_type = StaticSharedCountingAllocator<std::allocator<std::pair<const int, int>>>;
|
| /oneTBB/include/oneapi/tbb/detail/ |
| H A D | _concurrent_queue_base.h | 148 page_allocator_type page_allocator(allocator); in push() 171 prepare_page(k, base, allocator, p); in abort_push() 187 page_allocator_type page_allocator(allocator); in pop() 200 micro_queue& assign( const micro_queue& src, queue_allocator_type& allocator, in assign() argument 251 page_allocator_type page_allocator(allocator); in make_copy() 286 page_allocator_type page_allocator(allocator); 308 void clear_and_invalidate(queue_allocator_type& allocator) { in clear_and_invalidate() argument 310 clear(allocator, invalid_page, invalid_page); in clear_and_invalidate() 372 my_ticket_type(k), my_queue(queue), my_page(p), allocator(alloc) in micro_queue_pop_finalizer() 390 allocator_traits_type::destroy(allocator, static_cast<padded_page*>(p)); in ~micro_queue_pop_finalizer() [all …]
|
| H A D | _flow_graph_impl.h | 128 graph_task(graph& g, small_object_allocator& allocator 133 , my_allocator(allocator) in my_graph() 162 …ority_task_selector(graph_task_priority_queue_t& priority_queue, small_object_allocator& allocator) in priority_task_selector() argument 163 : my_priority_queue(priority_queue), my_allocator(allocator), my_task() {} in priority_task_selector() 365 auto allocator = my_allocator; in destruct_and_deallocate() local 368 allocator.deallocate(static_cast<DerivedType*>(this), ed); in destruct_and_deallocate()
|
| H A D | _flow_graph_body_impl.h | 252 forward_task_bypass( graph& g, small_object_allocator& allocator, NodeType &n 254 ) : graph_task(g, allocator, node_priority), 281 apply_body_task_bypass( graph& g, small_object_allocator& allocator, NodeType &n, const Input &i 283 ) : graph_task(g, allocator, node_priority), 307 input_node_task_bypass( graph& g, small_object_allocator& allocator, NodeType &n ) 308 : graph_task(g, allocator), my_node(n) {}
|
| H A D | _flow_graph_node_impl.h | 303 small_object_allocator allocator{}; in create_body_task() 305 …graph_task* t = allocator.new_object<task_type>( my_graph_ref, allocator, *this, input, my_priorit… in create_body_task() 330 small_object_allocator allocator{}; in create_forward_task() 332 …graph_task* t = allocator.new_object<task_type>( graph_reference(), allocator, *this, my_priority … in create_forward_task() 683 small_object_allocator allocator{}; 685 …graph_task* t = allocator.new_object<task_type>( graph_reference(), allocator, *this, continue_msg…
|
| /oneTBB/test/common/ |
| H A D | custom_allocators.h | 443 AllocatorAwareData( const allocator_type& allocator = allocator_type() ) 444 : my_allocator(allocator), my_value(0) {} in my_allocator() argument 446 AllocatorAwareData( int v, const allocator_type& allocator = allocator_type() ) 447 : my_allocator(allocator), my_value(v) {} in my_allocator() argument 462 : my_allocator(allocator), my_value(rhs.my_value) {} in AllocatorAwareData() 465 : my_allocator(allocator), my_value(rhs.my_value) {} in AllocatorAwareData() 582 using NeverPropagatingAllocator = PropagatingAllocator<std::allocator<T>>; 592 class AlwaysEqualAllocator : public std::allocator<T> { 593 using base_allocator = std::allocator<T>; 614 class NotAlwaysEqualAllocator : public std::allocator<T> { [all …]
|
| H A D | concurrent_unordered_common.h | 216 typename Table::allocator_type allocator; in TypeTester() local 226 Table c2_alloc({*it++, *it++, *it++}, initial_bucket_number, allocator); in TypeTester() 232 Table c2_hash_alloc({*it++, *it++, *it++}, initial_bucket_number, hasher, allocator); in TypeTester() 241 Table c3_alloc(c1, allocator); in TypeTester() 250 Table c4_alloc(lst.size(), allocator); in TypeTester() 255 Table c4_hash_alloc(lst.size(), hasher, allocator); in TypeTester() 264 Table c5_alloc(c1.begin(), c2.end(), initial_bucket_number, allocator); in TypeTester() 268 Table c5_hash_alloc(c1.begin(), c2.end(), initial_bucket_number, hasher, allocator); in TypeTester()
|
| H A D | concurrent_ordered_common.h | 222 typename Table::allocator_type allocator; 233 Table c2_alloc(init, allocator); 238 Table c2_comp_alloc(init, compare, allocator); 247 Table c3_alloc(c1, allocator); 256 Table c5(allocator); 261 Table c6(compare, allocator); 270 Table c8(c1.begin(), c1.end(), allocator); 274 Table c9(c1.begin(), c1.end(), compare, allocator);
|
| H A D | iterator.h | 31 typedef std::allocator<T> allocator_type; 112 typedef std::allocator<T> allocator_type; 139 typedef std::allocator<T> allocator_type; 197 typedef std::allocator<T> allocator_type;
|