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

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
主站蜘蛛池模板: 景宁| 连州市| 涟水县| 江源县| 安徽省| 岳阳市| 安福县| 儋州市| 阿拉善左旗| 始兴县| 沙洋县| 长葛市| 汽车| 吴桥县| 广州市| 达拉特旗| 中超| 灵璧县| 云龙县| 清丰县| 镇巴县| 吉林市| 乐山市| 易门县| 宁国市| 邵武市| 烟台市| 连江县| 巴塘县| 绵竹市| 漳浦县| 阿荣旗| 商水县| 图们市| 五台县| 昭觉县| 饶河县| 横山县| 拉孜县| 许昌市| 永福县|