Sorting an array consisting of a large number of elements
First Claim
1. An apparatus, the apparatus comprising:
- an input sequence production unit configured to produce an input sequence by pairing a key from an element for use in a comparison during sorting with an index identifying the element for each element or sorted array of elements;
an execution unit configured to execute the multiway merging process on N input sequences without rearranging the elements based on which input sequences have been produced;
a generation unit configured to rearrange the elements constituting the input sequences according to an output sequence that has been generated by the multiway merging process in the execution unit so as to generate a sorted array of elements; and
a number of bits of the key determined so that a combination of the key and the index has a first number of bits until the number of elements contained in input sequences for the multiway merging process reaches a predetermined threshold, and when the number of elements exceeds the predetermined threshold, the number of bits of the key is determined so that the combination has a second number of bits which is greater than the first number of bits.
1 Assignment
0 Petitions
Accused Products
Abstract
Sorting an array consisting of large number of elements. The present invention provides an apparatus for executing a multiway merging process which generates one output sequence from N input sequences on an array consisting of a large number of elements. The apparatus includes: an input sequence production unit configured to produce an input sequence by pairing a key from an element for use in a comparison during sorting with an index identifying the element for each element or sorted array of elements; an execution unit configured to execute the multiway merging process on N input sequences without rearranging the elements based on which input sequences have been produced; and a generation unit configured to rearrange the elements constituting the input sequences according to an output sequence that has been generated by the multiway merging process in the execution unit so as to generate a sorted array of elements.
-
Citations
17 Claims
-
1. An apparatus, the apparatus comprising:
-
an input sequence production unit configured to produce an input sequence by pairing a key from an element for use in a comparison during sorting with an index identifying the element for each element or sorted array of elements; an execution unit configured to execute the multiway merging process on N input sequences without rearranging the elements based on which input sequences have been produced; a generation unit configured to rearrange the elements constituting the input sequences according to an output sequence that has been generated by the multiway merging process in the execution unit so as to generate a sorted array of elements; and a number of bits of the key determined so that a combination of the key and the index has a first number of bits until the number of elements contained in input sequences for the multiway merging process reaches a predetermined threshold, and when the number of elements exceeds the predetermined threshold, the number of bits of the key is determined so that the combination has a second number of bits which is greater than the first number of bits. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11)
-
-
12. A computer-implemented method, the method comprising:
-
producing an input sequence by pairing, per element or sorted array of elements, a key from an element for use in a comparison during sorting with an index identifying the element; executing the multiway merging process on N input sequences without rearranging the elements based on which input sequences have been produced; rearranging the elements, based on which the input sequences have been produced, according to an output sequence that has been generated by the multiway merging process in the executing step so as to generate a sorted array of elements; and determining a number of bits of the key so that a combination of the key and the index has a first number of bits until the number of elements contained in input sequences for the multiway merging process reaches a predetermined threshold, and when the number of elements exceeds the predetermined threshold, determining the number of bits of the key so that the combination has a second number of bits which is greater than the first number of bits. - View Dependent Claims (13, 14, 15, 16)
-
-
17. A computer program product, the computer program product comprising:
-
one or more computer readable hardware storage devices and program instructions stored on the one or more computer readable hardware storage devices, the program instructions comprising; program instructions to produce an input sequence by pairing, per element or sorted array of elements, a key from an element for use in a comparison during sorting with an index identifying the element; program instructions to execute the multiway merging process on N input sequences without rearranging the elements based on which input sequences have been produced; program instructions to rearrange the elements, based on which the input sequences have been produced, according to an output sequence that has been generated by the multiway merging process in the executing step so as to generate a sorted array of elements; and program instructions to determine a number of bits of the key so that a combination of the key and the index has a first number of bits until the number of elements contained in input sequences for the multiway merging process reaches a predetermined threshold, and when the number of elements exceeds the predetermined threshold, program instructions to determine the number of bits of the key so that the combination has a second number of bits which is greater than the first number of bits.
-
Specification