Skip to content
API REFERENCEUsage guides →

cellpack::loader::DataSource ​

struct

Module contract · All interfaces

At a glance ​

pub struct DataSource { /* private fields */ }

Every input matrix, numbered by global cell id, with each matrix’s map from its columns to the standard ids (the data side of the panel). Shared by planner and workers.

Member index ​

13 of 13 members

  • resident_metadata_bytesBytes of metadata and maps this source retains for its whole lifetime: chunk metadata, decode tables, the column arena, the mode words and the chunk and matrix tables. Counted by memory_estimate , not by RSS.
  • n_cellsTotal cells of every matrix: the size of the global cell id space.
  • n_pagesPages of all files together, in the global page numbering.
  • vocabSize of the standard id space: ids are 0..vocab .
  • matrix_dtypesElement types of the matrices, in registration order.
  • n_matricesMatrices registered, each a contiguous range of cell ids.
  • page_sizePage size shared by every file of the source, in bytes.
  • max_cell_pagesLargest number of pages one cell spans.
  • fingerprintStable identity of the page layout and cell numbering. Offline plans are bound to it; output column maps do not participate.
  • mapping_fingerprintIdentity including the standard id maps and the chunk metadata.
  • matrix_cellsThe first cell id of a matrix and its row count.
  • cell_pagesThe page run holding one cell: file descriptor (opened with the catalog’s I/O flags), offset of the first page, and page count. Meant for I/O tools measuring the device on the loader’s exact reads.
  • cell_bytesThe exact byte range of one cell: file descriptor, offset and length.

Methods and associated constants ​

resident_metadata_bytes ​

Bytes of metadata and maps this source retains for its whole lifetime: chunk metadata, decode tables, the column arena, the mode words and the chunk and matrix tables. Counted by memory_estimate, not by RSS.

n_cells ​

pub fn n_cells(&self) -> u64

Total cells of every matrix: the size of the global cell id space.

n_pages ​

pub fn n_pages(&self) -> u64

Pages of all files together, in the global page numbering.

vocab ​

pub fn vocab(&self) -> usize

Size of the standard id space: ids are 0..vocab.

matrix_dtypes ​

pub fn matrix_dtypes(&self) -> Vec<Dtype>

Element types of the matrices, in registration order.

n_matrices ​

pub fn n_matrices(&self) -> usize

Matrices registered, each a contiguous range of cell ids.

page_size ​

pub fn page_size(&self) -> usize

Page size shared by every file of the source, in bytes.

max_cell_pages ​

pub fn max_cell_pages(&self) -> usize

Largest number of pages one cell spans.

fingerprint ​

pub fn fingerprint(&self) -> u64

Stable identity of the page layout and cell numbering. Offline plans are bound to it; output column maps do not participate.

mapping_fingerprint ​

pub fn mapping_fingerprint(&self) -> u64

Identity including the standard id maps and the chunk metadata.

matrix_cells ​

pub fn matrix_cells(&self, matrix: u32) -> Option<(CellId, u64)>

The first cell id of a matrix and its row count.

cell_pages ​

pub fn cell_pages(&self, cell: CellId) -> Result<(RawFd, u64, usize)>

The page run holding one cell: file descriptor (opened with the catalog’s I/O flags), offset of the first page, and page count. Meant for I/O tools measuring the device on the loader’s exact reads.

cell_bytes ​

pub fn cell_bytes(&self, cell: CellId) -> Result<(RawFd, u64, usize)>

The exact byte range of one cell: file descriptor, offset and length.

Contract reference ​

See the module reference for semantic input/output rules, units, allocation, mutation, failure behavior, and lifetime requirements. Declarations and documented members are synchronized from the crate source.

Definition