Home
last modified time | relevance | path

Searched refs:p (Results 1 – 25 of 135) sorted by relevance

123456

/oneTBB/src/tbb/
H A Dobserver_proxy.cpp72 remove(p); in clear()
74 delete p; in clear()
109 p->my_next->my_prev = p->my_prev; in remove()
116 p->my_prev->my_next = p->my_next; in remove()
142 delete p; in remove_ref()
148 observer_proxy* p = last, * prev = p; in do_notify_entry_observers() local
203 prev = p; in do_notify_entry_observers()
222 p = p->my_next; in do_notify_exit_observers()
254 __TBB_ASSERT(p->my_ref_count || p == last, nullptr); in do_notify_exit_observers()
257 prev = p; in do_notify_exit_observers()
[all …]
H A Dallocator.cpp92 static void std_cache_aligned_deallocate(void* p);
202 (*cache_aligned_deallocate_handler)(p); in cache_aligned_deallocate()
209 void* p = nullptr; in std_cache_aligned_allocate()
210 int res = posix_memalign(&p, alignment, bytes); in std_cache_aligned_allocate()
212 p = nullptr; in std_cache_aligned_allocate()
213 return p; in std_cache_aligned_allocate()
236 free(p); in std_cache_aligned_deallocate()
238 _aligned_free(p); in std_cache_aligned_deallocate()
240 if (p) { in std_cache_aligned_deallocate()
259 if (p) { in deallocate_memory()
[all …]
H A Dobserver_proxy.h51 inline static void remove_ref_fast( observer_proxy*& p );
67 void insert ( observer_proxy* p );
70 void remove ( observer_proxy* p );
74 void remove_ref( observer_proxy* p );
121 void observer_list::remove_ref_fast( observer_proxy*& p ) { in remove_ref_fast() argument
122 if( p->my_observer ) { in remove_ref_fast()
124 std::uintptr_t r = --p->my_ref_count; in remove_ref_fast()
126 p = nullptr; in remove_ref_fast()
/oneTBB/examples/parallel_pipeline/square/
H A Dsquare.cpp83 void set_end(char* p) { in set_end() argument
84 logical_end = p; in set_end()
128 while (p > t->begin() && isdigit(p[-1])) in operator ()()
129 --p; in operator ()()
133 t->set_end(p); in operator ()()
147 char* p = input->begin(); in operator ()() local
151 while (p < input->end() && !isdigit(*p)) in operator ()()
152 *q++ = *p++; in operator ()()
153 if (p == input->end()) in operator ()()
155 long x = strtol(p, &p, 10); in operator ()()
[all …]
/oneTBB/test/tbbmalloc/
H A Dtest_malloc_pools.cpp182 for (int p=utils::MinThread; p<=utils::MaxThread; p++) { in TestSharedPool() local
282 for (int p=utils::MinThread; p<=utils::MaxThread; p++) { in TestCrossThreadPools() local
422 for (int p=utils::MinThread; p<=utils::MaxThread; p++) { in TestFixedBufferPool() local
423 utils::NativeParallelFor( p, FixedPoolUse(p, pool, MAX_OBJECT/p/2, 10000) ); in TestFixedBufferPool()
427 utils::NativeParallelFor( p, FixedPoolUse(p, pool, MAX_OBJECT/p/2, 1) ); in TestFixedBufferPool()
470 int p=128; in TestFixedBufferPool() local
471 utils::NativeParallelFor( p, FixedPoolUse(p, pool, MAX_OBJECT/p/2, 1) ); in TestFixedBufferPool()
518 if (p) in getMemMalloc()
520 return p; in getMemMalloc()
602 REQUIRE((p && 0==((uintptr_t)p & (algn[j]-1)))); in TestEntries()
[all …]
H A Dtest_malloc_regression.cpp123 char *p[NUM]; in TestAlignedMsize() local
131 p[i] = (char*)scalable_aligned_malloc(allocSz[s], align[a]); in TestAlignedMsize()
132 CHECK_FAST(tbb::detail::is_aligned(p[i], align[a])); in TestAlignedMsize()
136 objSizes[i] = scalable_msize(p[i]); in TestAlignedMsize()
138 memset(p[i], i, objSizes[i]); in TestAlignedMsize()
142 CHECK_FAST_MESSAGE((((char*)p[i])[j] == i), "Error: data broken"); in TestAlignedMsize()
146 p[i] = (char*)scalable_aligned_realloc(p[i], 2*allocSz[s], align[a]); in TestAlignedMsize()
147 CHECK(tbb::detail::is_aligned(p[i], align[a])); in TestAlignedMsize()
148 memset((char*)p[i]+allocSz[s], i+1, allocSz[s]); in TestAlignedMsize()
152 CHECK_FAST_MESSAGE((((char*)p[i])[j] == i), "Error: data broken"); in TestAlignedMsize()
[all …]
/oneTBB/include/oneapi/tbb/detail/
H A D_flow_graph_tagged_buffer_impl.h153 for( element_type *p = pa[i]; p; p = p_next) { in internal_free_buffer() local
156 void* ptr = (void*)(p->first); in internal_free_buffer()
201 pointer_type p = nullptr; in insert_with_key() local
204 p->~value_type(); in insert_with_key()
217 for(element_type* p = pointer_array[i]; p; p = (element_type *)(p->second)) { in find_ref_with_key() local
229 value_type *p; in find_with_key() local
230 if(find_ref_with_key(k, p)) { in find_with_key()
231 v = *p; in find_with_key()
241 for(element_type* p = pointer_array[h]; p; prev = p, p = (element_type *)(p->second)) { in delete_with_key() local
248 p->second = free_list; in delete_with_key()
[all …]
H A D_concurrent_queue_base.h38 inline bool is_valid_page(const Page p) { in is_valid_page() argument
129 if (p) { in prepare_page()
133 q->next = p; in prepare_page()
147 padded_page* p = nullptr; in push() local
170 padded_page* p = nullptr; in abort_push() local
183 __TBB_ASSERT( p, nullptr ); in pop()
379 padded_page* p = my_page; in ~micro_queue_pop_finalizer() local
380 if( is_valid_page(p) ) { in ~micro_queue_pop_finalizer()
382 padded_page* q = p->next; in ~micro_queue_pop_finalizer()
389 if ( is_valid_page(p) ) { in ~micro_queue_pop_finalizer()
[all …]
/oneTBB/examples/parallel_for/tachyon/src/
H A Dtrace_rest.cpp79 thr_io_parms p; in thread_io() local
81 p = *((thr_io_parms *)parms); in thread_io()
82 writetgaregion(p.tga, p.iwidth, p.iheight, p.startx, p.starty, p.stopx, p.stopy, p.buffer); in thread_io()
83 free(p.buffer); /* free the buffer once we are done with it.. */ in thread_io()
H A Dplane.cpp66 plane *p; in newplane() local
68 p = (plane *)rt_getmem(sizeof(plane)); in newplane()
69 memset(p, 0, sizeof(plane)); in newplane()
70 p->methods = &plane_methods; in newplane()
72 p->tex = (texture *)tex; in newplane()
73 p->norm = norm; in newplane()
74 VNorm(&p->norm); in newplane()
75 p->d = -VDot(&ctr, &p->norm); in newplane()
77 return (object *)p; in newplane()
/oneTBB/test/tbb/
H A Dtest_task_group.cpp767 for (unsigned p=MinThread; p <= MaxThread; ++p) { variable
768 if (p < 2) {
781 for (unsigned p=MinThread; p <= MaxThread; ++p) { variable
791 for (unsigned p = MinThread; p <= MaxThread; ++p) { variable
804 for (unsigned p=MinThread; p <= MaxThread; ++p) { variable
814 for (unsigned p=MinThread; p <= MaxThread; ++p) { variable
835 for (unsigned p=MinThread; p <= MaxThread; ++p) { variable
849 for (unsigned p=MinThread; p <= MaxThread; ++p) { variable
859 for (unsigned p=MinThread; p <= MaxThread; ++p) { variable
869 for (unsigned p=MinThread; p <= MaxThread; ++p) { variable
[all …]
H A Dtest_openmp.cpp80 utils::suppress_unused_warning(p); in OpenMP_TBB_Convolve()
81 #pragma omp parallel num_threads(p) in OpenMP_TBB_Convolve()
104 const int p; member in OuterBody
110 my_a(a), my_b(b), my_c(c), m(m_), n(n_), p(p_) in OuterBody()
117 #pragma omp parallel for reduction(+:sum) num_threads(p) in operator ()()
150 void RunTest( Func F, int m, int n, int p) { in RunTest() argument
151 tbb::global_control limit(tbb::global_control::max_allowed_parallelism, p); in RunTest()
153 F(actual, A, m, B, n, p); in RunTest()
164 for (int p = static_cast<int>(utils::MinThread); p <= static_cast<int>(utils::MaxThread); ++p) { variable
170 RunTest( OpenMP_TBB_Convolve, m, n, p );
[all …]
H A Dtest_partitioner.h116 RangeBase(RangeBase& r, proportional_split& p) : RangeStatisticCollector(r, p) { in RangeBase() argument
119 T right = self().compute_right_part(r, p); in RangeBase()
140 return T(r.size() * T(p.right())) / T(p.left() + p.right()); in compute_right_part()
166 : RangeBase<RoundedDownRange, float>(r, p) { } in RoundedDownRange()
179 : RangeBase<RoundedUpRange, float>(r, p) { } in RoundedUpRange()
190 Range1_2(Range1_2& r, proportional_split& p) : RangeBase<Range1_2, float>(r, p) { } in Range1_2() argument
204 Range1_999(Range1_999& r, proportional_split& p) : RangeBase<Range1_999, float>(r, p) { } in Range1_999() argument
218 Range999_1(Range999_1& r, proportional_split& p) : RangeBase<Range999_1, float>(r, p) { } in Range999_1() argument
232 : RangeStatisticCollector(r, p), blocked_range<size_t>(r, p) { } in BlockedRange()
248 return float(r.size() * float(p.left())) / float(p.left() + p.right()); in compute_right_part()
[all …]
H A Dtest_enumerable_thread_specific.cpp116 for (int p = 0; p < max_threads; ++p) { in do_std_threads() local
120 for (int p = 0; p < max_threads; ++p) { in do_std_threads() local
121 threads[p]->join(); in do_std_threads()
124 for(int p = 0; p < max_threads; ++p) { in do_std_threads() local
125 delete threads[p]; in do_std_threads()
132 for (int p = MinThread; p <= MaxThread; ++p) { in flog_key_creation_and_deletion() local
141 do_std_threads(p, a); in flog_key_creation_and_deletion()
148 REQUIRE( pcnt == p); // should be one local per thread. in flog_key_creation_and_deletion()
163 do_std_threads(p, a); in flog_key_creation_and_deletion()
331 int align_val(void * const p) { in align_val() argument
[all …]
H A Dtest_composite_node.cpp383 prefix_node<double> p(g, hidden); in test_prefix() local
385 …CHECK_MESSAGE( (&std::get<0>(p.input_ports()) == &tbb::flow::input_port<0>(p.j)), "input port 0 of… in test_prefix()
387 …CHECK_MESSAGE( (&std::get<2>(p.input_ports()) == &tbb::flow::input_port<2>(p.j)), "input port 2 of… in test_prefix()
389 …CHECK_MESSAGE( (&std::get<4>(p.input_ports()) == &tbb::flow::input_port<4>(p.j)), "input port 4 of… in test_prefix()
399 tbb::flow::make_edge( tbb::flow::output_port<0>(p), v[0] ); in test_prefix()
400 tbb::flow::make_edge( tbb::flow::output_port<1>(p), v[1] ); in test_prefix()
406 tbb::flow::input_port<0>(p).try_put( offset ); in test_prefix()
407 tbb::flow::input_port<1>(p).try_put( offset + 1 ); in test_prefix()
408 tbb::flow::input_port<2>(p).try_put( offset + 2 ); in test_prefix()
409 tbb::flow::input_port<3>(p).try_put( offset + 3 ); in test_prefix()
[all …]
H A Dtest_queue_node.cpp91 for ( int p = 0; p < my_num_threads; ++p) { in touches() local
94 my_last_touch[p][p2] = -1; in touches()
98 my_touches[p][n] = false; in touches()
103 for ( int p = 0; p < my_num_threads; ++p) { in ~touches() local
104 delete [] my_touches[p]; in ~touches()
105 delete [] my_last_touch[p]; in ~touches()
131 for ( int p = 0; p < my_num_threads; ++p) { in validate_touches() local
133 if ( my_touches[p][n] == true ) { in validate_touches()
500 for (int p = 2; p <= 4; ++p) { variable
502 tbb::task_arena arena(p);
[all …]
H A Dtest_broadcast_node.cpp131 void run_parallel_broadcasts(tbb::flow::graph& g, int p, tbb::flow::broadcast_node<T>& b) { in run_parallel_broadcasts() argument
141 utils::NativeParallelFor( p, native_body<T>( b ) ); in run_parallel_broadcasts()
145 CHECK_MESSAGE( (int)(*receivers[r])[n] == p, "" ); in run_parallel_broadcasts()
151 CHECK_MESSAGE( (int)(*receivers[r])[0] == p, "" ); in run_parallel_broadcasts()
156 void test_parallel_broadcasts(int p) { in test_parallel_broadcasts() argument
160 run_parallel_broadcasts(g, p, b); in test_parallel_broadcasts()
164 run_parallel_broadcasts(g, p, b_copy); in test_parallel_broadcasts()
255 for( unsigned int p=utils::MinThread; p<=utils::MaxThread; ++p ) { variable
256 test_parallel_broadcasts<int>(p);
257 test_parallel_broadcasts<float>(p);
[all …]
/oneTBB/examples/graph/cholesky/
H A Dcholesky.cpp71 const int p = n / b; in create_tile_array() local
74 for (int j = 0; j < p; ++j) { in create_tile_array()
95 const int p = n / b; in collapse_tile_array() local
271 const int p = n / b; in func() local
325 int p; member in dpotf2_body
352 int p; member in dtrsm_body
389 int p; member in dsyr2k_body
441 if (k < p - 2) { in operator ()()
475 const int p = n / b; in func() local
548 const int p = n / b; in func() local
[all …]
/oneTBB/examples/graph/binpack/
H A Dbinpack.cpp99 void operator()(const value_type& item, ports_type& p) { in operator ()() argument
104 std::get<0>(p).try_put(item); in operator ()()
113 std::get<1>(p).try_put(my_bin); in operator ()()
129 std::get<0>(p).try_put(my_bin[i]); in operator ()()
139 std::get<1>(p).try_put(my_bin); in operator ()()
156 std::get<1>(p).try_put(my_bin); in operator ()()
182 std::get<0>(p).try_put(my_bin[i]); in operator ()()
190 std::get<1>(p).try_put(my_bin); in operator ()()
196 std::get<0>(p).try_put(item); // put unused item back to pool in operator ()()
300 for (int p = threads.first; p <= threads.last; p = threads.step(p)) { in main() local
[all …]
/oneTBB/examples/parallel_reduce/pi/
H A Dmain.cpp64 for (int p = threads.first; p <= threads.last; p = threads.step(p)) { in main() local
67 if (p == 0) { in main()
75 threading tp(p); in main()
82 if (p == 0) { in main()
88 << " sec\t on " << p << " threads\n"; in main()
/oneTBB/examples/parallel_reduce/primes/
H A Dmain.cpp90 for (int p = options.threads.first; p <= options.threads.last; p = options.threads.step(p)) { in main() local
95 if (p == 0) { in main()
100 count = ParallelCountPrimes(n, p, grainSize); in main()
106 if (0 != p) in main()
107 std::cout << p << "-way parallelism"; in main()
/oneTBB/examples/parallel_for/seismic/
H A Dmain.cpp94 for (int p = options.threads.first; p <= options.threads.last; in main() local
95 p = options.threads.step(p)) { in main()
100 if (p == 0) { in main()
108 p); in main()
119 if (p == 0) { in main()
124 std::cout << p << " way parallelism" in main()
/oneTBB/examples/task_group/sudoku/
H A Dsudoku.cpp121 bool in_row(const std::vector<board_element>& b, unsigned row, unsigned col, unsigned short p) { in in_row() argument
123 if (c != col && b[row * BOARD_DIM + c].solved_element == p) in in_row()
128 bool in_col(const std::vector<board_element>& b, unsigned row, unsigned col, unsigned short p) { in in_col() argument
130 if (r != row && b[r * BOARD_DIM + col].solved_element == p) in in_col()
139 if (!(i == row && j == col) && b[i * BOARD_DIM + j].solved_element == p) in in_block()
263 unsigned solve(int p) { in solve() argument
264 oneapi::tbb::global_control c(oneapi::tbb::global_control::max_allowed_parallelism, p); in solve()
301 for (int p = threads.first; p <= threads.last; p = threads.step(p)) { in main() local
302 unsigned number = solve(p); in main()
307 p, in main()
[all …]
/oneTBB/examples/task_arena/fractal/
H A Dmain.cpp76 for (int p = threads.first; p <= threads.last; p = threads.step(p)) { in main() local
78 printf("Threads = %d\n", p); in main()
79 fractal_group fg(video.get_drawing_memory(), p, max_iterations, num_frames); in main()
/oneTBB/test/common/
H A Dutils_assert.h49 #define ASSERT_CUSTOM(p,message,file,line) ((p)?(void)0:utils::ReportError(file,line,#p,message)) argument
50 #define ASSERT(p,message) ASSERT_CUSTOM(p,message,__FILE__,__LINE__) argument

123456