aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/core/framework/op_kernel.h
diff options
context:
space:
mode:
Diffstat (limited to 'tensorflow/core/framework/op_kernel.h')
-rw-r--r--tensorflow/core/framework/op_kernel.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/tensorflow/core/framework/op_kernel.h b/tensorflow/core/framework/op_kernel.h
index 0092c6286f..a6cc323cea 100644
--- a/tensorflow/core/framework/op_kernel.h
+++ b/tensorflow/core/framework/op_kernel.h
@@ -199,7 +199,9 @@ class PersistentTensor {
// The check for initialization does not need to access the
// underlying tensor buffer.
- bool IsInitialized() { return tensor_.IsInitialized(); }
+ bool IsInitialized() const { return tensor_.IsInitialized(); }
+
+ int64 NumElements() const { return tensor_.NumElements(); }
private:
Tensor tensor_;