/* On an 8-core machine, this takes the top 3-bits of random numbers and distributes them to the 8 cores for sorting. Then, it merge sorts them. */ #define NUM 1000000 I64 my_mp_cnt=1<1) { do { less=base; greater=base+num; pivot=base[num/2]; while (less1); } } U0 MPSort(I64 dummy=0) { no_warn dummy; QSortU32(b[Gs->num],bn[Gs->num]); LBtr(&mp_not_done_flags,Gs->num); } U0 MPRadixSortDemo(I64 dummy=0) { no_warn dummy; I64 i,j,k1,k2; F64 t0; arg1=MAlloc(NUM*sizeof(I32)); for (i=0;i>k1+k2; //This is a preliminary radix sort. b[j][bn[j]++]=arg1[i]; } mp_not_done_flags=1<