diff options
author | Igor Ganichev <iga@google.com> | 2017-09-28 13:08:27 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-09-28 13:16:12 -0700 |
commit | 4f3956698fd8d0aeffb6c4e40fef05664e4ff3cc (patch) | |
tree | cda9080022177ffc286735f247030d576ce499be /tensorflow/c/c_api.h | |
parent | b1728aa3c5d2d8545acea781f1e2d6ffeccf3f7a (diff) |
Use void* intead of TF_Buffer in TF_FunctionImportFunctionDef
void* is more common (and more convenient) for passing in serialized
protobufs in c_api.h.
PiperOrigin-RevId: 170386128
Diffstat (limited to 'tensorflow/c/c_api.h')
-rw-r--r-- | tensorflow/c/c_api.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tensorflow/c/c_api.h b/tensorflow/c/c_api.h index 33fd1794cf..db94828e1a 100644 --- a/tensorflow/c/c_api.h +++ b/tensorflow/c/c_api.h @@ -1132,14 +1132,16 @@ TF_CAPI_EXPORT extern void TF_FunctionToFunctionDef(TF_Function* func, TF_Buffer* output_func_def, TF_Status* status); -// Construct and return the function serialized in `func_def`. +// Construct and return the function whose FunctionDef representation is +// serialized in `proto`. `proto_len` must equal the number of bytes +// pointed to by `proto`. // Returns: // On success, a newly created TF_Function instance. It must be deleted by // calling TF_DeleteFunction. // // On failure, null. TF_CAPI_EXPORT extern TF_Function* TF_FunctionImportFunctionDef( - const TF_Buffer* func_def, TF_Status* status); + const void* proto, size_t proto_len, TF_Status* status); // Sets function attribute named `attr_name` to value stored in `proto`. // If this attribute is already set to another value, it is overriden. |