inst/batchtests/matmult.r

suppressPackageStartupMessages(library(kazaam))

y = matrix(c(-1, 1, 0, 1), 2)


if (comm.rank() == 0){
  x = matrix(rnorm(30), 15)
  mm = x %*% y
} else {
  x = NULL
}



dx = expand(x)

mm_test = collapse(dx %*% y)

comm.print(all.equal(mm, mm_test))

finalize()

Try the kazaam package in your browser

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

kazaam documentation built on May 2, 2019, 8:55 a.m.