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

@ -32,8 +32,6 @@ using namespace LAMMPS_NS;
#if defined(LMP_QSORT)
// allocate space for static class variable
Dump *Dump::dumpptr;
#else
#include "mergesort.h"
#endif
#define BIG 1.0e20
@ -766,9 +764,9 @@ void Dump::sort()
#else
if (!reorderflag) {
for (i = 0; i < nme; i++) index[i] = i;
if (sortcol == 0) merge_sort(index,nme,(void *)this,idcompare);
else if (sortorder == ASCEND) merge_sort(index,nme,(void *)this,bufcompare);
else merge_sort(index,nme,(void *)this,bufcompare_reverse);
if (sortcol == 0) utils::merge_sort(index,nme,(void *)this,idcompare);
else if (sortorder == ASCEND) utils::merge_sort(index,nme,(void *)this,bufcompare);
else utils::merge_sort(index,nme,(void *)this,bufcompare_reverse);
}
#endif