Macaulay2 Engine
Loading...
Searching...
No Matches

◆ sort() [2/2]

template<typename Sorter>
void QuickSorter< Sorter >::sort ( Sorter * M0,
value * elems0,
long len0 )
static

Definition at line 376 of file monsort.hpp.

377{
379 int typ = 1;
381
382 switch (typ)
383 {
384 case 1:
385 S.sort2(0, len0);
386 break;
387 case 2:
388 S.sort2depth(0, len0, 1);
389 break;
390
391 case 3:
392 S.sortC();
393 break;
394
395 case 4:
396 S.sortD();
397 break;
398 }
399
401 long double nsecs = end_time - begin_time;
403
404 if (M2_gbTrace >= 4)
405 fprintf(
406 stderr, "sort: len %ld depth %ld time %Lf\n", len0, S.maxdepth, nsecs);
407}
void sortC()
Definition monsort.hpp:219
void sort2depth(long lo, long hi, long depth)
Definition monsort.hpp:169
QuickSorter(Sorter *M0, value *elems0, long len0)
Definition monsort.hpp:65
void sortD()
Definition monsort.hpp:322
void sort2(long lo, long hi)
Definition monsort.hpp:130
long maxdepth
Definition monsort.hpp:53

References M2_gbTrace, maxdepth, QuickSorter(), sort2(), sort2depth(), sortC(), and sortD().