#include "petscsys.h" PetscErrorCode PetscMPIIntSortSemiOrderedWithArray(PetscInt n, PetscMPIInt arr1[], PetscMPIInt arr2[])Not Collective
n | - number of values | |
arr1 | - array of integers to be sorted | |
arr2 | - array of integers to be reordered |
arr1 | - sorted array of integers | |
arr2 | - reordered array of integers |
If the array to be sorted is less than 64 entries long PetscSortMPIIntWithArray() is automatically used.
This function serves as an alternative to PetscSortMPIIntWithArray(). While this function works for any array of integers it is significantly faster if the array is not totally random. There are exceptions to this and so it is __highly__ recomended that the user benchmark their code to see which routine is fastest.