Swarm-NG
1.1
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
pair_calculation.hpp
1
// this file does not have guard since it is used by other headers
2
4
template
<
int
nbod>
5
GENERIC
int
first
(
int
ij ){
6
int
i = nbod - 1 - ij / (nbod/2);
7
int
j = ij % (nbod/2);
8
if
(j < i)
9
return
i;
10
else
11
return
nbod - 1 - i - nbod%2 + 1;
12
}
13
15
template
<
int
nbod>
16
GENERIC
int
second
(
int
ij ){
17
int
i = nbod - 1 - ij / (nbod/2);
18
int
j = ij % (nbod/2);
19
if
(j < i)
20
return
j;
21
else
22
return
nbod - 1 - j - nbod%2;
23
}
24
swarm
src
swarm
gpu
pair_calculation.hpp
Generated on Sun Jul 21 2013 11:11:54 for Swarm-NG by
1.8.4