ONE - On-device Neural Engine
Loading...
Searching...
No Matches
example.cpp File Reference
#include <mio/circle/schema_generated.h>
#include <fstream>
#include <iostream>
#include <vector>

Go to the source code of this file.

Functions

int main (int argc, char **argv)
 

Function Documentation

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 26 of file example.cpp.

27{
28 std::ifstream ifs(argv[1], std::ios_base::binary);
29 std::vector<char> buf(std::istreambuf_iterator<char>{ifs}, std::istreambuf_iterator<char>{});
30
31 flatbuffers::Verifier verifier{reinterpret_cast<uint8_t *>(buf.data()), buf.size()};
32
33 if (!circle::VerifyModelBuffer(verifier))
34 {
35 std::cout << "Fail" << std::endl;
36 return 255;
37 }
38
39 std::cout << "Pass" << std::endl;
40 return 0;
41}