ParallelMerging Module
This module implements a teaching tool for parallel merge sort
Functions and values
| Function or value | Description |
Full Usage:
ParallelMergeSort x
Parameters:
int[]
Returns: int array
|
Parallel merge sort is simply based on a recursive application of a parallel merging algorithm: We spit the given list into two halves, sort them recursively, and merge the obtained sorted lists with the parallel merging algorithm.
|
Full Usage:
ParallelMerging a b
Parameters:
int[]
b : int[]
Returns: int[]
|
Parallel merging of two sorted lists is done by partitioning these lists into pairs of B blocks (a[i(k)..i(k+1)-1],b[j(k)..j(k+1)-1]) so that the concatenation of these merged blocks results in the sorted sequence. Clearly, the merging of the pairs (a[i(k)..i(k+1)-1],b[j(k)..j(k+1)-1]) can be done in parallel.
|
|
This function is to be called by a teaching tool's html page. It will parse a general simplex problem, will solve it and print the results to the html page.
|
Full Usage:
Ranking a b
Parameters:
int[][]
b : int[][]
Returns: bool[][] * int[] * int[] * bool[][] * int[] * (int[] * int array)[]
|
Ranking determines the ranks of a in b, i.e., we partition array a into blocks a[i*N..(i+1)*N-1] with N:=sqrt(a.Length) and then determine a partition of array b such that the pairs of block (a[i],b[i]) can be used for parallel merging, i.e., once these blocks were merged into a sorted sequence, their concatenation yields the sorted list of the given array a and b.
|
Full Usage:
SequentialMerging a b
Parameters:
int[]
b : int[]
Returns: int[]
|
|
|
|
F#
Averest