bdtCrossprod_Weighted: Block matrix multiplication with Delayed Array Object

View source: R/RcppExports.R

bdtCrossprod_WeightedR Documentation

Block matrix multiplication with Delayed Array Object

Description

This function performs a Crossproduct with weigths matrix A

Usage

bdtCrossprod_Weighted(A, W, block_size = NULL, paral = NULL, threads = NULL)

Arguments

A

a double matrix.

W

a Weighted matrix

block_size

(optional, defalut = 128) block size to make matrix multiplication, if 'block_size = 1' no block size is applied (size 1 = 1 element per block)

paral,

(optional, default = TRUE) if paral = TRUE performs parallel computation else performs seria computation

threads

(optional) only if bparal = true, number of concurrent threads in parallelization if threads is null then threads = maximum number of threads available

Value

Matrix with A

Examples


# with numeric matrix
m <- 500
k <- 1500
n <- 400
A <- matrix(rnorm(n*k), nrow=n, ncol=k)
B <- matrix(rnorm(n*k), nrow=k, ncol=n)

# Serial execution
Serie<- bdtCrossprod_Weighted(A, B, paral = FALSE)

# Parallel execution with 2 threads and blocks 256x256
Par_2cor <- bdtCrossprod_Weighted(A, B, paral = TRUE, block_size = 256, threads = 2)

BigDataStatMeth documentation built on March 30, 2022, 1:07 a.m.