Publishing R3
[platform/upstream/dldt.git] / inference-engine / thirdparty / clDNN / tutorial / 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
17 /*! @page tutorial clDNN Tutorial  
18 * @section intro Introduction
19 *  This section contains 8 chapters of tutorial demonstrating how to work with clDNN. If you are new in clDNN, we recommend to start with
20 *  <a href="https://01org.github.io/clDNN/index.html">"clDNN documentation"</a> that describes API. We assume that user is familiar with C++ or C and Deep Learining terminology.
21 *  
22 * @subpage c1 <br>
23 * @subpage c2 <br>
24 * @subpage c3 <br>
25 * @subpage c4 <br>
26 * @subpage c5 <br>
27 * @subpage c6 <br>
28 * @subpage c7 <br>
29 * @subpage c8 <br>
30 *
31 */
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 }