官术网_书友最值得收藏!

Chapter 3. Understanding Parallelism Granularity

One of the most essential tasks when writing parallel code is to divide your program into subsets that will run in parallel and communicate between each other. Sometimes the task naturally divides into separate pieces, but usually it is up to you to choose which parts to make parallel. Should we use a small number of large tasks, many small tasks, or maybe large and small tasks at the same time?

Theoretically speaking, it does not matter. In case of an ideal computational device, it would have no overhead for creating a worker thread and distributing work between any numbers of threads. However, on a real CPU, this performance overhead is significant and it is very important to take this into account. The right way to split your program into parallel parts is the key to writing effective and fast programs. In this chapter, we are going to review this problem in detail.

主站蜘蛛池模板: 桦川县| 金湖县| 克拉玛依市| 商城县| 蕲春县| 宁阳县| 仙游县| 岳普湖县| 仁寿县| 曲阜市| 南平市| 大庆市| 安乡县| 武邑县| 夏河县| 松原市| 股票| 南靖县| 班戈县| 阿荣旗| 天门市| 佛教| 黔西| 双辽市| 佳木斯市| 湄潭县| 淳化县| 祁东县| 永德县| 瓦房店市| 永春县| 吴江市| 太仆寺旗| 菏泽市| 高平市| 阳城县| 左贡县| 乐平市| 历史| 蕉岭县| 安溪县|