single implementation of parallel work for both tbb and std