MCPcopy Create free account
hub / github.com/ARM-software/ComputeLibrary / parse_npy_header

Function parse_npy_header

utils/Utils.cpp:232–246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

230}
231
232npy::header_t parse_npy_header(std::ifstream &fs) //NOLINT
233{
234 // Read header
235 std::string header_s = npy::read_header(fs);
236
237 // Parse header
238 npy::header_t header = npy::parse_header(header_s);
239
240 bool fortran_order = false;
241 std::vector<unsigned long> shape = header.shape;
242
243 std::reverse(shape.begin(), shape.end());
244
245 return npy::header_t{header.dtype, fortran_order, shape};
246}
247
248/** This function returns the amount of memory free reading from /proc/meminfo
249 *

Callers 1

openMethod · 0.85

Calls 5

read_headerFunction · 0.85
parse_headerFunction · 0.85
reverseFunction · 0.85
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected