Implementation of Prim's algorithm in 3 flavors - serial, pthreads and C++ AMP