Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Array.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1337,6 +1337,8 @@ void Array::dump(std::ostream &strm) const {
*/
void Array::set_var_storage_info(const var_storage_info &my_vs_info) {

vs_info.has_filled_chunks = my_vs_info.has_filled_chunks;

vs_info.filter = my_vs_info.filter;

for (const auto &def_lev : my_vs_info.deflate_levels)
Expand Down
14 changes: 14 additions & 0 deletions Array.h
Original file line number Diff line number Diff line change
Expand Up @@ -191,6 +191,7 @@ class Array : public Vector {

/** @brief Storage layout and filter metadata for direct-I/O reads. */
struct var_storage_info {
bool has_filled_chunks; ///< Whether this array has chunks that only contain filled values.
string filter; ///< Filter pipeline description.
vector<unsigned int> deflate_levels; ///< Deflate levels per filter stage.
vector<size_t> chunk_dims; ///< Chunk dimensions in row-major order.
Expand All @@ -205,6 +206,8 @@ class Array : public Vector {
bool direct_io_flag = false;
var_storage_info vs_info;

float storage_size_ratio = 1;

void update_dimension_pointers(D4Group *grp);
void print_dim_element(const XMLWriter &xml, const dimension &d, bool constrained);

Expand Down Expand Up @@ -502,6 +505,17 @@ class Array : public Vector {
* @param my_vs_info New storage metadata.
*/
void set_var_storage_info(const var_storage_info &my_vs_info);

// The following methods are for the applications that care about storage size.

/** @brief Returns the ratio of logical size to the real storage size for this array. */
float get_storage_size_ratio() const { return storage_size_ratio; }

/**
* @brief set the ratio of the logical size to the real storage size for this array.
* @param the ratio of the logical size to the real storage size for this array.
*/
void set_storage_size_ratio(float sr) { storage_size_ratio = sr; }
};

} // namespace libdap
Expand Down
Loading