Academic example of mergesort implementation in C (non-parallel and parallel version) with sample python ctypes bindings.
Find a file
2015-03-04 20:56:48 +01:00
.gitignore Initial commit. 2015-03-04 20:51:13 +01:00
LICENSE Initial commit 2015-03-04 20:45:24 +01:00
main.c Initial commit. 2015-03-04 20:51:13 +01:00
ms.c Initial commit. 2015-03-04 20:51:13 +01:00
ms.h Add comments. 2015-03-04 20:56:48 +01:00
pyms.py Initial commit. 2015-03-04 20:51:13 +01:00
README.rst Fix rst layout. 2015-03-04 20:52:59 +01:00
test.py Initial commit. 2015-03-04 20:51:13 +01:00

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