Home
last modified time | relevance | path

Searched refs:threads (Results 1 – 25 of 100) sorted by relevance

1234

/oneTBB/doc/main/tbb_userguide/
H A DTask-Based_Programming.rst7 When striving for performance, programming in terms of threads can be a
9 your program in terms of *logical tasks*, not threads, for several
31 The threads you create with a threading package are *logical* threads,
32 which map onto the *physical threads* of the hardware. For computations
37 threads to keep the physical threads working. *Oversubscription* occurs
38 when there are more running logical threads than physical threads.
40 threads, which incurs overheads as discussed in Appendix A, *Costs of
43 threads, in a way that tolerates interference by other threads from the
70 number of threads, it is important to distribute work evenly across
71 those threads. As long as you break your program into enough small
[all …]
H A DWhen_Task-Based_Programming_Is_Inappropriate.rst11 rarely block. However, if threads block frequently, there is a
14 while waiting for I/O or mutexes for long periods. If threads hold
16 anyway, no matter how many threads it has. If you have blocking tasks,
17 it is best to use full-blown threads for those. The task scheduler is
18 designed so that you can safely mix your own threads with |full_name| tasks.
H A DContainers.rst9 Linux\* OS threads, or in conjunction with task-based programming.
12 A concurrent container allows multiple threads to concurrently access
25 - **Fine-grained locking:** Multiple threads operate on the container
27 different threads access different portions, they can proceed
31 - **Lock-free techniques:** Different threads account and correct for
32 the effects of other interfering threads.
H A DLock_Pathologies.rst17 Deadlock happens when threads are trying to acquire more than one
18 lock, and each holds some of the locks the other threads need to
22 - There is a cycle of threads
63 All other threads must wait until the interrupted thread resumes and
65 because if a waiting thread is interrupted, all the threads behind it
H A Dappendix_A.rst7 Time slicing enables there to be more logical threads than physical
8 threads. Each logical thread is serviced for a *time slice* by a
15 threads. Each context switch requires that the processor save all its
33 to evict data that was hot in cache for A, unless both threads need the
44 turn at a time slice to come up. Any other threads waiting on the lock
46 effect is called *convoying*, because the threads end up "bumper to
/oneTBB/examples/parallel_for/seismic/
H A Dmain.cpp36 utility::thread_number_range threads; member
44 : threads(threads_), in RunOptions()
52 utility::thread_number_range threads( in ParseCommandLine() local
64 .positional_arg(threads, "n-of-threads", utility::thread_number_range_desc) in ParseCommandLine()
70 return RunOptions(threads, numberOfFrames, silent, !serial); in ParseCommandLine()
76 SeismicVideo video(u, options.numberOfFrames, options.threads.last, options.parallel); in main()
81 video.threaded = options.threads.first > 0; in main()
94 for (int p = options.threads.first; p <= options.threads.last; in main()
95 p = options.threads.step(p)) { in main()
/oneTBB/examples/task_arena/fractal/
H A Dmain.cpp41 utility::thread_number_range threads(utility::get_default_num_threads); in main() local
51 .positional_arg(threads, "n-of-threads", utility::thread_number_range_desc) in main()
66 video.threaded = threads.first > 0; in main()
68 fractal_group fg(video.get_drawing_memory(), threads.last, max_iterations, num_frames); in main()
76 for (int p = threads.first; p <= threads.last; p = threads.step(p)) { in main()
/oneTBB/examples/parallel_reduce/primes/
H A Dmain.cpp34 utility::thread_number_range threads; member
49 : threads(threads_), in RunOptions()
58 utility::thread_number_range threads( in ParseCommandLine() local
70 .positional_arg(threads, "n-of-threads", utility::thread_number_range_desc) in ParseCommandLine()
81 RunOptions options(threads, grainSize, number, silent, repeatNumber); in ParseCommandLine()
90 for (int p = options.threads.first; p <= options.threads.last; p = options.threads.step(p)) { in main()
H A DREADME.md18 primes [n-of-threads=value] [number=value] [grain-size=value] [n-of-repeats=value] [silent] [-h] [n…
21 * `n-of-threads` - the number of threads to use; a range of the form low\[:high\], where low and op…
/oneTBB/examples/parallel_for_each/parallel_preorder/
H A Dmain.cpp44 static void ParseCommandLine(int argc, char* argv[], utility::thread_number_range& threads) { in ParseCommandLine() argument
50 .positional_arg(threads, "n-of-threads", utility::thread_number_range_desc) in ParseCommandLine()
60 utility::thread_number_range threads(utility::get_default_num_threads); in main() local
62 ParseCommandLine(argc, argv, threads); in main()
65 for (int p = threads.first; p <= threads.last; p = threads.step(p)) { in main()
/oneTBB/doc/main/tbb_userguide/Migration_Guide/
H A DTask_Scheduler_Init.rst10 Managing the number of threads
13 Querying the default number of threads
38 limits the total number of oneTBB worker threads
53 // Get the default number of threads
58 // Assert the maximum number of threads
66 // Assert the maximum number of threads
85 // Create the custom task_arena with four threads
89 // This arena is limited with for threads
120 to set the stack size for oneTBB worker threads:
128 // Set 16 MB of the stack size for oneTBB worker threads.
[all …]
/oneTBB/python/tbb/
H A Dapi.i82 void _concurrency_barrier(int threads = tbb::task_arena::automatic) {
83 if(threads == tbb::task_arena::automatic)
84 threads = tbb::this_task_arena::max_concurrency();
85 if(threads < 2)
88 (global_control::active_value(global_control::max_allowed_parallelism) < unsigned(threads))?
89 new global_control(global_control::max_allowed_parallelism, threads) : nullptr);
94 b.full_threads = threads-1;
110 void _concurrency_barrier(int threads = tbb::task_arena::automatic);
/oneTBB/examples/parallel_reduce/convex_hull/
H A DREADME.md23 convex_hull_sample [n-of-threads=value] [n-of-points=value] [silent] [verbose] [-h] [n-of-threads […
24 convex_hull_bench [n-of-threads=value] [n-of-points=value] [silent] [verbose] [-h] [n-of-threads [n…
27 * `n-of-threads` - the number of threads to use; a range of the form low\[:high\], where low and op…
/oneTBB/examples/parallel_reduce/pi/
H A Dmain.cpp53 utility::thread_number_range threads(utility::get_default_num_threads, 0); in main() local
60 .positional_arg(threads, "n-of-threads", utility::thread_number_range_desc) in main()
64 for (int p = threads.first; p <= threads.last; p = threads.step(p)) { in main()
H A DREADME.md19 pi [n-of-threads=value] [n-of-intervals=value] [silent] [-h] [n-of-threads [n-of-intervals]]
22threads` - the number of threads to use. This number is specified in the low\[:high\] range format…
/oneTBB/doc/GSG/
H A Dintro.rst6 |full_name| is a runtime-based parallel programming model for C++ code that uses threads.
10 parallelism is carried out through threads, an operating system mechanism that allows the same or d…
11 to be executed simultaneously. Using threads can make your program work faster and more efficiently.
13 Here you can see one of the possible executions of tasks by threads.
21 * Specify logical parallel structure instead of threads.
/oneTBB/examples/concurrent_hash_map/count_strings/
H A DREADME.md18 count_strings [n-of-threads=value] [n-of-strings=value] [verbose] [silent] [count_collisions] [-h] …
21 * `n-of-threads` - number of threads to use; a range of the form low\[:high\], where low and option…
H A Dcount_strings.cpp247 utility::thread_number_range threads(utility::get_default_num_threads, 0); in main() local
254 .positional_arg(threads, "n-of-threads", utility::thread_number_range_desc) in main()
266 if (threads.first) { in main()
267 for (int p = threads.first; p <= threads.last; p = threads.step(p)) { in main()
/oneTBB/examples/graph/logic_sim/
H A DREADME.md18 logic_sim [#threads=value] [verbose] [silent] [-h] [#threads]
21 * `#threads` - the number of threads to use; a range of the form low[:high] where low and optional …
/oneTBB/doc/main/intro/
H A DBenefits.rst18 threads, yet does not require exotic languages or compilers. You can use
24 threads**. Most threading packages require you to specify threads.
25 Programming directly in terms of threads can be tedious and lead to
26 inefficient programs, because threads are low-level, heavy constructs
27 that are close to the hardware. Direct programming with threads
28 forces you to efficiently map logical tasks onto threads. In
30 parallelism onto threads in a way that makes efficient use of
53 multiple threads to work on different parts of a collection.
/oneTBB/test/tbbmalloc/
H A Dtest_malloc_used_by_lib.cpp113 constexpr std::size_t threads = 4; in ThreadsLoadUnload() local
115 RunWithLoad::startBarr.initialize(threads); in ThreadsLoadUnload()
116 RunWithLoad::endBarr.initialize(threads); in ThreadsLoadUnload()
118 utils::NativeParallelFor(threads, body); in ThreadsLoadUnload()
/oneTBB/examples/parallel_pipeline/square/
H A DREADME.md19 square [n-of-threads=value] [input-file=value] [output-file=value] [max-slice-size=value] [silent] …
22 * `n-of-threads` - the number of threads to use; a range of the form low\[:high\], where low and op…
H A Dsquare.cpp231 utility::thread_number_range threads(utility::get_default_num_threads, 0); in main() local
238 .positional_arg(threads, "n-of-threads", utility::thread_number_range_desc) in main()
247 if (threads.first) { in main()
248 for (int p = threads.first; p <= threads.last; p = threads.step(p)) { in main()
/oneTBB/examples/graph/binpack/
H A DREADME.md20 binpack [#threads=value] [verbose] [silent] [elements_num=value] [bin_capacity=value] [#packers=val…
23 * `#threads` - the number of threads to use; a range of the form low\[:high\] where low and optiona…
28 * `#packers` - number of concurrent bin packers to use (`default=#threads`).
/oneTBB/examples/graph/dining_philosophers/
H A Ddining_philosophers.cpp69 utility::thread_number_range threads; member
73 : threads(threads_), in RunOptions()
80 utility::thread_number_range threads( in ParseCommandLine() local
90 cli_pack.positional_arg(threads, "n-of_threads", utility::thread_number_range_desc) in ParseCommandLine()
100 return RunOptions(threads, nPhilosophers, !verbose); in ParseCommandLine()
253 for (num_threads = options.threads.first; num_threads <= options.threads.last; in main()
254 num_threads = options.threads.step(num_threads)) { in main()

1234