Utopia  2
Framework for studying models of complex & adaptive systems.
Namespaces | Functions
hdfchunking.hh File Reference
#include <numeric>
#include <sstream>
#include <hdf5.h>
#include "../core/logging.hh"
#include "hdfutilities.hh"
Include dependency graph for hdfchunking.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 Utopia
 
 Utopia::DataIO
 
 Utopia::DataIO::_chunk_helpers
 

Functions

template<typename Cont , typename Predicate >
std::vector< unsigned short > Utopia::DataIO::_chunk_helpers::find_all_idcs (Cont &vec, Predicate pred)
 Finds all indices of elements in a vector that matches the given predicate. More...
 
template<typename Cont = std::vector< hsize_t >>
std::string Utopia::DataIO::_chunk_helpers::to_str (const Cont &vec)
 Helper function to create a string representation of containers. More...
 
template<typename Cont , typename Logger >
void Utopia::DataIO::_chunk_helpers::opt_chunks_target (Cont &chunks, double bytes_target, const hsize_t typesize, const unsigned int CHUNKSIZE_MAX, const unsigned int CHUNKSIZE_MIN, const bool larger_high_dims, const Logger &log)
 Optimizes the chunks along all axes to find a good default. More...
 
template<typename Cont , typename Logger >
void Utopia::DataIO::_chunk_helpers::opt_chunks_with_max_extend (Cont &chunks, const Cont &max_extend, const hsize_t typesize, const unsigned int CHUNKSIZE_MAX, const bool opt_inf_dims, const bool larger_high_dims, const Logger &log)
 Optimize chunk sizes using max_extend information. More...
 
template<typename Cont = std::vector< hsize_t >>
const Cont Utopia::DataIO::calc_chunksize (const hsize_t typesize, const Cont io_extend, Cont max_extend={}, const bool opt_inf_dims=true, const bool larger_high_dims=true, const unsigned int CHUNKSIZE_MAX=1048576, const unsigned int CHUNKSIZE_MIN=8192, const unsigned int CHUNKSIZE_BASE=262144)
 Try to guess a good chunksize for a dataset. More...