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

Gather

In this pattern, each thread or task has multiple inputs, and it produces a single output to be written at a single location in memory. Suppose you want to write a program that finds a moving average of three numbers; this is an example of a gather operation. It takes three inputs from memory and writes single output to memory. So, there is data reuse on the input side. It is basically a many-to-one operation. The code for gather pattern will look as follows:

out[i] = (in [i-1] + in[i] + in[i+1])/3
主站蜘蛛池模板: 庆安县| 宁海县| 赞皇县| 蕲春县| 吉林省| 安平县| 托克托县| 建湖县| 营口市| 河西区| 棋牌| 芮城县| 临潭县| 定安县| 正宁县| 偃师市| 成武县| 彩票| 绍兴县| 沅江市| 杂多县| 洞头县| 辛集市| 新河县| 建德市| 英超| 克什克腾旗| 宁河县| 临澧县| 和平县| 德安县| 肥西县| 盐亭县| 马边| 东宁县| 政和县| 股票| 南川市| 安康市| 亚东县| 永吉县|