clDNN
main.cpp
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 
32 #include <../api/CPP/engine.hpp>
33 #include <../api/CPP/topology.hpp>
34 
35 
36 cldnn::engine chapter_1(); // Engine, layout, tensor, memory, data and input
37 cldnn::topology chapter_2(cldnn::engine&); // Primitives and topology
38 void chapter_3(cldnn::engine&, cldnn::topology&); // Network and execution
39 void chapter_4(cldnn::engine&, cldnn::topology&); // Hidden layers access
40 void chapter_5(cldnn::engine&, cldnn::topology&); // Other building options
41 void chapter_6(cldnn::engine&); // How to add a kernel to clDNN
42 void chapter_7(cldnn::engine&); // How to create a custom primitive (without changing clDNN)
43 void chapter_8(cldnn::engine&); // Extended profiling for networks built with optimized data
44 
45 int main()
46 {
47  try {
48  cldnn::engine eng = chapter_1();
49  cldnn::topology topology = chapter_2(eng);
50  chapter_3(eng, topology);
51  chapter_4(eng, topology);
52  chapter_5(eng, topology);
53  chapter_6(eng);
54  chapter_7(eng);
55  chapter_8(eng);
56  }
57  catch (const std::exception& ex)
58  {
59  std::cout << ex.what();
60  }
61  return 0;
62 }
Network topology to be defined by user.
Definition: topology.hpp:33
Represents clDNN engine object.
Definition: engine.hpp:110