getBestChunkDims: Get best chunk dimensions

Description Usage Arguments Details Value Author(s) Examples

View source: R/getBestChunkDims.R

Description

Computes the optimal chunk dimensions for consecutive row/column access from a HDF5Matrix.

Usage

1

Arguments

dims

An integer vector of length 2 containing the dimensions of a HDF5Matrix object.

Details

Consider a HDF5Matrix where access to consecutive rows or columns is requested. The optimal chunk dimensions ensure that the number of disk reads required is the same as that of a file layout with pure row or column chunks. This exploits the HDF5 chunk cache to store data from neighbouring rows/columns, avoiding the need to reread or rewrite the entire chunk for the next row/column. Obviously, this is not relevant to situations involving random row or column access.

Value

An integer vector of length 2, containing the dimensions of each chunk in the HDF5 file.

Author(s)

Aaron Lun

Examples

1
2
getBestChunkDims(c(10340, 234))
getBestChunkDims(c(13400, 2068))

beachmat documentation built on Nov. 1, 2018, 4:22 a.m.