Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision | |||
| habrok:examples:r [2025/06/11 12:14] – lint pedro | habrok:examples:r [2025/06/11 12:15] (current) – [Multiple CPUs] lint pedro | ||
|---|---|---|---|
| Line 86: | Line 86: | ||
| cpu <- Sys.getenv(" | cpu <- Sys.getenv(" | ||
| - | hosts <- rep(" | + | hosts <- rep(" |
| cl <- makeCluster(hosts, | cl <- makeCluster(hosts, | ||
| # Create random matrices. | # Create random matrices. | ||
| n <- 5000 | n <- 5000 | ||
| - | A <- matrix(rnorm(n^2), | + | A <- matrix(rnorm(n^2), |
| - | B <- matrix(rnorm(n^2), | + | B <- matrix(rnorm(n^2), |
| # Single core time of matrix multiplication of matrices | # Single core time of matrix multiplication of matrices | ||