| Title: | Rust Backend for edgeicg |
|---|---|
| Description: | Compiled kernels for the edgeicg package: a generic cross-product (t(x) %*% y) through faer's cache-blocked, SIMD matrix multiply, so the method's hotspot runs fast on every platform independent of the BLAS R is linked to. |
| Authors: | Ruben Dries [aut, cre] |
| Maintainer: | Ruben Dries <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-11-24 18:25:08 UTC |
| Source: | https://github.com/drieslab/edgeicgrs |
crossprod_rs(x, y) is crossprod(x, y) (that is t(x) %*% y) and matprod_rs(x, y) is x %*% y, both computed by faer's matrix multiply in Rust:
cache-blocked and SIMD on every platform, so its speed does not depend on the BLAS R is linked to (R's
reference BLAS is the default on macOS and Windows). It is the kernel edgeicg uses for its sweeps
(edgeicg(backend = "auto") picks it up when this package is installed), and it is generic: any two numeric
matrices (or vectors, taken as one-column matrices) with conforming dimensions.
crossprod_rs(x, y, threads = 1L) matprod_rs(x, y, threads = 1L)crossprod_rs(x, y, threads = 1L) matprod_rs(x, y, threads = 1L)
x, y
|
numeric matrices (or vectors). Integer input is converted to double; dimnames are not carried over. |
threads |
threads for the product: 1 (default) runs on the calling thread, which is what parallel workers should use; 0 uses all cores. |
t(x) %*% y (ncol(x) x ncol(y)), or x %*% y (nrow(x) x ncol(y)).
x <- matrix(rnorm(2000), 200); y <- matrix(rnorm(6000), 200) all.equal(crossprod_rs(x, y), crossprod(x, y), check.attributes = FALSE)x <- matrix(rnorm(2000), 200); y <- matrix(rnorm(6000), 200) all.equal(crossprod_rs(x, y), crossprod(x, y), check.attributes = FALSE)