bes Updated for version 3.20.13
dmrpp::SuperChunk Class Reference

A SuperChunk is a collection of contiguous Chunk objects along with optimized methods for data retrieval and inflation. More...

#include <SuperChunk.h>

Collaboration diagram for dmrpp::SuperChunk:
Collaboration graph

Public Member Functions

virtual bool add_chunk (std::shared_ptr< Chunk > candidate_chunk)
 Attempts to add a new Chunk to this SuperChunk.
 
virtual void dump (std::ostream &strm) const
 Writes the to_string() output to the stream strm.
 
virtual bool empty ()
 
std::vector< std::shared_ptr< Chunk > > get_chunks ()
 
std::shared_ptr< http::urlget_data_url ()
 
virtual unsigned long long get_offset () const
 
virtual unsigned long long get_size () const
 
virtual std::string id () const
 
virtual void process_child_chunks ()
 Reads the SuperChunk, inflates/de-shuffles the subordinate chunks as required and copies the values into array.
 
virtual void process_child_chunks_unconstrained ()
 Reads the SuperChunk, inflates/deshuffles the subordinate chunks as required and copies the values into array.
 
virtual void read ()
 
virtual void read_unconstrained ()
 
virtual void retrieve_data ()
 Cause the SuperChunk and all of it's subordinate Chunks to be read.
 
 SuperChunk (const std::string sc_id, DmrppArray *parent=nullptr)
 
std::string to_string (bool verbose) const
 Makes a string representation of the SuperChunk.
 

Detailed Description

A SuperChunk is a collection of contiguous Chunk objects along with optimized methods for data retrieval and inflation.

Definition at line 44 of file SuperChunk.h.

Constructor & Destructor Documentation

◆ SuperChunk()

dmrpp::SuperChunk::SuperChunk ( const std::string  sc_id,
DmrppArray parent = nullptr 
)
inlineexplicit

Definition at line 64 of file SuperChunk.h.

◆ ~SuperChunk()

virtual dmrpp::SuperChunk::~SuperChunk ( )
inlinevirtual

Definition at line 67 of file SuperChunk.h.

Member Function Documentation

◆ add_chunk()

bool dmrpp::SuperChunk::add_chunk ( std::shared_ptr< Chunk candidate_chunk)
virtual

Attempts to add a new Chunk to this SuperChunk.

The candidate_chunk is added to this SuperChunk if: it is contiguous with the end of the this SuperChunk and has the same data_url. Note that if the SuperChunk is empty, candidate_chunk meets those criteria by default.

Note
This method was modified to support fill value chunks as part of the work on HYRAX-635. As a stop-gap implementation, each fill value chunk will get its own SuperChunk, even though that is not the most efficient way forward. See HYRAX-713 for a bit more on this. To add FV chunk support, FV chunks can ony be added when d_chunks is empty. Thus, the is_contiguous(...) test must fail if the chunk uses fill values. To make this hack easier to unwind later on, I'm going to make that test right here - so it's obvious. jhrg 5/7/22
Todo:
Should candidate_chunk be passed by reference? Maybe calls to this method should use move()? jhrg 5/7/22
Todo:
Should this only be called when d_chunks is not empty? jhrg 5/7/22
Parameters
candidate_chunkThe Chunk to add.
Returns
True when the chunk is added, false otherwise.

Definition at line 425 of file SuperChunk.cc.

◆ dump()

void dmrpp::SuperChunk::dump ( std::ostream &  strm) const
virtual

Writes the to_string() output to the stream strm.

Parameters
strm

Definition at line 696 of file SuperChunk.cc.

◆ empty()

virtual bool dmrpp::SuperChunk::empty ( )
inlinevirtual

Definition at line 93 of file SuperChunk.h.

◆ get_chunks()

std::vector< std::shared_ptr< Chunk > > dmrpp::SuperChunk::get_chunks ( )
inline

Definition at line 95 of file SuperChunk.h.

◆ get_data_url()

std::shared_ptr< http::url > dmrpp::SuperChunk::get_data_url ( )
inline

Definition at line 75 of file SuperChunk.h.

◆ get_offset()

virtual unsigned long long dmrpp::SuperChunk::get_offset ( ) const
inlinevirtual

Definition at line 77 of file SuperChunk.h.

◆ get_size()

virtual unsigned long long dmrpp::SuperChunk::get_size ( ) const
inlinevirtual

Definition at line 76 of file SuperChunk.h.

◆ id()

virtual std::string dmrpp::SuperChunk::id ( ) const
inlinevirtual

Definition at line 71 of file SuperChunk.h.

◆ process_child_chunks()

void dmrpp::SuperChunk::process_child_chunks ( )
virtual

Reads the SuperChunk, inflates/de-shuffles the subordinate chunks as required and copies the values into array.

Parameters
target_arrayThe array into which to write the data.

Definition at line 596 of file SuperChunk.cc.

◆ process_child_chunks_unconstrained()

void dmrpp::SuperChunk::process_child_chunks_unconstrained ( )
virtual

Reads the SuperChunk, inflates/deshuffles the subordinate chunks as required and copies the values into array.

Parameters
target_arrayThe array into which to write the data.

Definition at line 634 of file SuperChunk.cc.

◆ read()

virtual void dmrpp::SuperChunk::read ( )
inlinevirtual

Definition at line 79 of file SuperChunk.h.

◆ read_unconstrained()

virtual void dmrpp::SuperChunk::read_unconstrained ( )
inlinevirtual

Definition at line 84 of file SuperChunk.h.

◆ retrieve_data()

void dmrpp::SuperChunk::retrieve_data ( )
virtual

Cause the SuperChunk and all of it's subordinate Chunks to be read.

Definition at line 549 of file SuperChunk.cc.

◆ to_string()

string dmrpp::SuperChunk::to_string ( bool  verbose = false) const

Makes a string representation of the SuperChunk.

Parameters
verboseIf set true then details of the subordinate Chunks will be included.
Returns
A string representation of the SuperChunk.

Definition at line 675 of file SuperChunk.cc.


The documentation for this class was generated from the following files: