ONE - On-device Neural Engine
Loading...
Searching...
No Matches
VerifyFlatbuffers Class Reference

#include <VerifyFlatBuffers.h>

Public Member Functions

 VerifyFlatbuffers ()=default
 
int run (const std::string &model_file)
 
 VerifyFlatbuffers ()=default
 
int run (const std::string &model_file)
 

Detailed Description

Definition at line 23 of file VerifyFlatBuffers.h.

Constructor & Destructor Documentation

◆ VerifyFlatbuffers() [1/2]

VerifyFlatbuffers::VerifyFlatbuffers ( )
default

◆ VerifyFlatbuffers() [2/2]

VerifyFlatbuffers::VerifyFlatbuffers ( )
default

Member Function Documentation

◆ run() [1/2]

int VerifyFlatbuffers::run ( const std::string &  model_file)

Definition at line 22 of file VerifyFlatBuffers.cpp.

23{
24 foder::FileLoader fileLoader{model_file};
25 std::vector<char> modeldata = fileLoader.load();
26
27 const uint8_t *data = reinterpret_cast<const uint8_t *>(modeldata.data());
28 flatbuffers::Verifier verifier{data, modeldata.size()};
29
30 if (!circle::VerifyModelBuffer(verifier))
31 {
32 return -1;
33 }
34
35 return 0;
36}
DataBuffer load(void) const
Definition FileLoader.h:39

References foder::FileLoader::load().

Referenced by package.infer.session::inference().

◆ run() [2/2]

int VerifyFlatbuffers::run ( const std::string &  model_file)

The documentation for this class was generated from the following files: