Skip to contents

massive_matrix() describes a row-major float32 file without loading it. Raw .f32 files require dimensions; ANN .fbin files contain two little-endian unsigned 32-bit dimensions followed by row-major float32 values. access = "mmap" maps the file into virtual address space on POSIX systems; it does not read the whole file into RAM. A descriptor records the file size and modification time and rejects later reads if either changes; recreate it after intentionally replacing the input.

Usage

massive_matrix(
  x,
  nrow = NULL,
  ncol = NULL,
  format = NULL,
  access = c("stream", "mmap")
)

Arguments

x

File path or an ordinary double-precision R matrix. A matrix source is useful for checking experimental algorithms, but is already resident in RAM.

nrow, ncol

Dimensions of a headerless .f32 file.

format

One of "f32" or "fbin"; inferred from the suffix.

access

"stream" or "mmap" for file sources.

Value

A lightweight fastEmbedR_massive_matrix descriptor.