<s>
Gather/scatter	B-General_Concept
is	O
a	O
type	O
of	O
memory	B-General_Concept
addressing	O
that	O
at	O
once	O
collects	O
(	O
gathers	O
)	O
from	O
,	O
or	O
stores	O
(	O
scatters	O
)	O
data	O
to	O
,	O
multiple	O
,	O
arbitrary	O
indices	O
.	O
</s>
<s>
Examples	O
of	O
its	O
use	O
include	O
sparse	B-Algorithm
linear	B-Language
algebra	I-Language
operations	O
,	O
sorting	O
algorithms	O
,	O
fast	O
Fourier	O
transforms	O
,	O
and	O
some	O
computational	O
graph	O
theory	O
problems	O
.	O
</s>
<s>
Vector	B-Operating_System
processors	I-Operating_System
(	O
and	O
some	O
SIMD	B-Device
units	O
in	O
CPUs	B-Device
)	O
have	O
hardware	O
support	O
for	O
gather	O
and	O
scatter	O
operations	O
.	O
</s>
<s>
A	O
sparsely	B-Algorithm
populated	I-Algorithm
vector	I-Algorithm
holding	O
non-empty	O
elements	O
can	O
be	O
represented	O
by	O
two	O
densely	O
populated	O
vectors	O
of	O
length	O
;	O
containing	O
the	O
non-empty	O
elements	O
of	O
,	O
and	O
giving	O
the	O
index	O
in	O
where	O
'	O
s	O
element	O
is	O
located	O
.	O
</s>
<s>
The	O
sparse	B-Algorithm
scatter	O
,	O
denoted	O
is	O
the	O
reverse	O
operation	O
.	O
</s>
<s>
It	O
copies	O
the	O
values	O
of	O
into	O
the	O
corresponding	O
locations	O
in	O
the	O
sparsely	B-Algorithm
populated	I-Algorithm
vector	I-Algorithm
,	O
i.e.	O
</s>
<s>
x86-64	B-Device
CPUs	B-Device
which	O
support	O
the	O
AVX2	O
instruction	O
set	O
can	O
gather	O
32-bit	O
and	O
64-bit	O
elements	O
with	O
memory	B-General_Concept
offsets	O
from	O
a	O
base	O
address	O
.	O
</s>
<s>
A	O
second	O
register	O
determines	O
whether	O
the	O
particular	O
element	O
is	O
loaded	O
,	O
and	O
faults	O
occurring	O
from	O
invalid	O
memory	B-General_Concept
accesses	O
by	O
masked-out	O
elements	O
are	O
suppressed	O
.	O
</s>
<s>
The	O
AVX-512	B-General_Concept
instruction	O
set	O
also	O
contains	O
(	O
potentially	O
masked	O
)	O
scatter	O
operations	O
.	O
</s>
<s>
The	O
ARM	B-Architecture
instruction	I-Architecture
set	I-Architecture
's	O
Scalable	O
Vector	O
Extension	O
includes	O
gather	O
and	O
scatter	O
operations	O
on	O
8-	O
,	O
16-	O
,	O
32	O
-	O
and	O
64-bit	O
elements	O
.	O
</s>
<s>
InfiniBand	B-Architecture
has	O
hardware	O
support	O
for	O
gather/scatter	B-General_Concept
.	O
</s>
<s>
Without	O
instruction-level	O
gather/scatter	B-General_Concept
,	O
efficient	O
implementations	O
may	O
need	O
to	O
be	O
tuned	O
for	O
optimal	O
performance	O
,	O
for	O
example	O
with	O
prefetching	B-General_Concept
;	O
libraries	O
such	O
as	O
OpenMPI	O
may	O
provide	O
such	O
primitives	O
.	O
</s>
