adapt impl to additions in RcppParallel