dgeMatrix,
dpoMatrix, dtrMatrix or dtpMatrix.
"solve"(A, b, ...)
"solve"(A, b, ...)
"solve"(A, b, ...)
"solve"(A, b, ...)signature(A = "dgeMatrix", b = "missing"): Sets b as
the identity matrix and calculates inverse of A; Uses PLASMA_dgetri or magma_dgetri
for multi-core CPU and GPU respectively. Also uses some LAPACK dgetri to test singularity.signature(A = "dgeMatrix", b = "ddenseMatrix"): Solves a linear system
where b inherits from ddenseMatrix. If the routine is calling MAGMA "magma_dgetrs_gpu" is
called. If PLASMA is chosen "PLASMA_dgetrs" is called.signature(A = "dgeMatrix", b = "matrix"): Solves a linear system
where b is of type matrix from the R base. If the routine is calling MAGMA "magma_dgetrs_gpu" is
called. If PLASMA is chosen "PLASMA_dgetrs" is called.signature(A = "dgeMatrix", b = "sparseMatrix"): Solves a linear system
where b is a sparseMatrix from the Matrix package. For this routine the sparse matrix is coerced to a real dense matrix.
If the routine is calling MAGMA "magma_dgetrs_gpu" is
called. If PLASMA is chosen "PLASMA_dgetrs" is called.signature(A = "dpoMatrix", b = "missing"): Sets b as
the identity matrix and calculates inverse of A; Uses "PLASMA_dgetri" or "magma_dpotri_gpu"
for multi-core CPU and GPU respectively.signature(A = "dpoMatrix", b = "dgeMatrix"): Solves a linear system
where b is of type dgeMatrix. If the routine is calling MAGMA "magma_dpotrs_gpu" is
called. If PLASMA is chosen "PLASMA_dpotrs" is called.signature(A = "dpoMatrix", b = "matrix"): Solves a linear system
where b is of type matrix from the R base. If the routine is calling MAGMA "magma_dpotrs_gpu" is
called. If PLASMA is chosen "PLASMA_dpotrs" is called.signature(A = "dtpMatrix", b = "missing"): Sets b as
the identity matrix and calculates inverse of A; This is only supported on the GPU
so there is no PLASMA call here. Also the CUBLAS library is called here using cublasDtpsvsignature(A = "dtpMatrix", b = "ddenseMatrix"): Solves a linear system
where b inherits from ddenseMatrix. Again there is no MAGMA or PLASMA support for the dtpMatrix type
but for GPU capable systems we call cublasDtpsv.signature(A = "dtrMatrix", b = "missing"): Sets b as
the identity matrix and calculates inverse of A; Uses "PLASMA_dtrtri" or "magma_dtrtri"
for multi-core CPU and GPU respectively.signature(A = "dtrMatrix", b = "ddenseMatrix"): Solves a linear system where b inherits from ddenseMatrix. If the routine is calling MAGMA "magma_dtrsm" is called. If PLASMA is chosen "PLASMA_dtrsm" is called.signature(A = "dtrMatrix", b = "matrix"): Solves a linear system
where b is of type matrix from the R base. If the routine is calling MAGMA "magma_dtrsm" is
called. If PLASMA is chosen "PLASMA_dtrsm" is called.signature(A = "dtrMatrix", b = "Matrix"): Solves a linear system
where b inherits from Matrix. If the routine is calling MAGMA "magma_dtrsm" is
called. If PLASMA is chosen "PLASMA_dtrsm" is called.signature(A = "dtrMatrix", b = "dMatrix"): Solves a linear system
where b inherits from Matrix. If the routine is calling MAGMA "magma_dtrsm" is
called. If PLASMA is chosen "PLASMA_dtrsm" is called. p <- 128
A <- Matrix(rnorm(p*p), p, p) # random square matrix for large p
x_init <- vector("numeric", p)
b <- A
x <- solve(A, b)
stopifnot(identical(x, x_init))
Run the code above in your browser using DataLab