MPCRGemm: MPCR GEMM (Matrix-Matrix Multiplication)

38-MPCR GEMMR Documentation

MPCR GEMM (Matrix-Matrix Multiplication)

Description

Performs matrix-matrix multiplication of two given MPCR matrices to performs:
C = alpha A * B + beta C
C = alpha A A^T + beta C

Usage


## S4 method for signature 'Rcpp_MPCR'
MPCR.gemm(a,b = NULL,c,transpose_a= FALSE,transpose_b=FALSE,alpha=1,beta=0)
   

Arguments

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
The function will perform the following operation:
C=alphaA^TXA+betaC.

transpose_b

A flag to indicate whether transpose matrix B should be used.

alpha

Specifies the scalar alpha.

beta

Specifies the scalar beta.

Value

An MPCR matrix.

Examples

   ## 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)
 

MPCR documentation built on Aug. 23, 2026, 5:10 p.m.

Related to MPCRGemm in MPCR...