In a parallel code with Rcpp, I convert a NumericVector variable to RcppParallel::RVector<double>. I also convert a NumericMatrix variable to RcppParallel::RMatrix<double>.
To speed up the code, I would like to use float variables instead of double. Hence, I would like to convert a NumericVector variable to something like RcppParallel::RVector<float> and a NumericMatrix variable to something like RcppParallel::RMatrix<float>.
Is it possible? If so, could you provide an example?