Update TIDL network data structure
[tidl/tidl-api.git] / viewer / tidl_viewer.cpp
index 6ff4df1d1872ede98fbe707e41938575e087a512..d2bf44a8e3a96b570230c47008157f0ebfb87712 100644 (file)
@@ -38,9 +38,8 @@ bool tidl::util::PrintNetwork(const std::string& network_binary,
         return false;
 
     sTIDL_Network_t net;
-    bool status = ReadBinary(network_binary,
-                             reinterpret_cast<char *>(&net),
-                             sizeof(sTIDL_Network_t));
+    bool status = ReadNetworkBinary(network_binary,
+                                    reinterpret_cast<char *>(&net));
     if (!status)
     {
         std::cerr << "ERROR: Invalid network binary: "
@@ -95,9 +94,8 @@ bool tidl::util::GenerateDotGraphForNetwork(const std::string& network_binary,
         return false;
 
     sTIDL_Network_t net;
-    bool status = ReadBinary(network_binary,
-                             reinterpret_cast<char *>(&net),
-                             sizeof(sTIDL_Network_t));
+    bool status = ReadNetworkBinary(network_binary,
+                                    reinterpret_cast<char *>(&net));
     if (!status)
     {
         std::cerr << "ERROR: Invalid network binary: "