totalSort

private fnvoid totalSort(alias less, T)(ref T[] arr)

Sorts arr under a total order: segments sort in parallel, then pairwise merge rounds run in parallel. A total order has exactly one sorted permutation, so the result is identical to a serial sort of the whole array whatever the scheduling - the caller's comparator must therefore be total (index tie-breaks make it so).