/dports/math/cppad/CppAD-20210000.8/example/multi_thread/bthread/ |
H A D | simple_ad_bthread.cpp | 99 ok = thread_num == thread_alloc::thread_num(); in run_one_worker() 102 ok &= worker(thread_num, thread_all_[thread_num].info); in run_one_worker() 117 for(thread_num = 0; thread_num < num_threads; thread_num++) in run_all_workers() 119 thread_all_[thread_num].thread_num = thread_num; in run_all_workers() 145 for(thread_num = 1; thread_num < num_threads; thread_num++) in run_all_workers() 152 thread_num = thread_alloc::thread_num(); in run_all_workers() 154 ok &= worker(thread_num, thread_all_[thread_num].info); in run_all_workers() 157 for(thread_num = 1; thread_num < num_threads; thread_num++) in run_all_workers() 172 for(thread_num = 1; thread_num < num_threads; thread_num++) in run_all_workers() 211 for(thread_num = 0; thread_num < num_threads; thread_num++) in simple_ad() [all …]
|
H A D | team_bthread.cpp | 90 ok &= thread_num != 0; in thread_work() 93 thread_num_ptr_.reset(& thread_all_[thread_num].thread_num ); in thread_work() 134 size_t thread_num; in team_create() local 135 for(thread_num = 0; thread_num < num_threads; thread_num++) in team_create() 138 thread_all_[thread_num].thread_num = thread_num; in team_create() 168 for(thread_num = 1; thread_num < num_threads; thread_num++) in team_create() 209 size_t thread_num; in team_work() local 210 for(thread_num = 0; thread_num < num_threads_; thread_num++) in team_work() 232 size_t thread_num; in team_destroy() local 234 for(thread_num = 1; thread_num < num_threads_; thread_num++) in team_destroy() [all …]
|
/dports/math/cppad/CppAD-20210000.8/example/multi_thread/pthread/ |
H A D | simple_ad_pthread.cpp | 111 ok = thread_num == thread_alloc::thread_num(); in run_one_worker() 114 ok &= worker(thread_num, thread_all_[thread_num].info); in run_one_worker() 129 for(thread_num = 0; thread_num < num_threads; thread_num++) in run_all_workers() 131 thread_all_[thread_num].thread_num = thread_num; in run_all_workers() 177 for(thread_num = 1; thread_num < num_threads; thread_num++) in run_all_workers() 180 &(thread_all_[thread_num].thread_num) in run_all_workers() 193 thread_num = thread_alloc::thread_num(); in run_all_workers() 198 for(thread_num = 1; thread_num < num_threads; thread_num++) in run_all_workers() 218 for(thread_num = 1; thread_num < num_threads; thread_num++) in run_all_workers() 257 for(thread_num = 0; thread_num < num_threads; thread_num++) in simple_ad() [all …]
|
H A D | team_pthread.cpp | 106 return thread_num; in thread_number() 168 size_t thread_num; in team_create() local 169 for(thread_num = 0; thread_num < num_threads; thread_num++) in team_create() 172 thread_all_[thread_num].thread_num = thread_num; in team_create() 223 for(thread_num = 1; thread_num < num_threads; thread_num++) in team_create() 227 &(thread_all_[thread_num].thread_num) in team_create() 278 size_t thread_num; in team_work() local 279 for(thread_num = 0; thread_num < num_threads_; thread_num++) in team_work() 302 size_t thread_num; in team_destroy() local 303 for(thread_num = 1; thread_num < num_threads_; thread_num++) in team_destroy() [all …]
|
/dports/math/cppad/CppAD-20210000.8/example/multi_thread/openmp/ |
H A D | simple_ad_openmp.cpp | 74 for(thread_num = 0; thread_num < int_num_threads; thread_num++) in run_all_workers() 94 for(thread_num = 0; thread_num < int_num_threads; thread_num++) in run_all_workers() 95 thread_all_[thread_num].ok = worker(info_all[thread_num]); in run_all_workers() 107 for(thread_num = 1; thread_num < int_num_threads; thread_num++) in run_all_workers() 108 ok &= thread_all_[thread_num].ok; in run_all_workers() 147 size_t thread_num; in simple_ad() local 148 for(thread_num = 0; thread_num < num_threads; thread_num++) in simple_ad() 155 for(thread_num = 0; thread_num < num_threads; thread_num++) in simple_ad() 161 info_all[thread_num] = info; in simple_ad() 167 thread_num = num_threads; in simple_ad() [all …]
|
H A D | team_openmp.cpp | 42 size_t thread_num(void) in thread_num() function 49 ok &= thread_num() == 0;; in team_create() 59 thread_alloc::parallel_setup(num_threads, in_parallel, thread_num); in team_create() 71 ok &= thread_num() == 0;; in team_work() 75 int thread_num; in team_work() local 77 for(thread_num = 0; thread_num < number_threads; thread_num++) in team_work() 86 ok &= thread_num() == 0;; in team_destroy()
|
/dports/devel/hpx/hpx-1.2.1/tests/unit/resource/ |
H A D | suspend_thread.cpp | 37 for (std::size_t thread_num = 0; thread_num < num_threads - 1; ++thread_num) in hpx_main() local 44 for (std::size_t thread_num = 0; thread_num < num_threads - 1; ++thread_num) in hpx_main() local 64 std::size_t thread_num = 0; in hpx_main() local 71 for (thread_num = 0; thread_num < num_threads; in hpx_main() 72 ++thread_num) in hpx_main() 103 ++thread_num) in hpx_main() 140 std::size_t thread_num = 0; in hpx_main() local 160 ++thread_num; in hpx_main() 165 --thread_num; in hpx_main() 172 --thread_num; in hpx_main() [all …]
|
H A D | suspend_thread_external.cpp | 35 for (std::size_t thread_num = 0; thread_num < num_threads - 1; ++thread_num) in hpx_main() local 42 for (std::size_t thread_num = 0; thread_num < num_threads - 1; ++thread_num) in hpx_main() local 44 tp.resume_processing_unit(thread_num).get(); in hpx_main() 45 HPX_TEST_EQ(std::size_t(thread_num + 2), in hpx_main() 53 for (std::size_t thread_num = 0; in hpx_main() local 55 ++thread_num) in hpx_main() 92 std::size_t thread_num = 0; in hpx_main() local 112 ++thread_num; in hpx_main() 117 --thread_num; in hpx_main() 124 --thread_num; in hpx_main() [all …]
|
H A D | suspend_thread_timed.cpp | 37 std::size_t thread_num = 0; in hpx_main() local 60 if (thread_num != hpx::resource::get_num_threads("default") - 1) in hpx_main() 62 tp.suspend_processing_unit(thread_num).get(); in hpx_main() 65 ++thread_num; in hpx_main() 67 if (thread_num == hpx::resource::get_num_threads("default")) in hpx_main() 70 --thread_num; in hpx_main() 75 tp.resume_processing_unit(thread_num - 1).get(); in hpx_main() 77 --thread_num; in hpx_main() 79 if (thread_num == 0) in hpx_main() 89 for (std::size_t thread_num_resume = 0; thread_num_resume < thread_num; in hpx_main()
|
/dports/math/cppad/CppAD-20210000.8/example/multi_thread/ |
H A D | team_example.cpp | 64 size_t thread_num = thread_alloc::thread_num(); in worker() local 68 ax[0] = work_all_[thread_num]->x; in worker() 84 work_all_[thread_num]->ok = ok; in worker() 96 size_t thread_num; in team_example() local 97 for(thread_num = 0; thread_num < num_threads; thread_num++) in team_example() 103 for(thread_num = 0; thread_num < num_threads; thread_num++) in team_example() 109 work_all_[thread_num]->ok = false; in team_example() 111 work_all_[thread_num]->x = double(thread_num) + 1.; in team_example() 119 thread_num = num_threads; in team_example() 120 while(thread_num--) in team_example() [all …]
|
H A D | multi_chkpoint_one.cpp | 231 for(size_t thread_num = 0; thread_num < num_threads; thread_num++) in multi_chkpoint_one_setup() local 246 *(work_all_[thread_num]->fun) = fun; in multi_chkpoint_one_setup() 255 work_all_[thread_num]->ok = false; in multi_chkpoint_one_setup() 285 { size_t thread_num = thread_alloc::thread_num(); in multi_chkpoint_one_worker() local 358 for(size_t thread_num = 0; thread_num < num_threads; thread_num++) in multi_chkpoint_one_takedown() local 366 size_t thread_num = num_threads; in multi_chkpoint_one_takedown() local 367 while(thread_num--) in multi_chkpoint_one_takedown() 369 ok &= work_all_[thread_num]->ok; in multi_chkpoint_one_takedown() 376 delete work_all_[thread_num]->fun; in multi_chkpoint_one_takedown() 384 if( thread_num > 0 ) in multi_chkpoint_one_takedown() [all …]
|
H A D | multi_atomic_two.cpp | 276 for(size_t thread_num = 0; thread_num < num_threads; thread_num++) in multi_atomic_two_setup() local 291 *(work_all_[thread_num]->fun) = fun; in multi_atomic_two_setup() 300 work_all_[thread_num]->ok = false; in multi_atomic_two_setup() 329 { size_t thread_num = thread_alloc::thread_num(); in multi_atomic_two_worker() local 401 for(size_t thread_num = 0; thread_num < num_threads; thread_num++) in multi_atomic_two_takedown() local 409 size_t thread_num = num_threads; in multi_atomic_two_takedown() local 410 while(thread_num--) in multi_atomic_two_takedown() 412 ok &= work_all_[thread_num]->ok; in multi_atomic_two_takedown() 419 delete work_all_[thread_num]->fun; in multi_atomic_two_takedown() 426 if( thread_num > 0 ) in multi_atomic_two_takedown() [all …]
|
H A D | multi_chkpoint_two.cpp | 231 for(size_t thread_num = 0; thread_num < num_threads; thread_num++) in multi_chkpoint_two_setup() local 246 *(work_all_[thread_num]->fun) = fun; in multi_chkpoint_two_setup() 255 work_all_[thread_num]->ok = false; in multi_chkpoint_two_setup() 285 { size_t thread_num = thread_alloc::thread_num(); in multi_chkpoint_two_worker() local 358 for(size_t thread_num = 0; thread_num < num_threads; thread_num++) in multi_chkpoint_two_takedown() local 366 size_t thread_num = num_threads; in multi_chkpoint_two_takedown() local 367 while(thread_num--) in multi_chkpoint_two_takedown() 369 ok &= work_all_[thread_num]->ok; in multi_chkpoint_two_takedown() 376 delete work_all_[thread_num]->fun; in multi_chkpoint_two_takedown() 384 if( thread_num > 0 ) in multi_chkpoint_two_takedown() [all …]
|
H A D | harmonic.cpp | 125 for(size_t thread_num = 0; thread_num < num_threads; thread_num++) in harmonic_setup() local 132 work_all_[thread_num]->ok = false; in harmonic_setup() 134 if( thread_num == 0 ) in harmonic_setup() 196 size_t thread_num = thread_alloc::thread_num(); in harmonic_worker() local 210 work_all_[thread_num]->sum = sum; in harmonic_worker() 211 work_all_[thread_num]->ok = ok; in harmonic_worker() 266 size_t thread_num = num_threads; in harmonic_takedown() local 267 while(thread_num--) in harmonic_takedown() 269 ok &= work_all_[thread_num]->ok; in harmonic_takedown() 272 sum += work_all_[thread_num]->sum; in harmonic_takedown() [all …]
|
H A D | multi_atomic_three.cpp | 289 for(size_t thread_num = 0; thread_num < num_threads; thread_num++) in multi_atomic_three_setup() local 304 *(work_all_[thread_num]->fun) = fun; in multi_atomic_three_setup() 313 work_all_[thread_num]->ok = false; in multi_atomic_three_setup() 342 { size_t thread_num = thread_alloc::thread_num(); in multi_atomic_three_worker() local 414 for(size_t thread_num = 0; thread_num < num_threads; thread_num++) in multi_atomic_three_takedown() local 422 size_t thread_num = num_threads; in multi_atomic_three_takedown() local 423 while(thread_num--) in multi_atomic_three_takedown() 425 ok &= work_all_[thread_num]->ok; in multi_atomic_three_takedown() 432 delete work_all_[thread_num]->fun; in multi_atomic_three_takedown() 439 if( thread_num > 0 ) in multi_atomic_three_takedown() [all …]
|
H A D | multi_newton.cpp | 164 size_t thread_num, num_sub_thread; in multi_newton_setup() local 165 for(thread_num = 0; thread_num < num_threads; thread_num++) in multi_newton_setup() 182 if( thread_num < num_more ) in multi_newton_setup() 260 size_t thread_num = thread_alloc::thread_num(); in multi_newton_worker() local 276 { work_all_[thread_num]->ok = ok; in multi_newton_worker() 336 work_all_[thread_num]->ok = ok; in multi_newton_worker() 384 for(size_t thread_num = 0; thread_num < num_threads; thread_num++) in multi_newton_takedown() local 410 size_t thread_num = num_threads; in multi_newton_takedown() local 411 while(thread_num--) in multi_newton_takedown() 420 delete work_all_[thread_num]; in multi_newton_takedown() [all …]
|
/dports/math/cppad/CppAD-20210000.8/test_more/general/ |
H A D | alloc_openmp.cpp | 41 size_t thread_num = thread_number(); in worker() local 42 thread_all_[thread_num].x.resize(1); in worker() 43 thread_all_[thread_num].x[0]=static_cast<double>(thread_num); in worker() 59 int thread_num; in alloc_openmp() local 61 for(thread_num = 0; thread_num < num_threads; thread_num++) in alloc_openmp() 68 for(thread_num = 0; thread_num < num_threads; thread_num++) in alloc_openmp() 70 ok &= thread_all_[thread_num].x[0] == static_cast<double>(thread_num); in alloc_openmp() 74 thread_all_[thread_num].x.clear(); in alloc_openmp()
|
/dports/devel/hpx/hpx-1.2.1/hpx/runtime/threads/policies/ |
H A D | shared_priority_queue_scheduler.hpp | 582 std::size_t thread_num = 0; in create_thread() local 600 thread_num = 0; in create_thread() 602 thread_num = select_active_pu(l, thread_num); in create_thread() 747 std::size_t thread_num = 0; in schedule_thread() local 765 thread_num = 0; in schedule_thread() 767 thread_num = select_active_pu(l, thread_num, allow_fallback); in schedule_thread() 837 std::size_t thread_num = 0; in schedule_thread_last() local 855 thread_num = 0; in schedule_thread_last() 857 thread_num = select_active_pu(l, thread_num, allow_fallback); in schedule_thread_last() 1263 on_error(thread_num, e); in on_error() [all …]
|
/dports/devel/hpx/hpx-1.2.1/examples/resource_partitioner/ |
H A D | shared_priority_queue_scheduler.hpp | 712 std::size_t thread_num = 0; in create_thread() local 735 thread_num = 0; in create_thread() 737 thread_num = select_active_pu(l, thread_num); in create_thread() 914 std::size_t thread_num = 0; in schedule_thread() local 937 thread_num = 0; in schedule_thread() 939 thread_num = select_active_pu(l, thread_num, allow_fallback); in schedule_thread() 1016 std::size_t thread_num = 0; in schedule_thread_last() local 1039 thread_num = 0; in schedule_thread_last() 1041 thread_num = select_active_pu(l, thread_num, allow_fallback); in schedule_thread_last() 1501 on_error(thread_num, e); in on_error() [all …]
|
/dports/devel/valgrind/valgrind-dragonfly-dragonfly/none/tests/ |
H A D | pth_once.c | 56 int *id_arg, thread_num, rtn; in main() local 61 for (thread_num = 0; thread_num < NUM_THREADS; (thread_num)++) { in main() 63 id_arg[thread_num] = thread_num; in main() 65 if (( rtn = pthread_create(&threads[thread_num], in main() 68 (void *) &(id_arg[thread_num]))) in main() 75 for (thread_num = 0; thread_num < NUM_THREADS; thread_num++) { in main() 76 pthread_join(threads[thread_num], NULL); in main()
|
/dports/devel/valgrind-lts/valgrind-dragonfly-dragonfly/none/tests/ |
H A D | pth_once.c | 56 int *id_arg, thread_num, rtn; in main() local 61 for (thread_num = 0; thread_num < NUM_THREADS; (thread_num)++) { in main() 63 id_arg[thread_num] = thread_num; in main() 65 if (( rtn = pthread_create(&threads[thread_num], in main() 68 (void *) &(id_arg[thread_num]))) in main() 75 for (thread_num = 0; thread_num < NUM_THREADS; thread_num++) { in main() 76 pthread_join(threads[thread_num], NULL); in main()
|
/dports/devel/gdb/gdb-11.1/gdb/testsuite/gdb.threads/ |
H A D | omp-par-scope.exp | 121 set thread_num [get_valueof "" thread_num "unknown"] 129 maybe_setup_kfail {$thread_num != 0} 156 set thread_num [get_valueof "" thread_num "unknown"] 159 maybe_setup_kfail {$thread_num != 0} 162 maybe_setup_kfail {$thread_num != 0} 165 maybe_setup_kfail {$thread_num != 0} 209 maybe_setup_kfail {$thread_num != 0} 221 maybe_setup_kfail {$thread_num != 0} 229 maybe_setup_kfail {$thread_num != 0} 283 maybe_setup_kfail {$thread_num != 0} [all …]
|
/dports/devel/embb/embb-1.0.0/base_c/test/ |
H A D | alloc_test.cc | 103 size_t thread_num = in TestNonAlignedAlloc() local 105 assert(thread_num < allocated_.size()); in TestNonAlignedAlloc() 106 allocated_[thread_num] = NULL; in TestNonAlignedAlloc() 107 allocated_[thread_num] = embb_alloc(1); in TestNonAlignedAlloc() 109 embb_free(allocated_[thread_num]); in TestNonAlignedAlloc() 118 size_t thread_num = in TestAlignedAlloc() local 120 assert(thread_num < allocated_.size()); in TestAlignedAlloc() 121 allocated_[thread_num] = NULL; in TestAlignedAlloc() 133 size_t thread_num = in TestCacheAlignedAlloc() local 135 assert(thread_num < allocated_.size()); in TestCacheAlignedAlloc() [all …]
|
/dports/devel/hpx/hpx-1.2.1/examples/throttle/throttle/stubs/ |
H A D | throttle.hpp | 24 suspend_async(hpx::naming::id_type const& gid, std::size_t thread_num) in suspend_async() 30 return hpx::async<action_type>(gid, thread_num); in suspend_async() 34 suspend(hpx::naming::id_type const& gid, std::size_t thread_num) in suspend() 36 suspend_async(gid, thread_num).get(); in suspend() 41 resume_async(hpx::naming::id_type const& gid, std::size_t thread_num) in resume_async() 47 return hpx::async<action_type>(gid, thread_num); in resume_async() 51 resume(hpx::naming::id_type const& gid, std::size_t thread_num) in resume() 53 resume_async(gid, thread_num).get(); in resume()
|
/dports/devel/hpx/hpx-1.2.1/src/runtime/threads/ |
H A D | thread_pool_base.cpp | 55 for (std::size_t thread_num = 0; thread_num < get_os_thread_count(); in get_used_processing_units() local 56 ++thread_num) in get_used_processing_units() 58 if (sched->get_state(thread_num).load() <= state_suspended) in get_used_processing_units() 61 rp.get_pu_mask(thread_num + get_thread_offset()); in get_used_processing_units() 79 for (std::size_t thread_num = 0; thread_num < get_os_thread_count(); in get_active_os_thread_count() local 80 ++thread_num) in get_active_os_thread_count() 82 if (get_scheduler()->get_state(thread_num).load() <= state_suspended) in get_active_os_thread_count()
|