
208 Designing Scientific Applications on GPUs
structure (from lines 10 to 14). Fourth, since the order in which candidate
neighbors are evaluated is undefined, the neighborhood fitnesses structure has
to be copied to the host CPU (line 15). Then the selection strategy is applied
to this structure (line 16): the exploration of the neighborhood fitnesses struc-
ture is done by the CPU. Finally, after a new candidate has been selected,
this information is copied to the GPU (line 18). The process is repeated until
a given number of iterations has been reached.
Algorithm 9: template of an iterated tabu search on GPU for solving
the Q3AP
1 Choose an initial solution; ...