Game Development Reference
In-Depth Information
Figure 7.11. Simulation result with sorting(see Color Plate VI).
16
Update (UG)
Update (S)
Update (SS)
Total (UG)
Total (S)
Total (SS)
14
12
10
8
6
4
2
0
1
6
11
16
21
26
31
36
41
46
51
56
61
66
71
76
81
86
91
96
101 106 111 116
Simulation time
Figure 7.12. Comparison of computation times of simulations using uniform grid (UG),
sliced grid (S), and sliced grid with sorting (SS) (see Color Plate VII).
time step and update of the particle values. When sorting is used for a sliced grid,
particles are sorted at the update. Concretely, particle indices are sorted using the
grid coordinates as keys. Then updated velocities and positions are written to the
newmemory locations. This timing also includes the time for sorting. We can see
that total time with sorting does not spike when sorting is introduced, although
update with sorting does takes some time.
Search Nedrilad ::




Custom Search