File: runit.innerproduct.R

package info (click to toggle)
r-cran-rcppparallel 5.1.6%2Bdfsg-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 544 kB
  • sloc: cpp: 1,848; sh: 19; makefile: 3
file content (13 lines) | stat: -rw-r--r-- 252 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13

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

test.innerproduct <- function() {
   
   x <- runif(1000000)
   y <- runif(1000000)
   
   checkEquals(
      innerProduct(x, y), 
      parallelInnerProduct(x, y)
   )
}