Bitonic Sorter
   HOME



picture info

Bitonic Sorter
Bitonic mergesort is a parallel algorithm for sorting. It is also used as a construction method for building a sorting network. The algorithm was devised by Ken Batcher. The resulting sorting networks consist of O(n\log^2(n)) comparators and have a delay of O(\log^2(n)), where n is the number of items to be sorted. This makes it a popular choice for sorting large numbers of elements on an architecture which itself contains a large number of parallel execution units running in Lockstep (computing), lockstep, such as a typical Graphics processing unit, GPU. A sorted sequence is a monotonically non-decreasing (or non-increasing) sequence. A ''bitonic'' sequence is a sequence with x_0 \leq \cdots \leq x_k \geq \cdots \geq x_ for some k, 0 \leq k arr[l]) OR (bitwiseAND (i, k) != 0) AND (arr[i] < arr[l]) ) swap the elements arr[i] and arr[l]


See also

* Batcher odd–even mergesort * Pairwise sortin ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Sorting Algorithm
In computer science, a sorting algorithm is an algorithm that puts elements of a List (computing), list into an Total order, order. The most frequently used orders are numerical order and lexicographical order, and either ascending or descending. Efficient sorting is important for optimizing the Algorithmic efficiency, efficiency of other algorithms (such as search algorithm, search and merge algorithm, merge algorithms) that require input data to be in sorted lists. Sorting is also often useful for Canonicalization, canonicalizing data and for producing human-readable output. Formally, the output of any sorting algorithm must satisfy two conditions: # The output is in monotonic order (each element is no smaller/larger than the previous element, according to the required order). # The output is a permutation (a reordering, yet retaining all of the original elements) of the input. Although some algorithms are designed for sequential access, the highest-performing algorithms assum ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  




Locality Of Reference
In computer science, locality of reference, also known as the principle of locality, is the tendency of a processor to access the same set of memory locations repetitively over a short period of time. There are two basic types of reference locality temporal and spatial locality. Temporal locality refers to the reuse of specific data and/or resources within a relatively small time duration. Spatial locality (also termed ''data locality'')"NIST Big Data Interoperability Framework: Volume 1"urn:doi:10.6028/NIST.SP.1500-1r2 refers to the use of data elements within relatively close storage locations. Sequential locality, a special case of spatial locality, occurs when data elements are arranged and accessed linearly, such as traversing the elements in a one-dimensional Array data structure, array. Locality is a type of predictability, predictable behavior that occurs in computer systems. Systems which exhibit strong ''locality of reference'' are good candidates for performance optimiza ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Pairwise Sorting Network
The pairwise sorting network is a sorting network In computer science, comparator networks are abstract devices built up of a fixed number of "wires", carrying values, and comparator modules that connect pairs of wires, swapping the values on the wires if they are not in a desired order. Such ne ... discovered and published by Ian Parberry in 1992 in '' Parallel Processing Letters''. The pairwise sorting network has the same size (number of comparators) and depth as the odd–even mergesort network. At the time of publication, the network was one of several known networks with a depth of O(\log^2 n). It requires n(\log n)(\log n - 1)/4 + n - 1 comparators and has depth (\log n)(\log n + 1)/2. The sorting procedure implemented by the network is as follows (guided by the zero-one principle): # Sort consecutive pairwise bits of the input (corresponds to the first layer of the diagram) # Sort all pairs into lexicographic order by recursively sorting all odd bits and even bits sepa ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Batcher Odd–even Mergesort
Batcher's odd–even mergesort is a generic construction devised by Ken Batcher for sorting networks of size O(''n'' (log ''n'')2) and depth O((log ''n'')2), where ''n'' is the number of items to be sorted. Although it is not asymptotically optimal, Donald Knuth, Knuth concluded in 1998, with respect to the Sorting network#Optimal sorting networks, AKS network that "Batcher's method is much better, unless ''n'' exceeds the total memory capacity of all computers on earth!" It is popularized by the second ''GPU Gems'' book, as an easy way of doing reasonably efficient sorts on graphics-processing hardware. Pseudocode Various recursive and iterative schemes are possible to calculate the indices of the elements to be compared and sorted. This is one iterative technique to generate the indices for sorting n elements: # note: the input sequence is indexed from 0 to (n-1) for p = 1, 2, 4, 8, ... # as long as p = 1 for j = mod(k,p) to (n-1-k) with a step size of 2k ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Butterfly Network
Butterflies are winged insects from the lepidopteran superfamily Papilionoidea, characterized by large, often brightly coloured wings that often fold together when at rest, and a conspicuous, fluttering flight. The oldest butterfly fossils have been dated to the Paleocene, about 56 million years ago, though molecular evidence suggests that they likely originated in the Cretaceous. Butterflies have a four-stage life cycle, and like other holometabolous insects they undergo complete metamorphosis. Winged adults lay eggs on the food plant on which their larvae, known as caterpillars, will feed. The caterpillars grow, sometimes very rapidly, and when fully developed, pupate in a chrysalis. When metamorphosis is complete, the pupal skin splits, the adult insect climbs out, expands its wings to dry, and flies off. Some butterflies, especially in the tropics, have several generations in a year, while others have a single generation, and a few in cold locations may take several ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Sorting Network
In computer science, comparator networks are abstract devices built up of a fixed number of "wires", carrying values, and comparator modules that connect pairs of wires, swapping the values on the wires if they are not in a desired order. Such networks are typically designed to perform sorting algorithm, sorting on fixed numbers of values, in which case they are called sorting networks. Sorting networks differ from general comparison sorts in that they are not capable of handling arbitrarily large inputs, and in that their sequence of comparisons is set in advance, regardless of the outcome of previous comparisons. In order to sort larger amounts of inputs, new sorting networks must be constructed. This independence of comparison sequences is useful for parallel execution and for implementation in computer hardware, hardware. Despite the simplicity of sorting nets, their theory is surprisingly deep and complex. Sorting networks were first studied circa 1954 by Armstrong, Nelson an ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Odd–even Sort
In computing, an odd–even sort or odd–even transposition sort (also known as brick sort or parity sort) is a relatively simple sorting algorithm, developed originally for use on parallel processors with local interconnections. It is a comparison sort related to bubble sort, with which it shares many characteristics. It functions by comparing all odd/even indexed pairs of adjacent elements in the list and swapping pairs where in the wrong order (where the first is larger than the second). The next step repeats this for even/odd indexed pairs (of adjacent elements). Then it alternates between odd/even and even/odd steps until the list is sorted. Sorting on processor arrays On parallel processors, with one value per processor and only local left–right neighbor connections, the processors all concurrently do a compare–exchange operation with their neighbors, alternating between odd–even and even–odd pairings. This algorithm was originally presented, and shown to be eff ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


Batcher Bitonic Mergesort For Eight Inputs
Kenneth Edward Batcher (December 27, 1935 – August 22, 2019) was an American academic who was emeritus professor of Computer Science at Kent State University. He also worked as a computer architect at Goodyear Aerospace in Akron, Ohio for 28 years. Background Kenneth Edward Batcher was born on December 27, 1935 in Queens, New York, to Lois and Ralph Batcher. His parents met at Iowa State University and later relocated to New York City after graduation. His father, Ralph R. Batcher, was the Chief Engineer of The A. H. Grebe Radio Company until its bankruptcy in 1932. Batcher graduated from Brooklyn Technical High School, and then from Iowa State University with B.E. degree in 1957. In 1964, Batcher received his Ph.D. in electrical engineering from the University of Illinois. Batcher died in Stow, Ohio on August 22, 2019, at the age of 83. Career and achievements Among the designs he worked on at Goodyear were the: * Massively Parallel Processor (16,384 custom bit-serial pro ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  


picture info

Graphics Processing Unit
A graphics processing unit (GPU) is a specialized electronic circuit designed for digital image processing and to accelerate computer graphics, being present either as a discrete video card or embedded on motherboards, mobile phones, personal computers, workstations, and game consoles. GPUs were later found to be useful for non-graphic calculations involving embarrassingly parallel problems due to their parallel structure. The ability of GPUs to rapidly perform vast numbers of calculations has led to their adoption in diverse fields including artificial intelligence (AI) where they excel at handling data-intensive and computationally demanding tasks. Other non-graphical uses include the training of neural networks and cryptocurrency mining. History 1970s Arcade system boards have used specialized graphics circuits since the 1970s. In early video game hardware, RAM for frame buffers was expensive, so video chips composited data together as the display was being scann ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]  




Lockstep (computing)
Lockstep systems are fault-tolerant computer systems that run the same set of operations at the same time in parallel. The redundancy (duplication) allows error detection and error correction: the output from lockstep operations can be compared to determine if there has been a fault if there are at least two systems ( dual modular redundancy DMR), and the error can be automatically corrected if there are at least three systems ( triple modular redundancy TMR), via majority vote. The term " lockstep" originates from army usage, where it refers to synchronized walking, in which marchers walk as closely together as physically practical. To run in lockstep, each system is set up to progress from one well-defined state to the next well-defined state. When a new set of inputs reaches the system, it processes them, generates new outputs and updates its state. This set of changes (new inputs, new outputs, new state) is considered to define that step, and must be treated as an atomic t ...
[...More Info...]      
[...Related Items...]     OR:     [Wikipedia]   [Google]   [Baidu]