restore old qsort() based code and add preprocessor directives to switch

-DLMP_USE_LIBC_QSORT will use qsort() from libc to sort (requires static/global variables).
-DLMP_USE_MERGE_SORT will use a plain merge sort. slightly slower for expensive comparisons.
-DLMP_USE_HYBRID_SORT will use hybrid merge sort. faster than merge sort (no static/global variables)
This commit is contained in:
Axel Kohlmeyer
2017-06-16 18:17:48 -04:00
parent 2a6f026853
commit c1b0b1b3f9
5 changed files with 162 additions and 9 deletions

View File

@ -21,6 +21,12 @@ namespace LAMMPS_NS {
class Irregular : protected Pointers {
public:
#if defined(LMP_USE_LIBC_QSORT)
// static variable across all Irregular objects, for qsort callback
static int *proc_recv_copy;
#endif
Irregular(class LAMMPS *);
~Irregular();
void migrate_atoms(int sortflag = 0, int preassign = 0,