Academic example of mergesort implementation in C (non-parallel and parallel version) with sample python ctypes bindings.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Darko 2c129e97a1 Add comments. 7 years ago
.gitignore Initial commit. 7 years ago
LICENSE Initial commit 7 years ago
README.rst Fix rst layout. 7 years ago
main.c Initial commit. 7 years ago
ms.c Initial commit. 7 years ago
ms.h Add comments. 7 years ago
pyms.py Initial commit. 7 years ago
test.py Initial commit. 7 years ago

README.rst

mergesort
=========

Academic example of merge sort implementation in C.
Implementation includes one process version and parallel
implementation using limited fork()s and example python
bindings using ctypes.

Contents
========

* ms.h, ms.c - merge sort implementation
* main.c - sample test of using merge sort implementation with time measurement
* pyms.py - sample python bindings using ctypes
* test.py - sample test of using pyms

Compile shared library with

.. code:: bash

cc -c -Wall -Werror -fpic ms.c
cc -shared -o libms.so ms.o

and sample C program (set LD_LIBRARY_PATH before running it)

.. code:: bash

cc -Wall -o test ms.c main.c