ONE - On-device Neural Engine
Loading...
Searching...
No Matches
minmax_embedder_test Namespace Reference

Data Structures

class  DataGen
 
class  H5Writer
 
class  MinMax
 
struct  ModelSpec
 

Functions

uint32_t to_u32 (uint64_t v)
 
H5::Group ensureGroup (H5::Group parent, const std::string &child)
 

Function Documentation

◆ ensureGroup()

H5::Group minmax_embedder_test::ensureGroup ( H5::Group  parent,
const std::string &  child 
)

Definition at line 30 of file H5Writer.cpp.

31{
32 H5::Exception::dontPrint();
33 try
34 {
35 return parent.openGroup(child.c_str());
36 }
37 catch (H5::Exception &e)
38 {
39 return parent.createGroup(child.c_str());
40 }
41}

Referenced by minmax_embedder_test::H5Writer::dump().

◆ to_u32()

uint32_t minmax_embedder_test::to_u32 ( uint64_t  v)

Definition at line 25 of file Cast.h.

26{
27 if (v > UINT32_MAX)
28 throw std::overflow_error("to_u32 gets a value bigger than uint32 max.");
29 return static_cast<uint32_t>(v);
30}

Referenced by minmax_embedder_test::H5Writer::dump().