| /oneTBB/test/conformance/ |
| H A D | conformance_combinable.cpp | 74 template <typename T> 79 template <typename T> 84 template <typename T> 86 T operator()(T left, T right ) const { in operator ()() 93 T operator()(const T& left, const T& right ) const { in operator ()() 99 T my_combine( T left, T right) { return left + right; } in my_combine() 102 T my_combine_ref( const T &left, const T &right) { return left + right; } in my_combine_ref() 110 T& my_result; 119 T& my_result; 135 T& my_result; [all …]
|
| H A D | conformance_enumerable_thread_specific.cpp | 93 T& check_alignment(T& t, const char *aname) { in check_alignment() 102 const T& check_alignment(const T& t, const char *aname) { in check_alignment() 149 static inline void init(T &e) { e = static_cast<T>(0); } in init() 216 T operator()(const T& left, const T& right) const { in operator ()() 241 T operator()(T left, T right ) const { in operator ()() 247 T FunctionAddByRef( const T &left, const T &right) { in FunctionAddByRef() 252 T FunctionAdd( T left, T right) { return FunctionAddByRef(left,right); } in FunctionAdd() 611 T sum; 781 T sum; in run_serial_scalar_tests() 796 T sum; in run_serial_vector_tests() [all …]
|
| H A D | conformance_parallel_for.cpp | 45 template<typename T> 48 void operator ()(T index) const { in operator ()() 134 void operator()( const T& first, const T& last, const Body& f, empty_partitioner_tag& ) { in operator ()() 137 …void operator()( const T& first, const T& last, const T& step, const Body& f, empty_partitioner_ta… in operator ()() 144 void operator()( const T& first, const T& last, const Body& f, Partitioner& p ) { in operator ()() 147 void operator()( const T& first, const T& last, const T& step, const Body& f, Partitioner& p ) { in operator ()() 199 const T pfor_buffer_test_size = static_cast<T>(PFOR_BUFFER_TEST_SIZE); in TestParallelForWithStepSupportHelper() 200 const T pfor_buffer_actual_size = static_cast<T>(PFOR_BUFFER_ACTUAL_SIZE); in TestParallelForWithStepSupportHelper() 202 InvokerStep< Flavor, Partitioner, T, TestFunctor<T> > invoke_for; in TestParallelForWithStepSupportHelper() 204 T step; in TestParallelForWithStepSupportHelper() [all …]
|
| /oneTBB/test/common/ |
| H A D | utils.h | 100 template<typename... T> void suppress_unused_warning(T&&...) {} in suppress_unused_warning() argument 185 template <typename T> using is_swappable = decltype(swap(std::declval<T&>(), std::declval<T&>())); 192 template <typename T> using is_equality_comparable = decltype(std::declval<T>() == std::declval<T>(… 193 template <typename T> using is_unequality_comparable = decltype(std::declval<T>() != std::declval<T… 198 template <typename T> using is_add_assignable = decltype(std::declval<T>() += std::declval<typename… 199 template <typename T> using is_sub_assignable = decltype(std::declval<T>() -= std::declval<typename… 206 template <typename T> using have_operator_less = decltype(std::declval<T>() < std::declval<T>()); 207 template <typename T> using have_operator_great = decltype(std::declval<T>() > std::declval<T>()); 208 template <typename T> using have_operator_not_less = decltype(std::declval<T>() <= std::declval<T>(… 209 template <typename T> using have_operator_not_great = decltype(std::declval<T>() >= std::declval<T>… [all …]
|
| H A D | concurrent_priority_queue_common.h | 189 template <typename T> 190 bool operator()( const T& t1, const T& t2 ) { in operator() 195 bool operator()( const std::weak_ptr<T>& t1, const std::weak_ptr<T>& t2 ) { in operator() 200 template <typename T> 248 T my_min, my_max; 254 FillBody( std::size_t n, T max, T min, tbb::concurrent_priority_queue<T, C>* cpq ) in FillBody() argument 258 T elem = my_min + T(int(thread_id)); in operator() 270 T my_max; 277 EmptyBody( T max, tbb::concurrent_priority_queue<T, C>* cpq ) in EmptyBody() 305 T elem = T(int(thread_id + 1)); in operator() [all …]
|
| H A D | concepts_common.h | 227 template <typename T> using Correct = ParallelForEachBody<T, /*() = */State::correct>; 232 template <typename T, typename F = T> using WithFeeder = ParallelForEachFeederBody<T, F, /*() = */S… 233 template <typename T, typename F = T> using WithFeederNoOperatorRoundBrackets = ParallelForEachFeed… 253 template <typename T> 255 T data{}; 262 using iterator = T*; 271 template <typename T> 331 …T operator()( const T& a, const T& ) const requires (EnableFunctionCallOperator == State::correct)… in operator() 332 …T operator()( const T& a, const T& ) requires (EnableFunctionCallOperator == State::incorrect_cons… in operator() 412 template <typename T> using Correct = Compare<T, /*() = */State::correct>; [all …]
|
| H A D | iterator.h | 29 template <typename T> 35 typedef T value_type; 104 T * my_ptr; 109 template <typename T> 111 T * my_ptr; 116 typedef T value_type; 136 template <typename T> 138 T * my_ptr; 143 typedef T value_type; 194 template <typename T> [all …]
|
| /oneTBB/include/oneapi/tbb/detail/ |
| H A D | _utils.h | 34 template<typename... T> void suppress_unused_warning(T&&...) {} in suppress_unused_warning() argument 136 T clamp(T value, T lower_bound, T upper_bound) { in clamp() 147 template<typename T> 148 T reverse_bits(T src) { in reverse_bits() 152 template<typename T> 153 T reverse_n_bits(T src, std::size_t n) { in reverse_n_bits() 185 template<typename T> 194 template<typename T> 197 template<typename T> 201 template<typename T> [all …]
|
| H A D | _template_helpers.h | 50 struct supports_impl<T, void_t<Checks<T>...>, Checks...> { 81 template<class T, size_t S> struct padded_base<T, S, 0> : T {}; 85 struct padded : padded_base<T, S, sizeof(T) % S> {}; 121 template <typename T> 122 struct conjunction<T> : T {}; 131 template <typename T> 132 struct disjunction<T> : T {}; 155 template <typename T> 159 template <typename T> 176 using type = T; [all …]
|
| H A D | _flow_graph_cache_impl.h | 38 void add( T &n ) { in add() 43 void remove( T &n ) { in remove() 46 T &s = internal_pop(); in remove() 61 std::queue< T * > my_q; 74 inline void internal_push( T &n ) { in internal_push() 79 inline T &internal_pop() { in internal_pop() 80 T *v = my_q.front(); in internal_pop() 92 typedef T output_type; 150 typedef T output_type; 227 typedef receiver<T>* pointer_type; [all …]
|
| H A D | _flow_graph_types_impl.h | 40 typedef Tp T; typedef 128 template<typename T> 130 typedef T value_type; 133 T value_space; 163 typedef T value_type; 244 template<typename T> struct size_of { static const int value = sizeof(T); }; 275 template<typename T> 276 struct do_if<T, true> { 281 template<typename T> 282 struct do_if<T, false> { [all …]
|
| H A D | _flow_graph_node_set_impl.h | 42 template <typename T> 76 template <typename T> using output_type = typename T::output_type; 78 template <typename T> using input_type = typename T::input_type; 79 template <typename T> using input_ports_type = typename T::input_ports_type; 82 template <typename T> 85 template <typename T> 88 template <typename T> 91 template <typename T> 94 template<typename T> 95 struct is_sender : std::is_base_of<sender<typename T::output_type>, T> {}; [all …]
|
| /oneTBB/test/tbb/ |
| H A D | test_sequencer_node.cpp | 51 void spin_try_get( tbb::flow::queue_node<T> &q, T &value ) { in spin_try_get() 147 T v; in operator ()() 198 tbb::flow::sequencer_node<T> s(g, seq_inspector<T>()); in test_parallel() 212 tbb::flow::sequencer_node<T> s1(g, seq_inspector<T>()); in test_parallel() 213 tbb::flow::sequencer_node<T> s2(g, seq_inspector<T>()); in test_parallel() 214 tbb::flow::sequencer_node<T> s3(g, seq_inspector<T>()); in test_parallel() 266 tbb::flow::sequencer_node<T> s(g, seq_inspector<T>()); in test_serial() 267 tbb::flow::sequencer_node<T> s2(g, seq_inspector<T>()); in test_serial() 324 tbb::flow::sequencer_node<T> s3(g, seq_inspector<T>()); in test_serial() 325 tbb::flow::sequencer_node<T> s4(g, seq_inspector<T>()); in test_serial() [all …]
|
| H A D | test_buffer_node.cpp | 35 template< typename T > 36 void spin_try_get( tbb::flow::buffer_node<T> &b, T &value ) { in spin_try_get() 40 template< typename T > 41 void check_item( T* count_value, T &value ) { in check_item() 45 template< typename T > 108 T v; in operator ()() 160 T v, vsum; in test_reservation() 209 T *next_value = new T[num_threads]; in test_parallel() 341 T vsum = T(0); in test_serial() 355 vsum = T(0); in test_serial() [all …]
|
| H A D | test_queue_node.cpp | 41 template< typename T > 42 void spin_try_get( tbb::flow::queue_node<T> &q, T &value ) { in spin_try_get() 57 template< typename T > 58 void check_item( T* next_value, T &value ) { in check_item() 65 template< typename T > 160 T v; in operator ()() 186 T v; in operator ()() 208 q.try_put(T(1)); in test_reservation() 209 q.try_put(T(2)); in test_reservation() 212 T v; in test_reservation() [all …]
|
| H A D | test_parallel_scan.cpp | 67 template<typename T> 69 T my_total; 90 Storage<T> JoinStorages(const Storage<T>& left, const Storage<T>& right) { in JoinStorages() 101 …oid Scan(const Range & r, bool is_final, Storage<T> & storage, std::vector<T> & sum, const std::ve… in Scan() 123 Storage<T> ScanWithInit(const Range & r, T init, bool is_final, Storage<T> & storage, std::vector<T… in ScanWithInit() 161 Accumulator( T init, const std::vector<T> & array, std::vector<T> & sum ) : in Accumulator() 249 Storage<T> operator()(const Storage<T>& left, const Storage<T>& right) const { in operator ()() 256 T operator()(Range range, T init, const std::vector<T> &addend, std::vector<T> &sum, int mode) { in operator ()() 273 T operator()(Range range, T init, const std::vector<T> &addend, std::vector<T> &sum, int mode) { in operator ()() 282 [](const Storage<T>& left, const Storage<T>& right) -> Storage<T> { in operator ()() [all …]
|
| H A D | test_priority_queue_node.cpp | 41 template< typename T > 42 void spin_try_get( tbb::flow::priority_queue_node<T> &q, T &value ) { in spin_try_get() 46 template< typename T > 47 void check_item( T* next_value, T &value ) { in check_item() 54 template< typename T > 66 template< typename T > 71 T prev; in operator ()() 74 T v; in operator ()() 81 template< typename T > 94 T v; in operator ()() [all …]
|
| H A D | test_broadcast_node.cpp | 53 template< typename T > 81 template< typename T > 85 tbb::flow::broadcast_node<T> b(g); in test_serial_broadcasts() 113 template< typename T > 130 template< typename T > 155 template< typename T > 169 template<typename T> 174 tbb::flow::queue_node<T> q0(g); in test_resets() 177 T j; in test_resets() 195 for(T i= 0; i <= 3; i += 1) { in test_resets() [all …]
|
| /oneTBB/src/tbb/ |
| H A D | intrusive_list.h | 30 template <class List, class T> 145 void remove( T& val ) { in remove() 158 T& val = *it; in erase() 174 class intrusive_list : public intrusive_list_base<intrusive_list<T, U, NodePtr>, T>; 176 template <class T> 178 : public intrusive_list_base<intrusive_list<T>, T>; 194 friend class intrusive_list_base<memptr_intrusive_list<T, U, NodePtr>, T>; 217 template <class T> 218 class intrusive_list : public intrusive_list_base<intrusive_list<T>, T> 220 friend class intrusive_list_base<intrusive_list<T>, T>; [all …]
|
| H A D | tls.h | 35 template <typename T> 44 void set( T value ) { pthread_setspecific(my_key, (void*)value); } in set() 45 T get() { return (T)pthread_getspecific(my_key); } in get() 58 void set( T value ) { TlsSetValue(my_key, (LPVOID)value); } 59 T get() { return (T)TlsGetValue(my_key); } 69 void set( T value ) { FlsSetValue(my_key, (LPVOID)value); } 70 T get() { return (T)FlsGetValue(my_key); }
|
| H A D | arena_slot.cpp | 32 d1::task* result = task_pool_ptr[T]; in get_task_impl() 56 task_pool_ptr[T] = nullptr; in get_task_impl() 66 std::size_t H0 = (std::size_t)-1, T = T0; in get_task() local 73 T = --tail; in get_task() 88 } else if ( H0 == T ) { in get_task() 101 poison_pointer( task_pool_ptr[T] ); in get_task() 104 poison_pointer( task_pool_ptr[T] ); in get_task() 105 __TBB_ASSERT( T0 == T+1, nullptr ); in get_task() 106 T0 = T; in get_task() 118 __TBB_ASSERT( H0 == T, nullptr ); in get_task() [all …]
|
| /oneTBB/examples/parallel_reduce/convex_hull/ |
| H A D | convex_hull.hpp | 72 template <typename T> 74 T x; 75 T y; 82 point(T _x, T _y) : x(_x), y(_y) {} in point() 137 template <typename T> 142 template <typename T> 147 template <typename T> 148 bool operator==(point<T> p1, point<T> p2) { in operator ==() 152 template <typename T> 153 bool operator!=(point<T> p1, point<T> p2) { in operator !=() [all …]
|
| /oneTBB/src/tbbmalloc/ |
| H A D | shared_utils.h | 37 template<typename T> 38 static inline T alignDown(T arg, uintptr_t alignment) { in alignDown() 39 return T( (uintptr_t)arg & ~(alignment-1)); in alignDown() 41 template<typename T> 42 static inline T alignUp (T arg, uintptr_t alignment) { in alignUp() 43 return T(((uintptr_t)arg+(alignment-1)) & ~(alignment-1)); in alignUp() 46 template<typename T> // works for not power-of-2 alignments 47 static inline T alignUpGeneric(T arg, uintptr_t alignment) { in alignUpGeneric() 66 template<typename T> 67 T min ( const T& val1, const T& val2 ) {
|
| /oneTBB/include/oneapi/tbb/ |
| H A D | concurrent_unordered_set.h | 122 template <typename T, 149 template <typename T, typename Alloc, 152 -> concurrent_unordered_set<T, std::hash<T>, std::equal_to<T>, Alloc>; 154 template <typename T, typename Alloc, 157 -> concurrent_unordered_set<T, std::hash<T>, std::equal_to<T>, Alloc>; 164 -> concurrent_unordered_set<T, Hash, std::equal_to<T>, Alloc>; 260 template <typename T, 287 template <typename T, typename Alloc, 290 -> concurrent_unordered_multiset<T, std::hash<T>, std::equal_to<T>, Alloc>; 295 -> concurrent_unordered_multiset<T, std::hash<T>, std::equal_to<T>, Alloc>; [all …]
|
| H A D | enumerable_thread_specific.h | 630 template<typename T> 636 template<typename T> 638 const T exemplar; 736 template <typename T> using has_empty_braces_operator = decltype(std::declval<T>()()); 759 template <typename T, typename Allocator=cache_aligned_allocator<T>, 771 using value_type = T; 803 new(lref.value()) T(*static_cast<T*>(p)); 810 new(lref.value()) T(std::move(*static_cast<T*>(p))); 830 using value_type = T; 894 return *(T*)ptr; [all …]
|