1// This file is MACHINE GENERATED! Do not edit.
2
3#ifndef TENSORFLOW_CC_OPS_RESOURCE_VARIABLE_OPS_H_
4#define TENSORFLOW_CC_OPS_RESOURCE_VARIABLE_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
15namespace tensorflow {
16namespace ops {
17
18/// @defgroup resource_variable_ops Resource Variable Ops
19/// @{
20
21/// TODO: add doc.
22///
23/// Args:
24/// * scope: A Scope object
25///
26/// Returns:
27/// * the created `Operation`
28class AssignAddVariableOp {
29 public:
30 AssignAddVariableOp(const ::tensorflow::Scope& scope, ::tensorflow::Input
31 resource, ::tensorflow::Input value);
32 operator ::tensorflow::Operation() const { return operation; }
33
34 Operation operation;
35};
36
37/// TODO: add doc.
38///
39/// Args:
40/// * scope: A Scope object
41///
42/// Returns:
43/// * the created `Operation`
44class AssignSubVariableOp {
45 public:
46 AssignSubVariableOp(const ::tensorflow::Scope& scope, ::tensorflow::Input
47 resource, ::tensorflow::Input value);
48 operator ::tensorflow::Operation() const { return operation; }
49
50 Operation operation;
51};
52
53/// TODO: add doc.
54///
55/// Args:
56/// * scope: A Scope object
57///
58/// Returns:
59/// * the created `Operation`
60class AssignVariableOp {
61 public:
62 /// Optional attribute setters for AssignVariableOp
63 struct Attrs {
64 /// Defaults to false
65 TF_MUST_USE_RESULT Attrs ValidateShape(bool x) {
66 Attrs ret = *this;
67 ret.validate_shape_ = x;
68 return ret;
69 }
70
71 bool validate_shape_ = false;
72 };
73 AssignVariableOp(const ::tensorflow::Scope& scope, ::tensorflow::Input
74 resource, ::tensorflow::Input value);
75 AssignVariableOp(const ::tensorflow::Scope& scope, ::tensorflow::Input
76 resource, ::tensorflow::Input value, const
77 AssignVariableOp::Attrs& attrs);
78 operator ::tensorflow::Operation() const { return operation; }
79
80 static Attrs ValidateShape(bool x) {
81 return Attrs().ValidateShape(x);
82 }
83
84 Operation operation;
85};
86
87/// TODO: add doc.
88///
89/// Args:
90/// * scope: A Scope object
91///
92/// Returns:
93/// * the created `Operation`
94class ConsumeMutexLock {
95 public:
96 ConsumeMutexLock(const ::tensorflow::Scope& scope, ::tensorflow::Input
97 mutex_lock);
98 operator ::tensorflow::Operation() const { return operation; }
99
100 Operation operation;
101};
102
103/// TODO: add doc.
104///
105/// Args:
106/// * scope: A Scope object
107///
108/// Returns:
109/// * the created `Operation`
110class DestroyResourceOp {
111 public:
112 /// Optional attribute setters for DestroyResourceOp
113 struct Attrs {
114 /// Defaults to true
115 TF_MUST_USE_RESULT Attrs IgnoreLookupError(bool x) {
116 Attrs ret = *this;
117 ret.ignore_lookup_error_ = x;
118 return ret;
119 }
120
121 bool ignore_lookup_error_ = true;
122 };
123 DestroyResourceOp(const ::tensorflow::Scope& scope, ::tensorflow::Input
124 resource);
125 DestroyResourceOp(const ::tensorflow::Scope& scope, ::tensorflow::Input
126 resource, const DestroyResourceOp::Attrs& attrs);
127 operator ::tensorflow::Operation() const { return operation; }
128
129 static Attrs IgnoreLookupError(bool x) {
130 return Attrs().IgnoreLookupError(x);
131 }
132
133 Operation operation;
134};
135
136/// TODO: add doc.
137///
138/// Args:
139/// * scope: A Scope object
140///
141/// Returns:
142/// * the created `Operation`
143class DisableCopyOnRead {
144 public:
145 DisableCopyOnRead(const ::tensorflow::Scope& scope, ::tensorflow::Input
146 resource);
147 operator ::tensorflow::Operation() const { return operation; }
148
149 Operation operation;
150};
151
152/// TODO: add doc.
153///
154/// Args:
155/// * scope: A Scope object
156///
157/// Returns:
158/// * `Output`: The mutex_lock tensor.
159class MutexLock {
160 public:
161 MutexLock(const ::tensorflow::Scope& scope, ::tensorflow::Input mutex);
162 operator ::tensorflow::Output() const { return mutex_lock; }
163 operator ::tensorflow::Input() const { return mutex_lock; }
164 ::tensorflow::Node* node() const { return mutex_lock.node(); }
165
166 Operation operation;
167 ::tensorflow::Output mutex_lock;
168};
169
170/// TODO: add doc.
171///
172/// Args:
173/// * scope: A Scope object
174///
175/// Returns:
176/// * `Output`: The resource tensor.
177class MutexV2 {
178 public:
179 /// Optional attribute setters for MutexV2
180 struct Attrs {
181 /// Defaults to ""
182 TF_MUST_USE_RESULT Attrs Container(StringPiece x) {
183 Attrs ret = *this;
184 ret.container_ = x;
185 return ret;
186 }
187
188 /// Defaults to ""
189 TF_MUST_USE_RESULT Attrs SharedName(StringPiece x) {
190 Attrs ret = *this;
191 ret.shared_name_ = x;
192 return ret;
193 }
194
195 StringPiece container_ = "";
196 StringPiece shared_name_ = "";
197 };
198 MutexV2(const ::tensorflow::Scope& scope);
199 MutexV2(const ::tensorflow::Scope& scope, const MutexV2::Attrs& attrs);
200 operator ::tensorflow::Output() const { return resource; }
201 operator ::tensorflow::Input() const { return resource; }
202 ::tensorflow::Node* node() const { return resource.node(); }
203
204 static Attrs Container(StringPiece x) {
205 return Attrs().Container(x);
206 }
207 static Attrs SharedName(StringPiece x) {
208 return Attrs().SharedName(x);
209 }
210
211 Operation operation;
212 ::tensorflow::Output resource;
213};
214
215/// TODO: add doc.
216///
217/// Args:
218/// * scope: A Scope object
219///
220/// Returns:
221/// * `Output`: The value tensor.
222class ReadVariableOp {
223 public:
224 ReadVariableOp(const ::tensorflow::Scope& scope, ::tensorflow::Input resource,
225 DataType dtype);
226 operator ::tensorflow::Output() const { return value; }
227 operator ::tensorflow::Input() const { return value; }
228 ::tensorflow::Node* node() const { return value.node(); }
229
230 Operation operation;
231 ::tensorflow::Output value;
232};
233
234/// TODO: add doc.
235///
236/// Args:
237/// * scope: A Scope object
238///
239/// Returns:
240/// * `Output`: The output tensor.
241class ResourceGather {
242 public:
243 /// Optional attribute setters for ResourceGather
244 struct Attrs {
245 /// Defaults to 0
246 TF_MUST_USE_RESULT Attrs BatchDims(int64 x) {
247 Attrs ret = *this;
248 ret.batch_dims_ = x;
249 return ret;
250 }
251
252 /// Defaults to true
253 TF_MUST_USE_RESULT Attrs ValidateIndices(bool x) {
254 Attrs ret = *this;
255 ret.validate_indices_ = x;
256 return ret;
257 }
258
259 int64 batch_dims_ = 0;
260 bool validate_indices_ = true;
261 };
262 ResourceGather(const ::tensorflow::Scope& scope, ::tensorflow::Input resource,
263 ::tensorflow::Input indices, DataType dtype);
264 ResourceGather(const ::tensorflow::Scope& scope, ::tensorflow::Input resource,
265 ::tensorflow::Input indices, DataType dtype, const
266 ResourceGather::Attrs& attrs);
267 operator ::tensorflow::Output() const { return output; }
268 operator ::tensorflow::Input() const { return output; }
269 ::tensorflow::Node* node() const { return output.node(); }
270
271 static Attrs BatchDims(int64 x) {
272 return Attrs().BatchDims(x);
273 }
274 static Attrs ValidateIndices(bool x) {
275 return Attrs().ValidateIndices(x);
276 }
277
278 Operation operation;
279 ::tensorflow::Output output;
280};
281
282/// TODO: add doc.
283///
284/// Args:
285/// * scope: A Scope object
286///
287/// Returns:
288/// * `Output`: The output tensor.
289class ResourceGatherNd {
290 public:
291 ResourceGatherNd(const ::tensorflow::Scope& scope, ::tensorflow::Input
292 resource, ::tensorflow::Input indices, DataType dtype);
293 operator ::tensorflow::Output() const { return output; }
294 operator ::tensorflow::Input() const { return output; }
295 ::tensorflow::Node* node() const { return output.node(); }
296
297 Operation operation;
298 ::tensorflow::Output output;
299};
300
301/// TODO: add doc.
302///
303/// Args:
304/// * scope: A Scope object
305///
306/// Returns:
307/// * the created `Operation`
308class ResourceScatterAdd {
309 public:
310 ResourceScatterAdd(const ::tensorflow::Scope& scope, ::tensorflow::Input
311 resource, ::tensorflow::Input indices, ::tensorflow::Input
312 updates);
313 operator ::tensorflow::Operation() const { return operation; }
314
315 Operation operation;
316};
317
318/// TODO: add doc.
319///
320/// Args:
321/// * scope: A Scope object
322///
323/// Returns:
324/// * the created `Operation`
325class ResourceScatterDiv {
326 public:
327 ResourceScatterDiv(const ::tensorflow::Scope& scope, ::tensorflow::Input
328 resource, ::tensorflow::Input indices, ::tensorflow::Input
329 updates);
330 operator ::tensorflow::Operation() const { return operation; }
331
332 Operation operation;
333};
334
335/// TODO: add doc.
336///
337/// Args:
338/// * scope: A Scope object
339///
340/// Returns:
341/// * the created `Operation`
342class ResourceScatterMax {
343 public:
344 ResourceScatterMax(const ::tensorflow::Scope& scope, ::tensorflow::Input
345 resource, ::tensorflow::Input indices, ::tensorflow::Input
346 updates);
347 operator ::tensorflow::Operation() const { return operation; }
348
349 Operation operation;
350};
351
352/// TODO: add doc.
353///
354/// Args:
355/// * scope: A Scope object
356///
357/// Returns:
358/// * the created `Operation`
359class ResourceScatterMin {
360 public:
361 ResourceScatterMin(const ::tensorflow::Scope& scope, ::tensorflow::Input
362 resource, ::tensorflow::Input indices, ::tensorflow::Input
363 updates);
364 operator ::tensorflow::Operation() const { return operation; }
365
366 Operation operation;
367};
368
369/// TODO: add doc.
370///
371/// Args:
372/// * scope: A Scope object
373///
374/// Returns:
375/// * the created `Operation`
376class ResourceScatterMul {
377 public:
378 ResourceScatterMul(const ::tensorflow::Scope& scope, ::tensorflow::Input
379 resource, ::tensorflow::Input indices, ::tensorflow::Input
380 updates);
381 operator ::tensorflow::Operation() const { return operation; }
382
383 Operation operation;
384};
385
386/// TODO: add doc.
387///
388/// Args:
389/// * scope: A Scope object
390///
391/// Returns:
392/// * the created `Operation`
393class ResourceScatterSub {
394 public:
395 ResourceScatterSub(const ::tensorflow::Scope& scope, ::tensorflow::Input
396 resource, ::tensorflow::Input indices, ::tensorflow::Input
397 updates);
398 operator ::tensorflow::Operation() const { return operation; }
399
400 Operation operation;
401};
402
403/// TODO: add doc.
404///
405/// Args:
406/// * scope: A Scope object
407///
408/// Returns:
409/// * the created `Operation`
410class ResourceScatterUpdate {
411 public:
412 ResourceScatterUpdate(const ::tensorflow::Scope& scope, ::tensorflow::Input
413 resource, ::tensorflow::Input indices,
414 ::tensorflow::Input updates);
415 operator ::tensorflow::Operation() const { return operation; }
416
417 Operation operation;
418};
419
420/// TODO: add doc.
421///
422/// Args:
423/// * scope: A Scope object
424///
425/// Returns:
426/// * `Output`: The resource tensor.
427class VarHandleOp {
428 public:
429 /// Optional attribute setters for VarHandleOp
430 struct Attrs {
431 /// Defaults to ""
432 TF_MUST_USE_RESULT Attrs Container(StringPiece x) {
433 Attrs ret = *this;
434 ret.container_ = x;
435 return ret;
436 }
437
438 /// Defaults to ""
439 TF_MUST_USE_RESULT Attrs SharedName(StringPiece x) {
440 Attrs ret = *this;
441 ret.shared_name_ = x;
442 return ret;
443 }
444
445 /// Defaults to []
446 TF_MUST_USE_RESULT Attrs AllowedDevices(const gtl::ArraySlice<::tensorflow::tstring>& x) {
447 Attrs ret = *this;
448 ret.allowed_devices_ = x;
449 return ret;
450 }
451
452 StringPiece container_ = "";
453 StringPiece shared_name_ = "";
454 gtl::ArraySlice<::tensorflow::tstring> allowed_devices_ = {};
455 };
456 VarHandleOp(const ::tensorflow::Scope& scope, DataType dtype,
457 PartialTensorShape shape);
458 VarHandleOp(const ::tensorflow::Scope& scope, DataType dtype,
459 PartialTensorShape shape, const VarHandleOp::Attrs& attrs);
460 operator ::tensorflow::Output() const { return resource; }
461 operator ::tensorflow::Input() const { return resource; }
462 ::tensorflow::Node* node() const { return resource.node(); }
463
464 static Attrs Container(StringPiece x) {
465 return Attrs().Container(x);
466 }
467 static Attrs SharedName(StringPiece x) {
468 return Attrs().SharedName(x);
469 }
470 static Attrs AllowedDevices(const gtl::ArraySlice<::tensorflow::tstring>& x) {
471 return Attrs().AllowedDevices(x);
472 }
473
474 Operation operation;
475 ::tensorflow::Output resource;
476};
477
478/// TODO: add doc.
479///
480/// Args:
481/// * scope: A Scope object
482///
483/// Returns:
484/// * `Output`: The is_initialized tensor.
485class VarIsInitializedOp {
486 public:
487 VarIsInitializedOp(const ::tensorflow::Scope& scope, ::tensorflow::Input
488 resource);
489 operator ::tensorflow::Output() const { return is_initialized; }
490 operator ::tensorflow::Input() const { return is_initialized; }
491 ::tensorflow::Node* node() const { return is_initialized.node(); }
492
493 Operation operation;
494 ::tensorflow::Output is_initialized;
495};
496
497/// TODO: add doc.
498///
499/// Args:
500/// * scope: A Scope object
501///
502/// Returns:
503/// * `Output`: The output tensor.
504class VariableShape {
505 public:
506 /// Optional attribute setters for VariableShape
507 struct Attrs {
508 /// Defaults to DT_INT32
509 TF_MUST_USE_RESULT Attrs OutType(DataType x) {
510 Attrs ret = *this;
511 ret.out_type_ = x;
512 return ret;
513 }
514
515 DataType out_type_ = DT_INT32;
516 };
517 VariableShape(const ::tensorflow::Scope& scope, ::tensorflow::Input input);
518 VariableShape(const ::tensorflow::Scope& scope, ::tensorflow::Input input,
519 const VariableShape::Attrs& attrs);
520 operator ::tensorflow::Output() const { return output; }
521 operator ::tensorflow::Input() const { return output; }
522 ::tensorflow::Node* node() const { return output.node(); }
523
524 static Attrs OutType(DataType x) {
525 return Attrs().OutType(x);
526 }
527
528 Operation operation;
529 ::tensorflow::Output output;
530};
531
532/// TODO: add doc.
533///
534/// Args:
535/// * scope: A Scope object
536///
537/// Returns:
538/// * `OutputList`: The values tensor.
539class _ReadVariablesOp {
540 public:
541 _ReadVariablesOp(const ::tensorflow::Scope& scope, ::tensorflow::InputList
542 resources, const DataTypeSlice& dtypes);
543 ::tensorflow::Output operator[](size_t index) const { return values[index]; }
544
545
546 Operation operation;
547 ::tensorflow::OutputList values;
548};
549
550/// TODO: add doc.
551///
552/// Args:
553/// * scope: A Scope object
554///
555/// Returns:
556/// * `OutputList`: The resources tensor.
557class _VarHandlesOp {
558 public:
559 _VarHandlesOp(const ::tensorflow::Scope& scope, const
560 gtl::ArraySlice<::tensorflow::tstring>& containers, const
561 gtl::ArraySlice<::tensorflow::tstring>& shared_names, int64 N,
562 const DataTypeSlice& dtypes, const
563 gtl::ArraySlice<PartialTensorShape>& shapes);
564 ::tensorflow::Output operator[](size_t index) const { return resources[index]; }
565
566
567 Operation operation;
568 ::tensorflow::OutputList resources;
569};
570
571/// @}
572
573} // namespace ops
574} // namespace tensorflow
575
576#endif // TENSORFLOW_CC_OPS_RESOURCE_VARIABLE_OPS_H_
577