- Hands-On GPU:Accelerated Computer Vision with OpenCV and CUDA
- Bhaumik Vaidya
- 94字
- 2021-08-13 15:48:23
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
推薦閱讀
- HTML5移動(dòng)Web開發(fā)技術(shù)
- 大學(xué)計(jì)算機(jī)應(yīng)用基礎(chǔ)實(shí)踐教程
- Visual FoxPro程序設(shè)計(jì)教程(第3版)
- Python機(jī)器學(xué)習(xí):數(shù)據(jù)分析與評(píng)分卡建模(微課版)
- 算法基礎(chǔ):打開程序設(shè)計(jì)之門
- Web交互界面設(shè)計(jì)與制作(微課版)
- Julia機(jī)器學(xué)習(xí)核心編程:人人可用的高性能科學(xué)計(jì)算
- 征服RIA
- Python機(jī)器學(xué)習(xí)實(shí)戰(zhàn)
- 深度學(xué)習(xí):算法入門與Keras編程實(shí)踐
- Hands-On GPU:Accelerated Computer Vision with OpenCV and CUDA
- Python編程實(shí)戰(zhàn)
- 編程與類型系統(tǒng)
- 深入淺出React和Redux
- Learning AngularJS for .NET Developers