A SuperChunk is a collection of contiguous Chunk objects along with optimized methods for data retrieval and inflation.
More...
#include <SuperChunk.h>
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.
◆ SuperChunk()
dmrpp::SuperChunk::SuperChunk |
( |
const std::string & | sc_id, |
|
|
DmrppArray * | parent = nullptr ) |
|
inlineexplicit |
◆ ~SuperChunk()
virtual dmrpp::SuperChunk::~SuperChunk |
( |
| ) |
|
|
inlinevirtual |
◆ 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_chunk | The Chunk to add. |
- Returns
- True when the chunk is added, false otherwise.
Definition at line 524 of file SuperChunk.cc.
◆ add_chunk_non_contiguous()
bool dmrpp::SuperChunk::add_chunk_non_contiguous |
( |
std::shared_ptr< Chunk > | candidate_chunk, |
|
|
unsigned long long & | end_pos ) |
|
virtual |
◆ dump()
void dmrpp::SuperChunk::dump |
( |
std::ostream & | strm | ) |
const |
|
virtual |
◆ empty()
virtual bool dmrpp::SuperChunk::empty |
( |
| ) |
const |
|
inlinevirtual |
◆ get_data_url()
std::shared_ptr< http::url > dmrpp::SuperChunk::get_data_url |
( |
| ) |
|
|
inline |
◆ get_non_contiguous_chunk_flag()
bool dmrpp::SuperChunk::get_non_contiguous_chunk_flag |
( |
| ) |
const |
|
inline |
◆ get_offset()
virtual unsigned long long dmrpp::SuperChunk::get_offset |
( |
| ) |
const |
|
inlinevirtual |
◆ get_size()
virtual unsigned long long dmrpp::SuperChunk::get_size |
( |
| ) |
const |
|
inlinevirtual |
◆ id()
virtual std::string dmrpp::SuperChunk::id |
( |
| ) |
const |
|
inlinevirtual |
◆ 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_array | The array into which to write the data. |
Definition at line 800 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_array | The array into which to write the data. |
Definition at line 836 of file SuperChunk.cc.
◆ read()
virtual void dmrpp::SuperChunk::read |
( |
| ) |
|
|
inlinevirtual |
◆ read_unconstrained()
virtual void dmrpp::SuperChunk::read_unconstrained |
( |
| ) |
|
|
inlinevirtual |
◆ read_unconstrained_dio()
void dmrpp::SuperChunk::read_unconstrained_dio |
( |
| ) |
|
|
virtual |
◆ retrieve_data()
void dmrpp::SuperChunk::retrieve_data |
( |
| ) |
|
|
virtual |
◆ retrieve_data_dio()
void dmrpp::SuperChunk::retrieve_data_dio |
( |
| ) |
|
|
virtual |
◆ set_non_contiguous_chunk_flag()
void dmrpp::SuperChunk::set_non_contiguous_chunk_flag |
( |
bool | flag | ) |
|
|
inline |
◆ to_string()
string dmrpp::SuperChunk::to_string |
( |
bool | verbose = false | ) |
const |
Makes a string representation of the SuperChunk.
- Parameters
-
verbose | If set true then details of the subordinate Chunks will be included. |
- Returns
- A string representation of the SuperChunk.
Definition at line 874 of file SuperChunk.cc.
◆ SuperChunkTest
friend class SuperChunkTest |
|
friend |
The documentation for this class was generated from the following files: