pub struct EaGeometry {
pub idx_blk_elmts: u64,
pub data_blk_min_elmts: u64,
pub dblk_page_nelmts: u64,
pub iblock_nsblks: usize,
pub ndblk_addrs: usize,
pub nsblk_addrs: usize,
pub sblk: Vec<EaSblkInfo>,
}Expand description
Extensible-array geometry derived from the creation parameters, matching
the libhdf5 on-disk layout (H5EA__hdr_init, H5EAiblock.c).
Fields§
§idx_blk_elmts: u64§data_blk_min_elmts: u64§dblk_page_nelmts: u64Elements per data block page (paging threshold).
iblock_nsblks: usizeSuper blocks whose data-block addresses live in the index block.
ndblk_addrs: usizeData-block address slots in the index block.
nsblk_addrs: usizeSuper-block address slots in the index block.
sblk: Vec<EaSblkInfo>Per-super-block layout, length = total super-block count.
Implementations§
Source§impl EaGeometry
impl EaGeometry
Sourcepub fn new(
idx_blk_elmts: u8,
data_blk_min_elmts: u8,
sup_blk_min_data_ptrs: u8,
max_nelmts_bits: u8,
max_dblk_page_nelmts_bits: u8,
) -> FormatResult<Self>
pub fn new( idx_blk_elmts: u8, data_blk_min_elmts: u8, sup_blk_min_data_ptrs: u8, max_nelmts_bits: u8, max_dblk_page_nelmts_bits: u8, ) -> FormatResult<Self>
Derive the geometry from the EA creation parameters.
All parameters originate from a decoded file (the data-layout
message), so this validates them and returns a FormatError rather
than panicking on malformed or hostile input.
Sourcepub fn sblk_index(&self, idx: u64) -> usize
pub fn sblk_index(&self, idx: u64) -> usize
Super-block index containing chunk idx (idx >= idx_blk_elmts).
Sourcepub fn is_sblk_paged(&self, u: usize) -> bool
pub fn is_sblk_paged(&self, u: usize) -> bool
Whether super block u’s data blocks are paged (data block larger
than one page).
Sourcepub fn dblk_page_init_size(&self, u: usize) -> usize
pub fn dblk_page_init_size(&self, u: usize) -> usize
Size of the page-init bitmap for one data block of super block u.
Sourcepub fn dblk_page_size(&self, raw_elmt_size: usize) -> usize
pub fn dblk_page_size(&self, raw_elmt_size: usize) -> usize
On-disk size of one data block page (H5EA_DBLK_PAGE_SIZE).
Sourcepub fn dblk_prefix_size(&self, sizeof_addr: u8, max_nelmts_bits: u8) -> usize
pub fn dblk_prefix_size(&self, sizeof_addr: u8, max_nelmts_bits: u8) -> usize
On-disk size of a data block prefix (H5EA_DBLOCK_PREFIX_SIZE):
magic + version + class + header addr + block offset + checksum.
Sourcepub fn locate(&self, idx: u64) -> FormatResult<EaLoc>
pub fn locate(&self, idx: u64) -> FormatResult<EaLoc>
Locate chunk idx within the array.
Returns an error when idx exceeds the array’s capacity (rather than
panicking on an out-of-bounds super-block index).
Trait Implementations§
Source§impl Clone for EaGeometry
impl Clone for EaGeometry
Source§fn clone(&self) -> EaGeometry
fn clone(&self) -> EaGeometry
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more