A Header for Multithreaded Programming
Roman Pearce, CECM, Simon Fraser University
We present a small C header for cross platform parallel programming based the SDMP library which is now part of Maple. The header consists of macros and functions for starting and stopping threads, finding the number cores, measuring time, and locking outside of the OS scheduler. In this programming model, a thread is created for each cpu core, the data is divided manually, and the program runs with minimal interruption. Efficiency is achieved using cache-conscious, non-blocking design. We present two examples: classical dense polynomial multiplication and radix sort, and discuss how these algorithms can be parallelized.