Skip to Main Content
Intel Threading Building Blocks
book

Intel Threading Building Blocks

by James Reinders
July 2007
Intermediate to advanced content levelIntermediate to advanced
332 pages
10h 4m
English
O'Reilly Media, Inc.
Content preview from Intel Threading Building Blocks

Initializing the Library Is Your Job

Each thread must initialize the Threading Building Blocks library using tbb::task_ scheduler_init before using an algorithm template or the task scheduler. If you use the default task scheduler for the whole program and just define tasks using algorithm templates as shown in the earlier chapters of this book, it is enough to define tbb::task_scheduler_init once, in your main program. However, if you create your own tasks as shown in this chapter, each task has to initialize the scheduler as well.

Refer to the section “Initializing and Terminating the Library” in Chapter 3 for more information on the proper initialization and optional parameters to tbb::task_ scheduler_init.

The section “Mixing with Other Threading Packages” in Chapter 10 explains how to construct task_scheduler_init objects if your program creates threads itself using another interface.

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Intel® Xeon Phi™ Coprocessor Architecture and Tools: The Guide for Application Developers

Intel® Xeon Phi™ Coprocessor Architecture and Tools: The Guide for Application Developers

Rezaur Rahman

Publisher Resources

ISBN: 9780596514808Errata Page