Implementing C++ std namespace algorithms as parallel functions using boost threads