Handbook
Glossary
init-bodies ( bodies -- )
Vocabulary
benchmark
.
nbody
Inputs
bodies
an
object
Outputs
None
Definition
USING:
accessors
kernel
math.vectors
sequences
specialized-arrays.instances.alien.c-types.double
;
IN:
benchmark.nbody
:
init-bodies
( bodies -- )
[
first
]
[
double-array{
0.0 0.0 0.0
}
[
[
velocity>>
]
[
mass>>
]
bi
v*n
v+
]
reduce
]
bi
offset-momentum
drop
;
inline