ONE - On-device Neural Engine
Loading...
Searching...
No Matches
QConfReader Struct Reference

Public Member Functions

void init (const std::string &filename)
 
Json::Value & root (void)
 

Detailed Description

Definition at line 39 of file CircleQuantizer.cpp.

Member Function Documentation

◆ init()

void QConfReader::init ( const std::string &  filename)
inline

Definition at line 41 of file CircleQuantizer.cpp.

42 {
43 std::ifstream ifs;
44
45 ifs.open(filename);
46
47 // Failed to open cfg file
48 if (not ifs.is_open())
49 throw std::runtime_error("Cannot open config file. " + filename);
50
51 JSONCPP_STRING errs;
52 Json::CharReaderBuilder builder;
53
54 // Failed to parse
55 if (not parseFromStream(builder, ifs, &_root, &errs))
56 throw std::runtime_error("Cannot parse config file (json format). " + errs);
57
58 ifs.close();
59 }

Referenced by read_layer_params(), and read_layer_params_set().

◆ root()

Json::Value & QConfReader::root ( void  )
inline

Definition at line 61 of file CircleQuantizer.cpp.

61{ return _root; }

Referenced by read_layer_params(), and read_layer_params_set().


The documentation for this struct was generated from the following file: