<s>
In	O
parallel	B-Operating_System
computing	I-Operating_System
,	O
all-to-all	B-Operating_System
(	O
also	O
known	O
as	O
index	O
operation	O
or	O
total	O
exchange	O
)	O
is	O
a	O
collective	B-Operating_System
operation	I-Operating_System
,	O
where	O
each	O
processor	O
sends	O
an	O
individual	O
message	O
to	O
every	O
other	O
processor	O
.	O
</s>
<s>
The	O
number	O
of	O
communication	O
rounds	O
and	O
the	O
overall	O
communication	O
volume	O
are	O
measures	O
to	O
evaluate	O
the	O
quality	O
of	O
an	O
all-to-all	B-Operating_System
algorithm	O
.	O
</s>
<s>
On	O
such	O
a	O
machine	O
,	O
an	O
all-to-all	B-Operating_System
algorithm	O
requires	O
at	O
least	O
communication	O
rounds	O
.	O
</s>
<s>
Depending	O
on	O
the	O
network	B-Architecture
topology	I-Architecture
(	O
fully	O
connected	O
,	O
hypercube	B-Operating_System
,	O
ring	B-Architecture
)	O
,	O
different	O
all-to-all	B-Operating_System
algorithms	O
are	O
required	O
.	O
</s>
<s>
The	O
way	O
the	O
data	O
is	O
routed	O
through	O
the	O
network	O
depends	O
on	O
its	O
underlying	O
topology	B-Architecture
.	O
</s>
<s>
We	O
take	O
a	O
look	O
at	O
all-to-all	B-Operating_System
algorithms	O
for	O
common	O
network	B-Architecture
topologies	I-Architecture
.	O
</s>
<s>
A	O
hypercube	B-Operating_System
is	O
a	O
network	B-Architecture
topology	I-Architecture
,	O
where	O
two	O
processors	O
share	O
a	O
link	O
,	O
if	O
the	O
hamming	O
distance	O
of	O
their	O
indices	O
is	O
one	O
.	O
</s>
<s>
The	O
idea	O
of	O
an	O
all-to-all	B-Operating_System
algorithm	O
is	O
to	O
combine	O
messages	O
belonging	O
to	O
the	O
same	O
subcube	O
,	O
and	O
then	O
distribute	O
them	O
.	O
</s>
<s>
An	O
all-to-all	B-Operating_System
algorithm	O
in	O
a	O
ring	B-Architecture
topology	I-Architecture
is	O
very	O
intuitive	O
.	O
</s>
<s>
For	O
a	O
mesh	B-Architecture
we	O
look	O
at	O
a	O
mesh	B-Architecture
.	O
</s>
<s>
This	O
algorithm	O
is	O
easily	O
adaptable	O
for	O
any	O
mesh	B-Architecture
.	O
</s>
<s>
An	O
all-to-all	B-Operating_System
algorithm	O
in	O
a	O
mesh	B-Architecture
consists	O
of	O
two	O
communication	O
phases	O
.	O
</s>
<s>
Next	O
,	O
an	O
all-to-all	B-Operating_System
operation	O
among	O
rows	O
is	O
performed	O
.	O
</s>
<s>
After	O
another	O
all-to-all	B-Operating_System
operation	O
,	O
this	O
time	O
in	O
respect	O
to	O
columns	O
,	O
each	O
processor	O
ends	O
up	O
with	O
its	O
messages	O
.	O
</s>
<s>
In	O
the	O
following	O
algorithm	O
an	O
all-to-all	B-Operating_System
algorithm	O
is	O
performed	O
using	O
(	O
p-1	O
)	O
one-to-one	O
routings	O
.	O
</s>
<s>
Depending	O
on	O
the	O
underlying	O
topology	B-Architecture
of	O
the	O
network	O
,	O
one	O
approach	O
might	O
be	O
superior	O
to	O
the	O
other	O
.	O
</s>
<s>
The	O
exclusive	O
or	O
approach	O
is	O
superior	O
,	O
when	O
performing	O
pairwise	O
one-to-one	O
routings	O
in	O
a	O
hypercube	B-Operating_System
or	O
fat-tree	O
.	O
</s>
