aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/user_ops
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/core/user_ops')
-rw-r--r--tensorflow/core/user_ops/fact.cc18
1 files changed, 9 insertions, 9 deletions
diff --git a/tensorflow/core/user_ops/fact.cc b/tensorflow/core/user_ops/fact.cc
index c512275506..800008e0b8 100644
--- a/tensorflow/core/user_ops/fact.cc
+++ b/tensorflow/core/user_ops/fact.cc
@@ -18,27 +18,27 @@ limitations under the License.
#include "tensorflow/core/framework/op.h"
#include "tensorflow/core/framework/op_kernel.h"
-using namespace tensorflow;
-
REGISTER_OP("Fact")
.Output("fact: string")
.Doc(R"doc(
Output a fact about factorials.
)doc");
-class FactOp : public OpKernel {
+class FactOp : public tensorflow::OpKernel {
public:
- explicit FactOp(OpKernelConstruction* context) : OpKernel(context) {}
+ explicit FactOp(tensorflow::OpKernelConstruction* context)
+ : OpKernel(context) {}
- void Compute(OpKernelContext* context) override {
+ void Compute(tensorflow::OpKernelContext* context) override {
// Output a scalar string.
- Tensor* output_tensor = nullptr;
- OP_REQUIRES_OK(context,
- context->allocate_output(0, TensorShape(), &output_tensor));
+ tensorflow::Tensor* output_tensor = nullptr;
+ OP_REQUIRES_OK(context, context->allocate_output(
+ 0, tensorflow::TensorShape(), &output_tensor));
+ using tensorflow::string;
auto output = output_tensor->template scalar<string>();
output() = "0! == 1";
}
};
-REGISTER_KERNEL_BUILDER(Name("Fact").Device(DEVICE_CPU), FactOp);
+REGISTER_KERNEL_BUILDER(Name("Fact").Device(tensorflow::DEVICE_CPU), FactOp);