1 | // This file is MACHINE GENERATED! Do not edit. |
2 | |
3 | #ifndef TENSORFLOW_CC_OPS_MAP_OPS_H_ |
4 | #define TENSORFLOW_CC_OPS_MAP_OPS_H_ |
5 | |
6 | // This file is MACHINE GENERATED! Do not edit. |
7 | |
8 | #include "tensorflow/cc/framework/ops.h" |
9 | #include "tensorflow/cc/framework/scope.h" |
10 | #include "tensorflow/core/framework/tensor.h" |
11 | #include "tensorflow/core/framework/tensor_shape.h" |
12 | #include "tensorflow/core/framework/types.h" |
13 | #include "tensorflow/core/lib/gtl/array_slice.h" |
14 | |
15 | namespace tensorflow { |
16 | namespace ops { |
17 | |
18 | /// @defgroup map_ops Map Ops |
19 | /// @{ |
20 | |
21 | /// Creates and returns an empty tensor map. |
22 | /// |
23 | /// handle: an empty tensor map |
24 | /// |
25 | /// Args: |
26 | /// * scope: A Scope object |
27 | /// |
28 | /// Returns: |
29 | /// * `Output`: The handle tensor. |
30 | class EmptyTensorMap { |
31 | public: |
32 | EmptyTensorMap(const ::tensorflow::Scope& scope); |
33 | operator ::tensorflow::Output() const { return handle; } |
34 | operator ::tensorflow::Input() const { return handle; } |
35 | ::tensorflow::Node* node() const { return handle.node(); } |
36 | |
37 | Operation operation; |
38 | ::tensorflow::Output handle; |
39 | }; |
40 | |
41 | /// Returns a tensor map with item from given key erased. |
42 | /// |
43 | /// input_handle: the original map |
44 | /// output_handle: the map with value from given key removed |
45 | /// key: the key of the value to be erased |
46 | /// |
47 | /// Args: |
48 | /// * scope: A Scope object |
49 | /// |
50 | /// Returns: |
51 | /// * `Output`: The output_handle tensor. |
52 | class TensorMapErase { |
53 | public: |
54 | TensorMapErase(const ::tensorflow::Scope& scope, ::tensorflow::Input |
55 | input_handle, ::tensorflow::Input key, DataType value_dtype); |
56 | operator ::tensorflow::Output() const { return output_handle; } |
57 | operator ::tensorflow::Input() const { return output_handle; } |
58 | ::tensorflow::Node* node() const { return output_handle.node(); } |
59 | |
60 | Operation operation; |
61 | ::tensorflow::Output output_handle; |
62 | }; |
63 | |
64 | /// Returns whether the given key exists in the map. |
65 | /// |
66 | /// input_handle: the input map |
67 | /// key: the key to check |
68 | /// has_key: whether the key is already in the map or not |
69 | /// |
70 | /// Args: |
71 | /// * scope: A Scope object |
72 | /// |
73 | /// Returns: |
74 | /// * `Output`: The has_key tensor. |
75 | class TensorMapHasKey { |
76 | public: |
77 | TensorMapHasKey(const ::tensorflow::Scope& scope, ::tensorflow::Input |
78 | input_handle, ::tensorflow::Input key); |
79 | operator ::tensorflow::Output() const { return has_key; } |
80 | operator ::tensorflow::Input() const { return has_key; } |
81 | ::tensorflow::Node* node() const { return has_key.node(); } |
82 | |
83 | Operation operation; |
84 | ::tensorflow::Output has_key; |
85 | }; |
86 | |
87 | /// Returns a map that is the 'input_handle' with the given key-value pair inserted. |
88 | /// |
89 | /// input_handle: the original map |
90 | /// output_handle: the map with key and value inserted |
91 | /// key: the key to be inserted |
92 | /// value: the value to be inserted |
93 | /// |
94 | /// Args: |
95 | /// * scope: A Scope object |
96 | /// |
97 | /// Returns: |
98 | /// * `Output`: The output_handle tensor. |
99 | class TensorMapInsert { |
100 | public: |
101 | TensorMapInsert(const ::tensorflow::Scope& scope, ::tensorflow::Input |
102 | input_handle, ::tensorflow::Input key, ::tensorflow::Input |
103 | value); |
104 | operator ::tensorflow::Output() const { return output_handle; } |
105 | operator ::tensorflow::Input() const { return output_handle; } |
106 | ::tensorflow::Node* node() const { return output_handle.node(); } |
107 | |
108 | Operation operation; |
109 | ::tensorflow::Output output_handle; |
110 | }; |
111 | |
112 | /// Returns the value from a given key in a tensor map. |
113 | /// |
114 | /// input_handle: the input map |
115 | /// key: the key to be looked up |
116 | /// value: the value found from the given key |
117 | /// |
118 | /// Args: |
119 | /// * scope: A Scope object |
120 | /// |
121 | /// Returns: |
122 | /// * `Output`: The value tensor. |
123 | class TensorMapLookup { |
124 | public: |
125 | TensorMapLookup(const ::tensorflow::Scope& scope, ::tensorflow::Input |
126 | input_handle, ::tensorflow::Input key, DataType value_dtype); |
127 | operator ::tensorflow::Output() const { return value; } |
128 | operator ::tensorflow::Input() const { return value; } |
129 | ::tensorflow::Node* node() const { return value.node(); } |
130 | |
131 | Operation operation; |
132 | ::tensorflow::Output value; |
133 | }; |
134 | |
135 | /// Returns the number of tensors in the input tensor map. |
136 | /// |
137 | /// input_handle: the input map |
138 | /// size: the number of tensors in the map |
139 | /// |
140 | /// Args: |
141 | /// * scope: A Scope object |
142 | /// |
143 | /// Returns: |
144 | /// * `Output`: The size tensor. |
145 | class TensorMapSize { |
146 | public: |
147 | TensorMapSize(const ::tensorflow::Scope& scope, ::tensorflow::Input |
148 | input_handle); |
149 | operator ::tensorflow::Output() const { return size; } |
150 | operator ::tensorflow::Input() const { return size; } |
151 | ::tensorflow::Node* node() const { return size.node(); } |
152 | |
153 | Operation operation; |
154 | ::tensorflow::Output size; |
155 | }; |
156 | |
157 | /// Returns a Tensor stack of all keys in a tensor map. |
158 | /// |
159 | /// input_handle: the input map |
160 | /// keys: the returned Tensor of all keys in the map |
161 | /// |
162 | /// Args: |
163 | /// * scope: A Scope object |
164 | /// |
165 | /// Returns: |
166 | /// * `Output`: The keys tensor. |
167 | class TensorMapStackKeys { |
168 | public: |
169 | TensorMapStackKeys(const ::tensorflow::Scope& scope, ::tensorflow::Input |
170 | input_handle, DataType key_dtype); |
171 | operator ::tensorflow::Output() const { return keys; } |
172 | operator ::tensorflow::Input() const { return keys; } |
173 | ::tensorflow::Node* node() const { return keys.node(); } |
174 | |
175 | Operation operation; |
176 | ::tensorflow::Output keys; |
177 | }; |
178 | |
179 | /// @} |
180 | |
181 | } // namespace ops |
182 | } // namespace tensorflow |
183 | |
184 | #endif // TENSORFLOW_CC_OPS_MAP_OPS_H_ |
185 | |