inst/tests/runit.transform.R

library(Rcpp)
library(RUnit)

sourceCpp(system.file("tests/cpp/transform.cpp", package = "RcppParallel"))

test.transform <- function() {
   
   m <- matrix(as.numeric(c(1:1000000)), nrow = 1000, ncol = 1000)
   
   checkEquals(
      matrixSqrt(m), 
      parallelMatrixSqrt(m)
   )   
}

Try the RcppParallel package in your browser

Any scripts or data that you put into this service are public.

RcppParallel documentation built on March 7, 2023, 7:05 p.m.