Porting parallel_invoke to OpenMP