diff options
author | Alexandre Passos <apassos@google.com> | 2017-04-12 15:30:57 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-04-12 16:45:16 -0700 |
commit | a5a8558feb9417359e30a991ab5e01cf17194473 (patch) | |
tree | 042d5208bd75c71ac298d0d508eca25dc96b4f7e /tensorflow/c/c_api.h | |
parent | eec34a104fae837a3ea7ce64c8110c2e19f20a27 (diff) |
Fetch / py_func arguments no longer copy.
Change: 153003331
Diffstat (limited to 'tensorflow/c/c_api.h')
-rw-r--r-- | tensorflow/c/c_api.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tensorflow/c/c_api.h b/tensorflow/c/c_api.h index f837b68d76..a686f7f701 100644 --- a/tensorflow/c/c_api.h +++ b/tensorflow/c/c_api.h @@ -220,6 +220,10 @@ extern TF_Tensor* TF_NewTensor(TF_DataType, const int64_t* dims, int num_dims, extern TF_Tensor* TF_AllocateTensor(TF_DataType, const int64_t* dims, int num_dims, size_t len); +// Deletes `tensor` and returns a new TF_Tensor with the same content if +// possible. Returns nullptr and leaves `tensor` untouched if not. +extern TF_Tensor* TF_TensorMaybeMove(TF_Tensor* tensor); + // Destroy a tensor. extern void TF_DeleteTensor(TF_Tensor*); |