*4.2.2. Parallelism of f*

In the serial program if the similarity-distance between data events of the simulation grid and the one sampled from the current training image node is higher than the threshold, a new central node will be sampled from the training image along a random path. Most nodes of the training image that may be visited is defined as *f* × *NTI*, as a result, large amount of data event will be sampled in large-scale 3-days simulations.

The parallelization of *f* is implemented in Kernel 4 that allocates *f* × *NTI* threads to *f* × *NTI* central nodes in the training image using a unique random path denoting each node. Thus these similarity distances are calculated simultaneously. There are two possibilities for the similarity distance and the data sampling strategy is shown as follows:


Finally, the central value of the chosen data event is assigned to the simulation grid by Kernel 6. Repeat all these kernels until all the nodes in the simulation grid are simulated.
