static void blockyTandemMergeSort ( final double [ ] keyArr , final long [ ] valArr , final int arrLen , final int blkSize ) { assert blkSize >= 1 ; if ( arrLen <= blkSize ) { return ; } int numblks = arrLen / blkSize ; if ( ( numblks * blkSize ) < arrLen ) { numblks += 1 ; } assert ( ( numblks * blkSize ) >= arrLen ) ; // duplicate the input is preparation for the "ping-pong" copy reduction strategy. final double [ ] keyTmp = Arrays . copyOf ( keyArr , arrLen ) ; final long [ ] valTmp = Arrays . copyOf ( valArr , arrLen ) ; blockyTandemMergeSortRecursion ( keyTmp , valTmp , keyArr , valArr , 0 , numblks , blkSize , arrLen ) ; }
used by DoublesAuxiliary and UtilTest