README
======
ginors_sort is an implementation of radix sort. See algorithm.txt for more
informations.
The structure of the data to be sorted have to look like:
struct {
unsigned (char/short/int/long) key;
[...]
}
the algorithm assumes that the key ist a bitpattern (e.g. unsigned integer)
which has to be sorted in ascending order (little-endian for now). In the
current implementation the struct has to begin with the key.
compilation:
------------
switch to the source code folder and type:
make
this should compile three files:
* libginors.a: library with the sorting function. You can use it in your own
code.
* ginors_sort: Tool for testing purpose.
* challange: A tool to compare the speed between ginors sort and the standard
"qsort" libc-function
ginors_sort:
------------
> ginors_sort -m MODE -s SIZE INPUT OUTPUT
where MODE is char/short/int/long (default: char) and SIZE is the size of your
data in bytes (default: 1).
If you want to sort e.g. the characters of the GPL type:
> ginors_sort -m char -s 1 gpl_v2.txt gpl_v2.txt.sort
or simply:
> ginors_sort gpl_v2.txt gpl_v2.txt.sort
The data size may not be smaller than the key size, e.g.:
> ginors_sort -m long -s 3 mydata mydata.sort
warning: object size: 4; key size: 3
warning: object size adjusted to key size
challange:
----------
Uses the same command line parameters as ginors_sort.