Parallelized f and jac eval in cpp implem.