US 12,450,029 B1
Top down merge sort method and apparatus
Robert Bernard Kent, Albuquerque, NM (US)
Filed by Robert Bernard Kent, Albuquerque, NM (US)
Filed on Oct. 25, 2024, as Appl. No. 18/927,131.
Claims priority of provisional application 63/593,707, filed on Oct. 27, 2023.
Int. Cl. G06F 7/16 (2006.01)
CPC G06F 7/16 (2013.01) 20 Claims
OG exemplary drawing
 
1. A method for merging sorted input lists of values into a single sorted output list with a hardware merge sort device, the method comprising:
creating an input array comprising a plurality of columns and a plurality of rows, wherein the plurality of columns is at least equal to the plurality of sorted input lists and wherein the plurality of rows is at least enough to hold all of the values of the sorted input lists, and wherein the input array is populated such that it comprises:
a largest value of a first sorted input list disposed in a first row and a first column of the input array, with any remaining values of the first sorted input list disposed in successive cells of the input array in row-major fashion in a first direction; and
applying a column offset to a second sorted input list, such that a largest value of the second sorted input list is disposed in a first open cell of a second column of the input array, with any remaining values of the second sorted input list disposed in successive cells of the input array in a row-major fashion in the first direction;
causing the values of the sorted input lists of the hardware merge sort device to be mapped to their specified locations in the input array;
the hardware merge sort device sorting the plurality of columns of the input array with column sorters, such that the values contained therein are in a sorted numerical order;
the hardware merge sort device sorting the plurality of rows of a column sort output array with row sorters; and
the hardware merge sort device outputting a plurality of sorted output values from the row sorters to the single sorted output list of the hardware merge sort device.