cache.gdsn: Caching variable data

View source: R/gdsfmt-main.r

cache.gdsnR Documentation

Caching variable data

Description

Caching the data associated with a GDS variable

Usage

cache.gdsn(node)

Arguments

node

an object of class gdsn.class, a GDS node

Details

If random access of array-based data is required, it is possible to speed up the access time by caching data in memory. This function tries to force the operating system to cache the data associated with the GDS node, however how to cache data depends on the configuration of operating system, including system memory and caching strategy. Note that this function does not explicitly allocate memory for the data.

If the data has been compressed, caching strategy almost has no effect on random access, since the data has to be decompressed serially.

Value

None.

Author(s)

Xiuwen Zheng

See Also

read.gdsn

Examples

# cteate a GDS file
f <- createfn.gds("test.gds")

n <- add.gdsn(f, "int.matrix", matrix(1:50*100, nrow=100, ncol=50))
n

cache.gdsn(n)

# close the GDS file
closefn.gds(f)

# delete the temporary file
unlink("test.gds", force=TRUE)

zhengxwen/gdsfmt documentation built on Sept. 27, 2024, 10:08 a.m.