The algorithm implementation is shown in the following figure:
There are several SSSP algorithms run in parallel as shown in the figure.
The max module finds the maximum distance found and keep a record of it.
To find more distance between pairs of vertices, you can re-run this kernel multiple times.