graph.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2017 Intel Corporation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 
17 #ifndef MOVIDIUS_NCS_LIB_GRAPH_H
18 #define MOVIDIUS_NCS_LIB_GRAPH_H
19 
20 #include <memory>
21 #include <string>
22 #include <utility>
23 #include <vector>
24 
29 
30 namespace movidius_ncs_lib
31 {
32 class Graph
33 {
34 public:
35  using Ptr = std::shared_ptr<Graph>;
36  using ConstPtr = std::shared_ptr<Graph const>;
37 
38  Graph(const Device::Ptr& device,
39  const std::string& graph_file,
40  int network_dimension);
41  ~Graph();
42 
43  void allocate(void* device_handle);
44  void deallocate();
45  float getTimeTaken();
46  std::string getDebugInfo();
47  void* getHandle();
48 
49  int getNetworkDim() const
50  {
51  return network_dimension_;
52  }
53 private:
54  std::string graph_buf_;
55  const int network_dimension_;
56  void* handle_;
57 };
58 } // namespace movidius_ncs_lib
59 
60 #endif // MOVIDIUS_NCS_LIB_GRAPH_H
std::shared_ptr< Graph > Ptr
Definition: graph.h:35
std::string graph_buf_
Definition: graph.h:54
std::shared_ptr< Device > Ptr
Definition: device.h:29
std::string getDebugInfo()
Definition: graph.cpp:52
void allocate(void *device_handle)
Definition: graph.cpp:93
const int network_dimension_
Definition: graph.h:55
Graph(const Device::Ptr &device, const std::string &graph_file, int network_dimension)
Definition: graph.cpp:30
int getNetworkDim() const
Definition: graph.h:49
std::shared_ptr< Graph const > ConstPtr
Definition: graph.h:36


movidius_ncs_lib
Author(s): Xiaojun Huang
autogenerated on Mon Jun 10 2019 14:11:23