| 149 | using TensorShape = nncc::core::ADT::tensor::Shape; |
| 150 | |
| 151 | TensorShape to_internal_shape(const H5::DataSpace &dataspace) |
| 152 | { |
| 153 | int rank = dataspace.getSimpleExtentNdims(); |
| 154 | |
| 155 | std::vector<hsize_t> dims; |
| 156 | |
| 157 | dims.resize(rank, 0); |
| 158 | |
| 159 | dataspace.getSimpleExtentDims(dims.data()); |
| 160 | |
| 161 | TensorShape res; |
| 162 | |
| 163 | res.resize(rank); |
| 164 | for (int axis = 0; axis < rank; ++axis) |
| 165 | { |
| 166 | res.dim(axis) = dims[axis]; |
| 167 | } |
| 168 | |
| 169 | return res; |
| 170 | } |
| 171 | |
| 172 | uint32_t element_count(const H5::DataSpace &dataspace) |
| 173 | { |
no test coverage detected