aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/c/c_api.h
diff options
context:
space:
mode:
authorGravatar Manjunath Kudlur <keveman@google.com>2017-07-20 14:44:20 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2017-07-20 14:47:43 -0700
commit19cc9a796d86b5cf2193e7648ac9ae05c5efb53f (patch)
tree6966d04d3470d74844f188a209f1cb22026eae40 /tensorflow/c/c_api.h
parent5dbae025a1b61155883c2f3c868bed9e53000e09 (diff)
Added DT_VARIANT type.
A tensor with DT_VARIANT type can store arbitrary C++ data structures. DT_VARIANT is implemented using a type-erased data structure similar to std::any, but with extensions to make it compatible with tensorflow::Tensor. In particular, Encode and Decode methods need to be provided by C++ classes whose objects are stored in Variant. PiperOrigin-RevId: 162668355
Diffstat (limited to 'tensorflow/c/c_api.h')
-rw-r--r--tensorflow/c/c_api.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/tensorflow/c/c_api.h b/tensorflow/c/c_api.h
index 3aeafb4685..46758408c4 100644
--- a/tensorflow/c/c_api.h
+++ b/tensorflow/c/c_api.h
@@ -117,6 +117,7 @@ typedef enum TF_DataType {
TF_COMPLEX128 = 18, // Double-precision complex
TF_HALF = 19,
TF_RESOURCE = 20,
+ TF_VARIANT = 21,
} TF_DataType;
// TF_DataTypeSize returns the sizeof() for the underlying type corresponding