diff options
author | 2018-08-16 12:30:14 -0700 | |
---|---|---|
committer | 2018-08-16 12:33:48 -0700 | |
commit | b09f347b6498edbd0aeeaa1001930e968e80dd49 (patch) | |
tree | 107119745508ea8a78201e1c4155e4ae5a6a89de /tensorflow/contrib/lite/util.cc | |
parent | 1326f33515dac82fbdd7ef502d1df5e96986fc12 (diff) |
Refactoring: Extract IsEagerOp function to shared component.
PiperOrigin-RevId: 209027338
Diffstat (limited to 'tensorflow/contrib/lite/util.cc')
-rw-r--r-- | tensorflow/contrib/lite/util.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tensorflow/contrib/lite/util.cc b/tensorflow/contrib/lite/util.cc index 8ccb65c24f..7950653da9 100644 --- a/tensorflow/contrib/lite/util.cc +++ b/tensorflow/contrib/lite/util.cc @@ -14,8 +14,15 @@ limitations under the License. ==============================================================================*/ #include "tensorflow/contrib/lite/util.h" +#include <cstring> + namespace tflite { +bool IsEagerOp(const char* custom_name) { + return custom_name && strncmp(custom_name, kEagerCustomCodePrefix, + strlen(kEagerCustomCodePrefix)) == 0; +} + TfLiteIntArray* ConvertVectorToTfLiteIntArray(const std::vector<int>& input) { return ConvertArrayToTfLiteIntArray(input.size(), input.data()); } |