H5Slice_traits.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c), 2017, Adrien Devresse <adrien.devresse@epfl.ch>
3  *
4  * Distributed under the Boost Software License, Version 1.0.
5  * (See accompanying file LICENSE_1_0.txt or copy at
6  * http://www.boost.org/LICENSE_1_0.txt)
7  *
8  */
9 #ifndef H5SLICE_TRAITS_HPP
10 #define H5SLICE_TRAITS_HPP
11 
12 #include <cstdlib>
13 #include <vector>
14 
15 #include "H5Utils.hpp"
16 
17 namespace HighFive {
18 
19 class DataSet;
20 class Group;
21 class DataSpace;
22 class DataType;
23 class Selection;
24 
25 template <typename Derivate>
27 
28 class ElementSet {
29  public:
30  explicit ElementSet(const std::vector<std::size_t>& element_ids);
31 
32  private:
33  std::vector<std::size_t> _ids;
34 
35  template <typename Derivate>
36  friend class SliceTraits;
37 };
38 
39 template <typename Derivate>
40 class SliceTraits {
41  public:
48  Selection select(const std::vector<size_t>& offset,
49  const std::vector<size_t>& count,
50  const std::vector<size_t>& stride = std::vector<size_t>())
51  const;
52 
57  Selection select(const std::vector<size_t>& columns) const;
58 
62  Selection select(const ElementSet& elements) const;
63 
73  template <typename T>
74  void read(T& array) const;
75 
82  template <typename T>
83  void read(T* array) const;
84 
92  template <typename T>
93  void write(const T& buffer);
94 
102  template <typename T>
103  void write(const T* buffer);
104 
105  private:
106  typedef Derivate derivate_type;
107 };
108 }
109 
110 #endif // H5SLICE_TRAITS_HPP
HighFive::Selection
Selection: represent a view on a slice/part of a dataset.
Definition: H5Selection.hpp:27
HighFive::ElementSet::ElementSet
ElementSet(const std::vector< std::size_t > &element_ids)
Definition: H5Slice_traits_misc.hpp:61
SingleArray
Definition: data_types.h:107
HighFive::SliceTraits::read
void read(T &array) const
Definition: H5Slice_traits_misc.hpp:149
HighFive::SliceTraits
Definition: H5Slice_traits.hpp:26
HighFive::SliceTraits::select
Selection select(const std::vector< size_t > &offset, const std::vector< size_t > &count, const std::vector< size_t > &stride=std::vector< size_t >()) const
Definition: H5Slice_traits_misc.hpp:66
HighFive::SliceTraits::write
void write(const T &buffer)
Definition: H5Slice_traits_misc.hpp:210
HighFive::ElementSet
Definition: H5Slice_traits.hpp:28
HighFive::SliceTraits::derivate_type
Derivate derivate_type
Definition: H5Slice_traits.hpp:106
HighFive::ElementSet::_ids
std::vector< std::size_t > _ids
Definition: H5Slice_traits.hpp:33
H5Utils.hpp
HighFive
Definition: H5Annotate_traits.hpp:14


lvr2
Author(s): Thomas Wiemann , Sebastian Pütz , Alexander Mock , Lars Kiesow , Lukas Kalbertodt , Tristan Igelbrink , Johan M. von Behren , Dominik Feldschnieders , Alexander Löhr
autogenerated on Wed Mar 2 2022 00:37:23