bdblockmult_hdf5: Block matrix multiplication with hdf5 datasets

View source: R/blockmult_hdf5.R

bdblockmult_hdf5R Documentation

Block matrix multiplication with hdf5 datasets

Description

This function performs a block matrix-matrix multiplication with mattrix stored in HDF5 file

Usage

bdblockmult_hdf5(
  filename,
  group,
  a,
  b,
  groupB = NULL,
  block_size = 128,
  paral = FALSE,
  threads = NULL,
  mixblock_size = 128,
  outgroup = "OUTPUT",
  outdataset = NULL
)

Arguments

filename

string file name where dataset to normalize is stored

group

string with the group name where matrix is stored inside HDF5 file

a

a double matrix.

b

a double matrix.

groupB,

string, (optional) group name where dataset b is stored

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 = FALSE) paral = true –> TO BE IMPLEMENTED

threads

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

mixblock_size

(optiona, default = 128), only if we are working with big matrix and parallel computation = true. Block size for mixed computation in big matrix parallel. Size of the block to be used to perform parallelized memory memory of the block read from the disk being processed.

outgroup

(optional) string with group name where we want to store the result matrix

outdataset

(optional) string with dataset name where we want to store the results

Value

A list with an HDF5 object with numerical matrix and HDF5 file name with results

####

  • "res"rhdf5 object with result matrix - link to hdf5 file contents . IMPORTANT !!, we have to close the object after fihish to work

  • "file"string with hdf5 file name with result and original matrixs

  • "dataset"string complete path inside hdf5 file where results are stored.

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)

C <- bdblockmult(A, B, 128, TRUE)


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