| 38-MPCR GEMM | R Documentation |
Performs matrix-matrix multiplication of two given MPCR matrices to performs:
C = alpha A * B + beta C
C = alpha A A^T + beta C
## S4 method for signature 'Rcpp_MPCR'
MPCR.gemm(a,b = NULL,c,transpose_a= FALSE,transpose_b=FALSE,alpha=1,beta=0)
a |
An MPCR matrix A. |
b |
An MPCR matrix B, if NULL, the function will perform syrk operation from blas. |
c |
Input/Output MPCR matrix C. |
transpose_a |
A flag to indicate whether transpose matrix A should be used, if B is NULL and transpose_a =TRUE
|
transpose_b |
A flag to indicate whether transpose matrix B should be used. |
alpha |
Specifies the scalar alpha. |
beta |
Specifies the scalar beta. |
An MPCR matrix.
## Not run:
library(MPCR)
# create 3 MPCR matrices a,b,c
a <- as.MPCR(1:12, 3, 4, "double")
b <- as.MPCR(1:20, 4, 5, "double")
c <- as.MPCR(matrix(0, 3, 5), 3, 5, "double")
print(c)
MPCR.gemm(a,b,c,transpose_a=FALSE,transpose_b=TRUE,alpha=1,beta=1)
print(c)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.