Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / src / inference_engine / cnn_network_stats_impl.cpp
1 // Copyright (C) 2018-2019 Intel Corporation
2 // SPDX-License-Identifier: Apache-2.0
3 //
4
5 #include <ie_common.h>
6 #include "cnn_network_stats_impl.hpp"
7 #include <memory>
8 #include <map>
9 #include <string>
10 #include <fstream>
11 #include <cassert>
12 #include <cfloat>
13 #include "debug.h"
14 #include <vector>
15
16 #include <pugixml.hpp>
17
18 using namespace std;
19 namespace InferenceEngine {
20 namespace details {
21
22 CNNNetworkStatsImpl::~CNNNetworkStatsImpl() {
23 }
24
25 string joinCommas(vector<float>& v) {
26     string res;
27
28     for (size_t i = 0; i < v.size(); ++i) {
29         res += to_string(v[i]);
30         if (i < v.size() - 1) {
31             res += ", ";
32         }
33     }
34
35     return res;
36 }
37
38 void CNNNetworkStatsImpl::setNodesStats(const NetworkStatsMap &stats) {
39     netNodesStats = stats;
40 }
41
42 const NetworkStatsMap& CNNNetworkStatsImpl::getNodesStats() const {
43     return netNodesStats;
44 }
45
46 }  // namespace details
47 }  // namespace InferenceEngine