move merge sort to utils namespace

This commit is contained in:
Axel Kohlmeyer
2020-09-06 17:38:53 -04:00
parent d995ed0d87
commit 485a169ef2
8 changed files with 218 additions and 199 deletions

View File

@ -31,7 +31,6 @@ using namespace LAMMPS_NS;
int *Irregular::proc_recv_copy;
static int compare_standalone(const void *, const void *);
#else
#include "mergesort.h"
// prototype for non-class function
static int compare_standalone(const int, const int, void *);
#endif
@ -441,7 +440,7 @@ int Irregular::create_atom(int n, int *sizes, int *proclist, int sortflag)
proc_recv_copy = proc_recv;
qsort(order,nrecv_proc,sizeof(int),compare_standalone);
#else
merge_sort(order,nrecv_proc,(void *)proc_recv,compare_standalone);
utils::merge_sort(order,nrecv_proc,(void *)proc_recv,compare_standalone);
#endif
int j;
@ -715,7 +714,7 @@ int Irregular::create_data(int n, int *proclist, int sortflag)
proc_recv_copy = proc_recv;
qsort(order,nrecv_proc,sizeof(int),compare_standalone);
#else
merge_sort(order,nrecv_proc,(void *)proc_recv,compare_standalone);
utils::merge_sort(order,nrecv_proc,(void *)proc_recv,compare_standalone);
#endif
int j;
@ -889,7 +888,7 @@ int Irregular::create_data_grouped(int n, int *procs, int sortflag)
proc_recv_copy = proc_recv;
qsort(order,nrecv_proc,sizeof(int),compare_standalone);
#else
merge_sort(order,nrecv_proc,(void *)proc_recv,compare_standalone);
utils::merge_sort(order,nrecv_proc,(void *)proc_recv,compare_standalone);
#endif
int j;