Skip to content

Commit

Permalink
update io-protobuff
Browse files Browse the repository at this point in the history
  • Loading branch information
unsky committed Aug 7, 2018
1 parent 0f0ca7b commit 147e52b
Show file tree
Hide file tree
Showing 8 changed files with 110 additions and 188 deletions.
290 changes: 105 additions & 185 deletions .idea/workspace.xml

Large diffs are not rendered by default.

Binary file not shown.
Binary file modified build/CMakeFiles/sita.dir/src/sita/dlflow/graph.cpp.o
Binary file not shown.
Binary file modified build/CMakeFiles/sita.dir/src/sita/io_protobuff.cpp.o
Binary file not shown.
Binary file modified build/sita
Binary file not shown.
4 changes: 3 additions & 1 deletion include/sita/io_protobuff.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ namespace sita{
using google::protobuf::io::ZeroCopyOutputStream;
using google::protobuf::io::CodedOutputStream;
using google::protobuf::Message;
bool ReadProtoFromTextFile(const char* filename, Message* proto);

bool read_proto_from_txt(const char* filename, Message* proto);

}

#endif //SITA_IO_PROTOBUFF_H
2 changes: 1 addition & 1 deletion src/sita/dlflow/graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
namespace sita{

Graph::Graph(std::string model_file){
CHECK(ReadProtoFromTextFile(model_file.c_str(), &_graph))
CHECK(read_proto_from_txt(model_file.c_str(), &_graph))
<< "Failed to parse SolverParameter file: " << model_file;
}

Expand Down
2 changes: 1 addition & 1 deletion src/sita/io_protobuff.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@

namespace sita{

bool ReadProtoFromTextFile(const char* filename, Message* proto) {
bool read_proto_from_txt(const char* filename, Message* proto) {
int fd = open(filename, O_RDONLY);
CHECK_NE(fd, -1) << "File not found: " << filename;
FileInputStream* input = new FileInputStream(fd);
Expand Down

0 comments on commit 147e52b

Please sign in to comment.