diff options
author | Peter Hawkins <phawkins@google.com> | 2018-06-01 08:34:24 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-06-01 08:37:00 -0700 |
commit | 46cd11058d049362b3ec813c7c07193449242eb3 (patch) | |
tree | 8483a62cd3a7e73874aaee9e6a8967595ba3e2bb /tensorflow/core/kernels/control_flow_ops.cc | |
parent | ccbb84022008c5a789b3767c3b1abf0806b4e3b6 (diff) |
Automated g4 rollback of changelist 198810875
PiperOrigin-RevId: 198876135
Diffstat (limited to 'tensorflow/core/kernels/control_flow_ops.cc')
-rw-r--r-- | tensorflow/core/kernels/control_flow_ops.cc | 22 |
1 files changed, 6 insertions, 16 deletions
diff --git a/tensorflow/core/kernels/control_flow_ops.cc b/tensorflow/core/kernels/control_flow_ops.cc index 7d5d54e5be..ebf844d75f 100644 --- a/tensorflow/core/kernels/control_flow_ops.cc +++ b/tensorflow/core/kernels/control_flow_ops.cc @@ -587,24 +587,14 @@ REGISTER_SYCL_HOST_KERNEL(string); #undef REGISTER_SYCL_HOST_KERNEL #endif // TENSORFLOW_USE_SYCL -// A LoopCond op has one input and one output. The input is a boolean -// scalar representing the taken branches of the "pivot" Switch that -// determines loop termination. As a contract, any high-level front-end -// should always use port '0' of the "pivot" switches for loop exit. -class LoopCondOp : public OpKernel { - public: - explicit LoopCondOp(OpKernelConstruction* context) : OpKernel(context) {} - - void Compute(OpKernelContext* context) override { - context->set_output(0, context->input(0)); - } +LoopCondOp::LoopCondOp(OpKernelConstruction* context) : OpKernel(context) {} +LoopCondOp::~LoopCondOp() = default; - bool IsExpensive() override { return false; } - - ~LoopCondOp() override {} +void LoopCondOp::Compute(OpKernelContext* context) { + context->set_output(0, context->input(0)); +} - TF_DISALLOW_COPY_AND_ASSIGN(LoopCondOp); -}; +bool LoopCondOp::IsExpensive() { return false; } REGISTER_KERNEL_BUILDER(Name("LoopCond").Device(DEVICE_CPU), LoopCondOp); REGISTER_KERNEL_BUILDER(Name("LoopCond") |