Publishing 2019 R2 content (#223)
[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 #pragma once
17 #include "cldnn.h"
18
19 /// @addtogroup c_api C API
20 /// @{
21 /// @addtogroup c_topology Network Topology
22 /// @{
23 /// @addtogroup c_primitives Primitives
24 /// @{
25
26 #ifdef __cplusplus
27 extern "C" {
28 #endif
29
30 /// @brief Function, which will be used during comparison.
31 typedef enum /*:int32_t*/ {
32     EQUAL,
33     GREATER,
34     LESS
35 } cldnn_cond_functions;
36
37 /// @brief Adds primitive, which works like "if".
38 ///
39 /// @details
40 /// @n   Applies comparision between 2 inputs.
41 /// @n   Compare data - sizes of that input specifes the range of the comparison.
42 /// @n   Offset - offset in memory, when comparing values.
43 CLDNN_BEGIN_PRIMITIVE_DESC(condition)
44 /// @brief An identifier of topology, which will be executed when comparison returns true.
45 cldnn_topology topology_true;
46 /// @brief An identifier of topology, which will be executed when comparison returns false.
47 cldnn_topology topology_false;
48 /// @brief An identifier of primitive which contains compare values.
49 cldnn_primitive_id compare_data;
50 /// @brief Used function during comparison.
51 cldnn_cond_functions function;
52 /// @brief Offset for compare data.
53 cldnn_tensor offset;
54
55 CLDNN_END_PRIMITIVE_DESC(condition)
56 CLDNN_DECLARE_PRIMITIVE_TYPE_ID(condition);
57
58 #ifdef __cplusplus
59 }
60 #endif
61
62 /// @}
63 /// @}
64 /// @}
65