Jenő Egerváry: Difference between revisions
en>R'n'B m Fix links to disambiguation page Matrix theory |
en>BattyBot m fixed CS1 errors: dates & General fixes using AWB (9816) |
||
Line 1: | Line 1: | ||
{{about|the vector addressing type|the I/O method|Vectored I/O}} | |||
'''Gather-scatter''' is a type of memory addressing that often arises when addressing | |||
vectors in [[Sparse matrix|sparse]] [[linear algebra]] operations. It is the | |||
vector-equivalent of register indirect addressing, with gather involving indexed | |||
reads and scatter indexed writes. [[Vector processor]]s have | |||
hardware support for gather-scatter operations, providing instructions such as | |||
''Load Vector Indexed'' for gather and ''Store Vector Indexed'' for scatter. | |||
==Definition== | |||
Denoting by <math>idx</math> the list of indices of sparse vector <math>x</math>, | |||
the sparse gather of dense <math>y</math> into <math>x</math> denoted | |||
<math>x \leftarrow y|_x</math>, assigns <math>x(i)=y(idx(i))</math>.<ref>[http://www.netlib.org/blas/blast-forum/chapter3.pdf BLAS Technical Forum standard, Chapter 3: Sparse BLAS.]</ref> | |||
The sparse scatter, denoted <math>y|_x \leftarrow x</math> is the reverse operation. | |||
It copies the nonzero values of sparse <math>x</math> into the corresponding | |||
locations in the dense vector <math>y</math>, i.e. <math>y(idx(i))=x(i)</math>. | |||
==Examples== | |||
Gather: | |||
<source lang="C"> | |||
for (i=0; i<N; ++i) | |||
x[i] = y[idx[i]]; | |||
</source> | |||
Scatter: | |||
<source lang="C"> | |||
for (i=0; i<N; ++i) | |||
y[idx[i]] = x[i]; | |||
</source> | |||
== See also == | |||
* [[SIMD]] | |||
* [[Vectorization (parallel computing)|Vectorization]] | |||
==References== | |||
{{reflist}} | |||
[[Category:Parallel computing]] |
Revision as of 08:07, 25 December 2013
29 yr old Orthopaedic Surgeon Grippo from Saint-Paul, spends time with interests including model railways, top property developers in singapore developers in singapore and dolls. Finished a cruise ship experience that included passing by Runic Stones and Church.
Gather-scatter is a type of memory addressing that often arises when addressing vectors in sparse linear algebra operations. It is the vector-equivalent of register indirect addressing, with gather involving indexed reads and scatter indexed writes. Vector processors have hardware support for gather-scatter operations, providing instructions such as Load Vector Indexed for gather and Store Vector Indexed for scatter.
Definition
Denoting by the list of indices of sparse vector , the sparse gather of dense into denoted , assigns .[1]
The sparse scatter, denoted is the reverse operation. It copies the nonzero values of sparse into the corresponding locations in the dense vector , i.e. .
Examples
Gather:
for (i=0; i<N; ++i)
x[i] = y[idx[i]];
Scatter:
for (i=0; i<N; ++i)
y[idx[i]] = x[i];
See also
References
43 year old Petroleum Engineer Harry from Deep River, usually spends time with hobbies and interests like renting movies, property developers in singapore new condominium and vehicle racing. Constantly enjoys going to destinations like Camino Real de Tierra Adentro.