Home
last modified time | relevance | path

Searched refs:std (Results 1 – 25 of 416) sorted by relevance

12345678910>>...17

/oneTBB/test/tbb/
H A Dtest_environment_whitebox.cpp51 std::pair<std::string, T> test_case ) in set_and_get_test_variable()
102 std::pair<std::string, T> create_random_case( std::size_t length ) { in create_random_case()
113 void prepare_random_cases( std::vector<std::pair<std::string, T>>& cases ) { in prepare_random_cases()
125 std::vector<std::pair<std::string, bool>> initialize_cases( bool wrong_result ) { in initialize_cases()
126 std::vector<std::pair<std::string, bool>> cases; in initialize_cases()
133 cases.push_back(std::make_pair((std::string(large_length, ' ') + '1').c_str(), true)); in initialize_cases()
159 std::vector<std::pair<std::string, long>> initialize_cases( long wrong_result ) { in initialize_cases()
160 std::vector<std::pair<std::string, long>> cases; in initialize_cases()
161 std::stringstream ss; in initialize_cases()
185 cases.push_back(std::make_pair((std::string(large_length, ' ') + '1').c_str(), 1L)); in initialize_cases()
[all …]
H A Dtest_hw_concurrency.cpp58 using vector_ets_type = tbb::enumerable_thread_specific<std::vector<std::size_t>>;
61 tbb::combinable<std::size_t> comb;
62 tbb::concurrent_vector<std::size_t> cv;
63 tbb::concurrent_queue<std::size_t> cq;
66 tbb::concurrent_hash_map<std::size_t, std::size_t> chmap;
67 tbb::concurrent_unordered_map<std::size_t, std::size_t> cumap;
68 tbb::concurrent_unordered_multimap<std::size_t, std::size_t> cummap;
71 tbb::concurrent_map<std::size_t, std::size_t> cmap;
72 tbb::concurrent_multimap<std::size_t, std::size_t> cmmap;
73 tbb::concurrent_set<std::size_t> cset;
[all …]
H A Dtest_task.cpp79 static std::atomic<std::size_t> my_execute_counter;
80 static std::atomic<std::size_t> my_cancel_counter;
89 std::atomic<std::size_t> CountingTask<Body>::my_execute_counter(0);
92 std::atomic<std::size_t> CountingTask<Body>::my_cancel_counter(0);
207 std::atomic<std::size_t> pfor_counter(0);
227 std::vector<std::thread> pfor_threads;
275 std::vector<std::thread> threads;
321 static std::atomic<std::size_t> my_current_task;
324 std::atomic<std::size_t> SpawningTaskBody::my_current_task(0);
760 std::atomic<std::size_t> task_counter{0};
[all …]
H A Dtest_concurrent_unordered_map.cpp32 using MyAllocator = LocalCountingAllocator<std::allocator<std::pair<const Key, Mapped>>>;
36 using map_type = tbb::concurrent_unordered_map<int, int, std::hash<int>, std::equal_to<int>, MyAllo…
37 using multimap_type = tbb::concurrent_unordered_multimap<int, int, std::hash<int>, std::equal_to<in…
50 …using container_type = tbb::concurrent_unordered_map<T, T, std::hash<T>, std::equal_to<T>, Allocat…
60 …using container_type = tbb::concurrent_unordered_multimap<T, T, std::hash<T>, std::equal_to<T>, Al…
87 void check( const std::list<ValueType>& lst ) { in check()
202 …ays_equal_alloc_map_type = tbb::concurrent_unordered_map<int, int, std::hash<int>, std::equal_to<i…
209 …ual_alloc_mmap_type = tbb::concurrent_unordered_multimap<int, int, std::hash<int>, std::equal_to<i…
229 using allocator_type = StaticSharedCountingAllocator<std::allocator<std::pair<const int, int>>>;
230 …using exception_mmap_type = tbb::concurrent_unordered_map<int, int, std::hash<int>, std::equal_to<…
[all …]
/oneTBB/test/conformance/
H A Dconformance_concurrent_unordered_map.cpp67 using test_allocator_type = std::allocator<std::pair<const int, int>>; in test_member_types()
129 using ComplexType = std::pair<int, std::string>; in test_deduction_guides()
130 using ComplexTypeConst = std::pair<const int, std::string>; in test_deduction_guides()
137 static_assert(std::is_same<decltype(m0), TMap<int, std::string>>::value); in test_deduction_guides()
141 static_assert(std::is_same<decltype(m1), TMap<int, std::string>>::value); in test_deduction_guides()
149 …static_assert(std::is_same<decltype(m3), TMap<int, std::string, degenerate_hash<int>, std::less<in… in test_deduction_guides()
158 static_assert(std::is_same<decltype(m5), TMap<int, std::string, std::hash<int>, in test_deduction_guides()
168 static_assert(std::is_same<decltype(m7), TMap<int, std::string>>::value); in test_deduction_guides()
172 static_assert(std::is_same<decltype(m8), TMap<int, std::string>>::value); in test_deduction_guides()
180 …static_assert(std::is_same<decltype(m10), TMap<int, std::string, degenerate_hash<int>, std::less<i… in test_deduction_guides()
[all …]
H A Dconformance_concurrent_unordered_set.cpp38 using set_type = oneapi::tbb::concurrent_unordered_set<int, std::hash<int>, std::equal_to<int>, All…
44 static_assert(std::is_same<typename default_container_type::hasher, std::hash<int>>::value, in test_member_types()
46 … static_assert(std::is_same<typename default_container_type::key_equal, std::equal_to<int>>::value, in test_member_types()
111 …using container_type = oneapi::tbb::concurrent_unordered_set<T, std::hash<T>, std::equal_to<T>, Al…
133 std::vector<ComplexType> v; in test_deduction_guides()
134 std::string s = "s"; in test_deduction_guides()
149 std::less<ComplexType>>>::value); in test_deduction_guides()
159 static_assert(std::is_same<decltype(s5), TSet<ComplexType, std::hash<ComplexType>, in test_deduction_guides()
187 static_assert(std::is_same<decltype(s11), TSet<ComplexType, std::hash<ComplexType>, in test_deduction_guides()
192 static_assert(std::is_same<decltype(s12), TSet<ComplexType, std::hash<ComplexType>, in test_deduction_guides()
[all …]
H A Dconformance_concurrent_map.cpp38 using Allocator = LocalCountingAllocator<std::allocator<std::pair<const Key, Mapped>>>;
60 static_assert(std::is_same<typename default_container_type::key_compare, std::less<int>>::value, in test_member_types()
66 using test_allocator_type = std::allocator<std::pair<const int, int>>; in test_member_types()
74 … static_assert(std::is_same<typename container_type::value_type, std::pair<const int, int>>::value, in test_member_types()
111 std::vector<std::pair<int, int>> v(10, {0, 0}); in test_deduction_guides()
115 std::greater<int> compare; in test_deduction_guides()
116 std::allocator<std::pair<const int, int>> 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()
126 using pair_t = std::pair<const int, int>; 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()
[all …]
H A Dconformance_parallel_scan.cpp38 std::vector<T>& y;
39 const std::vector<T>& z;
109 std::vector<std::size_t> input(size);
110 std::vector<std::size_t> output(size);
111 std::vector<std::size_t> control(size);
121 …[&](const oneapi::tbb::blocked_range<std::size_t>& r, std::size_t sum, bool is_final) -> std::size…
131 [](std::size_t a, std::size_t b) -> std::size_t
141 void test_pscan_invoke(const std::vector<std::size_t>& desired_vector, in test_pscan_invoke()
142 std::vector<std::size_t>& result_vector, in test_pscan_invoke()
155 std::vector<std::size_t> desired_vector(iterations);
[all …]
/oneTBB/include/oneapi/tbb/
H A Dconcurrent_unordered_map.h103 …where = this->emplace(std::piecewise_construct, std::forward_as_tuple(std::move(key)), std::tuple<…
183 concurrent_unordered_map( std::initializer_list<std::pair<Key, T>>, std::size_t = {},
208 concurrent_unordered_map( std::initializer_list<std::pair<Key, T>>, std::size_t, Alloc )
209 -> concurrent_unordered_map<std::remove_const_t<Key>, T, std::hash<std::remove_const_t<Key>>,
215 -> concurrent_unordered_map<std::remove_const_t<Key>, T, std::hash<std::remove_const_t<Key>>,
222 concurrent_unordered_map( std::initializer_list<std::pair<Key, T>>, std::size_t, Hash, Alloc )
344 concurrent_unordered_multimap( std::initializer_list<std::pair<Key, T>>, std::size_t = {},
367 concurrent_unordered_multimap( std::initializer_list<std::pair<Key, T>>, std::size_t, Alloc )
368 -> concurrent_unordered_multimap<std::remove_const_t<Key>, T, std::hash<std::remove_const_t<Key>>,
374 -> concurrent_unordered_multimap<std::remove_const_t<Key>, T, std::hash<std::remove_const_t<Key>>,
[all …]
H A Dconcurrent_unordered_set.h118 typename = std::enable_if_t<!std::is_integral_v<Hash>>>
129 typename = std::enable_if_t<!std::is_integral_v<Hash>>>
130 concurrent_unordered_set( std::initializer_list<T>, std::size_t = {},
145 typename = std::enable_if_t<!std::is_integral_v<Hash>>>
152 -> concurrent_unordered_set<T, std::hash<T>, std::equal_to<T>, Alloc>;
157 -> concurrent_unordered_set<T, std::hash<T>, std::equal_to<T>, Alloc>;
162 typename = std::enable_if_t<!std::is_integral_v<Hash>>>
256 typename = std::enable_if_t<!std::is_integral_v<Hash>>>
267 typename = std::enable_if_t<!std::is_integral_v<Hash>>>
283 typename = std::enable_if_t<!std::is_integral_v<Hash>>>
[all …]
H A Dcache_aligned_allocator.h47 using is_always_equal = std::true_type;
58 void deallocate(T* p, std::size_t) { in deallocate()
73 using size_type = std::size_t;
121 void* do_allocate(std::size_t bytes, std::size_t alignment) override { in do_allocate()
125 std::uintptr_t base = reinterpret_cast<std::uintptr_t>(m_upstream->allocate(space)); in do_allocate()
138 void do_deallocate(void* ptr, std::size_t bytes, std::size_t alignment) override { in do_deallocate()
141 std::uintptr_t base = (reinterpret_cast<std::uintptr_t*>(ptr))[-1]; in do_deallocate()
156 std::size_t correct_alignment(std::size_t alignment) { in correct_alignment()
159 std::size_t cache_line_size = std::hardware_destructive_interference_size; in correct_alignment()
166 std::size_t correct_size(std::size_t bytes) { in correct_size()
[all …]
/oneTBB/examples/getting_started/sub_string_finder/
H A Dsub_string_finder_extended.cpp29 std::vector<std::size_t> &max_array, in SerialSubStringFinder()
30 std::vector<std::size_t> &pos_array) { in SerialSubStringFinder()
35 std::size_t limit = str.size() - (std::max)(i, j); in SerialSubStringFinder()
52 const std::size_t len;
62 std::size_t limit = len - (std::max)(i, j); in operator ()()
78 SubStringFinder(const char *s, const std::size_t s_len, std::size_t *m, std::size_t *p) in SubStringFinder()
86 std::string str[N] = { std::string("a"), std::string("b") }; in main()
92 std::vector<std::size_t> max1(num_elem); in main()
93 std::vector<std::size_t> pos1(num_elem); in main()
94 std::vector<std::size_t> max2(num_elem); in main()
[all …]
H A Dsub_string_finder_pretty.cpp26 static const std::size_t N = 9;
29 const std::string &str;
30 std::vector<std::size_t> &max_array;
31 std::vector<std::size_t> &pos_array;
39 std::size_t limit = str.size() - (std::max)(i, j); in operator ()()
55 SubStringFinder(const std::string &s, std::vector<std::size_t> &m, std::vector<std::size_t> &p) in SubStringFinder()
62 std::string str[N] = { std::string("a"), std::string("b") }; in main()
69 std::vector<std::size_t> max(num_elem); in main()
70 std::vector<std::size_t> pos(num_elem); in main()
78 std::cout << "_"; in main()
[all …]
H A Dsub_string_finder.cpp29 static const std::size_t N = 23;
32 const std::string &str;
33 std::vector<std::size_t> &max_array;
34 std::vector<std::size_t> &pos_array;
42 std::size_t limit = str.size() - (std::max)(i, j); in operator ()()
58 SubStringFinder(const std::string &s, std::vector<std::size_t> &m, std::vector<std::size_t> &p) in SubStringFinder()
72 std::string str[N] = { std::string("a"), std::string("b") }; in main()
73 for (std::size_t i = 2; i < N; ++i) in main()
75 std::string &to_scan = str[N - 1]; in main()
78 std::vector<std::size_t> max(num_elem); in main()
[all …]
/oneTBB/examples/common/utility/
H A Dutility.hpp74 const std::string name;
77 type_base(std::string a_name, std::string a_description) in type_base()
194 typedef std::map<std::string, internal::argument> args_map_type;
195 typedef std::vector<std::string> args_display_order_type;
196 typedef std::vector<std::string> positional_arg_names_type;
202 std::set<std::string> bool_args_names;
265 std::string name_found = std::string(begin, assign_sign); in parse()
316 std::string usage_string(const std::string& binary_name) const { in usage_string()
362 std::size_t intval = std::size_t(val); in is_power_of_2()
566 std::cout << cli_pack.usage_string(argv[0]) << std::flush; in parse_cli_arguments()
[all …]
/oneTBB/src/tbb/
H A Darena_slot.h50 std::atomic<bool> my_is_occupied; in alignas()
60 std::atomic<std::size_t> head; in alignas()
78 std::atomic<std::size_t> tail; in alignas()
81 std::size_t my_task_pool_size; in alignas()
99 void fill_with_canary_pattern ( std::size_t first, std::size_t last ) { in fill_with_canary_pattern()
174 head.load(std::memory_order_relaxed) >= tail.load(std::memory_order_relaxed); in is_empty()
213 std::size_t prepare_task_pool(std::size_t num_tasks) { in prepare_task_pool()
214 std::size_t T = tail.load(std::memory_order_relaxed); // mirror in prepare_task_pool()
228 std::size_t H = head.load(std::memory_order_relaxed); // mirror in prepare_task_pool()
246 std::size_t T1 = 0; in prepare_task_pool()
[all …]
H A Dqueuing_rw_mutex.cpp42 … static T* fetch_add( std::atomic<word>& location, word addend, std::memory_order memory_order ) { in fetch_add()
46 static T* exchange( std::atomic<word>& location, T* value, std::memory_order memory_order ) { in exchange()
50 …static T* compare_exchange_strong( std::atomic<word>& obj, const T* expected, const T* desired, st… in compare_exchange_strong()
56 … static void store( std::atomic<word>& location, const T* value, std::memory_order memory_order ) { in store()
60 static T* load( std::atomic<word>& location, std::memory_order memory_order ) { in load()
233 …state.compare_exchange_strong(old_state, STATE_ACTIVEREADER, std::memory_order_release, std::memor… in acquire()
245 …tricky_pointer::load(s.my_next, std::memory_order_relaxed)->my_going.store(1U, std::memory_order_r… in acquire()
297 std::memory_order_release, std::memory_order_relaxed) ) in release()
379 … predecessor->my_next.store(s.my_next.load(std::memory_order_relaxed), std::memory_order_release); in release()
391 std::memory_order_release, std::memory_order_relaxed) ) in release()
[all …]
H A Dallocator.cpp62 void* scalable_malloc(std::size_t);
64 void* scalable_aligned_malloc(std::size_t, std::size_t);
86 static void* initialize_cache_aligned_allocate_handler(std::size_t n, std::size_t alignment);
89 static void* std_cache_aligned_allocate(std::size_t n, std::size_t alignment);
95 using cache_aligned_allocate_handler_type = void* (*)(std::size_t n, std::size_t alignment);
143 deallocate_handler = &std::free; in initialize_handler_pointers()
167 static void* initialize_cache_aligned_allocate_handler(std::size_t bytes, std::size_t alignment) { in initialize_cache_aligned_allocate_handler()
205 static void* std_cache_aligned_allocate(std::size_t bytes, std::size_t alignment) { in std_cache_aligned_allocate()
218 std::size_t space = alignment + bytes; in std_cache_aligned_allocate()
219 std::uintptr_t base = reinterpret_cast<std::uintptr_t>(std::malloc(space)); in std_cache_aligned_allocate()
[all …]
/oneTBB/src/tbbmalloc/
H A Dbackref.cpp39 std::atomic<bool> addedToForUse;
94 static std::atomic<BackRefMain*> backRefMain;
201 …if (active.load(std::memory_order_relaxed)->allocatedCount.load(std::memory_order_relaxed) == BR_M… in requestNewSpace()
241 …|| backRefIdx.getMain() > (backRefMain.load(std::memory_order_relaxed)->lastUsed.load(std::memory_… in getBackRef()
246 std::atomic<void*>& backRefEntry = *(std::atomic<void*>*)( in getBackRef()
255 …MALLOC_ASSERT(backRefIdx.getMain()<=backRefMain.load(std::memory_order_relaxed)->lastUsed.load(std in setBackRef()
257 …((std::atomic<void*>*)((uintptr_t)backRefMain.load(std::memory_order_relaxed)->backRefBl[backRefId… in setBackRef()
297 … !backRefMain.load(std::memory_order_relaxed)->listForUse.load(std::memory_order_relaxed)) { in newBackRef()
326std::atomic<void*>& backRefEntry = *(std::atomic<void*>*)((uintptr_t)currBlock + sizeof(BackRefBlo… in removeBackRef()
345 … currBlock!=backRefMain.load(std::memory_order_relaxed)->active.load(std::memory_order_relaxed)) { in removeBackRef()
[all …]
/oneTBB/include/oneapi/tbb/detail/
H A D_segment_table.h48 using size_type = std::size_t;
49 using segment_index_type = std::size_t;
103 internal_move(std::move(other));
349 my_size.store(other.my_size.load(std::memory_order_relaxed), std::memory_order_relaxed); in internal_transfer()
378 …my_first_block.store(other.my_first_block.load(std::memory_order_relaxed), std::memory_order_relax… in internal_move()
379 my_size.store(other.my_size.load(std::memory_order_relaxed), std::memory_order_relaxed); in internal_move()
400 internal_move(std::move(other)); in internal_move_construct_with_allocator()
423 internal_move(std::move(other)); in internal_move_assign()
489 …other.my_first_block.store(my_first_block.load(std::memory_order_relaxed), std::memory_order_relax… in internal_swap_fields()
493 other.my_size.store(my_size.load(std::memory_order_relaxed), std::memory_order_relaxed); in internal_swap_fields()
[all …]
H A D_utils.h50 std::int32_t count;
96 T spin_wait_while(const std::atomic<T>& location, C comp, std::memory_order order) { in spin_wait_while()
109 T spin_wait_while_eq(const std::atomic<T>& location, const U value, std::memory_order order = std::…
116 T spin_wait_until_eq(const std::atomic<T>& location, const U value, std::memory_order order = std::…
245 void swap_atomics_relaxed(std::atomic<T>& lhs, std::atomic<T>& rhs){ in swap_atomics_relaxed()
247 lhs.store(rhs.load(std::memory_order_relaxed), std::memory_order_relaxed); in swap_atomics_relaxed()
344 std::same_as<T, U>; in atomic_do_once()
356 return std::invoke(std::forward<F>(f), std::forward<Args>(args)...); in atomic_do_once()
359 noexcept(noexcept(std::forward<F>(f)(std::forward<Args>(args)...))) in atomic_do_once()
360 -> decltype(std::forward<F>(f)(std::forward<Args>(args)...)) in atomic_do_once()
[all …]
H A D_concurrent_queue_base.h35 using ticket_type = std::size_t;
63 using size_type = std::size_t;
94 std::atomic<std::uintptr_t> mask{};
190 if (p->mask.load(std::memory_order_relaxed) & (std::uintptr_t(1) << index)) { in pop()
290 … if (curr_page->mask.load(std::memory_order_relaxed) & (std::uintptr_t(1) << index)) {
410 using size_type = std::size_t;
473 std::ptrdiff_t(tc - hc - n_invalid_entries.load(std::memory_order_relaxed)) <= 0; in empty()
476 std::ptrdiff_t size() const { in size()
478 std::ptrdiff_t hc = head_counter.load(std::memory_order_acquire); in size()
479 std::ptrdiff_t tc = tail_counter.load(std::memory_order_relaxed); in size()
[all …]
/oneTBB/test/common/
H A Dallocator_stl_test_common.h99 …using Acii = typename std::allocator_traits<Allocator>::template rebind_alloc<std::pair<const int,…
102 …using Aii = typename std::allocator_traits<Allocator>::template rebind_alloc<std::pair<int, int> >;
116 TestSet<std::set <int, std::less<int>, Ai> >(a);
117 TestSet<std::multiset<int, std::less<int>, Ai> >(a);
118 TestMap<std::map <int, int, std::less<int>, Acii> >(a);
119 TestMap<std::multimap<int, int, std::less<int>, Acii> >(a);
129 TestSet<std::set<const int, std::less<int>, Aci> >(a);
130 TestMap<std::map<int, int, std::less<int>, Aii> >(a);
131 TestMap<std::map<const int, int, std::less<int>, Acii> >(a);
132 TestMap<std::multimap<int, int, std::less<int>, Aii> >(a);
[all …]
H A Dutils.h53 std::sort(first, last); in median()
54 typename std::iterator_traits<It>::difference_type distance = std::distance(first, last); in median()
72 std::vector<std::thread> thread_pool; in NativeParallelFor()
104 template <std::size_t size>
140 template <std::size_t size = 2>
184 using std::swap;
377 static bool compare( const std::weak_ptr<T> &t1, const std::weak_ptr<T> &t2 ) {
383 static bool compare( const std::unique_ptr<T> &t1, const std::unique_ptr<T> &t2 ) {
388 static bool compare( const std::pair< const std::weak_ptr<T1>, std::weak_ptr<T2> > &t1,
389 const std::pair< const std::weak_ptr<T1>, std::weak_ptr<T2> > &t2 ) {
[all …]
H A Dcustom_allocators.h107 using counter_type = std::atomic<std::size_t>;
121 std::size_t allocs, std::size_t fres ) { in set_counters()
195 using counter_type = std::atomic<std::size_t>;
206 AllocatorCounters( std::size_t it_allocated, std::size_t it_freed, std::size_t it_constructed, in AllocatorCounters()
207 std::size_t it_destroyed, std::size_t allocs, std::size_t fres ) in AllocatorCounters()
244 using counter_type = std::atomic<std::size_t>;
324 std::atomic<std::size_t> StaticCountingAllocator<T>::items_freed;
330 std::atomic<std::size_t> StaticCountingAllocator<T>::allocations;
332 std::atomic<std::size_t> StaticCountingAllocator<T>::frees;
337 using counter_type = std::atomic<std::size_t>;
[all …]

12345678910>>...17