chihaya
Validating delayed array operations in HDF5
Loading...
Searching...
No Matches
Namespaces | Classes | Enumerations | Functions
chihaya Namespace Reference

Namespace for all chihaya functions. More...

Namespaces

namespace  binary_arithmetic
 Namespace for delayed binary arithmetic operations.
 
namespace  binary_comparison
 Namespace for delayed binary comparisons.
 
namespace  binary_logic
 Namespace for delayed binary logical operations.
 
namespace  combine
 Namespace for delayed combining operations.
 
namespace  constant_array
 Namespace for constant arrays.
 
namespace  custom_array
 Namespace for custom third-party arrays.
 
namespace  dense_array
 Namespace for dense arrays.
 
namespace  external_hdf5
 Namespace for external HDF5 arrays.
 
namespace  matrix_product
 Namespace for delayed matrix products.
 
namespace  sparse_matrix
 Namespace for sparse matrices.
 
namespace  subset
 Namespace for delayed subsets.
 
namespace  subset_assignment
 Namespace for delayed subset assignment.
 
namespace  transpose
 Namespace for delayed transposition.
 
namespace  unary_arithmetic
 Namespace for delayed unary arithmetic operations.
 
namespace  unary_comparison
 Namespace for delayed unary comparisons.
 
namespace  unary_logic
 Namespace for delayed unary logic operations.
 
namespace  unary_math
 Namespace for delayed unary math.
 
namespace  unary_special_check
 Namespace for delayed unary special checks.
 

Classes

struct  ArrayDetails
 Details about an array. More...
 
struct  Options
 Validation options. More...
 

Enumerations

enum  ArrayType { BOOLEAN = 0 , INTEGER = 1 , FLOAT = 2 , STRING = 3 }
 

Functions

ArrayDetails validate (const H5::Group &handle, const ritsuko::Version &version, Options &options)
 
ritsuko::Version extract_version (const H5::Group &handle)
 
ArrayDetails validate (const H5::Group &handle, Options &options)
 
ArrayDetails validate (const std::string &path, const std::string &name, Options &options)
 
ArrayDetails validate (const std::string &path, const std::string &name)
 

Detailed Description

Namespace for all chihaya functions.

Enumeration Type Documentation

◆ ArrayType

Type of the array. Operations involving mixed types will generally result in promotion to the more advanced types, e.g., an INTEGER and FLOAT addition will result in promotion to FLOAT. Note that operations involving the same types are not guaranteed to preserve type, e.g., INTEGER division is assumed to produce a FLOAT.

Function Documentation

◆ extract_version()

ritsuko::Version chihaya::extract_version ( const H5::Group &  handle)
inline

The version is taken from the delayed_version attribute of the handle. This should be a version string of the form <MAJOR>.<MINOR>. For back-compatibility purposes, the string "1.0.0" is also allowed, corresponding to version 1.0; and if delayed_version is missing, it defaults to 0.99.

Parameters
handleOpen handle to a HDF5 group corresponding to a delayed operation or array.
Returns
Version of the chihaya specification.

◆ validate() [1/4]

ArrayDetails chihaya::validate ( const H5::Group &  handle,
const ritsuko::Version &  version,
Options options 
)
inline

For operations, this function will first search options.custom_operation_validate_registry for an available validation function. For arrays, this function will first search options.custom_array_validate_registry for an available validation function.

Parameters
handleOpen handle to a HDF5 group corresponding to a delayed operation or array.
versionVersion of the chihaya specification.
optionsValidation options, possibly containing custom validation functions.
Returns
Details of the array after all delayed operations in handle (and its children) have been applied.

◆ validate() [2/4]

ArrayDetails chihaya::validate ( const H5::Group &  handle,
Options options 
)
inline

Validate a delayed operation/array at the specified HDF5 group,

Parameters
handleOpen handle to a HDF5 group corresponding to a delayed operation or array.
optionsValidation options, see validate() for details.
Returns
Details of the array after all delayed operations in handle (and its children) have been applied.

◆ validate() [3/4]

ArrayDetails chihaya::validate ( const std::string &  path,
const std::string &  name 
)
inline

Validate a delayed operation/array at the specified HDF5 group. This simply calls the validate() overload for a H5::Group.

Parameters
pathPath to a HDF5 file.
nameName of the group inside the file.
Returns
Details of the array after all delayed operations have been applied.

◆ validate() [4/4]

ArrayDetails chihaya::validate ( const std::string &  path,
const std::string &  name,
Options options 
)
inline

Validate a delayed operation/array at the specified HDF5 group. This simply calls the validate() overload for a H5::Group.

Parameters
pathPath to a HDF5 file.
nameName of the group inside the file.
optionsValidation options, see validate() for details.
Returns
Details of the array after all delayed operations have been applied.