MCPcopy Create free account
hub / github.com/Samsung/ONE / to_internal_shape

Function to_internal_shape

compiler/i5diff/src/entry.cpp:151–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149using TensorShape = nncc::core::ADT::tensor::Shape;
150
151TensorShape 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
172uint32_t element_count(const H5::DataSpace &dataspace)
173{

Callers 2

element_countFunction · 0.85
entryFunction · 0.85

Calls 3

resizeMethod · 0.45
dataMethod · 0.45
dimMethod · 0.45

Tested by

no test coverage detected