Skip to content

Commit

Permalink
Apply clang-format to onnxconverter
Browse files Browse the repository at this point in the history
  • Loading branch information
daquexian committed May 13, 2019
1 parent 42c8044 commit 5e9fed5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tools/onnx2daq/OnnxConverter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1032,8 +1032,8 @@ void OnnxConverter::Save(const std::string &filename) {
ofs.close();
}

std::unique_ptr<uint8_t []> OnnxConverter::GetBuf() {
std::unique_ptr<uint8_t []> ptr(new uint8_t[builder_.GetSize()]);
std::unique_ptr<uint8_t[]> OnnxConverter::GetBuf() {
std::unique_ptr<uint8_t[]> ptr(new uint8_t[builder_.GetSize()]);
memcpy(ptr.get(), builder_.GetBufferPointer(), builder_.GetSize());
return std::move(ptr);
}
4 changes: 2 additions & 2 deletions tools/onnx2daq/OnnxConverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ class OnnxConverter {

public:
void Convert(const ONNX_NAMESPACE::ModelProto &model,
const css &table_file = "");
const css &table_file = "");
void Save(const std::string &filename);
std::unique_ptr<uint8_t []> GetBuf();
std::unique_ptr<uint8_t[]> GetBuf();
};

0 comments on commit 5e9fed5

Please sign in to comment.