Home
last modified time | relevance | path

Searched refs:v (Results 1 – 25 of 94) sorted by relevance

1234

/oneTBB/doc/main/reference/
H A Dhelpers_for_expressing_graphs.rst58 function_node doubler(g, unlimited, [](const int& v) { return 2 * v; });
59 function_node squarer(g, unlimited, [](const int&) { return v * v; });
60 function_node cuber(g, unlimited, [](const int& v) { return v * v * v; });
65 function_node summer(g, serial, [&](const std::tuple<int, int, int>& v) {
66 int sub_sum = std::get<0>(v) + std::get<1>(v) + std::get<2>(v);
97 function_node doubler(g, unlimited, [](const int& v) { return 2 * v; });
98 function_node squarer(g, unlimited, [](const int&) { return v * v; });
99 function_node cuber(g, unlimited, [](const int& v) { return v * v * v; });
108 [&](const std::tuple<int, int, int>& v) {
109 int sub_sum = std::get<0>(v) + std::get<1>(v) + std::get<2>(v);
/oneTBB/test/tbb/
H A Dtest_input_node.cpp52 int v = my_counters[i]; in get_count() local
53 return v; in get_count()
59 int i = (int)v; in try_put_task()
81 T v = (T)my_count++; in operator ()() local
83 if ( (int)v < N ){ in operator ()()
84 return v; in operator ()()
105 bool operator()( T v ) { in operator ()() argument
106 ++my_counters[(int)v]; in operator ()()
135 int v = counters3[i]; in test_single_dest() local
149 int v = counters2[i]; in test_single_dest() local
[all …]
H A Dtest_concurrent_vector.cpp125 v.push_back(foo); in TestVectorTypes()
391 v.reserve( 1 ); in TestSerialGrowByRange()
722 v.resize(382);
725 v.emplace_back();
729 v.resize(27);
732 v.emplace_back();
736 v.resize(1);
737 CHECK(v.size() == 1);
739 v.emplace_back();
743 v.resize(2222);
[all …]
H A Dtest_queue_node.cpp111 bool check( int tid, T v ) { in check()
112 int v_tid = v / N; in check()
122 my_touches[tid][v] = true; in check()
160 T v; in operator ()() local
186 T v; in operator ()() local
212 T v; in test_reservation() local
216 v = bogus_value; in test_reservation()
221 v = bogus_value; in test_reservation()
226 v = bogus_value; in test_reservation()
232 v = bogus_value; in test_reservation()
[all …]
H A Dtest_buffer_node.cpp83 CHECK_MESSAGE( my_touches[v/N][v%N] == false, "" ); in check()
84 my_touches[v/N][v%N] = true; in check()
108 T v; in operator ()() local
134 T v; in operator ()() local
160 T v, vsum; in test_reservation() local
163 v = bogus_value; in test_reservation()
167 vsum += v; in test_reservation()
168 v = bogus_value; in test_reservation()
172 vsum += v; in test_reservation()
173 v = bogus_value; in test_reservation()
[all …]
H A Dtest_priority_queue_node.cpp74 T v; in operator ()() local
75 spin_try_get( my_q, v ); in operator ()()
76 CHECK_MESSAGE(v < prev, ""); in operator ()()
94 T v; in operator ()() local
122 T v=bogus_value, w=bogus_value; in test_reservation() local
124 CHECK_MESSAGE( v == T(3), "" ); in test_reservation()
126 v = bogus_value; in test_reservation()
131 v = bogus_value; in test_reservation()
136 v = bogus_value; in test_reservation()
146 v = bogus_value; in test_reservation()
[all …]
H A Dtest_scheduler_mix.cpp197 auto v = state(); in tryLock() local
198 if (v == 0) { in tryLock()
203 if (mState.compare_exchange_strong(v, v | LOCKED)) { in tryLock()
211 auto v = state(); in tryLockShared() local
212 if (v == 0) { in tryLockShared()
216 if ((v & LOCKED_MASK) != LOCKED && (v & LOCK_PENDING) == 0) { in tryLockShared()
217 if (mState.compare_exchange_strong(v, v + 1)) { in tryLockShared()
225 auto v = state(); in lock() local
226 mState.compare_exchange_strong(v, v | LOCK_PENDING); in lock()
233 auto v = state(); in unlock() local
[all …]
H A Dtest_indexer_node.cpp185 static void check_value(TT &v) { in check_value() argument
186 if(v.tag() == ELEM-1) { in check_value()
227 static void check_value(TT &v) { in check_value() argument
250 TType v; in test() local
275 CHECK_MESSAGE(outq1.try_get(v), ""); in test()
288 CHECK_MESSAGE(!outq1.try_get(v), ""); in test()
289 CHECK_MESSAGE(!outq2.try_get(v), ""); in test()
322 static void check_queue_value(OT &v) { in check_queue_value() argument
323 if(ELEM - 1 == v.tag()) { in check_queue_value()
352 static void check_queue_value(OT &v) { in check_queue_value() argument
[all …]
/oneTBB/examples/parallel_for/tachyon/src/
H A Dtexture.cpp67 flt u, v; in image_cyl_texture() local
81 v = v * tex->scale.y; in image_cyl_texture()
82 v = v + tex->rot.y; in image_cyl_texture()
83 v = fmod(v, 1.0); in image_cyl_texture()
93 flt u, v; in image_sphere_texture() local
107 v = v * tex->scale.y; in image_sphere_texture()
108 v = v + tex->rot.y; in image_sphere_texture()
109 v = fmod(v, 1.0); in image_sphere_texture()
139 v = v * tex->scale.y; in image_plane_texture()
140 v = v + tex->rot.y; in image_plane_texture()
[all …]
H A Dcoordsys.cpp54 void xytopolar(flt x, flt y, flt rad, flt* u, flt* v) { in xytopolar() argument
57 *v = sqrt(r1 / (rad * rad)); in xytopolar()
64 void xyztocyl(vector pnt, flt height, flt* u, flt* v) { in xyztocyl() argument
69 *v = pnt.z / height; in xyztocyl()
76 void xyztospr(vector pnt, flt* u, flt* v) { in xyztospr() argument
82 *v = phi / 3.1415926; in xyztospr()
/oneTBB/doc/main/tbb_userguide/
H A DEdges.rst20 function_node< int, int > n( g, unlimited, []( int v ) -> int {
21 cout << v;
22 spin_for( v );
23 cout << v;
24 return v;
26 function_node< int, int > m( g, 1, []( int v ) -> int {
27 v *= v;
28 cout << v;
29 spin_for( v );
30 cout << v;
[all …]
H A DData_Flow_Graph.rst46 function_node< int, int > squarer( g, unlimited, [](const int &v) {
47 return v*v;
49 function_node< int, int > cuber( g, unlimited, [](const int &v) {
50 return v*v*v;
52 function_node< int, int > summer( g, 1, [&](const int &v ) -> int {
53 return sum += v;
169 function_node< int, int > squarer( g, unlimited, [](const int &v) {
170 return v*v;
172 function_node< int, int > cuber( g, unlimited, [](const int &v) {
173 return v*v*v;
[all …]
H A DNodes.rst54 expression that prints each value v that it receives, spins for v
55 seconds, prints the value again, and then returns v unmodified. The code
63 function_node< int, int > n( g, 1, []( int v ) -> int {
64 cout << v;
65 spin_for( v );
66 cout << v;
67 return v;
116 cout << v;
117 spin_for( v );
118 cout << v;
[all …]
/oneTBB/test/conformance/
H A Dconformance_concurrent_vector.cpp93 V v(N); in TestSequentialFor() local
110 const V& u = v; in TestSequentialFor()
308 v = u; in TestCopyAssignment()
340 vector_t v; v.reserve(old_size); in TestCapacity() local
349 std::size_t j = v.grow_by(1) - v.begin(); in TestCapacity()
371 return v.grow_by(0) - v.begin(); in get_early_size()
744 v.clear(); in TestConcurrentGrowToAtLeastImpl()
784 vector_type v; in TestParallelFor() local
785 v.resize(N); in TestParallelFor()
1207 vector_t v; in TestPushBackMoveOnlyContainer() local
[all …]
H A Dconformance_parallel_for_each.cpp69 std::deque<size_t> v(elements, 0); in WorkProducingTest() local
72 oneapi::tbb::parallel_for_each(v.begin(), v.end(), set_to<0>(), context...); in WorkProducingTest()
73 REQUIRE_MESSAGE((element_counter == v.size() && element_counter == elements), in WorkProducingTest()
75 REQUIRE_MESSAGE(range_based_for_accumulate(v, std::plus<size_t>(), init_sum) == init_sum, in WorkProducingTest()
79 oneapi::tbb::parallel_for_each(v, set_to<1>(), context...); in WorkProducingTest()
80 REQUIRE_MESSAGE((element_counter == v.size() && element_counter == elements), in WorkProducingTest()
82 REQUIRE_MESSAGE(range_based_for_accumulate(v, std::plus<size_t>(), init_sum) == v.size(), in WorkProducingTest()
86 …lel_for_each(oneapi::tbb::blocked_range<std::deque<size_t>::iterator>(v.begin(), v.end()), set_to<… in WorkProducingTest()
87 REQUIRE_MESSAGE((element_counter == v.size() && element_counter == elements), in WorkProducingTest()
89 REQUIRE_MESSAGE(range_based_for_accumulate(v, std::plus<size_t>(), init_sum) == init_sum, in WorkProducingTest()
H A Dconformance_blocked_range.cpp36 friend int GetValueOf( const AbstractValueType& v ) {return v.value;} in GetValueOf() argument
45 std::size_t operator-( const AbstractValueType& u, const AbstractValueType& v ) { in operator -() argument
46 return GetValueOf(u) - GetValueOf(v); in operator -()
49 bool operator<( const AbstractValueType& u, const AbstractValueType& v ) { in operator <() argument
50 return GetValueOf(u) < GetValueOf(v); in operator <()
152 std::vector<const int *> v; variable
155 oneapi::tbb::blocked_range r1(v.begin(), v.end());
156 …static_assert(std::is_same<decltype(r1), oneapi::tbb::blocked_range<decltype(v)::iterator>>::value…
H A Dconformance_blocked_range2d.cpp38 friend int GetValueOf( const AbstractValueType<OtherTag>& v ) ;
49 int GetValueOf( const AbstractValueType<Tag>& v ) {return v.value;} in GetValueOf() argument
52 bool operator<( const AbstractValueType<Tag>& u, const AbstractValueType<Tag>& v ) { in operator <() argument
53 return GetValueOf(u)<GetValueOf(v); in operator <()
57 std::size_t operator-( const AbstractValueType<Tag>& u, const AbstractValueType<Tag>& v ) { in operator -() argument
58 return GetValueOf(u)-GetValueOf(v); in operator -()
177 std::vector<const unsigned long *> v; variable
181 oneapi::tbb::blocked_range2d r1(v.begin(), v.end(), 2, v2.begin(), v2.end(), 2);
182 …static_assert(std::is_same<decltype(r1), oneapi::tbb::blocked_range2d<decltype(v)::iterator, declt…
H A Dconformance_concurrent_unordered_map.cpp131 std::vector<ComplexType> v; in test_deduction_guides() local
136 TMap m0(v.begin(), v.end()); in test_deduction_guides()
140 TMap m1(v.begin(), v.end(), 1); in test_deduction_guides()
144 TMap m2(v.begin(), v.end(), 4, degenerate_hash<int>()); in test_deduction_guides()
148 TMap m3(v.begin(), v.end(), 4, degenerate_hash<int>(), std::less<int>()); in test_deduction_guides()
152 … TMap m4(v.begin(), v.end(), 4, degenerate_hash<int>(), std::less<int>(), custom_allocator_type{}); in test_deduction_guides()
157 TMap m5(v.begin(), v.end(), 5, custom_allocator_type{}); in test_deduction_guides()
162 TMap m6(v.begin(), v.end(), 4, degenerate_hash<int>(), custom_allocator_type{}); in test_deduction_guides()
H A Dconformance_indexer_node.cpp104 []( const my_output_type &v ) { in __anon3412adbc0402() argument
105 if (v.tag() == 0) { in __anon3412adbc0402()
106 CHECK_MESSAGE((v.is_a<int>()), "Expected to int" ); in __anon3412adbc0402()
107 … CHECK_MESSAGE((oneapi::tbb::flow::cast_to<int>(v) == 6), "Expected to receive 6" ); in __anon3412adbc0402()
108 } else if (v.tag() == 1) { in __anon3412adbc0402()
109 CHECK_MESSAGE((v.is_a<float>()), "Expected to float" ); in __anon3412adbc0402()
110 … CHECK_MESSAGE((oneapi::tbb::flow::cast_to<float>(v) == 1.5), "Expected to receive 1.5" ); in __anon3412adbc0402()
112 CHECK_MESSAGE((v.is_a<input_msg>()), "Expected to float" ); in __anon3412adbc0402()
113 …CHECK_MESSAGE((oneapi::tbb::flow::cast_to<input_msg>(v) == 5), "Expected to receive input_msg(5)" … in __anon3412adbc0402()
H A Dconformance_concurrent_priority_queue.cpp389 std::vector<int> v; in test_ctors_dtor_accessors() local
430 v.emplace_back(i); in test_ctors_dtor_accessors()
433 cpq_type cpq7(v.begin(), v.end()); in test_ctors_dtor_accessors()
439 cpq_with_compare_type cpq8(v.begin(), v.end(), l); in test_ctors_dtor_accessors()
454 std::vector<int> v; in test_assignment_clear_swap() local
458 v.emplace_back(i); in test_assignment_clear_swap()
460 cpq_type q(v.begin(), v.end()); in test_assignment_clear_swap()
473 assigned_q.assign(v.begin(), v.end()); in test_assignment_clear_swap()
565 TQueue qv(v.begin(), v.end()); in TestDeductionGuides()
569 TQueue qva(v.begin(), v.end(), std::allocator<ComplexType>()); in TestDeductionGuides()
[all …]
H A Dconformance_concurrent_unordered_set.cpp133 std::vector<ComplexType> v; in test_deduction_guides() local
139 TSet s1(v.begin(), v.end()); in test_deduction_guides()
143 TSet s2(v.begin(), v.end(), 5, degenerate_hash<ComplexType>()); in test_deduction_guides()
147 TSet s3(v.begin(), v.end(), 5, degenerate_hash<ComplexType>(), std::less<ComplexType>()); in test_deduction_guides()
152 TSet s4(v.begin(), v.end(), 5, degenerate_hash<ComplexType>(), std::less<ComplexType>(), in test_deduction_guides()
158 TSet s5(v.begin(), v.end(), 5, custom_allocator_type{}); in test_deduction_guides()
163 TSet s6(v.begin(), v.end(), 5, degenerate_hash<ComplexType>(), custom_allocator_type{}); in test_deduction_guides()
/oneTBB/include/oneapi/tbb/detail/
H A D_flow_graph_tagged_buffer_impl.h130 const value_type &v) { in internal_insert_with_key() argument
133 size_t h = this->hash(tbb::detail::invoke(*my_key, v)) & l_mask; in internal_insert_with_key()
136 (void) new(&(my_elem->first)) value_type(v); in internal_insert_with_key()
200 bool insert_with_key(const value_type &v) { in insert_with_key() argument
203 if(find_ref_with_key(tbb::detail::invoke(*my_key, v), p)) { in insert_with_key()
205 (void) new(p) value_type(v); // copy-construct into the space in insert_with_key()
210 internal_insert_with_key(pointer_array, my_size, free_list, v); in insert_with_key()
215 bool find_ref_with_key(const Knoref& k, pointer_type &v) { in find_ref_with_key() argument
221 v = pv; in find_ref_with_key()
228 bool find_with_key( const Knoref& k, value_type &v) { in find_with_key() argument
[all …]
/oneTBB/examples/graph/logic_sim/
H A Dbasics.hpp220 steady_signal(oneapi::tbb::flow::graph& g, signal_t v) in steady_signal() argument
222 init_signal(v), in steady_signal()
374 if (!touched || state != cast_to<signal_t>(v)) { in operator ()()
375 state = cast_to<signal_t>(v); in operator ()()
398 if (!touched || port != cast_to<signal_t>(v)) { in operator ()()
399 port = cast_to<signal_t>(v); in operator ()()
432 ports[v.tag()] = cast_to<signal_t>(v); in operator ()()
476 ports[v.tag()] = cast_to<signal_t>(v); in operator ()()
520 ports[v.tag()] = cast_to<signal_t>(v); in operator ()()
571 ports[v.tag()] = cast_to<signal_t>(v); in operator ()()
[all …]
/oneTBB/examples/test_all/fibonacci/
H A Dfibonacci.cpp59 value v[2][2]; member
62 v[0][0] = v00; in Matrix2x2()
63 v[0][1] = v01; in Matrix2x2()
64 v[1][0] = v10; in Matrix2x2()
65 v[1][1] = v11; in Matrix2x2()
137 return A.v[0][0]; in SerialQueueFib()
321 value res = M.v[0][0]; // get value in ParallelPipeFib()
354 return b.sum.v[0][0]; in parallel_reduceFib()
393 output[k] = product.v[0][1]; in operator ()()
407 return b.product.v[0][1]; in parallel_scanFib()
[all …]
/oneTBB/examples/concurrent_priority_queue/shortpath/
H A Dshortpath.cpp100 bool operator()(const vertex_rec& u, const vertex_rec& v) const { in operator ()()
101 return u.second > v.second; in operator ()()
137 vertex_id v = edges[u][i]; in shortpath_helper() local
138 double new_g_v = old_g_u + get_distance(vertices[u], vertices[v]); in shortpath_helper()
143 oneapi::tbb::spin_mutex::scoped_lock l(locks[v]); in shortpath_helper()
144 if (new_g_v < g_distance[v]) { in shortpath_helper()
145 predecessor[v] = u; in shortpath_helper()
146 g_distance[v] = new_g_v; in shortpath_helper()
147 new_f_v = f_distance[v] = in shortpath_helper()
148 g_distance[v] + get_distance(vertices[v], vertices[dst]); in shortpath_helper()
[all …]

1234