First stab at a parallel C++ version.