Home
last modified time | relevance | path

Searched refs:c (Results 1 – 25 of 218) sorted by relevance

123456789

/oneTBB/src/tbb/
H A Dco_context.h185 c.my_condvar.wait(lock, [&c] { return c.my_is_active == true; }); in coroutine_thread_func()
211 if (!c.my_thread) { in create_coroutine()
273 CloseHandle(c.my_thread); in destroy_coroutine()
282 __TBB_ASSERT(c, nullptr); in create_coroutine()
288 __TBB_ASSERT(c, nullptr); in current_coroutine()
302 __TBB_ASSERT(c, nullptr); in destroy_coroutine()
303 DeleteFiber(c); in destroy_coroutine()
329 c.my_context.uc_stack.ss_sp = (char*)c.my_stack; in create_coroutine()
330 c.my_context.uc_stack.ss_size = c.my_stack_size; in create_coroutine()
358 c.my_stack = nullptr; in destroy_coroutine()
[all …]
H A Dglobal_control.cpp179 auto it = c->my_list.find(&gc); in erase_if_present()
180 if (it != c->my_list.end()) { in erase_if_present()
181 c->my_list.erase(it); in erase_if_present()
194 if (c->my_list.empty() || c->is_first_arg_preferred(gc.my_value, c->my_active_value)) { in create()
199 c->my_list.insert(&gc); in create()
210 if (!erase_if_present(c, gc)) { in destroy()
214 if (c->my_list.empty()) { in destroy()
231 erase_if_present(c, gc); in remove_and_check_if_empty()
232 return c->my_list.empty(); in remove_and_check_if_empty()
240 auto it = c->my_list.find(&gc); in is_present()
[all …]
H A Dmarket.cpp52 void market::register_client(pm_client* c, d1::constraints&) { in register_client() argument
54 my_clients[c->priority_level()].push_back(c); in register_client()
57 void market::unregister_and_destroy_client(pm_client& c) { in unregister_and_destroy_client() argument
60 auto& clients = my_clients[c.priority_level()]; in unregister_and_destroy_client()
61 auto it = std::find(clients.begin(), clients.end(), &c); in unregister_and_destroy_client()
66 auto client = static_cast<tbb_permit_manager_client*>(&c); in unregister_and_destroy_client()
121 void market::adjust_demand(pm_client& c, int mandatory_delta, int workers_delta) { in adjust_demand() argument
128 delta = c.update_request(mandatory_delta, workers_delta); in adjust_demand()
132 my_priority_level_demand[c.priority_level()] += delta; in adjust_demand()
H A Dgovernor.cpp549 void constraints_assertion(d1::constraints c) { in constraints_assertion() argument
551 …__TBB_ASSERT_RELEASE(c.max_threads_per_core == system_topology::automatic || c.max_threads_per_cor… in constraints_assertion()
557 c.numa_id == system_topology::automatic || in constraints_assertion()
558 …(is_topology_initialized && std::find(numa_nodes_begin, numa_nodes_end, c.numa_id) != numa_nodes_e… in constraints_assertion()
563 __TBB_ASSERT_RELEASE(c.core_type == system_topology::automatic || in constraints_assertion()
564 …(is_topology_initialized && std::find(core_types_begin, core_types_end, c.core_type) != core_types… in constraints_assertion()
568 int __TBB_EXPORTED_FUNC constraints_default_concurrency(const d1::constraints& c, intptr_t /*reserv… in constraints_default_concurrency() argument
569 constraints_assertion(c); in constraints_default_concurrency()
571 if (c.numa_id >= 0 || c.core_type >= 0 || c.max_threads_per_core > 0) { in constraints_default_concurrency()
573 return get_default_concurrency_ptr(c.numa_id, c.core_type, c.max_threads_per_core); in constraints_default_concurrency()
/oneTBB/examples/parallel_for/tachyon/src/
H A Dcylinder.cpp73 cylinder *c; in newcylinder() local
80 c->ctr = ctr; in newcylinder()
82 c->rad = rad; in newcylinder()
140 c = cyl->axis; in cylinder_normal()
142 VNorm(&c); in cylinder_normal()
161 cylinder *c; in newfcylinder() local
168 c->ctr = ctr; in newfcylinder()
170 c->rad = rad; in newfcylinder()
182 maxtmp.x = c->ctr.x + c->axis.x; in fcylinder_bbox()
183 maxtmp.y = c->ctr.y + c->axis.y; in fcylinder_bbox()
[all …]
H A Dmacros.hpp58 #define RAYPNT(c, a, b) \ argument
59 c.x = a.o.x + (a.d.x * b); \
60 c.y = a.o.y + (a.d.y * b); \
61 c.z = a.o.z + (a.d.z * b);
63 #define VSUB(a, b, c) \ argument
64 c.x = (a.x - b.x); \
65 c.y = (a.y - b.y); \
66 c.z = (a.z - b.z);
68 #define VCROSS(a, b, c) \ argument
69 c->x = (a->y * b->z) - (a->z * b->y); \
[all …]
H A Dvector.cpp59 c->x = (a->y * b->z) - (a->z * b->y); in VCross()
60 c->y = (a->z * b->x) - (a->x * b->z); in VCross()
61 c->z = (a->x * b->y) - (a->y * b->x); in VCross()
79 void VAdd(vector *a, vector *b, vector *c) { in VAdd() argument
80 c->x = (a->x + b->x); in VAdd()
81 c->y = (a->y + b->y); in VAdd()
82 c->z = (a->z + b->z); in VAdd()
85 void VSub(vector *a, vector *b, vector *c) { in VSub() argument
86 c->x = (a->x - b->x); in VSub()
87 c->y = (a->y - b->y); in VSub()
[all …]
/oneTBB/examples/parallel_for_each/parallel_preorder/
H A DGraph.cpp33 Cell& c = my_vertex_set[k]; in create_random_dag() local
39 c.op = OP_VALUE; in create_random_dag()
42 case 1: c.op = OP_NEGATE; break; in create_random_dag()
43 case 2: c.op = OP_SUB; break; in create_random_dag()
44 case 3: c.op = OP_ADD; break; in create_random_dag()
45 case 4: c.op = OP_MUL; break; in create_random_dag()
49 c.input[j] = &input; in create_random_dag()
69 Cell& c = my_vertex_set[k]; in get_root_set() local
70 c.ref_count = ArityOfOp[c.op]; in get_root_set()
72 c.input[j]->successor.push_back(&c); in get_root_set()
[all …]
H A Dparallel_preorder.cpp33 void operator()(Cell* c, oneapi::tbb::feeder<Cell*>& feeder) const { in operator ()() argument
34 c->update(); in operator ()()
36 c->ref_count = ArityOfOp[c->op]; in operator ()()
37 for (std::size_t k = 0; k < c->successor.size(); ++k) { in operator ()()
38 Cell* successor = c->successor[k]; in operator ()()
/oneTBB/test/tbb/
H A Dtest_arena_constraints.cpp191 tbb::task_arena::constraints c{}; variable
192 c.set_max_concurrency(custom_concurrency_value);
193 check_concurrency_level(c);
195 c.set_numa_id(tbb::info::numa_nodes().front());
196 check_concurrency_level(c);
198 c.set_core_type(tbb::info::core_types().front());
199 check_concurrency_level(c);
201 c.set_max_threads_per_core(1);
202 check_concurrency_level(c);
208 tbb::task_arena::constraints c{}; variable
[all …]
H A Dtest_concurrent_vector.cpp101 return equal_sizes && std::equal(c.begin(), c.end(), begin); in equal()
194 test_grow_by_and_resize( tbb::concurrent_vector<Type, Allocator> &c ) : my_c(c) {} in test_grow_by_and_resize() argument
286 c.grow_by( size_type_t(5), c[0] ); in Examine()
287 c.grow_to_at_least( c.size()+5, c.at(0) ); in Examine()
290 std::copy( c.begin(), c.begin() + 5, std::back_inserter( c2 ) ); in Examine()
293 const vector_t& cvcr = c; in Examine()
296 REQUIRE( utils::IsEqual()(*c.cbegin(), *(c.crend()-1)) ); in Examine()
297 REQUIRE( utils::IsEqual()(*(c.cend()-1), *c.crbegin()) ); in Examine()
298 c.swap( c2 ); in Examine()
300 CompareVectors( c, c2 ); in Examine()
[all …]
H A Dtest_write_once_node.cpp66 size_t c = r[i]->my_count; in simple_read_write_tests() local
67 CHECK_MESSAGE( int(c) == 1, "" ); in simple_read_write_tests()
92 size_t c = r[i]->my_count; in simple_read_write_tests() local
93 CHECK_MESSAGE( int(c) == 1, "" ); in simple_read_write_tests()
100 size_t c = r[i]->my_count; in simple_read_write_tests() local
101 CHECK_MESSAGE( int(c) == 1, "" ); in simple_read_write_tests()
157 size_t c = r[i]->my_count; in parallel_read_write_tests() local
158 CHECK_MESSAGE( int(c) == 1, "" ); in parallel_read_write_tests()
165 size_t c = r[i]->my_count; in parallel_read_write_tests() local
166 CHECK_MESSAGE( int(c) == 1, "" ); in parallel_read_write_tests()
H A Dtest_openmp.cpp37 void SerialConvolve( data_type c[], const data_type a[], int m, const data_type b[], int n ) { in SerialConvolve() argument
44 c[i] = sum; in SerialConvolve()
79 void OpenMP_TBB_Convolve( data_type c[], const data_type a[], int m, const data_type b[], int n, in… in OpenMP_TBB_Convolve() argument
87 InnerBody body(c, a, b, i); in OpenMP_TBB_Convolve()
89 c[i] = body.sum; in OpenMP_TBB_Convolve()
109 OuterBody( data_type c[], const data_type a[], int m_, const data_type b[], int n_, int p_ ) : in OuterBody() argument
110 my_a(a), my_b(b), my_c(c), m(m_), n(n_), p(p_) in OuterBody()
126 void TBB_OpenMP_Convolve( data_type c[], const data_type a[], int m, const data_type b[], int n, in… in TBB_OpenMP_Convolve() argument
127 tbb::parallel_for(tbb::blocked_range<int>(0, m + n - 1, 10), OuterBody(c, a, m, b, n, p)); in TBB_OpenMP_Convolve()
H A Dtest_concurrent_hash_map.cpp78 test_insert_by_key( Table &c, const value_type &value ) : my_c(c), my_value(value) {} in test_insert_by_key() argument
128 check_value( Table &c ) : my_c(c) {} in check_value() argument
202 CHECK(!c.empty()); in Examine()
204 CHECK(c.max_size() >= c.size()); in Examine()
211 test_range<Table,iterator>( c, lst, marks ).do_test_range( c.begin(), c.end() ); in Examine()
214 test_range<const_table,const_iterator>( c, lst, marks ).do_test_range( c.begin(), c.end() ); in Examine()
221 const_table const_c = c; in Examine()
225 c.rehash( new_bucket_count ); in Examine()
234 c2.swap( c ); in Examine()
236 CHECK(c.size() == 5); in Examine()
[all …]
H A Dtest_overwrite_node.cpp72 size_t c = r[i]->my_count; in simple_read_write_tests() local
73 CHECK_MESSAGE( int(c) == N+t%2, "" ); in simple_read_write_tests()
80 size_t c = r[i]->my_count; in simple_read_write_tests() local
81 CHECK_MESSAGE( int(c) == N+t%2, "" ); in simple_read_write_tests()
133 size_t c = r[i]->my_count; in parallel_read_write_tests() local
134 CHECK_MESSAGE( int(c) == nthreads, "" ); in parallel_read_write_tests()
141 size_t c = r[i]->my_count; in parallel_read_write_tests() local
142 CHECK_MESSAGE( int(c) == nthreads, "" ); in parallel_read_write_tests()
/oneTBB/test/common/
H A Dconcurrent_unordered_common.h155 const Table constC = c; in CustomExamine()
165 REQUIRE(std::distance(c.unsafe_begin(i), c.unsafe_end(i)) == diff_type(size)); in CustomExamine()
166 REQUIRE(std::distance(c.unsafe_cbegin(i), c.unsafe_cend(i)) == diff_type(size)); in CustomExamine()
177 …REQUIRE(std::search(c.unsafe_begin(index), c.unsafe_end(index), prev_it, it, utils::IsEqual()) != in CustomExamine()
180 c.rehash(2*bucket_count); in CustomExamine()
183 auto count = 2 * c.max_load_factor() * c.unsafe_bucket_count(); in CustomExamine()
185 REQUIRE(c.max_load_factor() * c.unsafe_bucket_count() >= count); in CustomExamine()
187 REQUIRE(c.load_factor() <= c.max_load_factor()); in CustomExamine()
188 c.max_load_factor(1.0f); in CustomExamine()
189 c.hash_function(); in CustomExamine()
[all …]
H A Dconcurrent_associative_common.h1051 CheckValue( Table& c ) : my_c(c) {}
1137 if (!(!c.empty() && c.size() == lst.size() && c.max_size() >= c.size())) {
1145 REQUIRE((!c.empty() && c.size() == lst.size() && c.max_size() >= c.size()));
1151 TestRange<value_type>(lst, marks).do_test_range(c.begin(), c.end());
1157 TestRange<value_type>(lst, marks).do_test_range(c.begin(), c.end());
1172 c2.swap(c);
1246 char_key(const char* c) : my_item(c) {}
1259 while (ck[i] != '\0' && i < c.size() && ck[i] == c[i]) { ++i;}
1263 return ck == c;
1327 Container c;
[all …]
H A Drange_based_for_support.h27 inline InitValueType range_based_for_accumulate( const Container& c, BinaryAccumulator accumulator,… in range_based_for_accumulate() argument
30 for (ValueType x : c) { in range_based_for_accumulate()
37 inline InitValueType range_based_for_accumulate( const Container& c, BinaryAccumulator accumulator,… in range_based_for_accumulate() argument
38 return range_based_for_accumulate<typename Container::value_type>(c, accumulator, init); in range_based_for_accumulate()
H A Dconcurrent_ordered_common.h184 static bool equal( const OrderedType& c, Iterator begin, Iterator end ) { in equal()
185 bool equal_sizes = std::size_t(std::distance(begin, end)) == c.size(); in equal()
188 if (!c.contains(Value<OrderedType>::key((*it)))) return false; in equal()
207 void Examine(Table c, const std::list<typename Table::value_type>& lst) {
208 CommonExamine<DefCtorPresent>(c, lst);
303 Container c;
304 const Container& cc = c;
308 c.insert(Value<Container>::make(i));
312 c.insert(Value<Container>::make(0));
320 …REQUIRE_MESSAGE(c.lower_bound(k) == c.lower_bound(key), "Incorrect heterogeneous lower_bound retur…
[all …]
/oneTBB/examples/parallel_for/seismic/
H A Duniverse.cpp81 colorcomp_t c[3]; in InitializeUniverse() local
86 memcpy(c, MaterialColor[k], sizeof(c)); in InitializeUniverse()
87 c[2] = colorcomp_t(r * (255 - c[2]) + c[2]); in InitializeUniverse()
88 c[1] = colorcomp_t(g * (255 - c[1]) + c[1]); in InitializeUniverse()
89 c[0] = colorcomp_t(b * (255 - c[0]) + c[0]); in InitializeUniverse()
90 ColorMap[k][i] = colorizer.get_color(c[2], c[1], c[0]); in InitializeUniverse()
155 color_t* c = ColorMap[material[i][j]]; in UpdateStress() local
156 drawing.put_pixel(c[index]); in UpdateStress()
/oneTBB/python/tbb/
H A Dapi.i3 # Copyright (c) 2016-2021 Intel Corporation
66 ArenaPyCaller(task_arena *a, PyObject *c) : my_arena(a), my_callable(c) { in ArenaPyCaller()
68 Py_XINCREF(c); in ArenaPyCaller()
125 void enqueue( PyObject *c ) { $self->enqueue(PyCaller(c)); } in enqueue() argument
126 void execute( PyObject *c ) { $self->execute(PyCaller(c)); } in execute() argument
137 void run( PyObject *c ) { $self->run(PyCaller(c)); } in run() argument
138 void run( PyObject *c, task_arena *a ) { $self->run(ArenaPyCaller(a, c)); } in run() argument
/oneTBB/doc/main/reference/
H A Dparallel_sort_ranges_extension.rst36 void parallel_sort( Container&& c );
38 void parallel_sort( Container&& c, const Compare& comp );
46 .. cpp:function:: template <typename Container> void parallel_sort( Container&& c );
48 …Equivalent to ``parallel_sort( std::begin(c), std::end(c), comp )``, where `comp` uses `operator<`…
50 .. cpp:function:: template <typename Container, typename Compare> void parallel_sort( Container&& c
52 Equivalent to ``parallel_sort( std::begin(c), std::end(c), comp )``.
/oneTBB/examples/concurrent_hash_map/count_strings/
H A Dcount_strings.cpp34 for (const CharT* c = s.c_str(); *c; ++c) { in operator ()() local
35 h = h * hash_multiplier ^ char_hash(*c); in operator ()()
65 int c = 0; variable
116 c += i->second - 1; in CountOccurrences()
117 printf("hashes = %d collisions = %d ", static_cast<int>(hashes.size()), c); in CountOccurrences()
118 c = 0; in CountOccurrences()
270 oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism, p); in main() local
278 oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism, 1); in main() local
284 oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism, in main() local
/oneTBB/examples/migration/recursive_fibonacci/
H A Dfibonacci_two_tasks.h55 … auto& c = *this->allocate_continuation<fib_continuation>(/* children_counter = */ 2, *x); in execute() local
56 task_emulation::run_task(c.create_child<fib_computation>(n - 1, &c.x)); in execute()
59 this->recycle_as_child_of(c); in execute()
61 x = &c.y; in execute()
/oneTBB/include/oneapi/tbb/
H A Dinfo.h79 TBB_EXPORT int __TBB_EXPORTED_FUNC constraints_default_concurrency(const d1::constraints& c, intptr…
80 TBB_EXPORT int __TBB_EXPORTED_FUNC constraints_threads_per_core(const d1::constraints& c, intptr_t …
101 inline int default_concurrency(constraints c) { in default_concurrency() argument
102 if (c.max_concurrency > 0) { return c.max_concurrency; } in default_concurrency()
103 return r1::constraints_default_concurrency(c); in default_concurrency()

123456789