flexiblas-threads | R Documentation |
Get or set the number of threads for the BLAS backend.
flexiblas_get_num_threads()
flexiblas_set_num_threads(n)
n |
number of threads. |
flexiblas_get_num_threads
returns the number of threads.
flexiblas_set_num_threads
returns nothing.
flexiblas_avail, flexiblas_version, flexiblas-backends
max_threads <- 4
n <- 2000
runs <- 10
A <- matrix(runif(n*n), nrow=n)
B <- matrix(runif(n*n), nrow=n)
for (i in seq_len(max_threads)) {
message("Set number of threads to: ", i)
flexiblas_set_num_threads(i)
print(system.time({
for (j in seq_len(runs))
C <- A %*% B
}))
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.