Publishing 2019 R1 content
[platform/upstream/dldt.git] / inference-engine / thirdparty / clDNN / api / C / condition.h
1 // Copyright (c) 2018 Intel Corporation
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 //      http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 ///////////////////////////////////////////////////////////////////////////////////////////////////
16 #ifndef CONDITION_H
17 #define CONDITION_H
18
19 #include "cldnn.h"
20
21
22 /// @addtogroup c_api C API
23 /// @{
24 /// @addtogroup c_topology Network Topology
25 /// @{
26 /// @addtogroup c_primitives Primitives
27 /// @{
28
29 #ifdef __cplusplus
30 extern "C" {
31 #endif
32
33 /// @brief Function, which will be used during comparison.
34 typedef enum /*:int32_t*/
35 {
36     EQUAL,
37     GREATER,
38     LESS
39 } cldnn_cond_functions;
40
41 /// @brief Adds primitive, which works like "if".
42 ///
43 /// @details
44 /// @n   Applies comparision between 2 inputs.
45 /// @n   Compare data - sizes of that input specifes the range of the comparison.
46 /// @n   Offset - offset in memory, when comparing values.
47 CLDNN_BEGIN_PRIMITIVE_DESC(condition)
48 /// @brief An identifier of topology, which will be executed when comparison returns true.
49 cldnn_topology topology_true;
50 /// @brief An identifier of topology, which will be executed when comparison returns false.
51 cldnn_topology topology_false;
52 /// @brief An identifier of primitive which contains compare values.
53 cldnn_primitive_id compare_data;
54 /// @brief Used function during comparison.
55 cldnn_cond_functions function;
56 /// @brief Offset for compare data.
57 cldnn_tensor offset;
58
59 CLDNN_END_PRIMITIVE_DESC(condition)
60 CLDNN_DECLARE_PRIMITIVE_TYPE_ID(condition);
61
62
63 #ifdef __cplusplus
64 }
65 #endif
66
67 /// @}
68 /// @}
69 /// @}
70 #endif // CONDITION_H