diff options
author | Jared Duke <jdduke@google.com> | 2018-08-14 11:37:01 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-08-14 11:45:51 -0700 |
commit | 425b62a344f18c875f6f024b36ae37749cb00feb (patch) | |
tree | 3e46e2b08d1f93b6cc401ae2d3567d8a62f0cee1 /tensorflow/contrib/lite/context.h | |
parent | 77fabbeabb5b9061d8c606050c1ea79aec990c03 (diff) |
Provide TfLiteContext arg to all TfLiteDelegate callbacks
Note: This change may break clients who have custom
TfLiteDelegate implementations; this API has been and remains
experimental and subject to such changes.
PiperOrigin-RevId: 208683190
Diffstat (limited to 'tensorflow/contrib/lite/context.h')
-rw-r--r-- | tensorflow/contrib/lite/context.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tensorflow/contrib/lite/context.h b/tensorflow/contrib/lite/context.h index 5bc20106d3..c920f6a508 100644 --- a/tensorflow/contrib/lite/context.h +++ b/tensorflow/contrib/lite/context.h @@ -452,13 +452,15 @@ typedef struct _TfLiteDelegate { // Copy the data from delegate buffer handle to raw memory. // This can be null if the delegate doesn't use its own buffer. - TfLiteStatus (*CopyFromBufferHandle)(TfLiteDelegate* delegate, + TfLiteStatus (*CopyFromBufferHandle)(TfLiteContext* context, + TfLiteDelegate* delegate, TfLiteBufferHandle buffer_handle, void* data, size_t size); // Copy the data from raw memory to delegate buffer handle. // This can be null if the delegate doesn't use its own buffer. - TfLiteStatus (*CopyToBufferHandle)(TfLiteDelegate* delegate, + TfLiteStatus (*CopyToBufferHandle)(TfLiteContext* context, + TfLiteDelegate* delegate, TfLiteBufferHandle buffer_handle, void* data, size_t size); @@ -466,7 +468,7 @@ typedef struct _TfLiteDelegate { // this doesn't release the underlying resource (e.g. textures). The // resources are either owned by application layer or the delegate. // This can be null if the delegate doesn't use its own buffer. - void (*FreeBufferHandle)(TfLiteDelegate* delegate, + void (*FreeBufferHandle)(TfLiteContext* context, TfLiteDelegate* delegate, TfLiteBufferHandle* handle); } TfLiteDelegate; |