Got pthreads in its own file- CUDA compiler doesn't support pthreads.. such a pain.