## 3 GPU Parallelization of Metaphorless Optimization Algorithms
### GPU-Based Acceleration of the Java Optimization Algorithm  
GPU-Jaya was the first known parallelization of the Java algorithm on a GPU, introduced by [PERSON] et al. in 2018 [PERSON] et al. (2018) to estimate the parameters of a Li-ion battery model. The parallelization strategy employed in this algorithm focuses on minimizing data transmission between the host and the GPU. It utilizes both global and shared memories to efficiently manage data location, and the algorithm incorporates a parallel reduction procedure to optimize specific steps of the parallelization further. Data are stored in a collection of one-dimensional arrays, leading to the establishment of a set of conversion and mapping mechanisms. This implies a potential computing overhead resulting from the use of data adaptations. The number of threads is fixed at 32, while the number of blocks is determined by the size of the population array (\(popSize\times numVar\)) divided by 32. This suggests that the population array may need to be a multiple of 32, imposing constraints on selectable test parameters. The testing encompassed modest population sizes, ranging from 64 to 512. The problem involved six decision variables, with a maximum allowable number of iterations set at 20,000. With the fastest GPU used for testing, a Tesla K20c GPU with 2496 CUDA cores and 5 GB of VRAM, the GPU-Jaya achieved speedup factors ranging from 2.96 to 34.48, with an average of 13.17. [PERSON] et al. proposed [PERSON] et al. (2019) another parallelization of the Java algorithm on the GPU in 2019. The parallel execution scheme in this implementation determines the number of blocks based on the number of algorithm runs, while the number of threads per block is established by the population size and the number of design variables. However, this approach has the disadvantage of leading to an inefficient use of GPU resources, as the hardware allocation is influenced by the number of algorithm runs rather than the dimensions of the test case. Moreover, it imposes notable constraints on the allowable range of test parameters, particularly the population size and the number of decision variables. These restrictions stem from the close correlation of these parameters with the hardware characteristics of the GPU used for testing, particularly the maximum number of threads per block. The algorithm underwent evaluation on a GTX 970 GPU featuring 1664 CUDA cores and 2 GB of video random access memory (VRAM). It utilized a set of 30 unconstrained functions with population sizes ranging from 8 to 256, encompassing 2 to 32 decision variables and constrained by a maximum iteration count of 30,000. The implementation achieved maximum speedup factors ranging from 18.4 to 189.6, with an average of 53. A recent GPU parallelization of the Jaya algorithm proposed by [PERSON] and [PERSON] and [PERSON] (2018) makes use of the parallel execution strategy on GPUs detailed in the preceding section. The fundamental structure of this GPU-based version of Jaya is elucidated in Algorithm 10. ```
1:/* Initialization*/
2:Initialize\(numVar\),\(popSize\) and\(maxIter\);\(\triangleright\)Host
3:\(X\leftarrow\textsc{Generate\_initial\_population\_kernel}()\);
4:Evaluate_fitness_values_kernel\((X)\);
5:\(i\gets 1\);
6:/* Main loop*/
7:while\(i\leq maxIter\)do\(\triangleright\)Host
8: Determine\(X_{best,i}\) and \(X_{worst,i}\);
9:\(X_{i}^{new}\leftarrow\textsc{Jaya\_driven\_population\_update\_kernel}(X_{i})\);
10:Evaluate_fitness_values_kernel\((X_{i}^{new})\);
11:Greedy_selection_kernel\((X_{i},X_{i}^{new})\);
12:\(i\gets i+1\);
13:endwhile
14:Output the best solution found and terminate.\(\triangleright\)Host and device
```  
**Algorithm 10** GPU-based parallel Jaya  
Upon initial observation, juxtaposing the GPU-based Jaya algorithm with its sequential counterpart (Algorithm 1) elucidates a notably analogous structure.