From 2dca583c854019d9b55b999134c8853558a3c5bc Mon Sep 17 00:00:00 2001 From: wangguokun Date: Mon, 8 Jul 2024 02:35:17 +0000 Subject: [PATCH] lib/tflite: port tflite to tenonos Signed-off-by: wangguokun --- .clang-format | 11 + .editorconfig | 14 + Config.uk | 20 +- Makefile.uk | 352 +- README.md | 16 +- .../configuration/configuration.pb.cc | 12475 +++++++++++++ .../configuration/configuration.pb.h | 15094 ++++++++++++++++ patches/0001-Change-zu-to-lu.patch | 47 - patches/0001-Remove-__builtln_clrsbdi2.patch | 22 + ...em-of-the-file-link-of-the-same-name.patch | 30 + 10 files changed, 27960 insertions(+), 121 deletions(-) create mode 100644 .clang-format create mode 100644 .editorconfig create mode 100644 generated/tensorflow/lite/acceleration/configuration/configuration.pb.cc create mode 100644 generated/tensorflow/lite/acceleration/configuration/configuration.pb.h delete mode 100644 patches/0001-Change-zu-to-lu.patch create mode 100644 patches/0001-Remove-__builtln_clrsbdi2.patch create mode 100644 patches/0002-solve-the-problem-of-the-file-link-of-the-same-name.patch diff --git a/.clang-format b/.clang-format new file mode 100644 index 0000000..958f4c2 --- /dev/null +++ b/.clang-format @@ -0,0 +1,11 @@ +# Style is similar to Linux Kernel +# https://www.kernel.org/doc/Documentation/CodingStyle +BasedOnStyle: LLVM +IndentWidth: 8 +UseTab: Always +BreakBeforeBraces: Linux +BreakBeforeBinaryOperators: NonAssignment +AllowShortFunctionsOnASingleLine: Empty +AllowShortIfStatementsOnASingleLine: false +IndentCaseLabels: false +SortIncludes: false diff --git a/.editorconfig b/.editorconfig new file mode 100644 index 0000000..3811cc2 --- /dev/null +++ b/.editorconfig @@ -0,0 +1,14 @@ +root = true + +[*] +charset = utf-8 +end_of_line = lf +indent_size = 8 +indent_style = tab +max_line_length = 80 +insert_final_newline = true +trim_trailing_whitespace = true + +[.git/**] +max_line_length = 75 + diff --git a/Config.uk b/Config.uk index 8d483a2..c4127b5 100644 --- a/Config.uk +++ b/Config.uk @@ -1,9 +1,8 @@ menuconfig LIBTFLITE bool "TensorFlowLite - tensorflow lite library" select LIBCXX - select LIBNEWLIBC + select LIBMUSL select LIBPOSIX_SYSINFO - select LIBPTHREAD_EMBEDDED select LIBCOMPILTER_RT select LIBCOMPILER_RT_ATOMIC select LIBEIGEN @@ -11,12 +10,21 @@ menuconfig LIBTFLITE select LIBFLATBUFFERS select LIBGEMMLOWP select LIBFARMHASH + select LIBRUY + select LIBPROTOBUF + select LIBABSL + select LIBPYTHON3 if LIBTFLITE_BUILD_WITH_PYTHON + select LIBPYTHON_NUMPY if LIBTFLITE_BUILD_WITH_PYTHON + select LIBPYBIND11 if LIBTFLITE_BUILD_WITH_PYTHON + select LIBUKVMEM + select LIBPOSIX_MMAP select LIBUK9P select LIB9PFS select LIBDEVFS select LIBDEVFS_AUTOMOUNT select LIBVFSCORE_AUTOMOUNT_ROOTFS select LIBUKLIBPARAM + select LIBPTHREADPOOL default n if LIBTFLITE @@ -43,8 +51,14 @@ if LIBTFLITE default n endif +if LIBTFLITE + config LIBTFLITE_BUILD_WITH_PYTHON + bool "Use Python API" + default n +endif + if LIBTFLITE config LIBTFLITE_MAIN_FUNCTION bool "Provide main function" - default y + default n endif diff --git a/Makefile.uk b/Makefile.uk index 193a3b0..3200235 100644 --- a/Makefile.uk +++ b/Makefile.uk @@ -30,38 +30,44 @@ # POSSIBILITY OF SUCH DAMAGE. # +################################################################################ +# Library registration +################################################################################ $(eval $(call addlib_s,libtflite,$(CONFIG_LIBTFLITE))) ################################################################################ # Sources ################################################################################ -LIBTFLITE_VERSION=2.0.1 +LIBTFLITE_VERSION=2.14.0 LIBTFLITE_PATCHDIR=$(LIBTFLITE_BASE)/patches +LIBTFLITE_URL=https://github.com/tensorflow/tensorflow/archive/refs/tags/v$(LIBTFLITE_VERSION).zip -LIBTFLITE_URL=https://github.com/tensorflow/tensorflow/archive/v$(LIBTFLITE_VERSION).tar.gz +ifeq ($(CONFIG_LIBTFLITE), y) $(eval $(call fetch,libtflite,$(LIBTFLITE_URL))) $(eval $(call patch,libtflite,$(LIBTFLITE_PATCHDIR),tensorflow-$(LIBTFLITE_VERSION))) +endif ################################################################################ # Helpers ################################################################################ LIBTFLITE_SUBDIR=tensorflow-$(LIBTFLITE_VERSION) LIBTFLITE_SRC = $(LIBTFLITE_ORIGIN)/$(LIBTFLITE_SUBDIR) +LIBTFLITE_BSRC = $(LIBTFLITE_BASE)/generated/ ################################################################################ # Library includes ################################################################################ -CXXINCLUDES-$(CONFIG_LIBTFLITE) += -I$(LIBTFLITE_SRC)/ +CXXINCLUDES-$(CONFIG_LIBTFLITE) += -I$(LIBTFLITE_BSRC) +CXXINCLUDES-$(CONFIG_LIBTFLITE) += -I$(LIBTFLITE_SRC) CXXINCLUDES-$(CONFIG_LIBTFLITE) += -I$(LIBTFLITE_SRC)/tensorflow/lite - -CINCLUDES-$(CONFIG_LIBTFLITE) += -I$(LIBTFLITE_SRC)/ +CINCLUDES-$(CONFIG_LIBTFLITE) += -I$(LIBTFLITE_BSRC) +CINCLUDES-$(CONFIG_LIBTFLITE) += -I$(LIBTFLITE_SRC) CINCLUDES-$(CONFIG_LIBTFLITE) += -I$(LIBTFLITE_SRC)/tensorflow/lite ################################################################################ # Main code ################################################################################ - ifdef CONFIG_LIBTFLITE_MAIN_FUNCTION LIBTFLITE_SRCS-$(CONFIG_LIBTFLITE_MAIN_FUNCTION) += $(LIBTFLITE_BASE)/main.cpp endif @@ -71,13 +77,28 @@ endif ################################################################################ LIBTFLITE_SUPPRESS_FLAGS += -Wno-sign-compare -Wno-unused-parameter -Wno-comment \ -Wno-missing-field-initializers -Wno-parantheses \ - -Wno-unused-function -Wno-unknown-pragmas + -Wno-unused-function -Wno-unknown-pragmas \ + -Wno-unused-parameter -Wno-unused-variable \ + -Wno-unused-value -Wno-unused-function -LIBTFLITE_CXXFLAGS-y += $(LIBTFLITE_SUPPRESS_FLAGS) LIBTFLITE_CFLAGS-y += $(LIBTFLITE_SUPPRESS_FLAGS) +LIBTFLITE_CXXFLAGS-y += $(LIBTFLITE_SUPPRESS_FLAGS) + +GCC_INSTALLDIR_FLAGS := -idirafter $(shell LC_ALL=C $(CC) -v 2>&1 | \ + $(SED) -e '/^COLLECT_LTO_WRAPPER=\(.*\)\/lto-wrapper/!d' -e 's//\1/')/include + +ifeq ($(CONFIG_ARCH_X86_64), y) +LIBTFLITE_CFLAGS-$(CONFIG_ARCH_X86_64) += $(GCC_INSTALLDIR_FLAGS) +LIBTFLITE_CXXFLAGS-$(CONFIG_ARCH_X86_64) += $(GCC_INSTALLDIR_FLAGS) +endif + +ifeq ($(CONFIG_ARCH_ARM_64), y) +LIBTFLITE_CFLAGS-$(CONFIG_ARCH_ARM_64) += $(GCC_INSTALLDIR_FLAGS) +LIBTFLITE_CXXFLAGS-$(CONFIG_ARCH_ARM_64) += $(GCC_INSTALLDIR_FLAGS) +endif ifdef CONFIG_LIBTFLITE_BUILD_WITH_RUY -LIBTFLITE_CXXFLAGS-y += -D TFLITE_WITH_RUY +LIBTFLITE_CXXFLAGS-y += -D TFLITE_WITH_RUY LIBTFLITE_CFLAGS-y += -D TFLITE_WITH_RUY endif @@ -89,77 +110,270 @@ endif ################################################################################ # Library sources ################################################################################ -MINIMAL_SRCS := $(LIBTFLITE_SRC)/tensorflow/lite/examples/minimal/minimal.cc - - -CORE_CC_ALL_SRCS := \ - $(wildcard $(LIBTFLITE_SRC)/tensorflow/lite/*.cc) \ - $(wildcard $(LIBTFLITE_SRC)/tensorflow/lite/*.c) \ - $(wildcard $(LIBTFLITE_SRC)/tensorflow/lite/c/*.c) \ - $(wildcard $(LIBTFLITE_SRC)/tensorflow/lite/core/*.cc) \ - $(wildcard $(LIBTFLITE_SRC)/tensorflow/lite/core/api/*.cc) \ - $(wildcard $(LIBTFLITE_SRC)/tensorflow/lite/experimental/resource_variable/*.cc) \ - $(LIBTFLITE_SRC)/tensorflow/lite/experimental/ruy/allocator.cc \ - $(LIBTFLITE_SRC)/tensorflow/lite/experimental/ruy/block_map.cc \ - $(LIBTFLITE_SRC)/tensorflow/lite/experimental/ruy/blocking_counter.cc \ - $(LIBTFLITE_SRC)/tensorflow/lite/experimental/ruy/context.cc \ - $(LIBTFLITE_SRC)/tensorflow/lite/experimental/ruy/detect_dotprod.cc \ - $(LIBTFLITE_SRC)/tensorflow/lite/experimental/ruy/kernel_arm32.cc \ - $(LIBTFLITE_SRC)/tensorflow/lite/experimental/ruy/kernel_arm64.cc \ - $(LIBTFLITE_SRC)/tensorflow/lite/experimental/ruy/pack_arm.cc \ - $(LIBTFLITE_SRC)/tensorflow/lite/experimental/ruy/pmu.cc \ - $(LIBTFLITE_SRC)/tensorflow/lite/experimental/ruy/thread_pool.cc \ - $(LIBTFLITE_SRC)/tensorflow/lite/experimental/ruy/trace.cc \ - $(LIBTFLITE_SRC)/tensorflow/lite/experimental/ruy/trmul.cc \ - $(LIBTFLITE_SRC)/tensorflow/lite/experimental/ruy/tune.cc \ - $(LIBTFLITE_SRC)/tensorflow/lite/experimental/ruy/wait.cc \ - $(LIBTFLITE_SRC)/tensorflow/lite/minimal_logging_default.cc - - - -CORE_CC_ALL_SRCS += \ - $(wildcard $(LIBTFLITE_SRC)/tensorflow/lite/kernels/*.cc) \ - $(wildcard $(LIBTFLITE_SRC)/tensorflow/lite/kernels/internal/*.cc) \ - $(wildcard $(LIBTFLITE_SRC)/tensorflow/lite/kernels/internal/optimized/*.cc) \ - $(wildcard $(LIBTFLITE_SRC)/tensorflow/lite/kernels/internal/reference/*.cc) - - -CORE_CC_ALL_SRCS := $(sort $(CORE_CC_ALL_SRCS)) -CORE_CC_EXCLUDE_SRCS := \ - $(wildcard $(LIBTFLITE_SRC)/tensorflow/lite/*test.cc) \ - $(wildcard $(LIBTFLITE_SRC)/tensorflow/lite/*/*test.cc) \ - $(wildcard $(LIBTFLITE_SRC)/tensorflow/lite/*/*/*test.cc) \ - $(wildcard $(LIBTFLITE_SRC)/tensorflow/lite/*/*/*/*test.cc) \ - $(wildcard $(LIBTFLITE_SRC)/tensorflow/lite/kernels/*test_main.cc) \ - $(wildcard $(LIBTFLITE_SRC)/tensorflow/lite/kernels/*test_util.cc) \ - $(LIBTFLITE_SRC)/tensorflow/lite/experimental/ruy/pmu.cc \ - $(LIBTFLITE_SRC)/tensorflow/lite/minimal_logging_android.cc \ - $(LIBTFLITE_SRC)/tensorflow/lite/minimal_logging_ios.cc \ - $(MINIMAL_SRCS) - - -COMPILE_MANUAL_SRCS := \ - $(LIBTFLITE_SRC)/tensorflow/lite/kernels/internal/mfcc.cc \ - $(LIBTFLITE_SRC)/tensorflow/lite/kernels/mfcc.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/external_cpu_backend_context.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/minimal_logging_default.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/arena_planner.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/stderr_reporter.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/string_util.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/simple_planner.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/minimal_logging.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/util.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/array.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/mutable_op_resolver.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/tensorflow_profiler_logger_shim.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/logger.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/simple_memory_arena_debug_dump.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/graph_info.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/allocation.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/simple_memory_arena.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/optional_debug_tools.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/tflite_with_xnnpack_optional.cc + +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/c/common_internal.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/core/interpreter_experimental.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/core/interpreter_builder.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/core/signature_runner.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/core/model_builder.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/core/create_op_resolver_with_builtin_ops.cc + +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/profiling/telemetry/profiler.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/profiling/telemetry/telemetry.cc + +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/core/subgraph.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/core/interpreter.cc + +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/core/api/error_reporter.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/core/api/flatbuffer_conversions.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/core/api/op_resolver.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/core/api/tensor_utils.cc|api + +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/experimental/resource/initialization_status.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/experimental/resource/resource_variable.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/experimental/resource/static_hashtable.cc + +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/batch_matmul.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/sign.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/broadcast_args.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/pad.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/reshape.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/right_shift.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/hashtable_size.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/sparse_to_dense.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/neg.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/mul.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/segment_sum.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/mirror_pad.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/pow.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/ceil.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/zeros_like.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/comparisons.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/assign_variable.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/fully_connected.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/space_to_batch_nd.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/reverse.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/dynamic_update_slice.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/deprecated_backends.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/pooling.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/hashtable.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/unidirectional_sequence_rnn.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/while.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/squared_difference.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/floor_mod.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/maximum_minimum.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/quantize.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/split_v.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/cpu_backend_context.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/depthwise_conv.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/lsh_projection.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/reverse_sequence.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/complex_support.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/squeeze.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/range.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/skip_gram.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/eigen_support.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/bidirectional_sequence_rnn.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/resize_bilinear.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/unidirectional_sequence_gru.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/matrix_set_diag.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/read_variable.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/bidirectional_sequence_lstm.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/multinomial.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/svdf.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/bitcast.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/densify.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/variable_ops_wrapper.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/split.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/tile.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/rfft2d.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/logical.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/bitwise_xor.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/exp.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/rank.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/shape.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/batch_to_space_nd.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/gather_nd.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/audio_spectrogram.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/activations.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/random_uniform_custom.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/hashtable_lookup.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/arg_min_max.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/floor_div.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/unsorted_segment.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/matrix_diag.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/fake_quant.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/numeric_verify.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/sign_custom.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/embedding_lookup.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/kernel_util.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/div.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/scatter_nd.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/register_ref.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/conv.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/slice.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/dequantize.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/add_n.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/hashtable_import.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/if.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/l2norm.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/sub.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/lstm.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/topk_v2.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/detection_postprocess.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/mfcc.cc|kernels +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/atan2_custom.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/round.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/var_handle.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/transpose.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/cast.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/pooling3d.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/gather.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/depth_to_space.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/conv3d_transpose.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/atan2.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/cpu_backend_gemm_eigen.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/space_to_depth.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/unidirectional_sequence_lstm.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/embedding_lookup_sparse.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/gru_cell.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/call_once.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/roll.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/bucketize.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/broadcast_to.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/strided_slice.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/local_response_norm.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/random_standard_normal_custom.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/pack.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/add.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/conv3d.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/transpose_conv.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/random_ops.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/hashtable_find.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/elementwise.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/unique.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/concatenation.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/basic_rnn.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/reduce.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/fill.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/expand_dims.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/floor.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/cumsum.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/where.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/unpack.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/resize_nearest_neighbor.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/non_max_suppression.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/select.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/table.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/lstm_eval.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/one_hot.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/ctc/ctc_beam_search_decoder.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/internal/opaque_tensor_ctypes.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/internal/tensor_utils.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/internal/spectrogram.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/internal/transpose_utils.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/internal/portable_tensor_utils_noinline.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/internal/mfcc_dct.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/internal/tensor_ctypes.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/internal/runtime_shape.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/internal/mfcc.cc|internal +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/internal/quantization_util.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/internal/mfcc_mel_filterbank.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/internal/kernel_utils.cc + +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/core/c/c_api_opaque.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/core/c/registration_external.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/core/c/common.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/core/c/c_api_experimental.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/core/c/c_api.cc + +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/core/kernels/register.cc + +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/internal/reference/comparisons_noinline.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/internal/reference/portable_tensor_utils.cc + +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/internal/optimized/4bit/fully_connected_reference.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/internal/optimized/cpu_check.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/internal/optimized/sse_tensor_utils.cc + +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/internal/common_noinline.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/internal/optimized/neon_tensor_utils.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/internal/utils/sparsity_format_converter.cc + +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/schema/schema_conversion_utils.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/schema/schema_utils.cc + +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/profiling/profile_buffer.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/profiling/memory_usage_monitor.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/profiling/profile_summary_formatter.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/profiling/time.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/profiling/root_profiler.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/profiling/profile_summarizer.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/profiling/platform_profiler.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/profiling/atrace_profiler.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/profiling/subgraph_tensor_profiler.cc + +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/delegates/serialization.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/delegates/utils.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/delegates/interpreter_utils.cc + +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/delegates/utils/simple_delegate.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/delegates/utils/async_type_helpers.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/delegates/utils/simple_opaque_delegate.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/delegates/utils/sync_fence.cc + +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/acceleration/configuration/proto_to_flatbuffer.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/acceleration/configuration/flatbuffer_to_proto.cc + +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/core/acceleration/configuration/delegate_registry.cc + +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/core/tools/verifier.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/core/tools/verifier_internal.cc + +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/experimental/acceleration/mini_benchmark/mini_benchmark.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/experimental/remat/metadata_util.cc + +LIBTFLITE_SRCS-y += $(LIBTFLITE_BSRC)/tensorflow/lite/acceleration/configuration/configuration.pb.cc + +## -- Python Interpreters +LIBTFLITE_SRCS-$(CONFIG_LIBPYTHON3_EXTENSION_TFLITE) += $(LIBTFLITE_SRC)/tensorflow/lite/python/interpreter_wrapper/interpreter_wrapper.cc +LIBTFLITE_SRCS-$(CONFIG_LIBPYTHON3_EXTENSION_TFLITE) += $(LIBTFLITE_SRC)/tensorflow/lite/python/interpreter_wrapper/interpreter_wrapper_pybind11.cc +LIBTFLITE_SRCS-$(CONFIG_LIBPYTHON3_EXTENSION_TFLITE) += $(LIBTFLITE_SRC)/tensorflow/lite/python/interpreter_wrapper/python_error_reporter.cc +LIBTFLITE_SRCS-$(CONFIG_LIBPYTHON3_EXTENSION_TFLITE) += $(LIBTFLITE_SRC)/tensorflow/lite/python/interpreter_wrapper/python_utils.cc +LIBTFLITE_SRCS-$(CONFIG_LIBPYTHON3_EXTENSION_TFLITE) += $(LIBTFLITE_SRC)/tensorflow/lite/python/interpreter_wrapper/numpy.cc ifeq ($(CONFIG_LIBUKMMAP),y) -CORE_CC_EXCLUDE_SRCS += $(LIBTFLITE_SRC)/tensorflow/lite/mmap_allocation_disabled.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/mmap_allocation.cc else -CORE_CC_EXCLUDE_SRCS += $(LIBTFLITE_SRC)/tensorflow/lite/mmap_allocation.cc +LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/mmap_allocation_disabled.cc endif ifeq ($(LIBTFLITE_BUILD_WITH_NNAPI),y) -CORE_CC_ALL_SRCS += \ +LIBTFLITE_SRCS-y += \ $(LIBTFLITE_SRC)/tensorflow/lite/delegates/nnapi/nnapi_delegate.cc \ $(LIBTFLITE_SRC)/tensorflow/lite/delegates/nnapi/quant_lstm_sup.cc \ $(LIBTFLITE_SRC)/tensorflow/lite/nnapi/nnapi_implementation.cc else -CORE_CC_ALL_SRCS += \ +LIBTFLITE_SRCS-y += \ $(LIBTFLITE_SRC)/tensorflow/lite/delegates/nnapi/nnapi_delegate_disabled.cc \ $(LIBTFLITE_SRC)/tensorflow/lite/nnapi/nnapi_implementation_disabled.cc endif - -LIBTFLITE_SRCS-y += $(filter-out $(CORE_CC_EXCLUDE_SRCS) $(COMPILE_MANUAL_SRCS), $(CORE_CC_ALL_SRCS)) -LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/internal/mfcc.cc|internal -LIBTFLITE_SRCS-y += $(LIBTFLITE_SRC)/tensorflow/lite/kernels/mfcc.cc|kernels diff --git a/README.md b/README.md index 34ab3e7..13776e9 100644 --- a/README.md +++ b/README.md @@ -9,10 +9,9 @@ subdirectory of the main unikraft repository. TensorFlowLite interpreter depends on the following libraries, that need to be added to `Makefile` in this order: -* `pthreads`, e.g. `pthread-embedded` * `libcxx` * `libcxxabi` -* `libc`, e.g. `newlib` +* `libmusl` * `libunwind` * `libcompilerrt` * `libgemmlowp` @@ -20,6 +19,11 @@ be added to `Makefile` in this order: * `libfarmhash` * `libeigen` * `libfft2` +* `libruy` +* `libprotobuf` +* `libabsl` +* `libpython_numpy` if use Python API +* `libpybind` if use Python API ## Root filesystem ### Creating the filesystem @@ -58,3 +62,11 @@ Currently, `main.cpp` contains a minimal example for loading a *tflite* model an printing the interpreter state. The sample program will try to load the model from `mobilenet_v1_1.0_224.tflite` (this model and other models from the same family can be downloaded from [here](https://github.com/tensorflow/models/blob/master/research/slim/nets/mobilenet_v1.md)) + +## 关于 generated 文件 + +对原tensorflow仓库中的 .proto 文件转换成对应的 .c 文件,通过 protoc 命令执行: + +```powershell +find tensorflow/lite/acceleration/ -name *.proto | xargs -I {} protoc --cpp_out=./generated {} +``` diff --git a/generated/tensorflow/lite/acceleration/configuration/configuration.pb.cc b/generated/tensorflow/lite/acceleration/configuration/configuration.pb.cc new file mode 100644 index 0000000..02a94b4 --- /dev/null +++ b/generated/tensorflow/lite/acceleration/configuration/configuration.pb.cc @@ -0,0 +1,12475 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/lite/acceleration/configuration/configuration.proto + +#include "tensorflow/lite/acceleration/configuration/configuration.pb.h" + +#include + +#include +#include +#include +#include +#include +#include +#include +// @@protoc_insertion_point(includes) +#include + +PROTOBUF_PRAGMA_INIT_SEG + +namespace _pb = ::PROTOBUF_NAMESPACE_ID; +namespace _pbi = _pb::internal; + +namespace tflite { +namespace proto { +PROTOBUF_CONSTEXPR ComputeSettings::ComputeSettings( + ::_pbi::ConstantInitialized) + : model_namespace_for_statistics_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}) + , model_identifier_for_statistics_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}) + , tflite_settings_(nullptr) + , settings_to_test_locally_(nullptr) + , preference_(0) +{} +struct ComputeSettingsDefaultTypeInternal { + PROTOBUF_CONSTEXPR ComputeSettingsDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ComputeSettingsDefaultTypeInternal() {} + union { + ComputeSettings _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ComputeSettingsDefaultTypeInternal _ComputeSettings_default_instance_; +PROTOBUF_CONSTEXPR NNAPISettings::NNAPISettings( + ::_pbi::ConstantInitialized) + : accelerator_name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}) + , cache_directory_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}) + , model_token_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}) + , fallback_settings_(nullptr) + , execution_preference_(0) + + , no_of_nnapi_instances_to_cache_(0) + , execution_priority_(0) + + , allow_nnapi_cpu_on_android_10_plus_(false) + , allow_dynamic_dimensions_(false) + , allow_fp16_precision_for_fp32_(false) + , use_burst_computation_(false) + , support_library_handle_(int64_t{0}){} +struct NNAPISettingsDefaultTypeInternal { + PROTOBUF_CONSTEXPR NNAPISettingsDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~NNAPISettingsDefaultTypeInternal() {} + union { + NNAPISettings _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 NNAPISettingsDefaultTypeInternal _NNAPISettings_default_instance_; +PROTOBUF_CONSTEXPR GPUSettings::GPUSettings( + ::_pbi::ConstantInitialized) + : cache_directory_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}) + , model_token_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}) + , is_precision_loss_allowed_(false) + , force_backend_(0) + + , inference_priority1_(0) + + , inference_priority2_(0) + + , inference_priority3_(0) + + , inference_preference_(0) + + , enable_quantized_inference_(true){} +struct GPUSettingsDefaultTypeInternal { + PROTOBUF_CONSTEXPR GPUSettingsDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~GPUSettingsDefaultTypeInternal() {} + union { + GPUSettings _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GPUSettingsDefaultTypeInternal _GPUSettings_default_instance_; +PROTOBUF_CONSTEXPR HexagonSettings::HexagonSettings( + ::_pbi::ConstantInitialized) + : debug_level_(0) + , powersave_level_(0) + , print_graph_profile_(false) + , print_graph_debug_(false){} +struct HexagonSettingsDefaultTypeInternal { + PROTOBUF_CONSTEXPR HexagonSettingsDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~HexagonSettingsDefaultTypeInternal() {} + union { + HexagonSettings _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 HexagonSettingsDefaultTypeInternal _HexagonSettings_default_instance_; +PROTOBUF_CONSTEXPR XNNPackSettings::XNNPackSettings( + ::_pbi::ConstantInitialized) + : num_threads_(0) + , flags_(0) +{} +struct XNNPackSettingsDefaultTypeInternal { + PROTOBUF_CONSTEXPR XNNPackSettingsDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~XNNPackSettingsDefaultTypeInternal() {} + union { + XNNPackSettings _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 XNNPackSettingsDefaultTypeInternal _XNNPackSettings_default_instance_; +PROTOBUF_CONSTEXPR CoreMLSettings::CoreMLSettings( + ::_pbi::ConstantInitialized) + : enabled_devices_(0) + + , coreml_version_(0) + , max_delegated_partitions_(0) + , min_nodes_per_partition_(2){} +struct CoreMLSettingsDefaultTypeInternal { + PROTOBUF_CONSTEXPR CoreMLSettingsDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~CoreMLSettingsDefaultTypeInternal() {} + union { + CoreMLSettings _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CoreMLSettingsDefaultTypeInternal _CoreMLSettings_default_instance_; +PROTOBUF_CONSTEXPR StableDelegateLoaderSettings::StableDelegateLoaderSettings( + ::_pbi::ConstantInitialized) + : delegate_path_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}) + , delegate_name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}){} +struct StableDelegateLoaderSettingsDefaultTypeInternal { + PROTOBUF_CONSTEXPR StableDelegateLoaderSettingsDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~StableDelegateLoaderSettingsDefaultTypeInternal() {} + union { + StableDelegateLoaderSettings _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 StableDelegateLoaderSettingsDefaultTypeInternal _StableDelegateLoaderSettings_default_instance_; +PROTOBUF_CONSTEXPR CompilationCachingSettings::CompilationCachingSettings( + ::_pbi::ConstantInitialized) + : cache_dir_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}) + , model_token_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}){} +struct CompilationCachingSettingsDefaultTypeInternal { + PROTOBUF_CONSTEXPR CompilationCachingSettingsDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~CompilationCachingSettingsDefaultTypeInternal() {} + union { + CompilationCachingSettings _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CompilationCachingSettingsDefaultTypeInternal _CompilationCachingSettings_default_instance_; +PROTOBUF_CONSTEXPR EdgeTpuDeviceSpec::EdgeTpuDeviceSpec( + ::_pbi::ConstantInitialized) + : device_paths_() + , platform_type_(0) + + , num_chips_(0) + , chip_family_(0){} +struct EdgeTpuDeviceSpecDefaultTypeInternal { + PROTOBUF_CONSTEXPR EdgeTpuDeviceSpecDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~EdgeTpuDeviceSpecDefaultTypeInternal() {} + union { + EdgeTpuDeviceSpec _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EdgeTpuDeviceSpecDefaultTypeInternal _EdgeTpuDeviceSpec_default_instance_; +PROTOBUF_CONSTEXPR EdgeTpuInactivePowerConfig::EdgeTpuInactivePowerConfig( + ::_pbi::ConstantInitialized) + : inactive_timeout_us_(int64_t{0}) + , inactive_power_state_(0) +{} +struct EdgeTpuInactivePowerConfigDefaultTypeInternal { + PROTOBUF_CONSTEXPR EdgeTpuInactivePowerConfigDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~EdgeTpuInactivePowerConfigDefaultTypeInternal() {} + union { + EdgeTpuInactivePowerConfig _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EdgeTpuInactivePowerConfigDefaultTypeInternal _EdgeTpuInactivePowerConfig_default_instance_; +PROTOBUF_CONSTEXPR EdgeTpuSettings::EdgeTpuSettings( + ::_pbi::ConstantInitialized) + : inactive_power_configs_() + , hardware_cluster_ids_() + , _hardware_cluster_ids_cached_byte_size_(0) + , model_token_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}) + , public_model_id_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}) + , edgetpu_device_spec_(nullptr) + , inference_power_state_(0) + + , float_truncation_type_(0) + + , qos_class_(0) + + , inference_priority_(-1){} +struct EdgeTpuSettingsDefaultTypeInternal { + PROTOBUF_CONSTEXPR EdgeTpuSettingsDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~EdgeTpuSettingsDefaultTypeInternal() {} + union { + EdgeTpuSettings _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 EdgeTpuSettingsDefaultTypeInternal _EdgeTpuSettings_default_instance_; +PROTOBUF_CONSTEXPR GoogleEdgeTpuSettings::GoogleEdgeTpuSettings( + ::_pbi::ConstantInitialized) + : extension_data_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}) + , model_identifier_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}) + , priority_(0) + + , enable_tracing_(false) + , use_async_api_(false) + , allow_fp16_precision_for_fp32_(false) + , prefer_cache_coherency_for_inputs_(0) + + , prefer_cache_coherency_for_outputs_(0) + + , log_verbosity_(-1) + , delegate_should_manage_cache_for_inputs_(true) + , delegate_should_manage_cache_for_outputs_(true){} +struct GoogleEdgeTpuSettingsDefaultTypeInternal { + PROTOBUF_CONSTEXPR GoogleEdgeTpuSettingsDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~GoogleEdgeTpuSettingsDefaultTypeInternal() {} + union { + GoogleEdgeTpuSettings _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 GoogleEdgeTpuSettingsDefaultTypeInternal _GoogleEdgeTpuSettings_default_instance_; +PROTOBUF_CONSTEXPR CoralSettings::CoralSettings( + ::_pbi::ConstantInitialized) + : device_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}) + , usb_always_dfu_(false) + , usb_max_bulk_in_queue_length_(0) + , performance_(1) +{} +struct CoralSettingsDefaultTypeInternal { + PROTOBUF_CONSTEXPR CoralSettingsDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~CoralSettingsDefaultTypeInternal() {} + union { + CoralSettings _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CoralSettingsDefaultTypeInternal _CoralSettings_default_instance_; +PROTOBUF_CONSTEXPR CPUSettings::CPUSettings( + ::_pbi::ConstantInitialized) + : num_threads_(-1){} +struct CPUSettingsDefaultTypeInternal { + PROTOBUF_CONSTEXPR CPUSettingsDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~CPUSettingsDefaultTypeInternal() {} + union { + CPUSettings _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 CPUSettingsDefaultTypeInternal _CPUSettings_default_instance_; +PROTOBUF_CONSTEXPR ArmNNSettings::ArmNNSettings( + ::_pbi::ConstantInitialized) + : backends_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}) + , additional_parameters_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}) + , fastmath_(false){} +struct ArmNNSettingsDefaultTypeInternal { + PROTOBUF_CONSTEXPR ArmNNSettingsDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ArmNNSettingsDefaultTypeInternal() {} + union { + ArmNNSettings _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ArmNNSettingsDefaultTypeInternal _ArmNNSettings_default_instance_; +PROTOBUF_CONSTEXPR TFLiteSettings::TFLiteSettings( + ::_pbi::ConstantInitialized) + : nnapi_settings_(nullptr) + , gpu_settings_(nullptr) + , hexagon_settings_(nullptr) + , xnnpack_settings_(nullptr) + , cpu_settings_(nullptr) + , edgetpu_settings_(nullptr) + , fallback_settings_(nullptr) + , coral_settings_(nullptr) + , coreml_settings_(nullptr) + , stable_delegate_loader_settings_(nullptr) + , google_edgetpu_settings_(nullptr) + , compilation_caching_settings_(nullptr) + , armnn_settings_(nullptr) + , delegate_(0) + + , max_delegated_partitions_(0) + , disable_default_delegates_(false){} +struct TFLiteSettingsDefaultTypeInternal { + PROTOBUF_CONSTEXPR TFLiteSettingsDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~TFLiteSettingsDefaultTypeInternal() {} + union { + TFLiteSettings _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 TFLiteSettingsDefaultTypeInternal _TFLiteSettings_default_instance_; +PROTOBUF_CONSTEXPR FallbackSettings::FallbackSettings( + ::_pbi::ConstantInitialized) + : allow_automatic_fallback_on_compilation_error_(false) + , allow_automatic_fallback_on_execution_error_(false){} +struct FallbackSettingsDefaultTypeInternal { + PROTOBUF_CONSTEXPR FallbackSettingsDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~FallbackSettingsDefaultTypeInternal() {} + union { + FallbackSettings _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 FallbackSettingsDefaultTypeInternal _FallbackSettings_default_instance_; +PROTOBUF_CONSTEXPR BenchmarkMetric::BenchmarkMetric( + ::_pbi::ConstantInitialized) + : values_() + , name_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}){} +struct BenchmarkMetricDefaultTypeInternal { + PROTOBUF_CONSTEXPR BenchmarkMetricDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~BenchmarkMetricDefaultTypeInternal() {} + union { + BenchmarkMetric _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BenchmarkMetricDefaultTypeInternal _BenchmarkMetric_default_instance_; +PROTOBUF_CONSTEXPR BenchmarkResult_InferenceOutput::BenchmarkResult_InferenceOutput( + ::_pbi::ConstantInitialized) + : value_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}){} +struct BenchmarkResult_InferenceOutputDefaultTypeInternal { + PROTOBUF_CONSTEXPR BenchmarkResult_InferenceOutputDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~BenchmarkResult_InferenceOutputDefaultTypeInternal() {} + union { + BenchmarkResult_InferenceOutput _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BenchmarkResult_InferenceOutputDefaultTypeInternal _BenchmarkResult_InferenceOutput_default_instance_; +PROTOBUF_CONSTEXPR BenchmarkResult::BenchmarkResult( + ::_pbi::ConstantInitialized) + : initialization_time_us_() + , _initialization_time_us_cached_byte_size_(0) + , inference_time_us_() + , _inference_time_us_cached_byte_size_(0) + , metrics_() + , actual_output_() + , max_memory_kb_(0) + , ok_(false){} +struct BenchmarkResultDefaultTypeInternal { + PROTOBUF_CONSTEXPR BenchmarkResultDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~BenchmarkResultDefaultTypeInternal() {} + union { + BenchmarkResult _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BenchmarkResultDefaultTypeInternal _BenchmarkResult_default_instance_; +PROTOBUF_CONSTEXPR ErrorCode::ErrorCode( + ::_pbi::ConstantInitialized) + : source_(0) + + , tflite_error_(0) + , underlying_api_error_(int64_t{0}){} +struct ErrorCodeDefaultTypeInternal { + PROTOBUF_CONSTEXPR ErrorCodeDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ErrorCodeDefaultTypeInternal() {} + union { + ErrorCode _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ErrorCodeDefaultTypeInternal _ErrorCode_default_instance_; +PROTOBUF_CONSTEXPR BenchmarkError::BenchmarkError( + ::_pbi::ConstantInitialized) + : error_code_() + , stage_(0) + + , exit_code_(0) + , signal_(0) + , mini_benchmark_error_code_(0){} +struct BenchmarkErrorDefaultTypeInternal { + PROTOBUF_CONSTEXPR BenchmarkErrorDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~BenchmarkErrorDefaultTypeInternal() {} + union { + BenchmarkError _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BenchmarkErrorDefaultTypeInternal _BenchmarkError_default_instance_; +PROTOBUF_CONSTEXPR BenchmarkEvent::BenchmarkEvent( + ::_pbi::ConstantInitialized) + : tflite_settings_(nullptr) + , result_(nullptr) + , error_(nullptr) + , boottime_us_(int64_t{0}) + , wallclock_us_(int64_t{0}) + , event_type_(0) +{} +struct BenchmarkEventDefaultTypeInternal { + PROTOBUF_CONSTEXPR BenchmarkEventDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~BenchmarkEventDefaultTypeInternal() {} + union { + BenchmarkEvent _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BenchmarkEventDefaultTypeInternal _BenchmarkEvent_default_instance_; +PROTOBUF_CONSTEXPR BestAccelerationDecision::BestAccelerationDecision( + ::_pbi::ConstantInitialized) + : min_latency_event_(nullptr) + , min_inference_time_us_(int64_t{0}) + , number_of_source_events_(0){} +struct BestAccelerationDecisionDefaultTypeInternal { + PROTOBUF_CONSTEXPR BestAccelerationDecisionDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~BestAccelerationDecisionDefaultTypeInternal() {} + union { + BestAccelerationDecision _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BestAccelerationDecisionDefaultTypeInternal _BestAccelerationDecision_default_instance_; +PROTOBUF_CONSTEXPR BenchmarkInitializationFailure::BenchmarkInitializationFailure( + ::_pbi::ConstantInitialized) + : initialization_status_(0){} +struct BenchmarkInitializationFailureDefaultTypeInternal { + PROTOBUF_CONSTEXPR BenchmarkInitializationFailureDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~BenchmarkInitializationFailureDefaultTypeInternal() {} + union { + BenchmarkInitializationFailure _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BenchmarkInitializationFailureDefaultTypeInternal _BenchmarkInitializationFailure_default_instance_; +PROTOBUF_CONSTEXPR MiniBenchmarkEvent::MiniBenchmarkEvent( + ::_pbi::ConstantInitialized) + : best_acceleration_decision_(nullptr) + , initialization_failure_(nullptr) + , benchmark_event_(nullptr) + , is_log_flushing_event_(false){} +struct MiniBenchmarkEventDefaultTypeInternal { + PROTOBUF_CONSTEXPR MiniBenchmarkEventDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~MiniBenchmarkEventDefaultTypeInternal() {} + union { + MiniBenchmarkEvent _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MiniBenchmarkEventDefaultTypeInternal _MiniBenchmarkEvent_default_instance_; +PROTOBUF_CONSTEXPR ModelFile::ModelFile( + ::_pbi::ConstantInitialized) + : filename_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}) + , model_id_group_(nullptr) + , fd_(int64_t{0}) + , offset_(int64_t{0}) + , length_(int64_t{0}) + , buffer_handle_(int64_t{0}){} +struct ModelFileDefaultTypeInternal { + PROTOBUF_CONSTEXPR ModelFileDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ModelFileDefaultTypeInternal() {} + union { + ModelFile _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ModelFileDefaultTypeInternal _ModelFile_default_instance_; +PROTOBUF_CONSTEXPR ModelIdGroup::ModelIdGroup( + ::_pbi::ConstantInitialized) + : model_namespace_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}) + , model_id_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}){} +struct ModelIdGroupDefaultTypeInternal { + PROTOBUF_CONSTEXPR ModelIdGroupDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ModelIdGroupDefaultTypeInternal() {} + union { + ModelIdGroup _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ModelIdGroupDefaultTypeInternal _ModelIdGroup_default_instance_; +PROTOBUF_CONSTEXPR BenchmarkStoragePaths::BenchmarkStoragePaths( + ::_pbi::ConstantInitialized) + : storage_file_path_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}) + , data_directory_path_(&::_pbi::fixed_address_empty_string, ::_pbi::ConstantInitialized{}){} +struct BenchmarkStoragePathsDefaultTypeInternal { + PROTOBUF_CONSTEXPR BenchmarkStoragePathsDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~BenchmarkStoragePathsDefaultTypeInternal() {} + union { + BenchmarkStoragePaths _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BenchmarkStoragePathsDefaultTypeInternal _BenchmarkStoragePaths_default_instance_; +PROTOBUF_CONSTEXPR ValidationSettings::ValidationSettings( + ::_pbi::ConstantInitialized) + : per_test_timeout_ms_(int64_t{0}){} +struct ValidationSettingsDefaultTypeInternal { + PROTOBUF_CONSTEXPR ValidationSettingsDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~ValidationSettingsDefaultTypeInternal() {} + union { + ValidationSettings _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 ValidationSettingsDefaultTypeInternal _ValidationSettings_default_instance_; +PROTOBUF_CONSTEXPR MinibenchmarkSettings::MinibenchmarkSettings( + ::_pbi::ConstantInitialized) + : settings_to_test_() + , model_file_(nullptr) + , storage_paths_(nullptr) + , validation_settings_(nullptr){} +struct MinibenchmarkSettingsDefaultTypeInternal { + PROTOBUF_CONSTEXPR MinibenchmarkSettingsDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~MinibenchmarkSettingsDefaultTypeInternal() {} + union { + MinibenchmarkSettings _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 MinibenchmarkSettingsDefaultTypeInternal _MinibenchmarkSettings_default_instance_; +PROTOBUF_CONSTEXPR BenchmarkEventStorage::BenchmarkEventStorage( + ::_pbi::ConstantInitialized) + : model_id_group_(nullptr) + , benchmark_event_(nullptr){} +struct BenchmarkEventStorageDefaultTypeInternal { + PROTOBUF_CONSTEXPR BenchmarkEventStorageDefaultTypeInternal() + : _instance(::_pbi::ConstantInitialized{}) {} + ~BenchmarkEventStorageDefaultTypeInternal() {} + union { + BenchmarkEventStorage _instance; + }; +}; +PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 BenchmarkEventStorageDefaultTypeInternal _BenchmarkEventStorage_default_instance_; +} // namespace proto +} // namespace tflite +static ::_pb::Metadata file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[32]; +static const ::_pb::EnumDescriptor* file_level_enum_descriptors_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[18]; +static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto = nullptr; + +const uint32_t TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + PROTOBUF_FIELD_OFFSET(::tflite::proto::ComputeSettings, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::ComputeSettings, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::ComputeSettings, preference_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::ComputeSettings, tflite_settings_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::ComputeSettings, model_namespace_for_statistics_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::ComputeSettings, model_identifier_for_statistics_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::ComputeSettings, settings_to_test_locally_), + 4, + 2, + 0, + 1, + 3, + PROTOBUF_FIELD_OFFSET(::tflite::proto::NNAPISettings, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::NNAPISettings, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::NNAPISettings, accelerator_name_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::NNAPISettings, cache_directory_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::NNAPISettings, model_token_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::NNAPISettings, execution_preference_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::NNAPISettings, no_of_nnapi_instances_to_cache_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::NNAPISettings, fallback_settings_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::NNAPISettings, allow_nnapi_cpu_on_android_10_plus_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::NNAPISettings, execution_priority_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::NNAPISettings, allow_dynamic_dimensions_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::NNAPISettings, allow_fp16_precision_for_fp32_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::NNAPISettings, use_burst_computation_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::NNAPISettings, support_library_handle_), + 0, + 1, + 2, + 4, + 5, + 3, + 7, + 6, + 8, + 9, + 10, + 11, + PROTOBUF_FIELD_OFFSET(::tflite::proto::GPUSettings, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::GPUSettings, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::GPUSettings, is_precision_loss_allowed_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::GPUSettings, enable_quantized_inference_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::GPUSettings, force_backend_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::GPUSettings, inference_priority1_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::GPUSettings, inference_priority2_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::GPUSettings, inference_priority3_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::GPUSettings, inference_preference_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::GPUSettings, cache_directory_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::GPUSettings, model_token_), + 2, + 8, + 3, + 4, + 5, + 6, + 7, + 0, + 1, + PROTOBUF_FIELD_OFFSET(::tflite::proto::HexagonSettings, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::HexagonSettings, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::HexagonSettings, debug_level_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::HexagonSettings, powersave_level_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::HexagonSettings, print_graph_profile_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::HexagonSettings, print_graph_debug_), + 0, + 1, + 2, + 3, + PROTOBUF_FIELD_OFFSET(::tflite::proto::XNNPackSettings, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::XNNPackSettings, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::XNNPackSettings, num_threads_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::XNNPackSettings, flags_), + 0, + 1, + PROTOBUF_FIELD_OFFSET(::tflite::proto::CoreMLSettings, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::CoreMLSettings, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::CoreMLSettings, enabled_devices_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::CoreMLSettings, coreml_version_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::CoreMLSettings, max_delegated_partitions_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::CoreMLSettings, min_nodes_per_partition_), + 0, + 1, + 2, + 3, + PROTOBUF_FIELD_OFFSET(::tflite::proto::StableDelegateLoaderSettings, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::StableDelegateLoaderSettings, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::StableDelegateLoaderSettings, delegate_path_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::StableDelegateLoaderSettings, delegate_name_), + 0, + 1, + PROTOBUF_FIELD_OFFSET(::tflite::proto::CompilationCachingSettings, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::CompilationCachingSettings, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::CompilationCachingSettings, cache_dir_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::CompilationCachingSettings, model_token_), + 0, + 1, + PROTOBUF_FIELD_OFFSET(::tflite::proto::EdgeTpuDeviceSpec, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::EdgeTpuDeviceSpec, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::EdgeTpuDeviceSpec, platform_type_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::EdgeTpuDeviceSpec, num_chips_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::EdgeTpuDeviceSpec, device_paths_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::EdgeTpuDeviceSpec, chip_family_), + 0, + 1, + ~0u, + 2, + PROTOBUF_FIELD_OFFSET(::tflite::proto::EdgeTpuInactivePowerConfig, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::EdgeTpuInactivePowerConfig, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::EdgeTpuInactivePowerConfig, inactive_power_state_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::EdgeTpuInactivePowerConfig, inactive_timeout_us_), + 1, + 0, + PROTOBUF_FIELD_OFFSET(::tflite::proto::EdgeTpuSettings, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::EdgeTpuSettings, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::EdgeTpuSettings, inference_power_state_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::EdgeTpuSettings, inactive_power_configs_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::EdgeTpuSettings, inference_priority_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::EdgeTpuSettings, edgetpu_device_spec_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::EdgeTpuSettings, model_token_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::EdgeTpuSettings, float_truncation_type_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::EdgeTpuSettings, qos_class_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::EdgeTpuSettings, hardware_cluster_ids_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::EdgeTpuSettings, public_model_id_), + 3, + ~0u, + 6, + 2, + 0, + 4, + 5, + ~0u, + 1, + PROTOBUF_FIELD_OFFSET(::tflite::proto::GoogleEdgeTpuSettings, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::GoogleEdgeTpuSettings, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::GoogleEdgeTpuSettings, log_verbosity_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::GoogleEdgeTpuSettings, enable_tracing_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::GoogleEdgeTpuSettings, priority_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::GoogleEdgeTpuSettings, extension_data_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::GoogleEdgeTpuSettings, model_identifier_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::GoogleEdgeTpuSettings, use_async_api_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::GoogleEdgeTpuSettings, delegate_should_manage_cache_for_inputs_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::GoogleEdgeTpuSettings, delegate_should_manage_cache_for_outputs_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::GoogleEdgeTpuSettings, prefer_cache_coherency_for_inputs_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::GoogleEdgeTpuSettings, prefer_cache_coherency_for_outputs_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::GoogleEdgeTpuSettings, allow_fp16_precision_for_fp32_), + 8, + 3, + 2, + 0, + 1, + 4, + 9, + 10, + 6, + 7, + 5, + PROTOBUF_FIELD_OFFSET(::tflite::proto::CoralSettings, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::CoralSettings, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::CoralSettings, device_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::CoralSettings, performance_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::CoralSettings, usb_always_dfu_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::CoralSettings, usb_max_bulk_in_queue_length_), + 0, + 3, + 1, + 2, + PROTOBUF_FIELD_OFFSET(::tflite::proto::CPUSettings, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::CPUSettings, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::CPUSettings, num_threads_), + 0, + PROTOBUF_FIELD_OFFSET(::tflite::proto::ArmNNSettings, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::ArmNNSettings, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::ArmNNSettings, backends_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::ArmNNSettings, fastmath_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::ArmNNSettings, additional_parameters_), + 0, + 2, + 1, + PROTOBUF_FIELD_OFFSET(::tflite::proto::TFLiteSettings, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::TFLiteSettings, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::TFLiteSettings, delegate_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::TFLiteSettings, nnapi_settings_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::TFLiteSettings, gpu_settings_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::TFLiteSettings, hexagon_settings_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::TFLiteSettings, xnnpack_settings_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::TFLiteSettings, coreml_settings_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::TFLiteSettings, cpu_settings_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::TFLiteSettings, max_delegated_partitions_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::TFLiteSettings, edgetpu_settings_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::TFLiteSettings, coral_settings_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::TFLiteSettings, fallback_settings_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::TFLiteSettings, disable_default_delegates_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::TFLiteSettings, stable_delegate_loader_settings_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::TFLiteSettings, google_edgetpu_settings_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::TFLiteSettings, compilation_caching_settings_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::TFLiteSettings, armnn_settings_), + 13, + 0, + 1, + 2, + 3, + 8, + 4, + 14, + 5, + 7, + 6, + 15, + 9, + 10, + 11, + 12, + PROTOBUF_FIELD_OFFSET(::tflite::proto::FallbackSettings, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::FallbackSettings, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::FallbackSettings, allow_automatic_fallback_on_compilation_error_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::FallbackSettings, allow_automatic_fallback_on_execution_error_), + 0, + 1, + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkMetric, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkMetric, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkMetric, name_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkMetric, values_), + 0, + ~0u, + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkResult_InferenceOutput, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkResult_InferenceOutput, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkResult_InferenceOutput, value_), + 0, + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkResult, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkResult, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkResult, initialization_time_us_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkResult, inference_time_us_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkResult, max_memory_kb_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkResult, ok_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkResult, metrics_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkResult, actual_output_), + ~0u, + ~0u, + 0, + 1, + ~0u, + ~0u, + PROTOBUF_FIELD_OFFSET(::tflite::proto::ErrorCode, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::ErrorCode, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::ErrorCode, source_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::ErrorCode, tflite_error_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::ErrorCode, underlying_api_error_), + 0, + 1, + 2, + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkError, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkError, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkError, stage_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkError, exit_code_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkError, signal_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkError, error_code_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkError, mini_benchmark_error_code_), + 0, + 1, + 2, + ~0u, + 3, + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkEvent, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkEvent, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkEvent, tflite_settings_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkEvent, event_type_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkEvent, result_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkEvent, error_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkEvent, boottime_us_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkEvent, wallclock_us_), + 0, + 5, + 1, + 2, + 3, + 4, + PROTOBUF_FIELD_OFFSET(::tflite::proto::BestAccelerationDecision, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BestAccelerationDecision, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::BestAccelerationDecision, number_of_source_events_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BestAccelerationDecision, min_latency_event_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BestAccelerationDecision, min_inference_time_us_), + 2, + 0, + 1, + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkInitializationFailure, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkInitializationFailure, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkInitializationFailure, initialization_status_), + 0, + PROTOBUF_FIELD_OFFSET(::tflite::proto::MiniBenchmarkEvent, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::MiniBenchmarkEvent, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::MiniBenchmarkEvent, is_log_flushing_event_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::MiniBenchmarkEvent, best_acceleration_decision_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::MiniBenchmarkEvent, initialization_failure_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::MiniBenchmarkEvent, benchmark_event_), + 3, + 0, + 1, + 2, + PROTOBUF_FIELD_OFFSET(::tflite::proto::ModelFile, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::ModelFile, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::ModelFile, filename_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::ModelFile, fd_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::ModelFile, offset_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::ModelFile, length_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::ModelFile, model_id_group_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::ModelFile, buffer_handle_), + 0, + 2, + 3, + 4, + 1, + 5, + PROTOBUF_FIELD_OFFSET(::tflite::proto::ModelIdGroup, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::ModelIdGroup, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::ModelIdGroup, model_namespace_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::ModelIdGroup, model_id_), + 0, + 1, + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkStoragePaths, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkStoragePaths, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkStoragePaths, storage_file_path_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkStoragePaths, data_directory_path_), + 0, + 1, + PROTOBUF_FIELD_OFFSET(::tflite::proto::ValidationSettings, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::ValidationSettings, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::ValidationSettings, per_test_timeout_ms_), + 0, + PROTOBUF_FIELD_OFFSET(::tflite::proto::MinibenchmarkSettings, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::MinibenchmarkSettings, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::MinibenchmarkSettings, settings_to_test_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::MinibenchmarkSettings, model_file_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::MinibenchmarkSettings, storage_paths_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::MinibenchmarkSettings, validation_settings_), + ~0u, + 0, + 1, + 2, + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkEventStorage, _has_bits_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkEventStorage, _internal_metadata_), + ~0u, // no _extensions_ + ~0u, // no _oneof_case_ + ~0u, // no _weak_field_map_ + ~0u, // no _inlined_string_donated_ + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkEventStorage, model_id_group_), + PROTOBUF_FIELD_OFFSET(::tflite::proto::BenchmarkEventStorage, benchmark_event_), + 0, + 1, +}; +static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = { + { 0, 11, -1, sizeof(::tflite::proto::ComputeSettings)}, + { 16, 34, -1, sizeof(::tflite::proto::NNAPISettings)}, + { 46, 61, -1, sizeof(::tflite::proto::GPUSettings)}, + { 70, 80, -1, sizeof(::tflite::proto::HexagonSettings)}, + { 84, 92, -1, sizeof(::tflite::proto::XNNPackSettings)}, + { 94, 104, -1, sizeof(::tflite::proto::CoreMLSettings)}, + { 108, 116, -1, sizeof(::tflite::proto::StableDelegateLoaderSettings)}, + { 118, 126, -1, sizeof(::tflite::proto::CompilationCachingSettings)}, + { 128, 138, -1, sizeof(::tflite::proto::EdgeTpuDeviceSpec)}, + { 142, 150, -1, sizeof(::tflite::proto::EdgeTpuInactivePowerConfig)}, + { 152, 167, -1, sizeof(::tflite::proto::EdgeTpuSettings)}, + { 176, 193, -1, sizeof(::tflite::proto::GoogleEdgeTpuSettings)}, + { 204, 214, -1, sizeof(::tflite::proto::CoralSettings)}, + { 218, 225, -1, sizeof(::tflite::proto::CPUSettings)}, + { 226, 235, -1, sizeof(::tflite::proto::ArmNNSettings)}, + { 238, 260, -1, sizeof(::tflite::proto::TFLiteSettings)}, + { 276, 284, -1, sizeof(::tflite::proto::FallbackSettings)}, + { 286, 294, -1, sizeof(::tflite::proto::BenchmarkMetric)}, + { 296, 303, -1, sizeof(::tflite::proto::BenchmarkResult_InferenceOutput)}, + { 304, 316, -1, sizeof(::tflite::proto::BenchmarkResult)}, + { 322, 331, -1, sizeof(::tflite::proto::ErrorCode)}, + { 334, 345, -1, sizeof(::tflite::proto::BenchmarkError)}, + { 350, 362, -1, sizeof(::tflite::proto::BenchmarkEvent)}, + { 368, 377, -1, sizeof(::tflite::proto::BestAccelerationDecision)}, + { 380, 387, -1, sizeof(::tflite::proto::BenchmarkInitializationFailure)}, + { 388, 398, -1, sizeof(::tflite::proto::MiniBenchmarkEvent)}, + { 402, 414, -1, sizeof(::tflite::proto::ModelFile)}, + { 420, 428, -1, sizeof(::tflite::proto::ModelIdGroup)}, + { 430, 438, -1, sizeof(::tflite::proto::BenchmarkStoragePaths)}, + { 440, 447, -1, sizeof(::tflite::proto::ValidationSettings)}, + { 448, 458, -1, sizeof(::tflite::proto::MinibenchmarkSettings)}, + { 462, 470, -1, sizeof(::tflite::proto::BenchmarkEventStorage)}, +}; + +static const ::_pb::Message* const file_default_instances[] = { + &::tflite::proto::_ComputeSettings_default_instance_._instance, + &::tflite::proto::_NNAPISettings_default_instance_._instance, + &::tflite::proto::_GPUSettings_default_instance_._instance, + &::tflite::proto::_HexagonSettings_default_instance_._instance, + &::tflite::proto::_XNNPackSettings_default_instance_._instance, + &::tflite::proto::_CoreMLSettings_default_instance_._instance, + &::tflite::proto::_StableDelegateLoaderSettings_default_instance_._instance, + &::tflite::proto::_CompilationCachingSettings_default_instance_._instance, + &::tflite::proto::_EdgeTpuDeviceSpec_default_instance_._instance, + &::tflite::proto::_EdgeTpuInactivePowerConfig_default_instance_._instance, + &::tflite::proto::_EdgeTpuSettings_default_instance_._instance, + &::tflite::proto::_GoogleEdgeTpuSettings_default_instance_._instance, + &::tflite::proto::_CoralSettings_default_instance_._instance, + &::tflite::proto::_CPUSettings_default_instance_._instance, + &::tflite::proto::_ArmNNSettings_default_instance_._instance, + &::tflite::proto::_TFLiteSettings_default_instance_._instance, + &::tflite::proto::_FallbackSettings_default_instance_._instance, + &::tflite::proto::_BenchmarkMetric_default_instance_._instance, + &::tflite::proto::_BenchmarkResult_InferenceOutput_default_instance_._instance, + &::tflite::proto::_BenchmarkResult_default_instance_._instance, + &::tflite::proto::_ErrorCode_default_instance_._instance, + &::tflite::proto::_BenchmarkError_default_instance_._instance, + &::tflite::proto::_BenchmarkEvent_default_instance_._instance, + &::tflite::proto::_BestAccelerationDecision_default_instance_._instance, + &::tflite::proto::_BenchmarkInitializationFailure_default_instance_._instance, + &::tflite::proto::_MiniBenchmarkEvent_default_instance_._instance, + &::tflite::proto::_ModelFile_default_instance_._instance, + &::tflite::proto::_ModelIdGroup_default_instance_._instance, + &::tflite::proto::_BenchmarkStoragePaths_default_instance_._instance, + &::tflite::proto::_ValidationSettings_default_instance_._instance, + &::tflite::proto::_MinibenchmarkSettings_default_instance_._instance, + &::tflite::proto::_BenchmarkEventStorage_default_instance_._instance, +}; + +const char descriptor_table_protodef_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = + "\n>tensorflow/lite/acceleration/configura" + "tion/configuration.proto\022\014tflite.proto\"\227" + "\002\n\017ComputeSettings\0225\n\npreference\030\001 \001(\0162!" + ".tflite.proto.ExecutionPreference\0225\n\017tfl" + "ite_settings\030\002 \001(\0132\034.tflite.proto.TFLite" + "Settings\022&\n\036model_namespace_for_statisti" + "cs\030\003 \001(\t\022\'\n\037model_identifier_for_statist" + "ics\030\004 \001(\t\022E\n\030settings_to_test_locally\030\005 " + "\001(\0132#.tflite.proto.MinibenchmarkSettings" + "\"\202\004\n\rNNAPISettings\022\030\n\020accelerator_name\030\001" + " \001(\t\022\033\n\017cache_directory\030\002 \001(\tB\002\030\001\022\027\n\013mod" + "el_token\030\003 \001(\tB\002\030\001\022D\n\024execution_preferen" + "ce\030\004 \001(\0162&.tflite.proto.NNAPIExecutionPr" + "eference\022&\n\036no_of_nnapi_instances_to_cac" + "he\030\005 \001(\005\022=\n\021fallback_settings\030\006 \001(\0132\036.tf" + "lite.proto.FallbackSettingsB\002\030\001\022*\n\"allow" + "_nnapi_cpu_on_android_10_plus\030\007 \001(\010\022@\n\022e" + "xecution_priority\030\010 \001(\0162$.tflite.proto.N" + "NAPIExecutionPriority\022 \n\030allow_dynamic_d" + "imensions\030\t \001(\010\022%\n\035allow_fp16_precision_" + "for_fp32\030\n \001(\010\022\035\n\025use_burst_computation\030" + "\013 \001(\010\022\036\n\026support_library_handle\030\014 \001(\003\"\364\003" + "\n\013GPUSettings\022!\n\031is_precision_loss_allow" + "ed\030\001 \001(\010\022(\n\032enable_quantized_inference\030\002" + " \001(\010:\004true\022/\n\rforce_backend\030\003 \001(\0162\030.tfli" + "te.proto.GPUBackend\022R\n\023inference_priorit" + "y1\030\004 \001(\0162\".tflite.proto.GPUInferencePrio" + "rity:\021GPU_PRIORITY_AUTO\022R\n\023inference_pri" + "ority2\030\005 \001(\0162\".tflite.proto.GPUInference" + "Priority:\021GPU_PRIORITY_AUTO\022R\n\023inference" + "_priority3\030\006 \001(\0162\".tflite.proto.GPUInfer" + "encePriority:\021GPU_PRIORITY_AUTO\022=\n\024infer" + "ence_preference\030\007 \001(\0162\037.tflite.proto.GPU" + "InferenceUsage\022\027\n\017cache_directory\030\010 \001(\t\022" + "\023\n\013model_token\030\t \001(\t\"w\n\017HexagonSettings\022" + "\023\n\013debug_level\030\001 \001(\005\022\027\n\017powersave_level\030" + "\002 \001(\005\022\033\n\023print_graph_profile\030\003 \001(\010\022\031\n\021pr" + "int_graph_debug\030\004 \001(\010\"s\n\017XNNPackSettings" + "\022\023\n\013num_threads\030\001 \001(\005\022K\n\005flags\030\002 \001(\0162\032.t" + "flite.proto.XNNPackFlags: TFLITE_XNNPACK" + "_DELEGATE_NO_FLAGS\"\372\001\n\016CoreMLSettings\022D\n" + "\017enabled_devices\030\001 \001(\0162+.tflite.proto.Co" + "reMLSettings.EnabledDevices\022\026\n\016coreml_ve" + "rsion\030\002 \001(\005\022#\n\030max_delegated_partitions\030" + "\003 \001(\005:\0010\022\"\n\027min_nodes_per_partition\030\004 \001(" + "\005:\0012\"A\n\016EnabledDevices\022\017\n\013DEVICES_ALL\020\000\022" + "\036\n\032DEVICES_WITH_NEURAL_ENGINE\020\001\"L\n\034Stabl" + "eDelegateLoaderSettings\022\025\n\rdelegate_path" + "\030\001 \001(\t\022\025\n\rdelegate_name\030\002 \001(\t\"D\n\032Compila" + "tionCachingSettings\022\021\n\tcache_dir\030\001 \001(\t\022\023" + "\n\013model_token\030\002 \001(\t\"\344\001\n\021EdgeTpuDeviceSpe" + "c\022C\n\rplatform_type\030\001 \001(\0162,.tflite.proto." + "EdgeTpuDeviceSpec.PlatformType\022\021\n\tnum_ch" + "ips\030\002 \001(\005\022\024\n\014device_paths\030\003 \003(\t\022\023\n\013chip_" + "family\030\004 \001(\005\"L\n\014PlatformType\022\010\n\004MMIO\020\000\022\r" + "\n\tREFERENCE\020\001\022\r\n\tSIMULATOR\020\002\022\024\n\020REMOTE_S" + "IMULATOR\020\003\"x\n\032EdgeTpuInactivePowerConfig" + "\022=\n\024inactive_power_state\030\001 \001(\0162\037.tflite." + "proto.EdgeTpuPowerState\022\033\n\023inactive_time" + "out_us\030\002 \001(\003\"\366\004\n\017EdgeTpuSettings\022>\n\025infe" + "rence_power_state\030\001 \001(\0162\037.tflite.proto.E" + "dgeTpuPowerState\022H\n\026inactive_power_confi" + "gs\030\002 \003(\0132(.tflite.proto.EdgeTpuInactiveP" + "owerConfig\022\036\n\022inference_priority\030\003 \001(\005:\002" + "-1\022<\n\023edgetpu_device_spec\030\004 \001(\0132\037.tflite" + ".proto.EdgeTpuDeviceSpec\022\023\n\013model_token\030" + "\005 \001(\t\022P\n\025float_truncation_type\030\006 \001(\01621.t" + "flite.proto.EdgeTpuSettings.FloatTruncat" + "ionType\022H\n\tqos_class\030\007 \001(\0162&.tflite.prot" + "o.EdgeTpuSettings.QosClass:\rQOS_UNDEFINE" + "D\022 \n\024hardware_cluster_ids\030\010 \003(\005B\002\020\001\022\027\n\017p" + "ublic_model_id\030\t \001(\t\"Q\n\023FloatTruncationT" + "ype\022\017\n\013UNSPECIFIED\020\000\022\021\n\rNO_TRUNCATION\020\001\022" + "\014\n\010BFLOAT16\020\002\022\010\n\004HALF\020\003\"<\n\010QosClass\022\021\n\rQ" + "OS_UNDEFINED\020\000\022\017\n\013BEST_EFFORT\020\001\022\014\n\010REALT" + "IME\020\002\"\334\005\n\025GoogleEdgeTpuSettings\022\031\n\rlog_v" + "erbosity\030\001 \001(\005:\002-1\022\035\n\016enable_tracing\030\002 \001" + "(\010:\005false\022>\n\010priority\030\003 \001(\0162,.tflite.pro" + "to.GoogleEdgeTpuSettings.Priority\022\026\n\016ext" + "ension_data\030\004 \001(\014\022\032\n\020model_identifier\030\005 " + "\001(\t:\000\022\034\n\ruse_async_api\030\006 \001(\010:\005false\0225\n\'d" + "elegate_should_manage_cache_for_inputs\030\007" + " \001(\010:\004true\0226\n(delegate_should_manage_cac" + "he_for_outputs\030\010 \001(\010:\004true\022W\n!prefer_cac" + "he_coherency_for_inputs\030\t \001(\0162,.tflite.p" + "roto.GoogleEdgeTpuSettings.TriState\022X\n\"p" + "refer_cache_coherency_for_outputs\030\n \001(\0162" + ",.tflite.proto.GoogleEdgeTpuSettings.Tri" + "State\022,\n\035allow_fp16_precision_for_fp32\030\013" + " \001(\010:\005false\"\\\n\010Priority\022\026\n\022PRIORITY_UNDE" + "FINED\020\000\022\020\n\014PRIORITY_LOW\020\001\022\023\n\017PRIORITY_ME" + "DIUM\020\002\022\021\n\rPRIORITY_HIGH\020\003\"I\n\010TriState\022\026\n" + "\022TRISTATE_UNDEFINED\020\000\022\022\n\016TRISTATE_FALSE\020" + "\001\022\021\n\rTRISTATE_TRUE\020\002\"\356\001\n\rCoralSettings\022\016" + "\n\006device\030\001 \001(\t\022E\n\013performance\030\002 \001(\0162\'.tf" + "lite.proto.CoralSettings.Performance:\007MA" + "XIMUM\022\026\n\016usb_always_dfu\030\003 \001(\010\022$\n\034usb_max" + "_bulk_in_queue_length\030\004 \001(\005\"H\n\013Performan" + "ce\022\r\n\tUNDEFINED\020\000\022\013\n\007MAXIMUM\020\001\022\010\n\004HIGH\020\002" + "\022\n\n\006MEDIUM\020\003\022\007\n\003LOW\020\004\"&\n\013CPUSettings\022\027\n\013" + "num_threads\030\001 \001(\005:\002-1\"R\n\rArmNNSettings\022\020" + "\n\010backends\030\001 \001(\t\022\020\n\010fastmath\030\002 \001(\010\022\035\n\025ad" + "ditional_parameters\030\003 \001(\t\"\210\007\n\016TFLiteSett" + "ings\022(\n\010delegate\030\001 \001(\0162\026.tflite.proto.De" + "legate\0223\n\016nnapi_settings\030\002 \001(\0132\033.tflite." + "proto.NNAPISettings\022/\n\014gpu_settings\030\003 \001(" + "\0132\031.tflite.proto.GPUSettings\0227\n\020hexagon_" + "settings\030\004 \001(\0132\035.tflite.proto.HexagonSet" + "tings\0227\n\020xnnpack_settings\030\005 \001(\0132\035.tflite" + ".proto.XNNPackSettings\0225\n\017coreml_setting" + "s\030\013 \001(\0132\034.tflite.proto.CoreMLSettings\022/\n" + "\014cpu_settings\030\006 \001(\0132\031.tflite.proto.CPUSe" + "ttings\022 \n\030max_delegated_partitions\030\007 \001(\005" + "\0227\n\020edgetpu_settings\030\010 \001(\0132\035.tflite.prot" + "o.EdgeTpuSettings\0223\n\016coral_settings\030\n \001(" + "\0132\033.tflite.proto.CoralSettings\0229\n\021fallba" + "ck_settings\030\t \001(\0132\036.tflite.proto.Fallbac" + "kSettings\022!\n\031disable_default_delegates\030\014" + " \001(\010\022S\n\037stable_delegate_loader_settings\030" + "\r \001(\0132*.tflite.proto.StableDelegateLoade" + "rSettings\022D\n\027google_edgetpu_settings\030\016 \001" + "(\0132#.tflite.proto.GoogleEdgeTpuSettings\022" + "N\n\034compilation_caching_settings\030\017 \001(\0132(." + "tflite.proto.CompilationCachingSettings\022" + "3\n\016armnn_settings\030\020 \001(\0132\033.tflite.proto.A" + "rmNNSettings\"~\n\020FallbackSettings\0225\n-allo" + "w_automatic_fallback_on_compilation_erro" + "r\030\007 \001(\010\0223\n+allow_automatic_fallback_on_e" + "xecution_error\030\010 \001(\010\"3\n\017BenchmarkMetric\022" + "\014\n\004name\030\001 \001(\t\022\022\n\006values\030\002 \003(\002B\002\020\001\"\217\002\n\017Be" + "nchmarkResult\022\"\n\026initialization_time_us\030" + "\001 \003(\003B\002\020\001\022\035\n\021inference_time_us\030\002 \003(\003B\002\020\001" + "\022\025\n\rmax_memory_kb\030\003 \001(\005\022\n\n\002ok\030\004 \001(\010\022.\n\007m" + "etrics\030\005 \003(\0132\035.tflite.proto.BenchmarkMet" + "ric\022D\n\ractual_output\030\006 \003(\0132-.tflite.prot" + "o.BenchmarkResult.InferenceOutput\032 \n\017Inf" + "erenceOutput\022\r\n\005value\030\001 \001(\014\"g\n\tErrorCode" + "\022&\n\006source\030\001 \001(\0162\026.tflite.proto.Delegate" + "\022\024\n\014tflite_error\030\002 \001(\005\022\034\n\024underlying_api" + "_error\030\003 \001(\003\"\260\001\n\016BenchmarkError\022+\n\005stage" + "\030\001 \001(\0162\034.tflite.proto.BenchmarkStage\022\021\n\t" + "exit_code\030\002 \001(\005\022\016\n\006signal\030\003 \001(\005\022+\n\nerror" + "_code\030\004 \003(\0132\027.tflite.proto.ErrorCode\022!\n\031" + "mini_benchmark_error_code\030\005 \001(\005\"\204\002\n\016Benc" + "hmarkEvent\0225\n\017tflite_settings\030\001 \001(\0132\034.tf" + "lite.proto.TFLiteSettings\0224\n\nevent_type\030" + "\002 \001(\0162 .tflite.proto.BenchmarkEventType\022" + "-\n\006result\030\003 \001(\0132\035.tflite.proto.Benchmark" + "Result\022+\n\005error\030\004 \001(\0132\034.tflite.proto.Ben" + "chmarkError\022\023\n\013boottime_us\030\005 \001(\003\022\024\n\014wall" + "clock_us\030\006 \001(\003\"\223\001\n\030BestAccelerationDecis" + "ion\022\037\n\027number_of_source_events\030\001 \001(\005\0227\n\021" + "min_latency_event\030\002 \001(\0132\034.tflite.proto.B" + "enchmarkEvent\022\035\n\025min_inference_time_us\030\003" + " \001(\003\"\?\n\036BenchmarkInitializationFailure\022\035" + "\n\025initialization_status\030\001 \001(\005\"\204\002\n\022MiniBe" + "nchmarkEvent\022\035\n\025is_log_flushing_event\030\001 " + "\001(\010\022J\n\032best_acceleration_decision\030\002 \001(\0132" + "&.tflite.proto.BestAccelerationDecision\022" + "L\n\026initialization_failure\030\003 \001(\0132,.tflite" + ".proto.BenchmarkInitializationFailure\0225\n" + "\017benchmark_event\030\004 \001(\0132\034.tflite.proto.Be" + "nchmarkEvent\"\224\001\n\tModelFile\022\020\n\010filename\030\001" + " \001(\t\022\n\n\002fd\030\002 \001(\003\022\016\n\006offset\030\003 \001(\003\022\016\n\006leng" + "th\030\004 \001(\003\0222\n\016model_id_group\030\005 \001(\0132\032.tflit" + "e.proto.ModelIdGroup\022\025\n\rbuffer_handle\030\006 " + "\001(\003\"9\n\014ModelIdGroup\022\027\n\017model_namespace\030\001" + " \001(\t\022\020\n\010model_id\030\002 \001(\t\"O\n\025BenchmarkStora" + "gePaths\022\031\n\021storage_file_path\030\001 \001(\t\022\033\n\023da" + "ta_directory_path\030\002 \001(\t\"1\n\022ValidationSet" + "tings\022\033\n\023per_test_timeout_ms\030\001 \001(\003\"\367\001\n\025M" + "inibenchmarkSettings\0226\n\020settings_to_test" + "\030\001 \003(\0132\034.tflite.proto.TFLiteSettings\022+\n\n" + "model_file\030\002 \001(\0132\027.tflite.proto.ModelFil" + "e\022:\n\rstorage_paths\030\003 \001(\0132#.tflite.proto." + "BenchmarkStoragePaths\022=\n\023validation_sett" + "ings\030\004 \001(\0132 .tflite.proto.ValidationSett" + "ings\"\202\001\n\025BenchmarkEventStorage\0222\n\016model_" + "id_group\030\001 \001(\0132\032.tflite.proto.ModelIdGro" + "up\0225\n\017benchmark_event\030\002 \001(\0132\034.tflite.pro" + "to.BenchmarkEvent*M\n\023ExecutionPreference" + "\022\007\n\003ANY\020\000\022\017\n\013LOW_LATENCY\020\001\022\r\n\tLOW_POWER\020" + "\002\022\r\n\tFORCE_CPU\020\003*z\n\010Delegate\022\010\n\004NONE\020\000\022\t" + "\n\005NNAPI\020\001\022\007\n\003GPU\020\002\022\013\n\007HEXAGON\020\003\022\013\n\007XNNPA" + "CK\020\004\022\013\n\007EDGETPU\020\005\022\021\n\rEDGETPU_CORAL\020\006\022\013\n\007" + "CORE_ML\020\007\022\t\n\005ARMNN\020\010*w\n\030NNAPIExecutionPr" + "eference\022\r\n\tUNDEFINED\020\000\022\023\n\017NNAPI_LOW_POW" + "ER\020\001\022\034\n\030NNAPI_FAST_SINGLE_ANSWER\020\002\022\031\n\025NN" + "API_SUSTAINED_SPEED\020\003*\202\001\n\026NNAPIExecution" + "Priority\022\034\n\030NNAPI_PRIORITY_UNDEFINED\020\000\022\026" + "\n\022NNAPI_PRIORITY_LOW\020\001\022\031\n\025NNAPI_PRIORITY" + "_MEDIUM\020\002\022\027\n\023NNAPI_PRIORITY_HIGH\020\003*/\n\nGP" + "UBackend\022\t\n\005UNSET\020\000\022\n\n\006OPENCL\020\001\022\n\n\006OPENG" + "L\020\002*\216\001\n\024GPUInferencePriority\022\025\n\021GPU_PRIO" + "RITY_AUTO\020\000\022\036\n\032GPU_PRIORITY_MAX_PRECISIO" + "N\020\001\022\034\n\030GPU_PRIORITY_MIN_LATENCY\020\002\022!\n\035GPU" + "_PRIORITY_MIN_MEMORY_USAGE\020\003*r\n\021GPUInfer" + "enceUsage\022/\n+GPU_INFERENCE_PREFERENCE_FA" + "ST_SINGLE_ANSWER\020\000\022,\n(GPU_INFERENCE_PREF" + "ERENCE_SUSTAINED_SPEED\020\001*\327\001\n\014XNNPackFlag" + "s\022$\n TFLITE_XNNPACK_DELEGATE_NO_FLAGS\020\000\022" + "$\n TFLITE_XNNPACK_DELEGATE_FLAG_QS8\020\001\022$\n" + " TFLITE_XNNPACK_DELEGATE_FLAG_QU8\020\002\022(\n$T" + "FLITE_XNNPACK_DELEGATE_FLAG_QS8_QU8\020\003\022+\n" + "\'TFLITE_XNNPACK_DELEGATE_FLAG_FORCE_FP16" + "\020\004*\255\001\n\021EdgeTpuPowerState\022\030\n\024UNDEFINED_PO" + "WERSTATE\020\000\022\020\n\014TPU_CORE_OFF\020\001\022\t\n\005READY\020\002\022" + "\024\n\020ACTIVE_MIN_POWER\020\003\022\031\n\025ACTIVE_VERY_LOW" + "_POWER\020\004\022\024\n\020ACTIVE_LOW_POWER\020\005\022\n\n\006ACTIVE" + "\020\006\022\016\n\nOVER_DRIVE\020\007*x\n\022BenchmarkEventType" + "\022\"\n\036UNDEFINED_BENCHMARK_EVENT_TYPE\020\000\022\t\n\005" + "START\020\001\022\007\n\003END\020\002\022\t\n\005ERROR\020\003\022\n\n\006LOGGED\020\004\022" + "\023\n\017RECOVERED_ERROR\020\005*@\n\016BenchmarkStage\022\013" + "\n\007UNKNOWN\020\000\022\022\n\016INITIALIZATION\020\001\022\r\n\tINFER" + "ENCE\020\002" + ; +static ::_pbi::once_flag descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once; +const ::_pbi::DescriptorTable descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto = { + false, false, 8566, descriptor_table_protodef_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto, + "tensorflow/lite/acceleration/configuration/configuration.proto", + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, nullptr, 0, 32, + schemas, file_default_instances, TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto::offsets, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto, file_level_enum_descriptors_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto, + file_level_service_descriptors_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto, +}; +PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter() { + return &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +} + +// Force running AddDescriptors() at dynamic initialization time. +PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto(&descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto); +namespace tflite { +namespace proto { +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* CoreMLSettings_EnabledDevices_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto); + return file_level_enum_descriptors_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[0]; +} +bool CoreMLSettings_EnabledDevices_IsValid(int value) { + switch (value) { + case 0: + case 1: + return true; + default: + return false; + } +} + +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr CoreMLSettings_EnabledDevices CoreMLSettings::DEVICES_ALL; +constexpr CoreMLSettings_EnabledDevices CoreMLSettings::DEVICES_WITH_NEURAL_ENGINE; +constexpr CoreMLSettings_EnabledDevices CoreMLSettings::EnabledDevices_MIN; +constexpr CoreMLSettings_EnabledDevices CoreMLSettings::EnabledDevices_MAX; +constexpr int CoreMLSettings::EnabledDevices_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EdgeTpuDeviceSpec_PlatformType_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto); + return file_level_enum_descriptors_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[1]; +} +bool EdgeTpuDeviceSpec_PlatformType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr EdgeTpuDeviceSpec_PlatformType EdgeTpuDeviceSpec::MMIO; +constexpr EdgeTpuDeviceSpec_PlatformType EdgeTpuDeviceSpec::REFERENCE; +constexpr EdgeTpuDeviceSpec_PlatformType EdgeTpuDeviceSpec::SIMULATOR; +constexpr EdgeTpuDeviceSpec_PlatformType EdgeTpuDeviceSpec::REMOTE_SIMULATOR; +constexpr EdgeTpuDeviceSpec_PlatformType EdgeTpuDeviceSpec::PlatformType_MIN; +constexpr EdgeTpuDeviceSpec_PlatformType EdgeTpuDeviceSpec::PlatformType_MAX; +constexpr int EdgeTpuDeviceSpec::PlatformType_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EdgeTpuSettings_FloatTruncationType_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto); + return file_level_enum_descriptors_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[2]; +} +bool EdgeTpuSettings_FloatTruncationType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr EdgeTpuSettings_FloatTruncationType EdgeTpuSettings::UNSPECIFIED; +constexpr EdgeTpuSettings_FloatTruncationType EdgeTpuSettings::NO_TRUNCATION; +constexpr EdgeTpuSettings_FloatTruncationType EdgeTpuSettings::BFLOAT16; +constexpr EdgeTpuSettings_FloatTruncationType EdgeTpuSettings::HALF; +constexpr EdgeTpuSettings_FloatTruncationType EdgeTpuSettings::FloatTruncationType_MIN; +constexpr EdgeTpuSettings_FloatTruncationType EdgeTpuSettings::FloatTruncationType_MAX; +constexpr int EdgeTpuSettings::FloatTruncationType_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EdgeTpuSettings_QosClass_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto); + return file_level_enum_descriptors_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[3]; +} +bool EdgeTpuSettings_QosClass_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr EdgeTpuSettings_QosClass EdgeTpuSettings::QOS_UNDEFINED; +constexpr EdgeTpuSettings_QosClass EdgeTpuSettings::BEST_EFFORT; +constexpr EdgeTpuSettings_QosClass EdgeTpuSettings::REALTIME; +constexpr EdgeTpuSettings_QosClass EdgeTpuSettings::QosClass_MIN; +constexpr EdgeTpuSettings_QosClass EdgeTpuSettings::QosClass_MAX; +constexpr int EdgeTpuSettings::QosClass_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* GoogleEdgeTpuSettings_Priority_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto); + return file_level_enum_descriptors_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[4]; +} +bool GoogleEdgeTpuSettings_Priority_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr GoogleEdgeTpuSettings_Priority GoogleEdgeTpuSettings::PRIORITY_UNDEFINED; +constexpr GoogleEdgeTpuSettings_Priority GoogleEdgeTpuSettings::PRIORITY_LOW; +constexpr GoogleEdgeTpuSettings_Priority GoogleEdgeTpuSettings::PRIORITY_MEDIUM; +constexpr GoogleEdgeTpuSettings_Priority GoogleEdgeTpuSettings::PRIORITY_HIGH; +constexpr GoogleEdgeTpuSettings_Priority GoogleEdgeTpuSettings::Priority_MIN; +constexpr GoogleEdgeTpuSettings_Priority GoogleEdgeTpuSettings::Priority_MAX; +constexpr int GoogleEdgeTpuSettings::Priority_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* GoogleEdgeTpuSettings_TriState_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto); + return file_level_enum_descriptors_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[5]; +} +bool GoogleEdgeTpuSettings_TriState_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr GoogleEdgeTpuSettings_TriState GoogleEdgeTpuSettings::TRISTATE_UNDEFINED; +constexpr GoogleEdgeTpuSettings_TriState GoogleEdgeTpuSettings::TRISTATE_FALSE; +constexpr GoogleEdgeTpuSettings_TriState GoogleEdgeTpuSettings::TRISTATE_TRUE; +constexpr GoogleEdgeTpuSettings_TriState GoogleEdgeTpuSettings::TriState_MIN; +constexpr GoogleEdgeTpuSettings_TriState GoogleEdgeTpuSettings::TriState_MAX; +constexpr int GoogleEdgeTpuSettings::TriState_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* CoralSettings_Performance_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto); + return file_level_enum_descriptors_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[6]; +} +bool CoralSettings_Performance_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + return true; + default: + return false; + } +} + +#if (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +constexpr CoralSettings_Performance CoralSettings::UNDEFINED; +constexpr CoralSettings_Performance CoralSettings::MAXIMUM; +constexpr CoralSettings_Performance CoralSettings::HIGH; +constexpr CoralSettings_Performance CoralSettings::MEDIUM; +constexpr CoralSettings_Performance CoralSettings::LOW; +constexpr CoralSettings_Performance CoralSettings::Performance_MIN; +constexpr CoralSettings_Performance CoralSettings::Performance_MAX; +constexpr int CoralSettings::Performance_ARRAYSIZE; +#endif // (__cplusplus < 201703) && (!defined(_MSC_VER) || (_MSC_VER >= 1900 && _MSC_VER < 1912)) +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ExecutionPreference_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto); + return file_level_enum_descriptors_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[7]; +} +bool ExecutionPreference_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Delegate_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto); + return file_level_enum_descriptors_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[8]; +} +bool Delegate_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + case 8: + return true; + default: + return false; + } +} + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* NNAPIExecutionPreference_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto); + return file_level_enum_descriptors_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[9]; +} +bool NNAPIExecutionPreference_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* NNAPIExecutionPriority_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto); + return file_level_enum_descriptors_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[10]; +} +bool NNAPIExecutionPriority_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* GPUBackend_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto); + return file_level_enum_descriptors_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[11]; +} +bool GPUBackend_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* GPUInferencePriority_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto); + return file_level_enum_descriptors_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[12]; +} +bool GPUInferencePriority_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + return true; + default: + return false; + } +} + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* GPUInferenceUsage_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto); + return file_level_enum_descriptors_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[13]; +} +bool GPUInferenceUsage_IsValid(int value) { + switch (value) { + case 0: + case 1: + return true; + default: + return false; + } +} + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* XNNPackFlags_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto); + return file_level_enum_descriptors_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[14]; +} +bool XNNPackFlags_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + return true; + default: + return false; + } +} + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EdgeTpuPowerState_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto); + return file_level_enum_descriptors_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[15]; +} +bool EdgeTpuPowerState_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + case 7: + return true; + default: + return false; + } +} + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* BenchmarkEventType_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto); + return file_level_enum_descriptors_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[16]; +} +bool BenchmarkEventType_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + return true; + default: + return false; + } +} + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* BenchmarkStage_descriptor() { + ::PROTOBUF_NAMESPACE_ID::internal::AssignDescriptors(&descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto); + return file_level_enum_descriptors_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[17]; +} +bool BenchmarkStage_IsValid(int value) { + switch (value) { + case 0: + case 1: + case 2: + return true; + default: + return false; + } +} + + +// =================================================================== + +class ComputeSettings::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_preference(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static const ::tflite::proto::TFLiteSettings& tflite_settings(const ComputeSettings* msg); + static void set_has_tflite_settings(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_model_namespace_for_statistics(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_model_identifier_for_statistics(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static const ::tflite::proto::MinibenchmarkSettings& settings_to_test_locally(const ComputeSettings* msg); + static void set_has_settings_to_test_locally(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } +}; + +const ::tflite::proto::TFLiteSettings& +ComputeSettings::_Internal::tflite_settings(const ComputeSettings* msg) { + return *msg->tflite_settings_; +} +const ::tflite::proto::MinibenchmarkSettings& +ComputeSettings::_Internal::settings_to_test_locally(const ComputeSettings* msg) { + return *msg->settings_to_test_locally_; +} +ComputeSettings::ComputeSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.ComputeSettings) +} +ComputeSettings::ComputeSettings(const ComputeSettings& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + model_namespace_for_statistics_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + model_namespace_for_statistics_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_model_namespace_for_statistics()) { + model_namespace_for_statistics_.Set(from._internal_model_namespace_for_statistics(), + GetArenaForAllocation()); + } + model_identifier_for_statistics_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + model_identifier_for_statistics_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_model_identifier_for_statistics()) { + model_identifier_for_statistics_.Set(from._internal_model_identifier_for_statistics(), + GetArenaForAllocation()); + } + if (from._internal_has_tflite_settings()) { + tflite_settings_ = new ::tflite::proto::TFLiteSettings(*from.tflite_settings_); + } else { + tflite_settings_ = nullptr; + } + if (from._internal_has_settings_to_test_locally()) { + settings_to_test_locally_ = new ::tflite::proto::MinibenchmarkSettings(*from.settings_to_test_locally_); + } else { + settings_to_test_locally_ = nullptr; + } + preference_ = from.preference_; + // @@protoc_insertion_point(copy_constructor:tflite.proto.ComputeSettings) +} + +inline void ComputeSettings::SharedCtor() { +model_namespace_for_statistics_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + model_namespace_for_statistics_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +model_identifier_for_statistics_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + model_identifier_for_statistics_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&tflite_settings_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&preference_) - + reinterpret_cast(&tflite_settings_)) + sizeof(preference_)); +} + +ComputeSettings::~ComputeSettings() { + // @@protoc_insertion_point(destructor:tflite.proto.ComputeSettings) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ComputeSettings::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + model_namespace_for_statistics_.Destroy(); + model_identifier_for_statistics_.Destroy(); + if (this != internal_default_instance()) delete tflite_settings_; + if (this != internal_default_instance()) delete settings_to_test_locally_; +} + +void ComputeSettings::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ComputeSettings::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.ComputeSettings) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + model_namespace_for_statistics_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + model_identifier_for_statistics_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(tflite_settings_ != nullptr); + tflite_settings_->Clear(); + } + if (cached_has_bits & 0x00000008u) { + GOOGLE_DCHECK(settings_to_test_locally_ != nullptr); + settings_to_test_locally_->Clear(); + } + } + preference_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ComputeSettings::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .tflite.proto.ExecutionPreference preference = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::tflite::proto::ExecutionPreference_IsValid(val))) { + _internal_set_preference(static_cast<::tflite::proto::ExecutionPreference>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .tflite.proto.TFLiteSettings tflite_settings = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_tflite_settings(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string model_namespace_for_statistics = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_model_namespace_for_statistics(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + #ifndef NDEBUG + ::_pbi::VerifyUTF8(str, "tflite.proto.ComputeSettings.model_namespace_for_statistics"); + #endif // !NDEBUG + } else + goto handle_unusual; + continue; + // optional string model_identifier_for_statistics = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_model_identifier_for_statistics(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + #ifndef NDEBUG + ::_pbi::VerifyUTF8(str, "tflite.proto.ComputeSettings.model_identifier_for_statistics"); + #endif // !NDEBUG + } else + goto handle_unusual; + continue; + // optional .tflite.proto.MinibenchmarkSettings settings_to_test_locally = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + ptr = ctx->ParseMessage(_internal_mutable_settings_to_test_locally(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ComputeSettings::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.ComputeSettings) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .tflite.proto.ExecutionPreference preference = 1; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this->_internal_preference(), target); + } + + // optional .tflite.proto.TFLiteSettings tflite_settings = 2; + if (cached_has_bits & 0x00000004u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, _Internal::tflite_settings(this), + _Internal::tflite_settings(this).GetCachedSize(), target, stream); + } + + // optional string model_namespace_for_statistics = 3; + if (cached_has_bits & 0x00000001u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_model_namespace_for_statistics().data(), static_cast(this->_internal_model_namespace_for_statistics().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "tflite.proto.ComputeSettings.model_namespace_for_statistics"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_model_namespace_for_statistics(), target); + } + + // optional string model_identifier_for_statistics = 4; + if (cached_has_bits & 0x00000002u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_model_identifier_for_statistics().data(), static_cast(this->_internal_model_identifier_for_statistics().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "tflite.proto.ComputeSettings.model_identifier_for_statistics"); + target = stream->WriteStringMaybeAliased( + 4, this->_internal_model_identifier_for_statistics(), target); + } + + // optional .tflite.proto.MinibenchmarkSettings settings_to_test_locally = 5; + if (cached_has_bits & 0x00000008u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(5, _Internal::settings_to_test_locally(this), + _Internal::settings_to_test_locally(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.ComputeSettings) + return target; +} + +size_t ComputeSettings::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.ComputeSettings) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + // optional string model_namespace_for_statistics = 3; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_model_namespace_for_statistics()); + } + + // optional string model_identifier_for_statistics = 4; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_model_identifier_for_statistics()); + } + + // optional .tflite.proto.TFLiteSettings tflite_settings = 2; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *tflite_settings_); + } + + // optional .tflite.proto.MinibenchmarkSettings settings_to_test_locally = 5; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *settings_to_test_locally_); + } + + // optional .tflite.proto.ExecutionPreference preference = 1; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_preference()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ComputeSettings::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + ComputeSettings::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ComputeSettings::GetClassData() const { return &_class_data_; } + +void ComputeSettings::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void ComputeSettings::MergeFrom(const ComputeSettings& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.ComputeSettings) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000001fu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_model_namespace_for_statistics(from._internal_model_namespace_for_statistics()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_model_identifier_for_statistics(from._internal_model_identifier_for_statistics()); + } + if (cached_has_bits & 0x00000004u) { + _internal_mutable_tflite_settings()->::tflite::proto::TFLiteSettings::MergeFrom(from._internal_tflite_settings()); + } + if (cached_has_bits & 0x00000008u) { + _internal_mutable_settings_to_test_locally()->::tflite::proto::MinibenchmarkSettings::MergeFrom(from._internal_settings_to_test_locally()); + } + if (cached_has_bits & 0x00000010u) { + preference_ = from.preference_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ComputeSettings::CopyFrom(const ComputeSettings& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.ComputeSettings) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ComputeSettings::IsInitialized() const { + return true; +} + +void ComputeSettings::InternalSwap(ComputeSettings* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &model_namespace_for_statistics_, lhs_arena, + &other->model_namespace_for_statistics_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &model_identifier_for_statistics_, lhs_arena, + &other->model_identifier_for_statistics_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ComputeSettings, preference_) + + sizeof(ComputeSettings::preference_) + - PROTOBUF_FIELD_OFFSET(ComputeSettings, tflite_settings_)>( + reinterpret_cast(&tflite_settings_), + reinterpret_cast(&other->tflite_settings_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ComputeSettings::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[0]); +} + +// =================================================================== + +class NNAPISettings::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_accelerator_name(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_cache_directory(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_model_token(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_execution_preference(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static void set_has_no_of_nnapi_instances_to_cache(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static const ::tflite::proto::FallbackSettings& fallback_settings(const NNAPISettings* msg); + static void set_has_fallback_settings(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_allow_nnapi_cpu_on_android_10_plus(HasBits* has_bits) { + (*has_bits)[0] |= 128u; + } + static void set_has_execution_priority(HasBits* has_bits) { + (*has_bits)[0] |= 64u; + } + static void set_has_allow_dynamic_dimensions(HasBits* has_bits) { + (*has_bits)[0] |= 256u; + } + static void set_has_allow_fp16_precision_for_fp32(HasBits* has_bits) { + (*has_bits)[0] |= 512u; + } + static void set_has_use_burst_computation(HasBits* has_bits) { + (*has_bits)[0] |= 1024u; + } + static void set_has_support_library_handle(HasBits* has_bits) { + (*has_bits)[0] |= 2048u; + } +}; + +const ::tflite::proto::FallbackSettings& +NNAPISettings::_Internal::fallback_settings(const NNAPISettings* msg) { + return *msg->fallback_settings_; +} +NNAPISettings::NNAPISettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.NNAPISettings) +} +NNAPISettings::NNAPISettings(const NNAPISettings& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + accelerator_name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + accelerator_name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_accelerator_name()) { + accelerator_name_.Set(from._internal_accelerator_name(), + GetArenaForAllocation()); + } + cache_directory_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + cache_directory_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_cache_directory()) { + cache_directory_.Set(from._internal_cache_directory(), + GetArenaForAllocation()); + } + model_token_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + model_token_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_model_token()) { + model_token_.Set(from._internal_model_token(), + GetArenaForAllocation()); + } + if (from._internal_has_fallback_settings()) { + fallback_settings_ = new ::tflite::proto::FallbackSettings(*from.fallback_settings_); + } else { + fallback_settings_ = nullptr; + } + ::memcpy(&execution_preference_, &from.execution_preference_, + static_cast(reinterpret_cast(&support_library_handle_) - + reinterpret_cast(&execution_preference_)) + sizeof(support_library_handle_)); + // @@protoc_insertion_point(copy_constructor:tflite.proto.NNAPISettings) +} + +inline void NNAPISettings::SharedCtor() { +accelerator_name_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + accelerator_name_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +cache_directory_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + cache_directory_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +model_token_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + model_token_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&fallback_settings_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&support_library_handle_) - + reinterpret_cast(&fallback_settings_)) + sizeof(support_library_handle_)); +} + +NNAPISettings::~NNAPISettings() { + // @@protoc_insertion_point(destructor:tflite.proto.NNAPISettings) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void NNAPISettings::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + accelerator_name_.Destroy(); + cache_directory_.Destroy(); + model_token_.Destroy(); + if (this != internal_default_instance()) delete fallback_settings_; +} + +void NNAPISettings::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void NNAPISettings::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.NNAPISettings) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + accelerator_name_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + cache_directory_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + model_token_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000008u) { + GOOGLE_DCHECK(fallback_settings_ != nullptr); + fallback_settings_->Clear(); + } + } + if (cached_has_bits & 0x000000f0u) { + ::memset(&execution_preference_, 0, static_cast( + reinterpret_cast(&allow_nnapi_cpu_on_android_10_plus_) - + reinterpret_cast(&execution_preference_)) + sizeof(allow_nnapi_cpu_on_android_10_plus_)); + } + if (cached_has_bits & 0x00000f00u) { + ::memset(&allow_dynamic_dimensions_, 0, static_cast( + reinterpret_cast(&support_library_handle_) - + reinterpret_cast(&allow_dynamic_dimensions_)) + sizeof(support_library_handle_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* NNAPISettings::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string accelerator_name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_accelerator_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + #ifndef NDEBUG + ::_pbi::VerifyUTF8(str, "tflite.proto.NNAPISettings.accelerator_name"); + #endif // !NDEBUG + } else + goto handle_unusual; + continue; + // optional string cache_directory = 2 [deprecated = true]; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_cache_directory(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + #ifndef NDEBUG + ::_pbi::VerifyUTF8(str, "tflite.proto.NNAPISettings.cache_directory"); + #endif // !NDEBUG + } else + goto handle_unusual; + continue; + // optional string model_token = 3 [deprecated = true]; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_model_token(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + #ifndef NDEBUG + ::_pbi::VerifyUTF8(str, "tflite.proto.NNAPISettings.model_token"); + #endif // !NDEBUG + } else + goto handle_unusual; + continue; + // optional .tflite.proto.NNAPIExecutionPreference execution_preference = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::tflite::proto::NNAPIExecutionPreference_IsValid(val))) { + _internal_set_execution_preference(static_cast<::tflite::proto::NNAPIExecutionPreference>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(4, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional int32 no_of_nnapi_instances_to_cache = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { + _Internal::set_has_no_of_nnapi_instances_to_cache(&has_bits); + no_of_nnapi_instances_to_cache_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.FallbackSettings fallback_settings = 6 [deprecated = true]; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + ptr = ctx->ParseMessage(_internal_mutable_fallback_settings(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool allow_nnapi_cpu_on_android_10_plus = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { + _Internal::set_has_allow_nnapi_cpu_on_android_10_plus(&has_bits); + allow_nnapi_cpu_on_android_10_plus_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.NNAPIExecutionPriority execution_priority = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 64)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::tflite::proto::NNAPIExecutionPriority_IsValid(val))) { + _internal_set_execution_priority(static_cast<::tflite::proto::NNAPIExecutionPriority>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(8, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional bool allow_dynamic_dimensions = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 72)) { + _Internal::set_has_allow_dynamic_dimensions(&has_bits); + allow_dynamic_dimensions_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool allow_fp16_precision_for_fp32 = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 80)) { + _Internal::set_has_allow_fp16_precision_for_fp32(&has_bits); + allow_fp16_precision_for_fp32_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool use_burst_computation = 11; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 88)) { + _Internal::set_has_use_burst_computation(&has_bits); + use_burst_computation_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int64 support_library_handle = 12; + case 12: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 96)) { + _Internal::set_has_support_library_handle(&has_bits); + support_library_handle_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* NNAPISettings::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.NNAPISettings) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string accelerator_name = 1; + if (cached_has_bits & 0x00000001u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_accelerator_name().data(), static_cast(this->_internal_accelerator_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "tflite.proto.NNAPISettings.accelerator_name"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_accelerator_name(), target); + } + + // optional string cache_directory = 2 [deprecated = true]; + if (cached_has_bits & 0x00000002u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_cache_directory().data(), static_cast(this->_internal_cache_directory().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "tflite.proto.NNAPISettings.cache_directory"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_cache_directory(), target); + } + + // optional string model_token = 3 [deprecated = true]; + if (cached_has_bits & 0x00000004u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_model_token().data(), static_cast(this->_internal_model_token().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "tflite.proto.NNAPISettings.model_token"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_model_token(), target); + } + + // optional .tflite.proto.NNAPIExecutionPreference execution_preference = 4; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 4, this->_internal_execution_preference(), target); + } + + // optional int32 no_of_nnapi_instances_to_cache = 5; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_no_of_nnapi_instances_to_cache(), target); + } + + // optional .tflite.proto.FallbackSettings fallback_settings = 6 [deprecated = true]; + if (cached_has_bits & 0x00000008u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(6, _Internal::fallback_settings(this), + _Internal::fallback_settings(this).GetCachedSize(), target, stream); + } + + // optional bool allow_nnapi_cpu_on_android_10_plus = 7; + if (cached_has_bits & 0x00000080u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_allow_nnapi_cpu_on_android_10_plus(), target); + } + + // optional .tflite.proto.NNAPIExecutionPriority execution_priority = 8; + if (cached_has_bits & 0x00000040u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 8, this->_internal_execution_priority(), target); + } + + // optional bool allow_dynamic_dimensions = 9; + if (cached_has_bits & 0x00000100u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(9, this->_internal_allow_dynamic_dimensions(), target); + } + + // optional bool allow_fp16_precision_for_fp32 = 10; + if (cached_has_bits & 0x00000200u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(10, this->_internal_allow_fp16_precision_for_fp32(), target); + } + + // optional bool use_burst_computation = 11; + if (cached_has_bits & 0x00000400u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(11, this->_internal_use_burst_computation(), target); + } + + // optional int64 support_library_handle = 12; + if (cached_has_bits & 0x00000800u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(12, this->_internal_support_library_handle(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.NNAPISettings) + return target; +} + +size_t NNAPISettings::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.NNAPISettings) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + // optional string accelerator_name = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_accelerator_name()); + } + + // optional string cache_directory = 2 [deprecated = true]; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_cache_directory()); + } + + // optional string model_token = 3 [deprecated = true]; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_model_token()); + } + + // optional .tflite.proto.FallbackSettings fallback_settings = 6 [deprecated = true]; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *fallback_settings_); + } + + // optional .tflite.proto.NNAPIExecutionPreference execution_preference = 4; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_execution_preference()); + } + + // optional int32 no_of_nnapi_instances_to_cache = 5; + if (cached_has_bits & 0x00000020u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_no_of_nnapi_instances_to_cache()); + } + + // optional .tflite.proto.NNAPIExecutionPriority execution_priority = 8; + if (cached_has_bits & 0x00000040u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_execution_priority()); + } + + // optional bool allow_nnapi_cpu_on_android_10_plus = 7; + if (cached_has_bits & 0x00000080u) { + total_size += 1 + 1; + } + + } + if (cached_has_bits & 0x00000f00u) { + // optional bool allow_dynamic_dimensions = 9; + if (cached_has_bits & 0x00000100u) { + total_size += 1 + 1; + } + + // optional bool allow_fp16_precision_for_fp32 = 10; + if (cached_has_bits & 0x00000200u) { + total_size += 1 + 1; + } + + // optional bool use_burst_computation = 11; + if (cached_has_bits & 0x00000400u) { + total_size += 1 + 1; + } + + // optional int64 support_library_handle = 12; + if (cached_has_bits & 0x00000800u) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_support_library_handle()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData NNAPISettings::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + NNAPISettings::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*NNAPISettings::GetClassData() const { return &_class_data_; } + +void NNAPISettings::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void NNAPISettings::MergeFrom(const NNAPISettings& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.NNAPISettings) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_accelerator_name(from._internal_accelerator_name()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_cache_directory(from._internal_cache_directory()); + } + if (cached_has_bits & 0x00000004u) { + _internal_set_model_token(from._internal_model_token()); + } + if (cached_has_bits & 0x00000008u) { + _internal_mutable_fallback_settings()->::tflite::proto::FallbackSettings::MergeFrom(from._internal_fallback_settings()); + } + if (cached_has_bits & 0x00000010u) { + execution_preference_ = from.execution_preference_; + } + if (cached_has_bits & 0x00000020u) { + no_of_nnapi_instances_to_cache_ = from.no_of_nnapi_instances_to_cache_; + } + if (cached_has_bits & 0x00000040u) { + execution_priority_ = from.execution_priority_; + } + if (cached_has_bits & 0x00000080u) { + allow_nnapi_cpu_on_android_10_plus_ = from.allow_nnapi_cpu_on_android_10_plus_; + } + _has_bits_[0] |= cached_has_bits; + } + if (cached_has_bits & 0x00000f00u) { + if (cached_has_bits & 0x00000100u) { + allow_dynamic_dimensions_ = from.allow_dynamic_dimensions_; + } + if (cached_has_bits & 0x00000200u) { + allow_fp16_precision_for_fp32_ = from.allow_fp16_precision_for_fp32_; + } + if (cached_has_bits & 0x00000400u) { + use_burst_computation_ = from.use_burst_computation_; + } + if (cached_has_bits & 0x00000800u) { + support_library_handle_ = from.support_library_handle_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void NNAPISettings::CopyFrom(const NNAPISettings& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.NNAPISettings) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool NNAPISettings::IsInitialized() const { + return true; +} + +void NNAPISettings::InternalSwap(NNAPISettings* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &accelerator_name_, lhs_arena, + &other->accelerator_name_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &cache_directory_, lhs_arena, + &other->cache_directory_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &model_token_, lhs_arena, + &other->model_token_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(NNAPISettings, support_library_handle_) + + sizeof(NNAPISettings::support_library_handle_) + - PROTOBUF_FIELD_OFFSET(NNAPISettings, fallback_settings_)>( + reinterpret_cast(&fallback_settings_), + reinterpret_cast(&other->fallback_settings_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata NNAPISettings::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[1]); +} + +// =================================================================== + +class GPUSettings::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_is_precision_loss_allowed(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_enable_quantized_inference(HasBits* has_bits) { + (*has_bits)[0] |= 256u; + } + static void set_has_force_backend(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_inference_priority1(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static void set_has_inference_priority2(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static void set_has_inference_priority3(HasBits* has_bits) { + (*has_bits)[0] |= 64u; + } + static void set_has_inference_preference(HasBits* has_bits) { + (*has_bits)[0] |= 128u; + } + static void set_has_cache_directory(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_model_token(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +GPUSettings::GPUSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.GPUSettings) +} +GPUSettings::GPUSettings(const GPUSettings& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + cache_directory_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + cache_directory_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_cache_directory()) { + cache_directory_.Set(from._internal_cache_directory(), + GetArenaForAllocation()); + } + model_token_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + model_token_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_model_token()) { + model_token_.Set(from._internal_model_token(), + GetArenaForAllocation()); + } + ::memcpy(&is_precision_loss_allowed_, &from.is_precision_loss_allowed_, + static_cast(reinterpret_cast(&enable_quantized_inference_) - + reinterpret_cast(&is_precision_loss_allowed_)) + sizeof(enable_quantized_inference_)); + // @@protoc_insertion_point(copy_constructor:tflite.proto.GPUSettings) +} + +inline void GPUSettings::SharedCtor() { +cache_directory_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + cache_directory_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +model_token_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + model_token_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&is_precision_loss_allowed_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&inference_preference_) - + reinterpret_cast(&is_precision_loss_allowed_)) + sizeof(inference_preference_)); +enable_quantized_inference_ = true; +} + +GPUSettings::~GPUSettings() { + // @@protoc_insertion_point(destructor:tflite.proto.GPUSettings) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void GPUSettings::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + cache_directory_.Destroy(); + model_token_.Destroy(); +} + +void GPUSettings::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void GPUSettings::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.GPUSettings) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + cache_directory_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + model_token_.ClearNonDefaultToEmpty(); + } + } + if (cached_has_bits & 0x000000fcu) { + ::memset(&is_precision_loss_allowed_, 0, static_cast( + reinterpret_cast(&inference_preference_) - + reinterpret_cast(&is_precision_loss_allowed_)) + sizeof(inference_preference_)); + } + enable_quantized_inference_ = true; + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GPUSettings::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional bool is_precision_loss_allowed = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_is_precision_loss_allowed(&has_bits); + is_precision_loss_allowed_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool enable_quantized_inference = 2 [default = true]; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_enable_quantized_inference(&has_bits); + enable_quantized_inference_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.GPUBackend force_backend = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::tflite::proto::GPUBackend_IsValid(val))) { + _internal_set_force_backend(static_cast<::tflite::proto::GPUBackend>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .tflite.proto.GPUInferencePriority inference_priority1 = 4 [default = GPU_PRIORITY_AUTO]; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::tflite::proto::GPUInferencePriority_IsValid(val))) { + _internal_set_inference_priority1(static_cast<::tflite::proto::GPUInferencePriority>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(4, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .tflite.proto.GPUInferencePriority inference_priority2 = 5 [default = GPU_PRIORITY_AUTO]; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::tflite::proto::GPUInferencePriority_IsValid(val))) { + _internal_set_inference_priority2(static_cast<::tflite::proto::GPUInferencePriority>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(5, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .tflite.proto.GPUInferencePriority inference_priority3 = 6 [default = GPU_PRIORITY_AUTO]; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::tflite::proto::GPUInferencePriority_IsValid(val))) { + _internal_set_inference_priority3(static_cast<::tflite::proto::GPUInferencePriority>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(6, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .tflite.proto.GPUInferenceUsage inference_preference = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::tflite::proto::GPUInferenceUsage_IsValid(val))) { + _internal_set_inference_preference(static_cast<::tflite::proto::GPUInferenceUsage>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(7, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional string cache_directory = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { + auto str = _internal_mutable_cache_directory(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + #ifndef NDEBUG + ::_pbi::VerifyUTF8(str, "tflite.proto.GPUSettings.cache_directory"); + #endif // !NDEBUG + } else + goto handle_unusual; + continue; + // optional string model_token = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 74)) { + auto str = _internal_mutable_model_token(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + #ifndef NDEBUG + ::_pbi::VerifyUTF8(str, "tflite.proto.GPUSettings.model_token"); + #endif // !NDEBUG + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* GPUSettings::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.GPUSettings) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional bool is_precision_loss_allowed = 1; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_is_precision_loss_allowed(), target); + } + + // optional bool enable_quantized_inference = 2 [default = true]; + if (cached_has_bits & 0x00000100u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_enable_quantized_inference(), target); + } + + // optional .tflite.proto.GPUBackend force_backend = 3; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 3, this->_internal_force_backend(), target); + } + + // optional .tflite.proto.GPUInferencePriority inference_priority1 = 4 [default = GPU_PRIORITY_AUTO]; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 4, this->_internal_inference_priority1(), target); + } + + // optional .tflite.proto.GPUInferencePriority inference_priority2 = 5 [default = GPU_PRIORITY_AUTO]; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 5, this->_internal_inference_priority2(), target); + } + + // optional .tflite.proto.GPUInferencePriority inference_priority3 = 6 [default = GPU_PRIORITY_AUTO]; + if (cached_has_bits & 0x00000040u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 6, this->_internal_inference_priority3(), target); + } + + // optional .tflite.proto.GPUInferenceUsage inference_preference = 7; + if (cached_has_bits & 0x00000080u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 7, this->_internal_inference_preference(), target); + } + + // optional string cache_directory = 8; + if (cached_has_bits & 0x00000001u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_cache_directory().data(), static_cast(this->_internal_cache_directory().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "tflite.proto.GPUSettings.cache_directory"); + target = stream->WriteStringMaybeAliased( + 8, this->_internal_cache_directory(), target); + } + + // optional string model_token = 9; + if (cached_has_bits & 0x00000002u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_model_token().data(), static_cast(this->_internal_model_token().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "tflite.proto.GPUSettings.model_token"); + target = stream->WriteStringMaybeAliased( + 9, this->_internal_model_token(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.GPUSettings) + return target; +} + +size_t GPUSettings::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.GPUSettings) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + // optional string cache_directory = 8; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_cache_directory()); + } + + // optional string model_token = 9; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_model_token()); + } + + // optional bool is_precision_loss_allowed = 1; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + 1; + } + + // optional .tflite.proto.GPUBackend force_backend = 3; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_force_backend()); + } + + // optional .tflite.proto.GPUInferencePriority inference_priority1 = 4 [default = GPU_PRIORITY_AUTO]; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_inference_priority1()); + } + + // optional .tflite.proto.GPUInferencePriority inference_priority2 = 5 [default = GPU_PRIORITY_AUTO]; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_inference_priority2()); + } + + // optional .tflite.proto.GPUInferencePriority inference_priority3 = 6 [default = GPU_PRIORITY_AUTO]; + if (cached_has_bits & 0x00000040u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_inference_priority3()); + } + + // optional .tflite.proto.GPUInferenceUsage inference_preference = 7; + if (cached_has_bits & 0x00000080u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_inference_preference()); + } + + } + // optional bool enable_quantized_inference = 2 [default = true]; + if (cached_has_bits & 0x00000100u) { + total_size += 1 + 1; + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GPUSettings::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + GPUSettings::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GPUSettings::GetClassData() const { return &_class_data_; } + +void GPUSettings::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void GPUSettings::MergeFrom(const GPUSettings& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.GPUSettings) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_cache_directory(from._internal_cache_directory()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_model_token(from._internal_model_token()); + } + if (cached_has_bits & 0x00000004u) { + is_precision_loss_allowed_ = from.is_precision_loss_allowed_; + } + if (cached_has_bits & 0x00000008u) { + force_backend_ = from.force_backend_; + } + if (cached_has_bits & 0x00000010u) { + inference_priority1_ = from.inference_priority1_; + } + if (cached_has_bits & 0x00000020u) { + inference_priority2_ = from.inference_priority2_; + } + if (cached_has_bits & 0x00000040u) { + inference_priority3_ = from.inference_priority3_; + } + if (cached_has_bits & 0x00000080u) { + inference_preference_ = from.inference_preference_; + } + _has_bits_[0] |= cached_has_bits; + } + if (cached_has_bits & 0x00000100u) { + _internal_set_enable_quantized_inference(from._internal_enable_quantized_inference()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GPUSettings::CopyFrom(const GPUSettings& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.GPUSettings) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GPUSettings::IsInitialized() const { + return true; +} + +void GPUSettings::InternalSwap(GPUSettings* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &cache_directory_, lhs_arena, + &other->cache_directory_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &model_token_, lhs_arena, + &other->model_token_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(GPUSettings, inference_preference_) + + sizeof(GPUSettings::inference_preference_) + - PROTOBUF_FIELD_OFFSET(GPUSettings, is_precision_loss_allowed_)>( + reinterpret_cast(&is_precision_loss_allowed_), + reinterpret_cast(&other->is_precision_loss_allowed_)); + swap(enable_quantized_inference_, other->enable_quantized_inference_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GPUSettings::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[2]); +} + +// =================================================================== + +class HexagonSettings::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_debug_level(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_powersave_level(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_print_graph_profile(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_print_graph_debug(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } +}; + +HexagonSettings::HexagonSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.HexagonSettings) +} +HexagonSettings::HexagonSettings(const HexagonSettings& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&debug_level_, &from.debug_level_, + static_cast(reinterpret_cast(&print_graph_debug_) - + reinterpret_cast(&debug_level_)) + sizeof(print_graph_debug_)); + // @@protoc_insertion_point(copy_constructor:tflite.proto.HexagonSettings) +} + +inline void HexagonSettings::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&debug_level_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&print_graph_debug_) - + reinterpret_cast(&debug_level_)) + sizeof(print_graph_debug_)); +} + +HexagonSettings::~HexagonSettings() { + // @@protoc_insertion_point(destructor:tflite.proto.HexagonSettings) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void HexagonSettings::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void HexagonSettings::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void HexagonSettings::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.HexagonSettings) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + ::memset(&debug_level_, 0, static_cast( + reinterpret_cast(&print_graph_debug_) - + reinterpret_cast(&debug_level_)) + sizeof(print_graph_debug_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* HexagonSettings::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int32 debug_level = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_debug_level(&has_bits); + debug_level_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 powersave_level = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_powersave_level(&has_bits); + powersave_level_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool print_graph_profile = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _Internal::set_has_print_graph_profile(&has_bits); + print_graph_profile_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool print_graph_debug = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + _Internal::set_has_print_graph_debug(&has_bits); + print_graph_debug_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* HexagonSettings::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.HexagonSettings) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int32 debug_level = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_debug_level(), target); + } + + // optional int32 powersave_level = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_powersave_level(), target); + } + + // optional bool print_graph_profile = 3; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_print_graph_profile(), target); + } + + // optional bool print_graph_debug = 4; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_print_graph_debug(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.HexagonSettings) + return target; +} + +size_t HexagonSettings::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.HexagonSettings) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional int32 debug_level = 1; + if (cached_has_bits & 0x00000001u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_debug_level()); + } + + // optional int32 powersave_level = 2; + if (cached_has_bits & 0x00000002u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_powersave_level()); + } + + // optional bool print_graph_profile = 3; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + 1; + } + + // optional bool print_graph_debug = 4; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + 1; + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData HexagonSettings::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + HexagonSettings::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*HexagonSettings::GetClassData() const { return &_class_data_; } + +void HexagonSettings::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void HexagonSettings::MergeFrom(const HexagonSettings& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.HexagonSettings) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + debug_level_ = from.debug_level_; + } + if (cached_has_bits & 0x00000002u) { + powersave_level_ = from.powersave_level_; + } + if (cached_has_bits & 0x00000004u) { + print_graph_profile_ = from.print_graph_profile_; + } + if (cached_has_bits & 0x00000008u) { + print_graph_debug_ = from.print_graph_debug_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void HexagonSettings::CopyFrom(const HexagonSettings& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.HexagonSettings) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool HexagonSettings::IsInitialized() const { + return true; +} + +void HexagonSettings::InternalSwap(HexagonSettings* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(HexagonSettings, print_graph_debug_) + + sizeof(HexagonSettings::print_graph_debug_) + - PROTOBUF_FIELD_OFFSET(HexagonSettings, debug_level_)>( + reinterpret_cast(&debug_level_), + reinterpret_cast(&other->debug_level_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata HexagonSettings::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[3]); +} + +// =================================================================== + +class XNNPackSettings::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_num_threads(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_flags(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +XNNPackSettings::XNNPackSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.XNNPackSettings) +} +XNNPackSettings::XNNPackSettings(const XNNPackSettings& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&num_threads_, &from.num_threads_, + static_cast(reinterpret_cast(&flags_) - + reinterpret_cast(&num_threads_)) + sizeof(flags_)); + // @@protoc_insertion_point(copy_constructor:tflite.proto.XNNPackSettings) +} + +inline void XNNPackSettings::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&num_threads_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&flags_) - + reinterpret_cast(&num_threads_)) + sizeof(flags_)); +} + +XNNPackSettings::~XNNPackSettings() { + // @@protoc_insertion_point(destructor:tflite.proto.XNNPackSettings) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void XNNPackSettings::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void XNNPackSettings::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void XNNPackSettings::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.XNNPackSettings) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + ::memset(&num_threads_, 0, static_cast( + reinterpret_cast(&flags_) - + reinterpret_cast(&num_threads_)) + sizeof(flags_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* XNNPackSettings::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int32 num_threads = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_num_threads(&has_bits); + num_threads_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.XNNPackFlags flags = 2 [default = TFLITE_XNNPACK_DELEGATE_NO_FLAGS]; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::tflite::proto::XNNPackFlags_IsValid(val))) { + _internal_set_flags(static_cast<::tflite::proto::XNNPackFlags>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* XNNPackSettings::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.XNNPackSettings) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int32 num_threads = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_num_threads(), target); + } + + // optional .tflite.proto.XNNPackFlags flags = 2 [default = TFLITE_XNNPACK_DELEGATE_NO_FLAGS]; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 2, this->_internal_flags(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.XNNPackSettings) + return target; +} + +size_t XNNPackSettings::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.XNNPackSettings) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional int32 num_threads = 1; + if (cached_has_bits & 0x00000001u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_threads()); + } + + // optional .tflite.proto.XNNPackFlags flags = 2 [default = TFLITE_XNNPACK_DELEGATE_NO_FLAGS]; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_flags()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData XNNPackSettings::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + XNNPackSettings::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*XNNPackSettings::GetClassData() const { return &_class_data_; } + +void XNNPackSettings::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void XNNPackSettings::MergeFrom(const XNNPackSettings& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.XNNPackSettings) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + num_threads_ = from.num_threads_; + } + if (cached_has_bits & 0x00000002u) { + flags_ = from.flags_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void XNNPackSettings::CopyFrom(const XNNPackSettings& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.XNNPackSettings) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool XNNPackSettings::IsInitialized() const { + return true; +} + +void XNNPackSettings::InternalSwap(XNNPackSettings* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(XNNPackSettings, flags_) + + sizeof(XNNPackSettings::flags_) + - PROTOBUF_FIELD_OFFSET(XNNPackSettings, num_threads_)>( + reinterpret_cast(&num_threads_), + reinterpret_cast(&other->num_threads_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata XNNPackSettings::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[4]); +} + +// =================================================================== + +class CoreMLSettings::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_enabled_devices(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_coreml_version(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_max_delegated_partitions(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_min_nodes_per_partition(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } +}; + +CoreMLSettings::CoreMLSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.CoreMLSettings) +} +CoreMLSettings::CoreMLSettings(const CoreMLSettings& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&enabled_devices_, &from.enabled_devices_, + static_cast(reinterpret_cast(&min_nodes_per_partition_) - + reinterpret_cast(&enabled_devices_)) + sizeof(min_nodes_per_partition_)); + // @@protoc_insertion_point(copy_constructor:tflite.proto.CoreMLSettings) +} + +inline void CoreMLSettings::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&enabled_devices_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&max_delegated_partitions_) - + reinterpret_cast(&enabled_devices_)) + sizeof(max_delegated_partitions_)); +min_nodes_per_partition_ = 2; +} + +CoreMLSettings::~CoreMLSettings() { + // @@protoc_insertion_point(destructor:tflite.proto.CoreMLSettings) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void CoreMLSettings::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void CoreMLSettings::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void CoreMLSettings::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.CoreMLSettings) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + ::memset(&enabled_devices_, 0, static_cast( + reinterpret_cast(&max_delegated_partitions_) - + reinterpret_cast(&enabled_devices_)) + sizeof(max_delegated_partitions_)); + min_nodes_per_partition_ = 2; + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* CoreMLSettings::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .tflite.proto.CoreMLSettings.EnabledDevices enabled_devices = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::tflite::proto::CoreMLSettings_EnabledDevices_IsValid(val))) { + _internal_set_enabled_devices(static_cast<::tflite::proto::CoreMLSettings_EnabledDevices>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional int32 coreml_version = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_coreml_version(&has_bits); + coreml_version_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 max_delegated_partitions = 3 [default = 0]; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _Internal::set_has_max_delegated_partitions(&has_bits); + max_delegated_partitions_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 min_nodes_per_partition = 4 [default = 2]; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + _Internal::set_has_min_nodes_per_partition(&has_bits); + min_nodes_per_partition_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* CoreMLSettings::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.CoreMLSettings) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .tflite.proto.CoreMLSettings.EnabledDevices enabled_devices = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this->_internal_enabled_devices(), target); + } + + // optional int32 coreml_version = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_coreml_version(), target); + } + + // optional int32 max_delegated_partitions = 3 [default = 0]; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_max_delegated_partitions(), target); + } + + // optional int32 min_nodes_per_partition = 4 [default = 2]; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_min_nodes_per_partition(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.CoreMLSettings) + return target; +} + +size_t CoreMLSettings::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.CoreMLSettings) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional .tflite.proto.CoreMLSettings.EnabledDevices enabled_devices = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_enabled_devices()); + } + + // optional int32 coreml_version = 2; + if (cached_has_bits & 0x00000002u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_coreml_version()); + } + + // optional int32 max_delegated_partitions = 3 [default = 0]; + if (cached_has_bits & 0x00000004u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_max_delegated_partitions()); + } + + // optional int32 min_nodes_per_partition = 4 [default = 2]; + if (cached_has_bits & 0x00000008u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_min_nodes_per_partition()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CoreMLSettings::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + CoreMLSettings::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CoreMLSettings::GetClassData() const { return &_class_data_; } + +void CoreMLSettings::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void CoreMLSettings::MergeFrom(const CoreMLSettings& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.CoreMLSettings) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + enabled_devices_ = from.enabled_devices_; + } + if (cached_has_bits & 0x00000002u) { + coreml_version_ = from.coreml_version_; + } + if (cached_has_bits & 0x00000004u) { + max_delegated_partitions_ = from.max_delegated_partitions_; + } + if (cached_has_bits & 0x00000008u) { + min_nodes_per_partition_ = from.min_nodes_per_partition_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void CoreMLSettings::CopyFrom(const CoreMLSettings& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.CoreMLSettings) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CoreMLSettings::IsInitialized() const { + return true; +} + +void CoreMLSettings::InternalSwap(CoreMLSettings* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(CoreMLSettings, max_delegated_partitions_) + + sizeof(CoreMLSettings::max_delegated_partitions_) + - PROTOBUF_FIELD_OFFSET(CoreMLSettings, enabled_devices_)>( + reinterpret_cast(&enabled_devices_), + reinterpret_cast(&other->enabled_devices_)); + swap(min_nodes_per_partition_, other->min_nodes_per_partition_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata CoreMLSettings::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[5]); +} + +// =================================================================== + +class StableDelegateLoaderSettings::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_delegate_path(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_delegate_name(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +StableDelegateLoaderSettings::StableDelegateLoaderSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.StableDelegateLoaderSettings) +} +StableDelegateLoaderSettings::StableDelegateLoaderSettings(const StableDelegateLoaderSettings& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + delegate_path_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + delegate_path_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_delegate_path()) { + delegate_path_.Set(from._internal_delegate_path(), + GetArenaForAllocation()); + } + delegate_name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + delegate_name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_delegate_name()) { + delegate_name_.Set(from._internal_delegate_name(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:tflite.proto.StableDelegateLoaderSettings) +} + +inline void StableDelegateLoaderSettings::SharedCtor() { +delegate_path_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + delegate_path_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +delegate_name_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + delegate_name_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +StableDelegateLoaderSettings::~StableDelegateLoaderSettings() { + // @@protoc_insertion_point(destructor:tflite.proto.StableDelegateLoaderSettings) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void StableDelegateLoaderSettings::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + delegate_path_.Destroy(); + delegate_name_.Destroy(); +} + +void StableDelegateLoaderSettings::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void StableDelegateLoaderSettings::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.StableDelegateLoaderSettings) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + delegate_path_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + delegate_name_.ClearNonDefaultToEmpty(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* StableDelegateLoaderSettings::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string delegate_path = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_delegate_path(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + #ifndef NDEBUG + ::_pbi::VerifyUTF8(str, "tflite.proto.StableDelegateLoaderSettings.delegate_path"); + #endif // !NDEBUG + } else + goto handle_unusual; + continue; + // optional string delegate_name = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_delegate_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + #ifndef NDEBUG + ::_pbi::VerifyUTF8(str, "tflite.proto.StableDelegateLoaderSettings.delegate_name"); + #endif // !NDEBUG + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* StableDelegateLoaderSettings::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.StableDelegateLoaderSettings) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string delegate_path = 1; + if (cached_has_bits & 0x00000001u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_delegate_path().data(), static_cast(this->_internal_delegate_path().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "tflite.proto.StableDelegateLoaderSettings.delegate_path"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_delegate_path(), target); + } + + // optional string delegate_name = 2; + if (cached_has_bits & 0x00000002u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_delegate_name().data(), static_cast(this->_internal_delegate_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "tflite.proto.StableDelegateLoaderSettings.delegate_name"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_delegate_name(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.StableDelegateLoaderSettings) + return target; +} + +size_t StableDelegateLoaderSettings::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.StableDelegateLoaderSettings) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string delegate_path = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_delegate_path()); + } + + // optional string delegate_name = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_delegate_name()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData StableDelegateLoaderSettings::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + StableDelegateLoaderSettings::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*StableDelegateLoaderSettings::GetClassData() const { return &_class_data_; } + +void StableDelegateLoaderSettings::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void StableDelegateLoaderSettings::MergeFrom(const StableDelegateLoaderSettings& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.StableDelegateLoaderSettings) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_delegate_path(from._internal_delegate_path()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_delegate_name(from._internal_delegate_name()); + } + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void StableDelegateLoaderSettings::CopyFrom(const StableDelegateLoaderSettings& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.StableDelegateLoaderSettings) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool StableDelegateLoaderSettings::IsInitialized() const { + return true; +} + +void StableDelegateLoaderSettings::InternalSwap(StableDelegateLoaderSettings* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &delegate_path_, lhs_arena, + &other->delegate_path_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &delegate_name_, lhs_arena, + &other->delegate_name_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata StableDelegateLoaderSettings::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[6]); +} + +// =================================================================== + +class CompilationCachingSettings::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_cache_dir(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_model_token(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +CompilationCachingSettings::CompilationCachingSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.CompilationCachingSettings) +} +CompilationCachingSettings::CompilationCachingSettings(const CompilationCachingSettings& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + cache_dir_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + cache_dir_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_cache_dir()) { + cache_dir_.Set(from._internal_cache_dir(), + GetArenaForAllocation()); + } + model_token_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + model_token_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_model_token()) { + model_token_.Set(from._internal_model_token(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:tflite.proto.CompilationCachingSettings) +} + +inline void CompilationCachingSettings::SharedCtor() { +cache_dir_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + cache_dir_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +model_token_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + model_token_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +CompilationCachingSettings::~CompilationCachingSettings() { + // @@protoc_insertion_point(destructor:tflite.proto.CompilationCachingSettings) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void CompilationCachingSettings::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + cache_dir_.Destroy(); + model_token_.Destroy(); +} + +void CompilationCachingSettings::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void CompilationCachingSettings::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.CompilationCachingSettings) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + cache_dir_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + model_token_.ClearNonDefaultToEmpty(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* CompilationCachingSettings::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string cache_dir = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_cache_dir(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + #ifndef NDEBUG + ::_pbi::VerifyUTF8(str, "tflite.proto.CompilationCachingSettings.cache_dir"); + #endif // !NDEBUG + } else + goto handle_unusual; + continue; + // optional string model_token = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_model_token(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + #ifndef NDEBUG + ::_pbi::VerifyUTF8(str, "tflite.proto.CompilationCachingSettings.model_token"); + #endif // !NDEBUG + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* CompilationCachingSettings::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.CompilationCachingSettings) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string cache_dir = 1; + if (cached_has_bits & 0x00000001u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_cache_dir().data(), static_cast(this->_internal_cache_dir().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "tflite.proto.CompilationCachingSettings.cache_dir"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_cache_dir(), target); + } + + // optional string model_token = 2; + if (cached_has_bits & 0x00000002u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_model_token().data(), static_cast(this->_internal_model_token().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "tflite.proto.CompilationCachingSettings.model_token"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_model_token(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.CompilationCachingSettings) + return target; +} + +size_t CompilationCachingSettings::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.CompilationCachingSettings) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string cache_dir = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_cache_dir()); + } + + // optional string model_token = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_model_token()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CompilationCachingSettings::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + CompilationCachingSettings::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CompilationCachingSettings::GetClassData() const { return &_class_data_; } + +void CompilationCachingSettings::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void CompilationCachingSettings::MergeFrom(const CompilationCachingSettings& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.CompilationCachingSettings) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_cache_dir(from._internal_cache_dir()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_model_token(from._internal_model_token()); + } + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void CompilationCachingSettings::CopyFrom(const CompilationCachingSettings& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.CompilationCachingSettings) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CompilationCachingSettings::IsInitialized() const { + return true; +} + +void CompilationCachingSettings::InternalSwap(CompilationCachingSettings* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &cache_dir_, lhs_arena, + &other->cache_dir_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &model_token_, lhs_arena, + &other->model_token_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata CompilationCachingSettings::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[7]); +} + +// =================================================================== + +class EdgeTpuDeviceSpec::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_platform_type(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_num_chips(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_chip_family(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } +}; + +EdgeTpuDeviceSpec::EdgeTpuDeviceSpec(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), + device_paths_(arena) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.EdgeTpuDeviceSpec) +} +EdgeTpuDeviceSpec::EdgeTpuDeviceSpec(const EdgeTpuDeviceSpec& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_), + device_paths_(from.device_paths_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&platform_type_, &from.platform_type_, + static_cast(reinterpret_cast(&chip_family_) - + reinterpret_cast(&platform_type_)) + sizeof(chip_family_)); + // @@protoc_insertion_point(copy_constructor:tflite.proto.EdgeTpuDeviceSpec) +} + +inline void EdgeTpuDeviceSpec::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&platform_type_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&chip_family_) - + reinterpret_cast(&platform_type_)) + sizeof(chip_family_)); +} + +EdgeTpuDeviceSpec::~EdgeTpuDeviceSpec() { + // @@protoc_insertion_point(destructor:tflite.proto.EdgeTpuDeviceSpec) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void EdgeTpuDeviceSpec::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void EdgeTpuDeviceSpec::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void EdgeTpuDeviceSpec::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.EdgeTpuDeviceSpec) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + device_paths_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + ::memset(&platform_type_, 0, static_cast( + reinterpret_cast(&chip_family_) - + reinterpret_cast(&platform_type_)) + sizeof(chip_family_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* EdgeTpuDeviceSpec::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .tflite.proto.EdgeTpuDeviceSpec.PlatformType platform_type = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::tflite::proto::EdgeTpuDeviceSpec_PlatformType_IsValid(val))) { + _internal_set_platform_type(static_cast<::tflite::proto::EdgeTpuDeviceSpec_PlatformType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional int32 num_chips = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_num_chips(&has_bits); + num_chips_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated string device_paths = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr -= 1; + do { + ptr += 1; + auto str = _internal_add_device_paths(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + #ifndef NDEBUG + ::_pbi::VerifyUTF8(str, "tflite.proto.EdgeTpuDeviceSpec.device_paths"); + #endif // !NDEBUG + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<26>(ptr)); + } else + goto handle_unusual; + continue; + // optional int32 chip_family = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + _Internal::set_has_chip_family(&has_bits); + chip_family_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* EdgeTpuDeviceSpec::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.EdgeTpuDeviceSpec) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .tflite.proto.EdgeTpuDeviceSpec.PlatformType platform_type = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this->_internal_platform_type(), target); + } + + // optional int32 num_chips = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_num_chips(), target); + } + + // repeated string device_paths = 3; + for (int i = 0, n = this->_internal_device_paths_size(); i < n; i++) { + const auto& s = this->_internal_device_paths(i); + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + s.data(), static_cast(s.length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "tflite.proto.EdgeTpuDeviceSpec.device_paths"); + target = stream->WriteString(3, s, target); + } + + // optional int32 chip_family = 4; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_chip_family(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.EdgeTpuDeviceSpec) + return target; +} + +size_t EdgeTpuDeviceSpec::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.EdgeTpuDeviceSpec) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated string device_paths = 3; + total_size += 1 * + ::PROTOBUF_NAMESPACE_ID::internal::FromIntSize(device_paths_.size()); + for (int i = 0, n = device_paths_.size(); i < n; i++) { + total_size += ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + device_paths_.Get(i)); + } + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional .tflite.proto.EdgeTpuDeviceSpec.PlatformType platform_type = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_platform_type()); + } + + // optional int32 num_chips = 2; + if (cached_has_bits & 0x00000002u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_chips()); + } + + // optional int32 chip_family = 4; + if (cached_has_bits & 0x00000004u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_chip_family()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EdgeTpuDeviceSpec::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + EdgeTpuDeviceSpec::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EdgeTpuDeviceSpec::GetClassData() const { return &_class_data_; } + +void EdgeTpuDeviceSpec::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void EdgeTpuDeviceSpec::MergeFrom(const EdgeTpuDeviceSpec& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.EdgeTpuDeviceSpec) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + device_paths_.MergeFrom(from.device_paths_); + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + platform_type_ = from.platform_type_; + } + if (cached_has_bits & 0x00000002u) { + num_chips_ = from.num_chips_; + } + if (cached_has_bits & 0x00000004u) { + chip_family_ = from.chip_family_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void EdgeTpuDeviceSpec::CopyFrom(const EdgeTpuDeviceSpec& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.EdgeTpuDeviceSpec) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool EdgeTpuDeviceSpec::IsInitialized() const { + return true; +} + +void EdgeTpuDeviceSpec::InternalSwap(EdgeTpuDeviceSpec* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + device_paths_.InternalSwap(&other->device_paths_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(EdgeTpuDeviceSpec, chip_family_) + + sizeof(EdgeTpuDeviceSpec::chip_family_) + - PROTOBUF_FIELD_OFFSET(EdgeTpuDeviceSpec, platform_type_)>( + reinterpret_cast(&platform_type_), + reinterpret_cast(&other->platform_type_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata EdgeTpuDeviceSpec::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[8]); +} + +// =================================================================== + +class EdgeTpuInactivePowerConfig::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_inactive_power_state(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_inactive_timeout_us(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +EdgeTpuInactivePowerConfig::EdgeTpuInactivePowerConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.EdgeTpuInactivePowerConfig) +} +EdgeTpuInactivePowerConfig::EdgeTpuInactivePowerConfig(const EdgeTpuInactivePowerConfig& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&inactive_timeout_us_, &from.inactive_timeout_us_, + static_cast(reinterpret_cast(&inactive_power_state_) - + reinterpret_cast(&inactive_timeout_us_)) + sizeof(inactive_power_state_)); + // @@protoc_insertion_point(copy_constructor:tflite.proto.EdgeTpuInactivePowerConfig) +} + +inline void EdgeTpuInactivePowerConfig::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&inactive_timeout_us_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&inactive_power_state_) - + reinterpret_cast(&inactive_timeout_us_)) + sizeof(inactive_power_state_)); +} + +EdgeTpuInactivePowerConfig::~EdgeTpuInactivePowerConfig() { + // @@protoc_insertion_point(destructor:tflite.proto.EdgeTpuInactivePowerConfig) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void EdgeTpuInactivePowerConfig::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void EdgeTpuInactivePowerConfig::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void EdgeTpuInactivePowerConfig::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.EdgeTpuInactivePowerConfig) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + ::memset(&inactive_timeout_us_, 0, static_cast( + reinterpret_cast(&inactive_power_state_) - + reinterpret_cast(&inactive_timeout_us_)) + sizeof(inactive_power_state_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* EdgeTpuInactivePowerConfig::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .tflite.proto.EdgeTpuPowerState inactive_power_state = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::tflite::proto::EdgeTpuPowerState_IsValid(val))) { + _internal_set_inactive_power_state(static_cast<::tflite::proto::EdgeTpuPowerState>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional int64 inactive_timeout_us = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_inactive_timeout_us(&has_bits); + inactive_timeout_us_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* EdgeTpuInactivePowerConfig::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.EdgeTpuInactivePowerConfig) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .tflite.proto.EdgeTpuPowerState inactive_power_state = 1; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this->_internal_inactive_power_state(), target); + } + + // optional int64 inactive_timeout_us = 2; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_inactive_timeout_us(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.EdgeTpuInactivePowerConfig) + return target; +} + +size_t EdgeTpuInactivePowerConfig::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.EdgeTpuInactivePowerConfig) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional int64 inactive_timeout_us = 2; + if (cached_has_bits & 0x00000001u) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_inactive_timeout_us()); + } + + // optional .tflite.proto.EdgeTpuPowerState inactive_power_state = 1; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_inactive_power_state()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EdgeTpuInactivePowerConfig::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + EdgeTpuInactivePowerConfig::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EdgeTpuInactivePowerConfig::GetClassData() const { return &_class_data_; } + +void EdgeTpuInactivePowerConfig::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void EdgeTpuInactivePowerConfig::MergeFrom(const EdgeTpuInactivePowerConfig& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.EdgeTpuInactivePowerConfig) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + inactive_timeout_us_ = from.inactive_timeout_us_; + } + if (cached_has_bits & 0x00000002u) { + inactive_power_state_ = from.inactive_power_state_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void EdgeTpuInactivePowerConfig::CopyFrom(const EdgeTpuInactivePowerConfig& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.EdgeTpuInactivePowerConfig) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool EdgeTpuInactivePowerConfig::IsInitialized() const { + return true; +} + +void EdgeTpuInactivePowerConfig::InternalSwap(EdgeTpuInactivePowerConfig* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(EdgeTpuInactivePowerConfig, inactive_power_state_) + + sizeof(EdgeTpuInactivePowerConfig::inactive_power_state_) + - PROTOBUF_FIELD_OFFSET(EdgeTpuInactivePowerConfig, inactive_timeout_us_)>( + reinterpret_cast(&inactive_timeout_us_), + reinterpret_cast(&other->inactive_timeout_us_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata EdgeTpuInactivePowerConfig::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[9]); +} + +// =================================================================== + +class EdgeTpuSettings::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_inference_power_state(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_inference_priority(HasBits* has_bits) { + (*has_bits)[0] |= 64u; + } + static const ::tflite::proto::EdgeTpuDeviceSpec& edgetpu_device_spec(const EdgeTpuSettings* msg); + static void set_has_edgetpu_device_spec(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_model_token(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_float_truncation_type(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static void set_has_qos_class(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static void set_has_public_model_id(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +const ::tflite::proto::EdgeTpuDeviceSpec& +EdgeTpuSettings::_Internal::edgetpu_device_spec(const EdgeTpuSettings* msg) { + return *msg->edgetpu_device_spec_; +} +EdgeTpuSettings::EdgeTpuSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), + inactive_power_configs_(arena), + hardware_cluster_ids_(arena) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.EdgeTpuSettings) +} +EdgeTpuSettings::EdgeTpuSettings(const EdgeTpuSettings& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_), + inactive_power_configs_(from.inactive_power_configs_), + hardware_cluster_ids_(from.hardware_cluster_ids_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + model_token_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + model_token_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_model_token()) { + model_token_.Set(from._internal_model_token(), + GetArenaForAllocation()); + } + public_model_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + public_model_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_public_model_id()) { + public_model_id_.Set(from._internal_public_model_id(), + GetArenaForAllocation()); + } + if (from._internal_has_edgetpu_device_spec()) { + edgetpu_device_spec_ = new ::tflite::proto::EdgeTpuDeviceSpec(*from.edgetpu_device_spec_); + } else { + edgetpu_device_spec_ = nullptr; + } + ::memcpy(&inference_power_state_, &from.inference_power_state_, + static_cast(reinterpret_cast(&inference_priority_) - + reinterpret_cast(&inference_power_state_)) + sizeof(inference_priority_)); + // @@protoc_insertion_point(copy_constructor:tflite.proto.EdgeTpuSettings) +} + +inline void EdgeTpuSettings::SharedCtor() { +model_token_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + model_token_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +public_model_id_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + public_model_id_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&edgetpu_device_spec_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&qos_class_) - + reinterpret_cast(&edgetpu_device_spec_)) + sizeof(qos_class_)); +inference_priority_ = -1; +} + +EdgeTpuSettings::~EdgeTpuSettings() { + // @@protoc_insertion_point(destructor:tflite.proto.EdgeTpuSettings) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void EdgeTpuSettings::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + model_token_.Destroy(); + public_model_id_.Destroy(); + if (this != internal_default_instance()) delete edgetpu_device_spec_; +} + +void EdgeTpuSettings::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void EdgeTpuSettings::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.EdgeTpuSettings) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + inactive_power_configs_.Clear(); + hardware_cluster_ids_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + model_token_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + public_model_id_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(edgetpu_device_spec_ != nullptr); + edgetpu_device_spec_->Clear(); + } + } + if (cached_has_bits & 0x00000078u) { + ::memset(&inference_power_state_, 0, static_cast( + reinterpret_cast(&qos_class_) - + reinterpret_cast(&inference_power_state_)) + sizeof(qos_class_)); + inference_priority_ = -1; + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* EdgeTpuSettings::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .tflite.proto.EdgeTpuPowerState inference_power_state = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::tflite::proto::EdgeTpuPowerState_IsValid(val))) { + _internal_set_inference_power_state(static_cast<::tflite::proto::EdgeTpuPowerState>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // repeated .tflite.proto.EdgeTpuInactivePowerConfig inactive_power_configs = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_inactive_power_configs(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<18>(ptr)); + } else + goto handle_unusual; + continue; + // optional int32 inference_priority = 3 [default = -1]; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _Internal::set_has_inference_priority(&has_bits); + inference_priority_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.EdgeTpuDeviceSpec edgetpu_device_spec = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_edgetpu_device_spec(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string model_token = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + auto str = _internal_mutable_model_token(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + #ifndef NDEBUG + ::_pbi::VerifyUTF8(str, "tflite.proto.EdgeTpuSettings.model_token"); + #endif // !NDEBUG + } else + goto handle_unusual; + continue; + // optional .tflite.proto.EdgeTpuSettings.FloatTruncationType float_truncation_type = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::tflite::proto::EdgeTpuSettings_FloatTruncationType_IsValid(val))) { + _internal_set_float_truncation_type(static_cast<::tflite::proto::EdgeTpuSettings_FloatTruncationType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(6, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .tflite.proto.EdgeTpuSettings.QosClass qos_class = 7 [default = QOS_UNDEFINED]; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::tflite::proto::EdgeTpuSettings_QosClass_IsValid(val))) { + _internal_set_qos_class(static_cast<::tflite::proto::EdgeTpuSettings_QosClass>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(7, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // repeated int32 hardware_cluster_ids = 8 [packed = true]; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_hardware_cluster_ids(), ptr, ctx); + CHK_(ptr); + } else if (static_cast(tag) == 64) { + _internal_add_hardware_cluster_ids(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string public_model_id = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 74)) { + auto str = _internal_mutable_public_model_id(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + #ifndef NDEBUG + ::_pbi::VerifyUTF8(str, "tflite.proto.EdgeTpuSettings.public_model_id"); + #endif // !NDEBUG + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* EdgeTpuSettings::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.EdgeTpuSettings) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .tflite.proto.EdgeTpuPowerState inference_power_state = 1; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this->_internal_inference_power_state(), target); + } + + // repeated .tflite.proto.EdgeTpuInactivePowerConfig inactive_power_configs = 2; + for (unsigned i = 0, + n = static_cast(this->_internal_inactive_power_configs_size()); i < n; i++) { + const auto& repfield = this->_internal_inactive_power_configs(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, repfield, repfield.GetCachedSize(), target, stream); + } + + // optional int32 inference_priority = 3 [default = -1]; + if (cached_has_bits & 0x00000040u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_inference_priority(), target); + } + + // optional .tflite.proto.EdgeTpuDeviceSpec edgetpu_device_spec = 4; + if (cached_has_bits & 0x00000004u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(4, _Internal::edgetpu_device_spec(this), + _Internal::edgetpu_device_spec(this).GetCachedSize(), target, stream); + } + + // optional string model_token = 5; + if (cached_has_bits & 0x00000001u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_model_token().data(), static_cast(this->_internal_model_token().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "tflite.proto.EdgeTpuSettings.model_token"); + target = stream->WriteStringMaybeAliased( + 5, this->_internal_model_token(), target); + } + + // optional .tflite.proto.EdgeTpuSettings.FloatTruncationType float_truncation_type = 6; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 6, this->_internal_float_truncation_type(), target); + } + + // optional .tflite.proto.EdgeTpuSettings.QosClass qos_class = 7 [default = QOS_UNDEFINED]; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 7, this->_internal_qos_class(), target); + } + + // repeated int32 hardware_cluster_ids = 8 [packed = true]; + { + int byte_size = _hardware_cluster_ids_cached_byte_size_.load(std::memory_order_relaxed); + if (byte_size > 0) { + target = stream->WriteInt32Packed( + 8, _internal_hardware_cluster_ids(), byte_size, target); + } + } + + // optional string public_model_id = 9; + if (cached_has_bits & 0x00000002u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_public_model_id().data(), static_cast(this->_internal_public_model_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "tflite.proto.EdgeTpuSettings.public_model_id"); + target = stream->WriteStringMaybeAliased( + 9, this->_internal_public_model_id(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.EdgeTpuSettings) + return target; +} + +size_t EdgeTpuSettings::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.EdgeTpuSettings) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .tflite.proto.EdgeTpuInactivePowerConfig inactive_power_configs = 2; + total_size += 1UL * this->_internal_inactive_power_configs_size(); + for (const auto& msg : this->inactive_power_configs_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated int32 hardware_cluster_ids = 8 [packed = true]; + { + size_t data_size = ::_pbi::WireFormatLite:: + Int32Size(this->hardware_cluster_ids_); + if (data_size > 0) { + total_size += 1 + + ::_pbi::WireFormatLite::Int32Size(static_cast(data_size)); + } + int cached_size = ::_pbi::ToCachedSize(data_size); + _hardware_cluster_ids_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000007fu) { + // optional string model_token = 5; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_model_token()); + } + + // optional string public_model_id = 9; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_public_model_id()); + } + + // optional .tflite.proto.EdgeTpuDeviceSpec edgetpu_device_spec = 4; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *edgetpu_device_spec_); + } + + // optional .tflite.proto.EdgeTpuPowerState inference_power_state = 1; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_inference_power_state()); + } + + // optional .tflite.proto.EdgeTpuSettings.FloatTruncationType float_truncation_type = 6; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_float_truncation_type()); + } + + // optional .tflite.proto.EdgeTpuSettings.QosClass qos_class = 7 [default = QOS_UNDEFINED]; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_qos_class()); + } + + // optional int32 inference_priority = 3 [default = -1]; + if (cached_has_bits & 0x00000040u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_inference_priority()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData EdgeTpuSettings::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + EdgeTpuSettings::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*EdgeTpuSettings::GetClassData() const { return &_class_data_; } + +void EdgeTpuSettings::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void EdgeTpuSettings::MergeFrom(const EdgeTpuSettings& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.EdgeTpuSettings) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + inactive_power_configs_.MergeFrom(from.inactive_power_configs_); + hardware_cluster_ids_.MergeFrom(from.hardware_cluster_ids_); + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000007fu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_model_token(from._internal_model_token()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_public_model_id(from._internal_public_model_id()); + } + if (cached_has_bits & 0x00000004u) { + _internal_mutable_edgetpu_device_spec()->::tflite::proto::EdgeTpuDeviceSpec::MergeFrom(from._internal_edgetpu_device_spec()); + } + if (cached_has_bits & 0x00000008u) { + inference_power_state_ = from.inference_power_state_; + } + if (cached_has_bits & 0x00000010u) { + float_truncation_type_ = from.float_truncation_type_; + } + if (cached_has_bits & 0x00000020u) { + qos_class_ = from.qos_class_; + } + if (cached_has_bits & 0x00000040u) { + inference_priority_ = from.inference_priority_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void EdgeTpuSettings::CopyFrom(const EdgeTpuSettings& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.EdgeTpuSettings) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool EdgeTpuSettings::IsInitialized() const { + return true; +} + +void EdgeTpuSettings::InternalSwap(EdgeTpuSettings* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + inactive_power_configs_.InternalSwap(&other->inactive_power_configs_); + hardware_cluster_ids_.InternalSwap(&other->hardware_cluster_ids_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &model_token_, lhs_arena, + &other->model_token_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &public_model_id_, lhs_arena, + &other->public_model_id_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(EdgeTpuSettings, qos_class_) + + sizeof(EdgeTpuSettings::qos_class_) + - PROTOBUF_FIELD_OFFSET(EdgeTpuSettings, edgetpu_device_spec_)>( + reinterpret_cast(&edgetpu_device_spec_), + reinterpret_cast(&other->edgetpu_device_spec_)); + swap(inference_priority_, other->inference_priority_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata EdgeTpuSettings::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[10]); +} + +// =================================================================== + +class GoogleEdgeTpuSettings::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_log_verbosity(HasBits* has_bits) { + (*has_bits)[0] |= 256u; + } + static void set_has_enable_tracing(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_priority(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_extension_data(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_model_identifier(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_use_async_api(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static void set_has_delegate_should_manage_cache_for_inputs(HasBits* has_bits) { + (*has_bits)[0] |= 512u; + } + static void set_has_delegate_should_manage_cache_for_outputs(HasBits* has_bits) { + (*has_bits)[0] |= 1024u; + } + static void set_has_prefer_cache_coherency_for_inputs(HasBits* has_bits) { + (*has_bits)[0] |= 64u; + } + static void set_has_prefer_cache_coherency_for_outputs(HasBits* has_bits) { + (*has_bits)[0] |= 128u; + } + static void set_has_allow_fp16_precision_for_fp32(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } +}; + +GoogleEdgeTpuSettings::GoogleEdgeTpuSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.GoogleEdgeTpuSettings) +} +GoogleEdgeTpuSettings::GoogleEdgeTpuSettings(const GoogleEdgeTpuSettings& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + extension_data_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + extension_data_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_extension_data()) { + extension_data_.Set(from._internal_extension_data(), + GetArenaForAllocation()); + } + model_identifier_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + model_identifier_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_model_identifier()) { + model_identifier_.Set(from._internal_model_identifier(), + GetArenaForAllocation()); + } + ::memcpy(&priority_, &from.priority_, + static_cast(reinterpret_cast(&delegate_should_manage_cache_for_outputs_) - + reinterpret_cast(&priority_)) + sizeof(delegate_should_manage_cache_for_outputs_)); + // @@protoc_insertion_point(copy_constructor:tflite.proto.GoogleEdgeTpuSettings) +} + +inline void GoogleEdgeTpuSettings::SharedCtor() { +extension_data_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + extension_data_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +model_identifier_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + model_identifier_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&priority_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&prefer_cache_coherency_for_outputs_) - + reinterpret_cast(&priority_)) + sizeof(prefer_cache_coherency_for_outputs_)); +log_verbosity_ = -1; +delegate_should_manage_cache_for_inputs_ = true; +delegate_should_manage_cache_for_outputs_ = true; +} + +GoogleEdgeTpuSettings::~GoogleEdgeTpuSettings() { + // @@protoc_insertion_point(destructor:tflite.proto.GoogleEdgeTpuSettings) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void GoogleEdgeTpuSettings::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + extension_data_.Destroy(); + model_identifier_.Destroy(); +} + +void GoogleEdgeTpuSettings::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void GoogleEdgeTpuSettings::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.GoogleEdgeTpuSettings) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + extension_data_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + model_identifier_.ClearNonDefaultToEmpty(); + } + } + if (cached_has_bits & 0x000000fcu) { + ::memset(&priority_, 0, static_cast( + reinterpret_cast(&prefer_cache_coherency_for_outputs_) - + reinterpret_cast(&priority_)) + sizeof(prefer_cache_coherency_for_outputs_)); + } + if (cached_has_bits & 0x00000700u) { + log_verbosity_ = -1; + delegate_should_manage_cache_for_inputs_ = true; + delegate_should_manage_cache_for_outputs_ = true; + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* GoogleEdgeTpuSettings::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int32 log_verbosity = 1 [default = -1]; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_log_verbosity(&has_bits); + log_verbosity_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool enable_tracing = 2 [default = false]; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_enable_tracing(&has_bits); + enable_tracing_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.GoogleEdgeTpuSettings.Priority priority = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::tflite::proto::GoogleEdgeTpuSettings_Priority_IsValid(val))) { + _internal_set_priority(static_cast<::tflite::proto::GoogleEdgeTpuSettings_Priority>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(3, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional bytes extension_data = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + auto str = _internal_mutable_extension_data(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string model_identifier = 5 [default = ""]; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + auto str = _internal_mutable_model_identifier(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + #ifndef NDEBUG + ::_pbi::VerifyUTF8(str, "tflite.proto.GoogleEdgeTpuSettings.model_identifier"); + #endif // !NDEBUG + } else + goto handle_unusual; + continue; + // optional bool use_async_api = 6 [default = false]; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { + _Internal::set_has_use_async_api(&has_bits); + use_async_api_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool delegate_should_manage_cache_for_inputs = 7 [default = true]; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { + _Internal::set_has_delegate_should_manage_cache_for_inputs(&has_bits); + delegate_should_manage_cache_for_inputs_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool delegate_should_manage_cache_for_outputs = 8 [default = true]; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 64)) { + _Internal::set_has_delegate_should_manage_cache_for_outputs(&has_bits); + delegate_should_manage_cache_for_outputs_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.GoogleEdgeTpuSettings.TriState prefer_cache_coherency_for_inputs = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 72)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::tflite::proto::GoogleEdgeTpuSettings_TriState_IsValid(val))) { + _internal_set_prefer_cache_coherency_for_inputs(static_cast<::tflite::proto::GoogleEdgeTpuSettings_TriState>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(9, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .tflite.proto.GoogleEdgeTpuSettings.TriState prefer_cache_coherency_for_outputs = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 80)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::tflite::proto::GoogleEdgeTpuSettings_TriState_IsValid(val))) { + _internal_set_prefer_cache_coherency_for_outputs(static_cast<::tflite::proto::GoogleEdgeTpuSettings_TriState>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(10, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional bool allow_fp16_precision_for_fp32 = 11 [default = false]; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 88)) { + _Internal::set_has_allow_fp16_precision_for_fp32(&has_bits); + allow_fp16_precision_for_fp32_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* GoogleEdgeTpuSettings::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.GoogleEdgeTpuSettings) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int32 log_verbosity = 1 [default = -1]; + if (cached_has_bits & 0x00000100u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_log_verbosity(), target); + } + + // optional bool enable_tracing = 2 [default = false]; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_enable_tracing(), target); + } + + // optional .tflite.proto.GoogleEdgeTpuSettings.Priority priority = 3; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 3, this->_internal_priority(), target); + } + + // optional bytes extension_data = 4; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 4, this->_internal_extension_data(), target); + } + + // optional string model_identifier = 5 [default = ""]; + if (cached_has_bits & 0x00000002u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_model_identifier().data(), static_cast(this->_internal_model_identifier().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "tflite.proto.GoogleEdgeTpuSettings.model_identifier"); + target = stream->WriteStringMaybeAliased( + 5, this->_internal_model_identifier(), target); + } + + // optional bool use_async_api = 6 [default = false]; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(6, this->_internal_use_async_api(), target); + } + + // optional bool delegate_should_manage_cache_for_inputs = 7 [default = true]; + if (cached_has_bits & 0x00000200u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_delegate_should_manage_cache_for_inputs(), target); + } + + // optional bool delegate_should_manage_cache_for_outputs = 8 [default = true]; + if (cached_has_bits & 0x00000400u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(8, this->_internal_delegate_should_manage_cache_for_outputs(), target); + } + + // optional .tflite.proto.GoogleEdgeTpuSettings.TriState prefer_cache_coherency_for_inputs = 9; + if (cached_has_bits & 0x00000040u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 9, this->_internal_prefer_cache_coherency_for_inputs(), target); + } + + // optional .tflite.proto.GoogleEdgeTpuSettings.TriState prefer_cache_coherency_for_outputs = 10; + if (cached_has_bits & 0x00000080u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 10, this->_internal_prefer_cache_coherency_for_outputs(), target); + } + + // optional bool allow_fp16_precision_for_fp32 = 11 [default = false]; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(11, this->_internal_allow_fp16_precision_for_fp32(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.GoogleEdgeTpuSettings) + return target; +} + +size_t GoogleEdgeTpuSettings::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.GoogleEdgeTpuSettings) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + // optional bytes extension_data = 4; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_extension_data()); + } + + // optional string model_identifier = 5 [default = ""]; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_model_identifier()); + } + + // optional .tflite.proto.GoogleEdgeTpuSettings.Priority priority = 3; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_priority()); + } + + // optional bool enable_tracing = 2 [default = false]; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + 1; + } + + // optional bool use_async_api = 6 [default = false]; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + 1; + } + + // optional bool allow_fp16_precision_for_fp32 = 11 [default = false]; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + 1; + } + + // optional .tflite.proto.GoogleEdgeTpuSettings.TriState prefer_cache_coherency_for_inputs = 9; + if (cached_has_bits & 0x00000040u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_prefer_cache_coherency_for_inputs()); + } + + // optional .tflite.proto.GoogleEdgeTpuSettings.TriState prefer_cache_coherency_for_outputs = 10; + if (cached_has_bits & 0x00000080u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_prefer_cache_coherency_for_outputs()); + } + + } + if (cached_has_bits & 0x00000700u) { + // optional int32 log_verbosity = 1 [default = -1]; + if (cached_has_bits & 0x00000100u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_log_verbosity()); + } + + // optional bool delegate_should_manage_cache_for_inputs = 7 [default = true]; + if (cached_has_bits & 0x00000200u) { + total_size += 1 + 1; + } + + // optional bool delegate_should_manage_cache_for_outputs = 8 [default = true]; + if (cached_has_bits & 0x00000400u) { + total_size += 1 + 1; + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData GoogleEdgeTpuSettings::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + GoogleEdgeTpuSettings::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GoogleEdgeTpuSettings::GetClassData() const { return &_class_data_; } + +void GoogleEdgeTpuSettings::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void GoogleEdgeTpuSettings::MergeFrom(const GoogleEdgeTpuSettings& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.GoogleEdgeTpuSettings) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_extension_data(from._internal_extension_data()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_model_identifier(from._internal_model_identifier()); + } + if (cached_has_bits & 0x00000004u) { + priority_ = from.priority_; + } + if (cached_has_bits & 0x00000008u) { + enable_tracing_ = from.enable_tracing_; + } + if (cached_has_bits & 0x00000010u) { + use_async_api_ = from.use_async_api_; + } + if (cached_has_bits & 0x00000020u) { + allow_fp16_precision_for_fp32_ = from.allow_fp16_precision_for_fp32_; + } + if (cached_has_bits & 0x00000040u) { + prefer_cache_coherency_for_inputs_ = from.prefer_cache_coherency_for_inputs_; + } + if (cached_has_bits & 0x00000080u) { + prefer_cache_coherency_for_outputs_ = from.prefer_cache_coherency_for_outputs_; + } + _has_bits_[0] |= cached_has_bits; + } + if (cached_has_bits & 0x00000700u) { + if (cached_has_bits & 0x00000100u) { + log_verbosity_ = from.log_verbosity_; + } + if (cached_has_bits & 0x00000200u) { + delegate_should_manage_cache_for_inputs_ = from.delegate_should_manage_cache_for_inputs_; + } + if (cached_has_bits & 0x00000400u) { + delegate_should_manage_cache_for_outputs_ = from.delegate_should_manage_cache_for_outputs_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void GoogleEdgeTpuSettings::CopyFrom(const GoogleEdgeTpuSettings& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.GoogleEdgeTpuSettings) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool GoogleEdgeTpuSettings::IsInitialized() const { + return true; +} + +void GoogleEdgeTpuSettings::InternalSwap(GoogleEdgeTpuSettings* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &extension_data_, lhs_arena, + &other->extension_data_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &model_identifier_, lhs_arena, + &other->model_identifier_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(GoogleEdgeTpuSettings, prefer_cache_coherency_for_outputs_) + + sizeof(GoogleEdgeTpuSettings::prefer_cache_coherency_for_outputs_) + - PROTOBUF_FIELD_OFFSET(GoogleEdgeTpuSettings, priority_)>( + reinterpret_cast(&priority_), + reinterpret_cast(&other->priority_)); + swap(log_verbosity_, other->log_verbosity_); + swap(delegate_should_manage_cache_for_inputs_, other->delegate_should_manage_cache_for_inputs_); + swap(delegate_should_manage_cache_for_outputs_, other->delegate_should_manage_cache_for_outputs_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata GoogleEdgeTpuSettings::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[11]); +} + +// =================================================================== + +class CoralSettings::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_device(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_performance(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_usb_always_dfu(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_usb_max_bulk_in_queue_length(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } +}; + +CoralSettings::CoralSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.CoralSettings) +} +CoralSettings::CoralSettings(const CoralSettings& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + device_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + device_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_device()) { + device_.Set(from._internal_device(), + GetArenaForAllocation()); + } + ::memcpy(&usb_always_dfu_, &from.usb_always_dfu_, + static_cast(reinterpret_cast(&performance_) - + reinterpret_cast(&usb_always_dfu_)) + sizeof(performance_)); + // @@protoc_insertion_point(copy_constructor:tflite.proto.CoralSettings) +} + +inline void CoralSettings::SharedCtor() { +device_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + device_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&usb_always_dfu_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&usb_max_bulk_in_queue_length_) - + reinterpret_cast(&usb_always_dfu_)) + sizeof(usb_max_bulk_in_queue_length_)); +performance_ = 1; +} + +CoralSettings::~CoralSettings() { + // @@protoc_insertion_point(destructor:tflite.proto.CoralSettings) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void CoralSettings::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + device_.Destroy(); +} + +void CoralSettings::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void CoralSettings::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.CoralSettings) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + device_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x0000000eu) { + ::memset(&usb_always_dfu_, 0, static_cast( + reinterpret_cast(&usb_max_bulk_in_queue_length_) - + reinterpret_cast(&usb_always_dfu_)) + sizeof(usb_max_bulk_in_queue_length_)); + performance_ = 1; + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* CoralSettings::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string device = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_device(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + #ifndef NDEBUG + ::_pbi::VerifyUTF8(str, "tflite.proto.CoralSettings.device"); + #endif // !NDEBUG + } else + goto handle_unusual; + continue; + // optional .tflite.proto.CoralSettings.Performance performance = 2 [default = MAXIMUM]; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::tflite::proto::CoralSettings_Performance_IsValid(val))) { + _internal_set_performance(static_cast<::tflite::proto::CoralSettings_Performance>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional bool usb_always_dfu = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _Internal::set_has_usb_always_dfu(&has_bits); + usb_always_dfu_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 usb_max_bulk_in_queue_length = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + _Internal::set_has_usb_max_bulk_in_queue_length(&has_bits); + usb_max_bulk_in_queue_length_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* CoralSettings::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.CoralSettings) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string device = 1; + if (cached_has_bits & 0x00000001u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_device().data(), static_cast(this->_internal_device().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "tflite.proto.CoralSettings.device"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_device(), target); + } + + // optional .tflite.proto.CoralSettings.Performance performance = 2 [default = MAXIMUM]; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 2, this->_internal_performance(), target); + } + + // optional bool usb_always_dfu = 3; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(3, this->_internal_usb_always_dfu(), target); + } + + // optional int32 usb_max_bulk_in_queue_length = 4; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(4, this->_internal_usb_max_bulk_in_queue_length(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.CoralSettings) + return target; +} + +size_t CoralSettings::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.CoralSettings) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional string device = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_device()); + } + + // optional bool usb_always_dfu = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + 1; + } + + // optional int32 usb_max_bulk_in_queue_length = 4; + if (cached_has_bits & 0x00000004u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_usb_max_bulk_in_queue_length()); + } + + // optional .tflite.proto.CoralSettings.Performance performance = 2 [default = MAXIMUM]; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_performance()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CoralSettings::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + CoralSettings::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CoralSettings::GetClassData() const { return &_class_data_; } + +void CoralSettings::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void CoralSettings::MergeFrom(const CoralSettings& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.CoralSettings) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_device(from._internal_device()); + } + if (cached_has_bits & 0x00000002u) { + usb_always_dfu_ = from.usb_always_dfu_; + } + if (cached_has_bits & 0x00000004u) { + usb_max_bulk_in_queue_length_ = from.usb_max_bulk_in_queue_length_; + } + if (cached_has_bits & 0x00000008u) { + performance_ = from.performance_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void CoralSettings::CopyFrom(const CoralSettings& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.CoralSettings) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CoralSettings::IsInitialized() const { + return true; +} + +void CoralSettings::InternalSwap(CoralSettings* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &device_, lhs_arena, + &other->device_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(CoralSettings, usb_max_bulk_in_queue_length_) + + sizeof(CoralSettings::usb_max_bulk_in_queue_length_) + - PROTOBUF_FIELD_OFFSET(CoralSettings, usb_always_dfu_)>( + reinterpret_cast(&usb_always_dfu_), + reinterpret_cast(&other->usb_always_dfu_)); + swap(performance_, other->performance_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata CoralSettings::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[12]); +} + +// =================================================================== + +class CPUSettings::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_num_threads(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +CPUSettings::CPUSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.CPUSettings) +} +CPUSettings::CPUSettings(const CPUSettings& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + num_threads_ = from.num_threads_; + // @@protoc_insertion_point(copy_constructor:tflite.proto.CPUSettings) +} + +inline void CPUSettings::SharedCtor() { +num_threads_ = -1; +} + +CPUSettings::~CPUSettings() { + // @@protoc_insertion_point(destructor:tflite.proto.CPUSettings) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void CPUSettings::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void CPUSettings::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void CPUSettings::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.CPUSettings) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + num_threads_ = -1; + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* CPUSettings::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int32 num_threads = 1 [default = -1]; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_num_threads(&has_bits); + num_threads_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* CPUSettings::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.CPUSettings) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int32 num_threads = 1 [default = -1]; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_num_threads(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.CPUSettings) + return target; +} + +size_t CPUSettings::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.CPUSettings) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // optional int32 num_threads = 1 [default = -1]; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_threads()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData CPUSettings::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + CPUSettings::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*CPUSettings::GetClassData() const { return &_class_data_; } + +void CPUSettings::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void CPUSettings::MergeFrom(const CPUSettings& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.CPUSettings) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_num_threads()) { + _internal_set_num_threads(from._internal_num_threads()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void CPUSettings::CopyFrom(const CPUSettings& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.CPUSettings) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool CPUSettings::IsInitialized() const { + return true; +} + +void CPUSettings::InternalSwap(CPUSettings* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + swap(num_threads_, other->num_threads_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata CPUSettings::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[13]); +} + +// =================================================================== + +class ArmNNSettings::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_backends(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_fastmath(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_additional_parameters(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +ArmNNSettings::ArmNNSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.ArmNNSettings) +} +ArmNNSettings::ArmNNSettings(const ArmNNSettings& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + backends_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + backends_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_backends()) { + backends_.Set(from._internal_backends(), + GetArenaForAllocation()); + } + additional_parameters_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + additional_parameters_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_additional_parameters()) { + additional_parameters_.Set(from._internal_additional_parameters(), + GetArenaForAllocation()); + } + fastmath_ = from.fastmath_; + // @@protoc_insertion_point(copy_constructor:tflite.proto.ArmNNSettings) +} + +inline void ArmNNSettings::SharedCtor() { +backends_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + backends_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +additional_parameters_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + additional_parameters_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +fastmath_ = false; +} + +ArmNNSettings::~ArmNNSettings() { + // @@protoc_insertion_point(destructor:tflite.proto.ArmNNSettings) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ArmNNSettings::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + backends_.Destroy(); + additional_parameters_.Destroy(); +} + +void ArmNNSettings::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ArmNNSettings::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.ArmNNSettings) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + backends_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + additional_parameters_.ClearNonDefaultToEmpty(); + } + } + fastmath_ = false; + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ArmNNSettings::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string backends = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_backends(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + #ifndef NDEBUG + ::_pbi::VerifyUTF8(str, "tflite.proto.ArmNNSettings.backends"); + #endif // !NDEBUG + } else + goto handle_unusual; + continue; + // optional bool fastmath = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_fastmath(&has_bits); + fastmath_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional string additional_parameters = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + auto str = _internal_mutable_additional_parameters(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + #ifndef NDEBUG + ::_pbi::VerifyUTF8(str, "tflite.proto.ArmNNSettings.additional_parameters"); + #endif // !NDEBUG + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ArmNNSettings::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.ArmNNSettings) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string backends = 1; + if (cached_has_bits & 0x00000001u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_backends().data(), static_cast(this->_internal_backends().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "tflite.proto.ArmNNSettings.backends"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_backends(), target); + } + + // optional bool fastmath = 2; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(2, this->_internal_fastmath(), target); + } + + // optional string additional_parameters = 3; + if (cached_has_bits & 0x00000002u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_additional_parameters().data(), static_cast(this->_internal_additional_parameters().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "tflite.proto.ArmNNSettings.additional_parameters"); + target = stream->WriteStringMaybeAliased( + 3, this->_internal_additional_parameters(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.ArmNNSettings) + return target; +} + +size_t ArmNNSettings::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.ArmNNSettings) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional string backends = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_backends()); + } + + // optional string additional_parameters = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_additional_parameters()); + } + + // optional bool fastmath = 2; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + 1; + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ArmNNSettings::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + ArmNNSettings::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ArmNNSettings::GetClassData() const { return &_class_data_; } + +void ArmNNSettings::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void ArmNNSettings::MergeFrom(const ArmNNSettings& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.ArmNNSettings) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_backends(from._internal_backends()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_additional_parameters(from._internal_additional_parameters()); + } + if (cached_has_bits & 0x00000004u) { + fastmath_ = from.fastmath_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ArmNNSettings::CopyFrom(const ArmNNSettings& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.ArmNNSettings) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ArmNNSettings::IsInitialized() const { + return true; +} + +void ArmNNSettings::InternalSwap(ArmNNSettings* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &backends_, lhs_arena, + &other->backends_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &additional_parameters_, lhs_arena, + &other->additional_parameters_, rhs_arena + ); + swap(fastmath_, other->fastmath_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ArmNNSettings::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[14]); +} + +// =================================================================== + +class TFLiteSettings::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_delegate(HasBits* has_bits) { + (*has_bits)[0] |= 8192u; + } + static const ::tflite::proto::NNAPISettings& nnapi_settings(const TFLiteSettings* msg); + static void set_has_nnapi_settings(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::tflite::proto::GPUSettings& gpu_settings(const TFLiteSettings* msg); + static void set_has_gpu_settings(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static const ::tflite::proto::HexagonSettings& hexagon_settings(const TFLiteSettings* msg); + static void set_has_hexagon_settings(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static const ::tflite::proto::XNNPackSettings& xnnpack_settings(const TFLiteSettings* msg); + static void set_has_xnnpack_settings(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static const ::tflite::proto::CoreMLSettings& coreml_settings(const TFLiteSettings* msg); + static void set_has_coreml_settings(HasBits* has_bits) { + (*has_bits)[0] |= 256u; + } + static const ::tflite::proto::CPUSettings& cpu_settings(const TFLiteSettings* msg); + static void set_has_cpu_settings(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static void set_has_max_delegated_partitions(HasBits* has_bits) { + (*has_bits)[0] |= 16384u; + } + static const ::tflite::proto::EdgeTpuSettings& edgetpu_settings(const TFLiteSettings* msg); + static void set_has_edgetpu_settings(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static const ::tflite::proto::CoralSettings& coral_settings(const TFLiteSettings* msg); + static void set_has_coral_settings(HasBits* has_bits) { + (*has_bits)[0] |= 128u; + } + static const ::tflite::proto::FallbackSettings& fallback_settings(const TFLiteSettings* msg); + static void set_has_fallback_settings(HasBits* has_bits) { + (*has_bits)[0] |= 64u; + } + static void set_has_disable_default_delegates(HasBits* has_bits) { + (*has_bits)[0] |= 32768u; + } + static const ::tflite::proto::StableDelegateLoaderSettings& stable_delegate_loader_settings(const TFLiteSettings* msg); + static void set_has_stable_delegate_loader_settings(HasBits* has_bits) { + (*has_bits)[0] |= 512u; + } + static const ::tflite::proto::GoogleEdgeTpuSettings& google_edgetpu_settings(const TFLiteSettings* msg); + static void set_has_google_edgetpu_settings(HasBits* has_bits) { + (*has_bits)[0] |= 1024u; + } + static const ::tflite::proto::CompilationCachingSettings& compilation_caching_settings(const TFLiteSettings* msg); + static void set_has_compilation_caching_settings(HasBits* has_bits) { + (*has_bits)[0] |= 2048u; + } + static const ::tflite::proto::ArmNNSettings& armnn_settings(const TFLiteSettings* msg); + static void set_has_armnn_settings(HasBits* has_bits) { + (*has_bits)[0] |= 4096u; + } +}; + +const ::tflite::proto::NNAPISettings& +TFLiteSettings::_Internal::nnapi_settings(const TFLiteSettings* msg) { + return *msg->nnapi_settings_; +} +const ::tflite::proto::GPUSettings& +TFLiteSettings::_Internal::gpu_settings(const TFLiteSettings* msg) { + return *msg->gpu_settings_; +} +const ::tflite::proto::HexagonSettings& +TFLiteSettings::_Internal::hexagon_settings(const TFLiteSettings* msg) { + return *msg->hexagon_settings_; +} +const ::tflite::proto::XNNPackSettings& +TFLiteSettings::_Internal::xnnpack_settings(const TFLiteSettings* msg) { + return *msg->xnnpack_settings_; +} +const ::tflite::proto::CoreMLSettings& +TFLiteSettings::_Internal::coreml_settings(const TFLiteSettings* msg) { + return *msg->coreml_settings_; +} +const ::tflite::proto::CPUSettings& +TFLiteSettings::_Internal::cpu_settings(const TFLiteSettings* msg) { + return *msg->cpu_settings_; +} +const ::tflite::proto::EdgeTpuSettings& +TFLiteSettings::_Internal::edgetpu_settings(const TFLiteSettings* msg) { + return *msg->edgetpu_settings_; +} +const ::tflite::proto::CoralSettings& +TFLiteSettings::_Internal::coral_settings(const TFLiteSettings* msg) { + return *msg->coral_settings_; +} +const ::tflite::proto::FallbackSettings& +TFLiteSettings::_Internal::fallback_settings(const TFLiteSettings* msg) { + return *msg->fallback_settings_; +} +const ::tflite::proto::StableDelegateLoaderSettings& +TFLiteSettings::_Internal::stable_delegate_loader_settings(const TFLiteSettings* msg) { + return *msg->stable_delegate_loader_settings_; +} +const ::tflite::proto::GoogleEdgeTpuSettings& +TFLiteSettings::_Internal::google_edgetpu_settings(const TFLiteSettings* msg) { + return *msg->google_edgetpu_settings_; +} +const ::tflite::proto::CompilationCachingSettings& +TFLiteSettings::_Internal::compilation_caching_settings(const TFLiteSettings* msg) { + return *msg->compilation_caching_settings_; +} +const ::tflite::proto::ArmNNSettings& +TFLiteSettings::_Internal::armnn_settings(const TFLiteSettings* msg) { + return *msg->armnn_settings_; +} +TFLiteSettings::TFLiteSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.TFLiteSettings) +} +TFLiteSettings::TFLiteSettings(const TFLiteSettings& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_nnapi_settings()) { + nnapi_settings_ = new ::tflite::proto::NNAPISettings(*from.nnapi_settings_); + } else { + nnapi_settings_ = nullptr; + } + if (from._internal_has_gpu_settings()) { + gpu_settings_ = new ::tflite::proto::GPUSettings(*from.gpu_settings_); + } else { + gpu_settings_ = nullptr; + } + if (from._internal_has_hexagon_settings()) { + hexagon_settings_ = new ::tflite::proto::HexagonSettings(*from.hexagon_settings_); + } else { + hexagon_settings_ = nullptr; + } + if (from._internal_has_xnnpack_settings()) { + xnnpack_settings_ = new ::tflite::proto::XNNPackSettings(*from.xnnpack_settings_); + } else { + xnnpack_settings_ = nullptr; + } + if (from._internal_has_cpu_settings()) { + cpu_settings_ = new ::tflite::proto::CPUSettings(*from.cpu_settings_); + } else { + cpu_settings_ = nullptr; + } + if (from._internal_has_edgetpu_settings()) { + edgetpu_settings_ = new ::tflite::proto::EdgeTpuSettings(*from.edgetpu_settings_); + } else { + edgetpu_settings_ = nullptr; + } + if (from._internal_has_fallback_settings()) { + fallback_settings_ = new ::tflite::proto::FallbackSettings(*from.fallback_settings_); + } else { + fallback_settings_ = nullptr; + } + if (from._internal_has_coral_settings()) { + coral_settings_ = new ::tflite::proto::CoralSettings(*from.coral_settings_); + } else { + coral_settings_ = nullptr; + } + if (from._internal_has_coreml_settings()) { + coreml_settings_ = new ::tflite::proto::CoreMLSettings(*from.coreml_settings_); + } else { + coreml_settings_ = nullptr; + } + if (from._internal_has_stable_delegate_loader_settings()) { + stable_delegate_loader_settings_ = new ::tflite::proto::StableDelegateLoaderSettings(*from.stable_delegate_loader_settings_); + } else { + stable_delegate_loader_settings_ = nullptr; + } + if (from._internal_has_google_edgetpu_settings()) { + google_edgetpu_settings_ = new ::tflite::proto::GoogleEdgeTpuSettings(*from.google_edgetpu_settings_); + } else { + google_edgetpu_settings_ = nullptr; + } + if (from._internal_has_compilation_caching_settings()) { + compilation_caching_settings_ = new ::tflite::proto::CompilationCachingSettings(*from.compilation_caching_settings_); + } else { + compilation_caching_settings_ = nullptr; + } + if (from._internal_has_armnn_settings()) { + armnn_settings_ = new ::tflite::proto::ArmNNSettings(*from.armnn_settings_); + } else { + armnn_settings_ = nullptr; + } + ::memcpy(&delegate_, &from.delegate_, + static_cast(reinterpret_cast(&disable_default_delegates_) - + reinterpret_cast(&delegate_)) + sizeof(disable_default_delegates_)); + // @@protoc_insertion_point(copy_constructor:tflite.proto.TFLiteSettings) +} + +inline void TFLiteSettings::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&nnapi_settings_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&disable_default_delegates_) - + reinterpret_cast(&nnapi_settings_)) + sizeof(disable_default_delegates_)); +} + +TFLiteSettings::~TFLiteSettings() { + // @@protoc_insertion_point(destructor:tflite.proto.TFLiteSettings) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void TFLiteSettings::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete nnapi_settings_; + if (this != internal_default_instance()) delete gpu_settings_; + if (this != internal_default_instance()) delete hexagon_settings_; + if (this != internal_default_instance()) delete xnnpack_settings_; + if (this != internal_default_instance()) delete cpu_settings_; + if (this != internal_default_instance()) delete edgetpu_settings_; + if (this != internal_default_instance()) delete fallback_settings_; + if (this != internal_default_instance()) delete coral_settings_; + if (this != internal_default_instance()) delete coreml_settings_; + if (this != internal_default_instance()) delete stable_delegate_loader_settings_; + if (this != internal_default_instance()) delete google_edgetpu_settings_; + if (this != internal_default_instance()) delete compilation_caching_settings_; + if (this != internal_default_instance()) delete armnn_settings_; +} + +void TFLiteSettings::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void TFLiteSettings::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.TFLiteSettings) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(nnapi_settings_ != nullptr); + nnapi_settings_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(gpu_settings_ != nullptr); + gpu_settings_->Clear(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(hexagon_settings_ != nullptr); + hexagon_settings_->Clear(); + } + if (cached_has_bits & 0x00000008u) { + GOOGLE_DCHECK(xnnpack_settings_ != nullptr); + xnnpack_settings_->Clear(); + } + if (cached_has_bits & 0x00000010u) { + GOOGLE_DCHECK(cpu_settings_ != nullptr); + cpu_settings_->Clear(); + } + if (cached_has_bits & 0x00000020u) { + GOOGLE_DCHECK(edgetpu_settings_ != nullptr); + edgetpu_settings_->Clear(); + } + if (cached_has_bits & 0x00000040u) { + GOOGLE_DCHECK(fallback_settings_ != nullptr); + fallback_settings_->Clear(); + } + if (cached_has_bits & 0x00000080u) { + GOOGLE_DCHECK(coral_settings_ != nullptr); + coral_settings_->Clear(); + } + } + if (cached_has_bits & 0x00001f00u) { + if (cached_has_bits & 0x00000100u) { + GOOGLE_DCHECK(coreml_settings_ != nullptr); + coreml_settings_->Clear(); + } + if (cached_has_bits & 0x00000200u) { + GOOGLE_DCHECK(stable_delegate_loader_settings_ != nullptr); + stable_delegate_loader_settings_->Clear(); + } + if (cached_has_bits & 0x00000400u) { + GOOGLE_DCHECK(google_edgetpu_settings_ != nullptr); + google_edgetpu_settings_->Clear(); + } + if (cached_has_bits & 0x00000800u) { + GOOGLE_DCHECK(compilation_caching_settings_ != nullptr); + compilation_caching_settings_->Clear(); + } + if (cached_has_bits & 0x00001000u) { + GOOGLE_DCHECK(armnn_settings_ != nullptr); + armnn_settings_->Clear(); + } + } + if (cached_has_bits & 0x0000e000u) { + ::memset(&delegate_, 0, static_cast( + reinterpret_cast(&disable_default_delegates_) - + reinterpret_cast(&delegate_)) + sizeof(disable_default_delegates_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* TFLiteSettings::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .tflite.proto.Delegate delegate = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::tflite::proto::Delegate_IsValid(val))) { + _internal_set_delegate(static_cast<::tflite::proto::Delegate>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .tflite.proto.NNAPISettings nnapi_settings = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_nnapi_settings(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.GPUSettings gpu_settings = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_gpu_settings(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.HexagonSettings hexagon_settings = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_hexagon_settings(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.XNNPackSettings xnnpack_settings = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + ptr = ctx->ParseMessage(_internal_mutable_xnnpack_settings(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.CPUSettings cpu_settings = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + ptr = ctx->ParseMessage(_internal_mutable_cpu_settings(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 max_delegated_partitions = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { + _Internal::set_has_max_delegated_partitions(&has_bits); + max_delegated_partitions_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.EdgeTpuSettings edgetpu_settings = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 66)) { + ptr = ctx->ParseMessage(_internal_mutable_edgetpu_settings(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.FallbackSettings fallback_settings = 9; + case 9: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 74)) { + ptr = ctx->ParseMessage(_internal_mutable_fallback_settings(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.CoralSettings coral_settings = 10; + case 10: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 82)) { + ptr = ctx->ParseMessage(_internal_mutable_coral_settings(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.CoreMLSettings coreml_settings = 11; + case 11: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 90)) { + ptr = ctx->ParseMessage(_internal_mutable_coreml_settings(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool disable_default_delegates = 12; + case 12: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 96)) { + _Internal::set_has_disable_default_delegates(&has_bits); + disable_default_delegates_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.StableDelegateLoaderSettings stable_delegate_loader_settings = 13; + case 13: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 106)) { + ptr = ctx->ParseMessage(_internal_mutable_stable_delegate_loader_settings(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.GoogleEdgeTpuSettings google_edgetpu_settings = 14; + case 14: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 114)) { + ptr = ctx->ParseMessage(_internal_mutable_google_edgetpu_settings(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.CompilationCachingSettings compilation_caching_settings = 15; + case 15: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 122)) { + ptr = ctx->ParseMessage(_internal_mutable_compilation_caching_settings(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.ArmNNSettings armnn_settings = 16; + case 16: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 130)) { + ptr = ctx->ParseMessage(_internal_mutable_armnn_settings(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* TFLiteSettings::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.TFLiteSettings) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .tflite.proto.Delegate delegate = 1; + if (cached_has_bits & 0x00002000u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this->_internal_delegate(), target); + } + + // optional .tflite.proto.NNAPISettings nnapi_settings = 2; + if (cached_has_bits & 0x00000001u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, _Internal::nnapi_settings(this), + _Internal::nnapi_settings(this).GetCachedSize(), target, stream); + } + + // optional .tflite.proto.GPUSettings gpu_settings = 3; + if (cached_has_bits & 0x00000002u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, _Internal::gpu_settings(this), + _Internal::gpu_settings(this).GetCachedSize(), target, stream); + } + + // optional .tflite.proto.HexagonSettings hexagon_settings = 4; + if (cached_has_bits & 0x00000004u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(4, _Internal::hexagon_settings(this), + _Internal::hexagon_settings(this).GetCachedSize(), target, stream); + } + + // optional .tflite.proto.XNNPackSettings xnnpack_settings = 5; + if (cached_has_bits & 0x00000008u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(5, _Internal::xnnpack_settings(this), + _Internal::xnnpack_settings(this).GetCachedSize(), target, stream); + } + + // optional .tflite.proto.CPUSettings cpu_settings = 6; + if (cached_has_bits & 0x00000010u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(6, _Internal::cpu_settings(this), + _Internal::cpu_settings(this).GetCachedSize(), target, stream); + } + + // optional int32 max_delegated_partitions = 7; + if (cached_has_bits & 0x00004000u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(7, this->_internal_max_delegated_partitions(), target); + } + + // optional .tflite.proto.EdgeTpuSettings edgetpu_settings = 8; + if (cached_has_bits & 0x00000020u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(8, _Internal::edgetpu_settings(this), + _Internal::edgetpu_settings(this).GetCachedSize(), target, stream); + } + + // optional .tflite.proto.FallbackSettings fallback_settings = 9; + if (cached_has_bits & 0x00000040u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(9, _Internal::fallback_settings(this), + _Internal::fallback_settings(this).GetCachedSize(), target, stream); + } + + // optional .tflite.proto.CoralSettings coral_settings = 10; + if (cached_has_bits & 0x00000080u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(10, _Internal::coral_settings(this), + _Internal::coral_settings(this).GetCachedSize(), target, stream); + } + + // optional .tflite.proto.CoreMLSettings coreml_settings = 11; + if (cached_has_bits & 0x00000100u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(11, _Internal::coreml_settings(this), + _Internal::coreml_settings(this).GetCachedSize(), target, stream); + } + + // optional bool disable_default_delegates = 12; + if (cached_has_bits & 0x00008000u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(12, this->_internal_disable_default_delegates(), target); + } + + // optional .tflite.proto.StableDelegateLoaderSettings stable_delegate_loader_settings = 13; + if (cached_has_bits & 0x00000200u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(13, _Internal::stable_delegate_loader_settings(this), + _Internal::stable_delegate_loader_settings(this).GetCachedSize(), target, stream); + } + + // optional .tflite.proto.GoogleEdgeTpuSettings google_edgetpu_settings = 14; + if (cached_has_bits & 0x00000400u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(14, _Internal::google_edgetpu_settings(this), + _Internal::google_edgetpu_settings(this).GetCachedSize(), target, stream); + } + + // optional .tflite.proto.CompilationCachingSettings compilation_caching_settings = 15; + if (cached_has_bits & 0x00000800u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(15, _Internal::compilation_caching_settings(this), + _Internal::compilation_caching_settings(this).GetCachedSize(), target, stream); + } + + // optional .tflite.proto.ArmNNSettings armnn_settings = 16; + if (cached_has_bits & 0x00001000u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(16, _Internal::armnn_settings(this), + _Internal::armnn_settings(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.TFLiteSettings) + return target; +} + +size_t TFLiteSettings::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.TFLiteSettings) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + // optional .tflite.proto.NNAPISettings nnapi_settings = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *nnapi_settings_); + } + + // optional .tflite.proto.GPUSettings gpu_settings = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *gpu_settings_); + } + + // optional .tflite.proto.HexagonSettings hexagon_settings = 4; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *hexagon_settings_); + } + + // optional .tflite.proto.XNNPackSettings xnnpack_settings = 5; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *xnnpack_settings_); + } + + // optional .tflite.proto.CPUSettings cpu_settings = 6; + if (cached_has_bits & 0x00000010u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *cpu_settings_); + } + + // optional .tflite.proto.EdgeTpuSettings edgetpu_settings = 8; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *edgetpu_settings_); + } + + // optional .tflite.proto.FallbackSettings fallback_settings = 9; + if (cached_has_bits & 0x00000040u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *fallback_settings_); + } + + // optional .tflite.proto.CoralSettings coral_settings = 10; + if (cached_has_bits & 0x00000080u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *coral_settings_); + } + + } + if (cached_has_bits & 0x0000ff00u) { + // optional .tflite.proto.CoreMLSettings coreml_settings = 11; + if (cached_has_bits & 0x00000100u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *coreml_settings_); + } + + // optional .tflite.proto.StableDelegateLoaderSettings stable_delegate_loader_settings = 13; + if (cached_has_bits & 0x00000200u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *stable_delegate_loader_settings_); + } + + // optional .tflite.proto.GoogleEdgeTpuSettings google_edgetpu_settings = 14; + if (cached_has_bits & 0x00000400u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *google_edgetpu_settings_); + } + + // optional .tflite.proto.CompilationCachingSettings compilation_caching_settings = 15; + if (cached_has_bits & 0x00000800u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *compilation_caching_settings_); + } + + // optional .tflite.proto.ArmNNSettings armnn_settings = 16; + if (cached_has_bits & 0x00001000u) { + total_size += 2 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *armnn_settings_); + } + + // optional .tflite.proto.Delegate delegate = 1; + if (cached_has_bits & 0x00002000u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_delegate()); + } + + // optional int32 max_delegated_partitions = 7; + if (cached_has_bits & 0x00004000u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_max_delegated_partitions()); + } + + // optional bool disable_default_delegates = 12; + if (cached_has_bits & 0x00008000u) { + total_size += 1 + 1; + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData TFLiteSettings::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + TFLiteSettings::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*TFLiteSettings::GetClassData() const { return &_class_data_; } + +void TFLiteSettings::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void TFLiteSettings::MergeFrom(const TFLiteSettings& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.TFLiteSettings) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x000000ffu) { + if (cached_has_bits & 0x00000001u) { + _internal_mutable_nnapi_settings()->::tflite::proto::NNAPISettings::MergeFrom(from._internal_nnapi_settings()); + } + if (cached_has_bits & 0x00000002u) { + _internal_mutable_gpu_settings()->::tflite::proto::GPUSettings::MergeFrom(from._internal_gpu_settings()); + } + if (cached_has_bits & 0x00000004u) { + _internal_mutable_hexagon_settings()->::tflite::proto::HexagonSettings::MergeFrom(from._internal_hexagon_settings()); + } + if (cached_has_bits & 0x00000008u) { + _internal_mutable_xnnpack_settings()->::tflite::proto::XNNPackSettings::MergeFrom(from._internal_xnnpack_settings()); + } + if (cached_has_bits & 0x00000010u) { + _internal_mutable_cpu_settings()->::tflite::proto::CPUSettings::MergeFrom(from._internal_cpu_settings()); + } + if (cached_has_bits & 0x00000020u) { + _internal_mutable_edgetpu_settings()->::tflite::proto::EdgeTpuSettings::MergeFrom(from._internal_edgetpu_settings()); + } + if (cached_has_bits & 0x00000040u) { + _internal_mutable_fallback_settings()->::tflite::proto::FallbackSettings::MergeFrom(from._internal_fallback_settings()); + } + if (cached_has_bits & 0x00000080u) { + _internal_mutable_coral_settings()->::tflite::proto::CoralSettings::MergeFrom(from._internal_coral_settings()); + } + } + if (cached_has_bits & 0x0000ff00u) { + if (cached_has_bits & 0x00000100u) { + _internal_mutable_coreml_settings()->::tflite::proto::CoreMLSettings::MergeFrom(from._internal_coreml_settings()); + } + if (cached_has_bits & 0x00000200u) { + _internal_mutable_stable_delegate_loader_settings()->::tflite::proto::StableDelegateLoaderSettings::MergeFrom(from._internal_stable_delegate_loader_settings()); + } + if (cached_has_bits & 0x00000400u) { + _internal_mutable_google_edgetpu_settings()->::tflite::proto::GoogleEdgeTpuSettings::MergeFrom(from._internal_google_edgetpu_settings()); + } + if (cached_has_bits & 0x00000800u) { + _internal_mutable_compilation_caching_settings()->::tflite::proto::CompilationCachingSettings::MergeFrom(from._internal_compilation_caching_settings()); + } + if (cached_has_bits & 0x00001000u) { + _internal_mutable_armnn_settings()->::tflite::proto::ArmNNSettings::MergeFrom(from._internal_armnn_settings()); + } + if (cached_has_bits & 0x00002000u) { + delegate_ = from.delegate_; + } + if (cached_has_bits & 0x00004000u) { + max_delegated_partitions_ = from.max_delegated_partitions_; + } + if (cached_has_bits & 0x00008000u) { + disable_default_delegates_ = from.disable_default_delegates_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void TFLiteSettings::CopyFrom(const TFLiteSettings& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.TFLiteSettings) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool TFLiteSettings::IsInitialized() const { + return true; +} + +void TFLiteSettings::InternalSwap(TFLiteSettings* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(TFLiteSettings, disable_default_delegates_) + + sizeof(TFLiteSettings::disable_default_delegates_) + - PROTOBUF_FIELD_OFFSET(TFLiteSettings, nnapi_settings_)>( + reinterpret_cast(&nnapi_settings_), + reinterpret_cast(&other->nnapi_settings_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata TFLiteSettings::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[15]); +} + +// =================================================================== + +class FallbackSettings::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_allow_automatic_fallback_on_compilation_error(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_allow_automatic_fallback_on_execution_error(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +FallbackSettings::FallbackSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.FallbackSettings) +} +FallbackSettings::FallbackSettings(const FallbackSettings& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&allow_automatic_fallback_on_compilation_error_, &from.allow_automatic_fallback_on_compilation_error_, + static_cast(reinterpret_cast(&allow_automatic_fallback_on_execution_error_) - + reinterpret_cast(&allow_automatic_fallback_on_compilation_error_)) + sizeof(allow_automatic_fallback_on_execution_error_)); + // @@protoc_insertion_point(copy_constructor:tflite.proto.FallbackSettings) +} + +inline void FallbackSettings::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&allow_automatic_fallback_on_compilation_error_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&allow_automatic_fallback_on_execution_error_) - + reinterpret_cast(&allow_automatic_fallback_on_compilation_error_)) + sizeof(allow_automatic_fallback_on_execution_error_)); +} + +FallbackSettings::~FallbackSettings() { + // @@protoc_insertion_point(destructor:tflite.proto.FallbackSettings) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void FallbackSettings::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void FallbackSettings::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void FallbackSettings::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.FallbackSettings) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + ::memset(&allow_automatic_fallback_on_compilation_error_, 0, static_cast( + reinterpret_cast(&allow_automatic_fallback_on_execution_error_) - + reinterpret_cast(&allow_automatic_fallback_on_compilation_error_)) + sizeof(allow_automatic_fallback_on_execution_error_)); + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* FallbackSettings::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional bool allow_automatic_fallback_on_compilation_error = 7; + case 7: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 56)) { + _Internal::set_has_allow_automatic_fallback_on_compilation_error(&has_bits); + allow_automatic_fallback_on_compilation_error_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool allow_automatic_fallback_on_execution_error = 8; + case 8: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 64)) { + _Internal::set_has_allow_automatic_fallback_on_execution_error(&has_bits); + allow_automatic_fallback_on_execution_error_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* FallbackSettings::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.FallbackSettings) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional bool allow_automatic_fallback_on_compilation_error = 7; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(7, this->_internal_allow_automatic_fallback_on_compilation_error(), target); + } + + // optional bool allow_automatic_fallback_on_execution_error = 8; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(8, this->_internal_allow_automatic_fallback_on_execution_error(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.FallbackSettings) + return target; +} + +size_t FallbackSettings::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.FallbackSettings) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional bool allow_automatic_fallback_on_compilation_error = 7; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + 1; + } + + // optional bool allow_automatic_fallback_on_execution_error = 8; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + 1; + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData FallbackSettings::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + FallbackSettings::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*FallbackSettings::GetClassData() const { return &_class_data_; } + +void FallbackSettings::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void FallbackSettings::MergeFrom(const FallbackSettings& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.FallbackSettings) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + allow_automatic_fallback_on_compilation_error_ = from.allow_automatic_fallback_on_compilation_error_; + } + if (cached_has_bits & 0x00000002u) { + allow_automatic_fallback_on_execution_error_ = from.allow_automatic_fallback_on_execution_error_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void FallbackSettings::CopyFrom(const FallbackSettings& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.FallbackSettings) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool FallbackSettings::IsInitialized() const { + return true; +} + +void FallbackSettings::InternalSwap(FallbackSettings* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(FallbackSettings, allow_automatic_fallback_on_execution_error_) + + sizeof(FallbackSettings::allow_automatic_fallback_on_execution_error_) + - PROTOBUF_FIELD_OFFSET(FallbackSettings, allow_automatic_fallback_on_compilation_error_)>( + reinterpret_cast(&allow_automatic_fallback_on_compilation_error_), + reinterpret_cast(&other->allow_automatic_fallback_on_compilation_error_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata FallbackSettings::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[16]); +} + +// =================================================================== + +class BenchmarkMetric::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_name(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +BenchmarkMetric::BenchmarkMetric(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), + values_(arena) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.BenchmarkMetric) +} +BenchmarkMetric::BenchmarkMetric(const BenchmarkMetric& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_), + values_(from.values_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + name_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + name_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_name()) { + name_.Set(from._internal_name(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:tflite.proto.BenchmarkMetric) +} + +inline void BenchmarkMetric::SharedCtor() { +name_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + name_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +BenchmarkMetric::~BenchmarkMetric() { + // @@protoc_insertion_point(destructor:tflite.proto.BenchmarkMetric) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void BenchmarkMetric::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + name_.Destroy(); +} + +void BenchmarkMetric::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void BenchmarkMetric::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.BenchmarkMetric) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + values_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + name_.ClearNonDefaultToEmpty(); + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* BenchmarkMetric::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string name = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_name(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + #ifndef NDEBUG + ::_pbi::VerifyUTF8(str, "tflite.proto.BenchmarkMetric.name"); + #endif // !NDEBUG + } else + goto handle_unusual; + continue; + // repeated float values = 2 [packed = true]; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_values(), ptr, ctx); + CHK_(ptr); + } else if (static_cast(tag) == 21) { + _internal_add_values(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad(ptr)); + ptr += sizeof(float); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* BenchmarkMetric::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.BenchmarkMetric) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string name = 1; + if (cached_has_bits & 0x00000001u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_name().data(), static_cast(this->_internal_name().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "tflite.proto.BenchmarkMetric.name"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_name(), target); + } + + // repeated float values = 2 [packed = true]; + if (this->_internal_values_size() > 0) { + target = stream->WriteFixedPacked(2, _internal_values(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.BenchmarkMetric) + return target; +} + +size_t BenchmarkMetric::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.BenchmarkMetric) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated float values = 2 [packed = true]; + { + unsigned int count = static_cast(this->_internal_values_size()); + size_t data_size = 4UL * count; + if (data_size > 0) { + total_size += 1 + + ::_pbi::WireFormatLite::Int32Size(static_cast(data_size)); + } + total_size += data_size; + } + + // optional string name = 1; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_name()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BenchmarkMetric::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + BenchmarkMetric::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BenchmarkMetric::GetClassData() const { return &_class_data_; } + +void BenchmarkMetric::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void BenchmarkMetric::MergeFrom(const BenchmarkMetric& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.BenchmarkMetric) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + values_.MergeFrom(from.values_); + if (from._internal_has_name()) { + _internal_set_name(from._internal_name()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void BenchmarkMetric::CopyFrom(const BenchmarkMetric& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.BenchmarkMetric) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BenchmarkMetric::IsInitialized() const { + return true; +} + +void BenchmarkMetric::InternalSwap(BenchmarkMetric* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + values_.InternalSwap(&other->values_); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &name_, lhs_arena, + &other->name_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata BenchmarkMetric::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[17]); +} + +// =================================================================== + +class BenchmarkResult_InferenceOutput::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_value(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +BenchmarkResult_InferenceOutput::BenchmarkResult_InferenceOutput(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.BenchmarkResult.InferenceOutput) +} +BenchmarkResult_InferenceOutput::BenchmarkResult_InferenceOutput(const BenchmarkResult_InferenceOutput& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + value_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + value_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_value()) { + value_.Set(from._internal_value(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:tflite.proto.BenchmarkResult.InferenceOutput) +} + +inline void BenchmarkResult_InferenceOutput::SharedCtor() { +value_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + value_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +BenchmarkResult_InferenceOutput::~BenchmarkResult_InferenceOutput() { + // @@protoc_insertion_point(destructor:tflite.proto.BenchmarkResult.InferenceOutput) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void BenchmarkResult_InferenceOutput::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + value_.Destroy(); +} + +void BenchmarkResult_InferenceOutput::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void BenchmarkResult_InferenceOutput::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.BenchmarkResult.InferenceOutput) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + value_.ClearNonDefaultToEmpty(); + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* BenchmarkResult_InferenceOutput::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional bytes value = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_value(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* BenchmarkResult_InferenceOutput::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.BenchmarkResult.InferenceOutput) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional bytes value = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->WriteBytesMaybeAliased( + 1, this->_internal_value(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.BenchmarkResult.InferenceOutput) + return target; +} + +size_t BenchmarkResult_InferenceOutput::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.BenchmarkResult.InferenceOutput) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // optional bytes value = 1; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::BytesSize( + this->_internal_value()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BenchmarkResult_InferenceOutput::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + BenchmarkResult_InferenceOutput::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BenchmarkResult_InferenceOutput::GetClassData() const { return &_class_data_; } + +void BenchmarkResult_InferenceOutput::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void BenchmarkResult_InferenceOutput::MergeFrom(const BenchmarkResult_InferenceOutput& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.BenchmarkResult.InferenceOutput) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_value()) { + _internal_set_value(from._internal_value()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void BenchmarkResult_InferenceOutput::CopyFrom(const BenchmarkResult_InferenceOutput& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.BenchmarkResult.InferenceOutput) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BenchmarkResult_InferenceOutput::IsInitialized() const { + return true; +} + +void BenchmarkResult_InferenceOutput::InternalSwap(BenchmarkResult_InferenceOutput* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &value_, lhs_arena, + &other->value_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata BenchmarkResult_InferenceOutput::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[18]); +} + +// =================================================================== + +class BenchmarkResult::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_max_memory_kb(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_ok(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +BenchmarkResult::BenchmarkResult(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), + initialization_time_us_(arena), + inference_time_us_(arena), + metrics_(arena), + actual_output_(arena) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.BenchmarkResult) +} +BenchmarkResult::BenchmarkResult(const BenchmarkResult& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_), + initialization_time_us_(from.initialization_time_us_), + inference_time_us_(from.inference_time_us_), + metrics_(from.metrics_), + actual_output_(from.actual_output_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&max_memory_kb_, &from.max_memory_kb_, + static_cast(reinterpret_cast(&ok_) - + reinterpret_cast(&max_memory_kb_)) + sizeof(ok_)); + // @@protoc_insertion_point(copy_constructor:tflite.proto.BenchmarkResult) +} + +inline void BenchmarkResult::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&max_memory_kb_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&ok_) - + reinterpret_cast(&max_memory_kb_)) + sizeof(ok_)); +} + +BenchmarkResult::~BenchmarkResult() { + // @@protoc_insertion_point(destructor:tflite.proto.BenchmarkResult) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void BenchmarkResult::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void BenchmarkResult::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void BenchmarkResult::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.BenchmarkResult) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + initialization_time_us_.Clear(); + inference_time_us_.Clear(); + metrics_.Clear(); + actual_output_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + ::memset(&max_memory_kb_, 0, static_cast( + reinterpret_cast(&ok_) - + reinterpret_cast(&max_memory_kb_)) + sizeof(ok_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* BenchmarkResult::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // repeated int64 initialization_time_us = 1 [packed = true]; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_initialization_time_us(), ptr, ctx); + CHK_(ptr); + } else if (static_cast(tag) == 8) { + _internal_add_initialization_time_us(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated int64 inference_time_us = 2 [packed = true]; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt64Parser(_internal_mutable_inference_time_us(), ptr, ctx); + CHK_(ptr); + } else if (static_cast(tag) == 16) { + _internal_add_inference_time_us(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr)); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 max_memory_kb = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _Internal::set_has_max_memory_kb(&has_bits); + max_memory_kb_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional bool ok = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + _Internal::set_has_ok(&has_bits); + ok_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .tflite.proto.BenchmarkMetric metrics = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_metrics(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<42>(ptr)); + } else + goto handle_unusual; + continue; + // repeated .tflite.proto.BenchmarkResult.InferenceOutput actual_output = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 50)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_actual_output(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr)); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* BenchmarkResult::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.BenchmarkResult) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated int64 initialization_time_us = 1 [packed = true]; + { + int byte_size = _initialization_time_us_cached_byte_size_.load(std::memory_order_relaxed); + if (byte_size > 0) { + target = stream->WriteInt64Packed( + 1, _internal_initialization_time_us(), byte_size, target); + } + } + + // repeated int64 inference_time_us = 2 [packed = true]; + { + int byte_size = _inference_time_us_cached_byte_size_.load(std::memory_order_relaxed); + if (byte_size > 0) { + target = stream->WriteInt64Packed( + 2, _internal_inference_time_us(), byte_size, target); + } + } + + cached_has_bits = _has_bits_[0]; + // optional int32 max_memory_kb = 3; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_max_memory_kb(), target); + } + + // optional bool ok = 4; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(4, this->_internal_ok(), target); + } + + // repeated .tflite.proto.BenchmarkMetric metrics = 5; + for (unsigned i = 0, + n = static_cast(this->_internal_metrics_size()); i < n; i++) { + const auto& repfield = this->_internal_metrics(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(5, repfield, repfield.GetCachedSize(), target, stream); + } + + // repeated .tflite.proto.BenchmarkResult.InferenceOutput actual_output = 6; + for (unsigned i = 0, + n = static_cast(this->_internal_actual_output_size()); i < n; i++) { + const auto& repfield = this->_internal_actual_output(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(6, repfield, repfield.GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.BenchmarkResult) + return target; +} + +size_t BenchmarkResult::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.BenchmarkResult) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated int64 initialization_time_us = 1 [packed = true]; + { + size_t data_size = ::_pbi::WireFormatLite:: + Int64Size(this->initialization_time_us_); + if (data_size > 0) { + total_size += 1 + + ::_pbi::WireFormatLite::Int32Size(static_cast(data_size)); + } + int cached_size = ::_pbi::ToCachedSize(data_size); + _initialization_time_us_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + // repeated int64 inference_time_us = 2 [packed = true]; + { + size_t data_size = ::_pbi::WireFormatLite:: + Int64Size(this->inference_time_us_); + if (data_size > 0) { + total_size += 1 + + ::_pbi::WireFormatLite::Int32Size(static_cast(data_size)); + } + int cached_size = ::_pbi::ToCachedSize(data_size); + _inference_time_us_cached_byte_size_.store(cached_size, + std::memory_order_relaxed); + total_size += data_size; + } + + // repeated .tflite.proto.BenchmarkMetric metrics = 5; + total_size += 1UL * this->_internal_metrics_size(); + for (const auto& msg : this->metrics_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + // repeated .tflite.proto.BenchmarkResult.InferenceOutput actual_output = 6; + total_size += 1UL * this->_internal_actual_output_size(); + for (const auto& msg : this->actual_output_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional int32 max_memory_kb = 3; + if (cached_has_bits & 0x00000001u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_max_memory_kb()); + } + + // optional bool ok = 4; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + 1; + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BenchmarkResult::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + BenchmarkResult::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BenchmarkResult::GetClassData() const { return &_class_data_; } + +void BenchmarkResult::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void BenchmarkResult::MergeFrom(const BenchmarkResult& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.BenchmarkResult) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + initialization_time_us_.MergeFrom(from.initialization_time_us_); + inference_time_us_.MergeFrom(from.inference_time_us_); + metrics_.MergeFrom(from.metrics_); + actual_output_.MergeFrom(from.actual_output_); + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + max_memory_kb_ = from.max_memory_kb_; + } + if (cached_has_bits & 0x00000002u) { + ok_ = from.ok_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void BenchmarkResult::CopyFrom(const BenchmarkResult& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.BenchmarkResult) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BenchmarkResult::IsInitialized() const { + return true; +} + +void BenchmarkResult::InternalSwap(BenchmarkResult* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + initialization_time_us_.InternalSwap(&other->initialization_time_us_); + inference_time_us_.InternalSwap(&other->inference_time_us_); + metrics_.InternalSwap(&other->metrics_); + actual_output_.InternalSwap(&other->actual_output_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(BenchmarkResult, ok_) + + sizeof(BenchmarkResult::ok_) + - PROTOBUF_FIELD_OFFSET(BenchmarkResult, max_memory_kb_)>( + reinterpret_cast(&max_memory_kb_), + reinterpret_cast(&other->max_memory_kb_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata BenchmarkResult::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[19]); +} + +// =================================================================== + +class ErrorCode::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_source(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_tflite_error(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_underlying_api_error(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } +}; + +ErrorCode::ErrorCode(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.ErrorCode) +} +ErrorCode::ErrorCode(const ErrorCode& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&source_, &from.source_, + static_cast(reinterpret_cast(&underlying_api_error_) - + reinterpret_cast(&source_)) + sizeof(underlying_api_error_)); + // @@protoc_insertion_point(copy_constructor:tflite.proto.ErrorCode) +} + +inline void ErrorCode::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&source_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&underlying_api_error_) - + reinterpret_cast(&source_)) + sizeof(underlying_api_error_)); +} + +ErrorCode::~ErrorCode() { + // @@protoc_insertion_point(destructor:tflite.proto.ErrorCode) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ErrorCode::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void ErrorCode::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ErrorCode::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.ErrorCode) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + ::memset(&source_, 0, static_cast( + reinterpret_cast(&underlying_api_error_) - + reinterpret_cast(&source_)) + sizeof(underlying_api_error_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ErrorCode::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .tflite.proto.Delegate source = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::tflite::proto::Delegate_IsValid(val))) { + _internal_set_source(static_cast<::tflite::proto::Delegate>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional int32 tflite_error = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_tflite_error(&has_bits); + tflite_error_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int64 underlying_api_error = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _Internal::set_has_underlying_api_error(&has_bits); + underlying_api_error_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ErrorCode::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.ErrorCode) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .tflite.proto.Delegate source = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this->_internal_source(), target); + } + + // optional int32 tflite_error = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_tflite_error(), target); + } + + // optional int64 underlying_api_error = 3; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_underlying_api_error(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.ErrorCode) + return target; +} + +size_t ErrorCode::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.ErrorCode) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional .tflite.proto.Delegate source = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_source()); + } + + // optional int32 tflite_error = 2; + if (cached_has_bits & 0x00000002u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_tflite_error()); + } + + // optional int64 underlying_api_error = 3; + if (cached_has_bits & 0x00000004u) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_underlying_api_error()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ErrorCode::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + ErrorCode::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ErrorCode::GetClassData() const { return &_class_data_; } + +void ErrorCode::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void ErrorCode::MergeFrom(const ErrorCode& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.ErrorCode) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + source_ = from.source_; + } + if (cached_has_bits & 0x00000002u) { + tflite_error_ = from.tflite_error_; + } + if (cached_has_bits & 0x00000004u) { + underlying_api_error_ = from.underlying_api_error_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ErrorCode::CopyFrom(const ErrorCode& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.ErrorCode) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ErrorCode::IsInitialized() const { + return true; +} + +void ErrorCode::InternalSwap(ErrorCode* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ErrorCode, underlying_api_error_) + + sizeof(ErrorCode::underlying_api_error_) + - PROTOBUF_FIELD_OFFSET(ErrorCode, source_)>( + reinterpret_cast(&source_), + reinterpret_cast(&other->source_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ErrorCode::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[20]); +} + +// =================================================================== + +class BenchmarkError::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_stage(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_exit_code(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_signal(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_mini_benchmark_error_code(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } +}; + +BenchmarkError::BenchmarkError(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), + error_code_(arena) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.BenchmarkError) +} +BenchmarkError::BenchmarkError(const BenchmarkError& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_), + error_code_(from.error_code_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + ::memcpy(&stage_, &from.stage_, + static_cast(reinterpret_cast(&mini_benchmark_error_code_) - + reinterpret_cast(&stage_)) + sizeof(mini_benchmark_error_code_)); + // @@protoc_insertion_point(copy_constructor:tflite.proto.BenchmarkError) +} + +inline void BenchmarkError::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&stage_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&mini_benchmark_error_code_) - + reinterpret_cast(&stage_)) + sizeof(mini_benchmark_error_code_)); +} + +BenchmarkError::~BenchmarkError() { + // @@protoc_insertion_point(destructor:tflite.proto.BenchmarkError) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void BenchmarkError::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void BenchmarkError::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void BenchmarkError::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.BenchmarkError) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + error_code_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + ::memset(&stage_, 0, static_cast( + reinterpret_cast(&mini_benchmark_error_code_) - + reinterpret_cast(&stage_)) + sizeof(mini_benchmark_error_code_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* BenchmarkError::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .tflite.proto.BenchmarkStage stage = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::tflite::proto::BenchmarkStage_IsValid(val))) { + _internal_set_stage(static_cast<::tflite::proto::BenchmarkStage>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(1, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional int32 exit_code = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_exit_code(&has_bits); + exit_code_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int32 signal = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _Internal::set_has_signal(&has_bits); + signal_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // repeated .tflite.proto.ErrorCode error_code = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_error_code(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<34>(ptr)); + } else + goto handle_unusual; + continue; + // optional int32 mini_benchmark_error_code = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { + _Internal::set_has_mini_benchmark_error_code(&has_bits); + mini_benchmark_error_code_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* BenchmarkError::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.BenchmarkError) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .tflite.proto.BenchmarkStage stage = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 1, this->_internal_stage(), target); + } + + // optional int32 exit_code = 2; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(2, this->_internal_exit_code(), target); + } + + // optional int32 signal = 3; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(3, this->_internal_signal(), target); + } + + // repeated .tflite.proto.ErrorCode error_code = 4; + for (unsigned i = 0, + n = static_cast(this->_internal_error_code_size()); i < n; i++) { + const auto& repfield = this->_internal_error_code(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(4, repfield, repfield.GetCachedSize(), target, stream); + } + + // optional int32 mini_benchmark_error_code = 5; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(5, this->_internal_mini_benchmark_error_code(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.BenchmarkError) + return target; +} + +size_t BenchmarkError::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.BenchmarkError) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .tflite.proto.ErrorCode error_code = 4; + total_size += 1UL * this->_internal_error_code_size(); + for (const auto& msg : this->error_code_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional .tflite.proto.BenchmarkStage stage = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_stage()); + } + + // optional int32 exit_code = 2; + if (cached_has_bits & 0x00000002u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_exit_code()); + } + + // optional int32 signal = 3; + if (cached_has_bits & 0x00000004u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_signal()); + } + + // optional int32 mini_benchmark_error_code = 5; + if (cached_has_bits & 0x00000008u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_mini_benchmark_error_code()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BenchmarkError::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + BenchmarkError::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BenchmarkError::GetClassData() const { return &_class_data_; } + +void BenchmarkError::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void BenchmarkError::MergeFrom(const BenchmarkError& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.BenchmarkError) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + error_code_.MergeFrom(from.error_code_); + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + stage_ = from.stage_; + } + if (cached_has_bits & 0x00000002u) { + exit_code_ = from.exit_code_; + } + if (cached_has_bits & 0x00000004u) { + signal_ = from.signal_; + } + if (cached_has_bits & 0x00000008u) { + mini_benchmark_error_code_ = from.mini_benchmark_error_code_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void BenchmarkError::CopyFrom(const BenchmarkError& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.BenchmarkError) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BenchmarkError::IsInitialized() const { + return true; +} + +void BenchmarkError::InternalSwap(BenchmarkError* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + error_code_.InternalSwap(&other->error_code_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(BenchmarkError, mini_benchmark_error_code_) + + sizeof(BenchmarkError::mini_benchmark_error_code_) + - PROTOBUF_FIELD_OFFSET(BenchmarkError, stage_)>( + reinterpret_cast(&stage_), + reinterpret_cast(&other->stage_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata BenchmarkError::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[21]); +} + +// =================================================================== + +class BenchmarkEvent::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static const ::tflite::proto::TFLiteSettings& tflite_settings(const BenchmarkEvent* msg); + static void set_has_tflite_settings(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_event_type(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } + static const ::tflite::proto::BenchmarkResult& result(const BenchmarkEvent* msg); + static void set_has_result(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static const ::tflite::proto::BenchmarkError& error(const BenchmarkEvent* msg); + static void set_has_error(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_boottime_us(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_wallclock_us(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } +}; + +const ::tflite::proto::TFLiteSettings& +BenchmarkEvent::_Internal::tflite_settings(const BenchmarkEvent* msg) { + return *msg->tflite_settings_; +} +const ::tflite::proto::BenchmarkResult& +BenchmarkEvent::_Internal::result(const BenchmarkEvent* msg) { + return *msg->result_; +} +const ::tflite::proto::BenchmarkError& +BenchmarkEvent::_Internal::error(const BenchmarkEvent* msg) { + return *msg->error_; +} +BenchmarkEvent::BenchmarkEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.BenchmarkEvent) +} +BenchmarkEvent::BenchmarkEvent(const BenchmarkEvent& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_tflite_settings()) { + tflite_settings_ = new ::tflite::proto::TFLiteSettings(*from.tflite_settings_); + } else { + tflite_settings_ = nullptr; + } + if (from._internal_has_result()) { + result_ = new ::tflite::proto::BenchmarkResult(*from.result_); + } else { + result_ = nullptr; + } + if (from._internal_has_error()) { + error_ = new ::tflite::proto::BenchmarkError(*from.error_); + } else { + error_ = nullptr; + } + ::memcpy(&boottime_us_, &from.boottime_us_, + static_cast(reinterpret_cast(&event_type_) - + reinterpret_cast(&boottime_us_)) + sizeof(event_type_)); + // @@protoc_insertion_point(copy_constructor:tflite.proto.BenchmarkEvent) +} + +inline void BenchmarkEvent::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&tflite_settings_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&event_type_) - + reinterpret_cast(&tflite_settings_)) + sizeof(event_type_)); +} + +BenchmarkEvent::~BenchmarkEvent() { + // @@protoc_insertion_point(destructor:tflite.proto.BenchmarkEvent) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void BenchmarkEvent::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete tflite_settings_; + if (this != internal_default_instance()) delete result_; + if (this != internal_default_instance()) delete error_; +} + +void BenchmarkEvent::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void BenchmarkEvent::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.BenchmarkEvent) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(tflite_settings_ != nullptr); + tflite_settings_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(result_ != nullptr); + result_->Clear(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(error_ != nullptr); + error_->Clear(); + } + } + if (cached_has_bits & 0x00000038u) { + ::memset(&boottime_us_, 0, static_cast( + reinterpret_cast(&event_type_) - + reinterpret_cast(&boottime_us_)) + sizeof(event_type_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* BenchmarkEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .tflite.proto.TFLiteSettings tflite_settings = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_tflite_settings(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.BenchmarkEventType event_type = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + uint64_t val = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + if (PROTOBUF_PREDICT_TRUE(::tflite::proto::BenchmarkEventType_IsValid(val))) { + _internal_set_event_type(static_cast<::tflite::proto::BenchmarkEventType>(val)); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::WriteVarint(2, val, mutable_unknown_fields()); + } + } else + goto handle_unusual; + continue; + // optional .tflite.proto.BenchmarkResult result = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_result(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.BenchmarkError error = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_error(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int64 boottime_us = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 40)) { + _Internal::set_has_boottime_us(&has_bits); + boottime_us_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int64 wallclock_us = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { + _Internal::set_has_wallclock_us(&has_bits); + wallclock_us_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* BenchmarkEvent::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.BenchmarkEvent) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .tflite.proto.TFLiteSettings tflite_settings = 1; + if (cached_has_bits & 0x00000001u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::tflite_settings(this), + _Internal::tflite_settings(this).GetCachedSize(), target, stream); + } + + // optional .tflite.proto.BenchmarkEventType event_type = 2; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteEnumToArray( + 2, this->_internal_event_type(), target); + } + + // optional .tflite.proto.BenchmarkResult result = 3; + if (cached_has_bits & 0x00000002u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, _Internal::result(this), + _Internal::result(this).GetCachedSize(), target, stream); + } + + // optional .tflite.proto.BenchmarkError error = 4; + if (cached_has_bits & 0x00000004u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(4, _Internal::error(this), + _Internal::error(this).GetCachedSize(), target, stream); + } + + // optional int64 boottime_us = 5; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(5, this->_internal_boottime_us(), target); + } + + // optional int64 wallclock_us = 6; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(6, this->_internal_wallclock_us(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.BenchmarkEvent) + return target; +} + +size_t BenchmarkEvent::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.BenchmarkEvent) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + // optional .tflite.proto.TFLiteSettings tflite_settings = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *tflite_settings_); + } + + // optional .tflite.proto.BenchmarkResult result = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *result_); + } + + // optional .tflite.proto.BenchmarkError error = 4; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *error_); + } + + // optional int64 boottime_us = 5; + if (cached_has_bits & 0x00000008u) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_boottime_us()); + } + + // optional int64 wallclock_us = 6; + if (cached_has_bits & 0x00000010u) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_wallclock_us()); + } + + // optional .tflite.proto.BenchmarkEventType event_type = 2; + if (cached_has_bits & 0x00000020u) { + total_size += 1 + + ::_pbi::WireFormatLite::EnumSize(this->_internal_event_type()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BenchmarkEvent::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + BenchmarkEvent::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BenchmarkEvent::GetClassData() const { return &_class_data_; } + +void BenchmarkEvent::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void BenchmarkEvent::MergeFrom(const BenchmarkEvent& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.BenchmarkEvent) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + if (cached_has_bits & 0x00000001u) { + _internal_mutable_tflite_settings()->::tflite::proto::TFLiteSettings::MergeFrom(from._internal_tflite_settings()); + } + if (cached_has_bits & 0x00000002u) { + _internal_mutable_result()->::tflite::proto::BenchmarkResult::MergeFrom(from._internal_result()); + } + if (cached_has_bits & 0x00000004u) { + _internal_mutable_error()->::tflite::proto::BenchmarkError::MergeFrom(from._internal_error()); + } + if (cached_has_bits & 0x00000008u) { + boottime_us_ = from.boottime_us_; + } + if (cached_has_bits & 0x00000010u) { + wallclock_us_ = from.wallclock_us_; + } + if (cached_has_bits & 0x00000020u) { + event_type_ = from.event_type_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void BenchmarkEvent::CopyFrom(const BenchmarkEvent& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.BenchmarkEvent) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BenchmarkEvent::IsInitialized() const { + return true; +} + +void BenchmarkEvent::InternalSwap(BenchmarkEvent* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(BenchmarkEvent, event_type_) + + sizeof(BenchmarkEvent::event_type_) + - PROTOBUF_FIELD_OFFSET(BenchmarkEvent, tflite_settings_)>( + reinterpret_cast(&tflite_settings_), + reinterpret_cast(&other->tflite_settings_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata BenchmarkEvent::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[22]); +} + +// =================================================================== + +class BestAccelerationDecision::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_number_of_source_events(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static const ::tflite::proto::BenchmarkEvent& min_latency_event(const BestAccelerationDecision* msg); + static void set_has_min_latency_event(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_min_inference_time_us(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +const ::tflite::proto::BenchmarkEvent& +BestAccelerationDecision::_Internal::min_latency_event(const BestAccelerationDecision* msg) { + return *msg->min_latency_event_; +} +BestAccelerationDecision::BestAccelerationDecision(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.BestAccelerationDecision) +} +BestAccelerationDecision::BestAccelerationDecision(const BestAccelerationDecision& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_min_latency_event()) { + min_latency_event_ = new ::tflite::proto::BenchmarkEvent(*from.min_latency_event_); + } else { + min_latency_event_ = nullptr; + } + ::memcpy(&min_inference_time_us_, &from.min_inference_time_us_, + static_cast(reinterpret_cast(&number_of_source_events_) - + reinterpret_cast(&min_inference_time_us_)) + sizeof(number_of_source_events_)); + // @@protoc_insertion_point(copy_constructor:tflite.proto.BestAccelerationDecision) +} + +inline void BestAccelerationDecision::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&min_latency_event_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&number_of_source_events_) - + reinterpret_cast(&min_latency_event_)) + sizeof(number_of_source_events_)); +} + +BestAccelerationDecision::~BestAccelerationDecision() { + // @@protoc_insertion_point(destructor:tflite.proto.BestAccelerationDecision) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void BestAccelerationDecision::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete min_latency_event_; +} + +void BestAccelerationDecision::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void BestAccelerationDecision::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.BestAccelerationDecision) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(min_latency_event_ != nullptr); + min_latency_event_->Clear(); + } + if (cached_has_bits & 0x00000006u) { + ::memset(&min_inference_time_us_, 0, static_cast( + reinterpret_cast(&number_of_source_events_) - + reinterpret_cast(&min_inference_time_us_)) + sizeof(number_of_source_events_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* BestAccelerationDecision::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int32 number_of_source_events = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_number_of_source_events(&has_bits); + number_of_source_events_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.BenchmarkEvent min_latency_event = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_min_latency_event(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int64 min_inference_time_us = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _Internal::set_has_min_inference_time_us(&has_bits); + min_inference_time_us_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* BestAccelerationDecision::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.BestAccelerationDecision) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int32 number_of_source_events = 1; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_number_of_source_events(), target); + } + + // optional .tflite.proto.BenchmarkEvent min_latency_event = 2; + if (cached_has_bits & 0x00000001u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, _Internal::min_latency_event(this), + _Internal::min_latency_event(this).GetCachedSize(), target, stream); + } + + // optional int64 min_inference_time_us = 3; + if (cached_has_bits & 0x00000002u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_min_inference_time_us(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.BestAccelerationDecision) + return target; +} + +size_t BestAccelerationDecision::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.BestAccelerationDecision) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional .tflite.proto.BenchmarkEvent min_latency_event = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *min_latency_event_); + } + + // optional int64 min_inference_time_us = 3; + if (cached_has_bits & 0x00000002u) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_min_inference_time_us()); + } + + // optional int32 number_of_source_events = 1; + if (cached_has_bits & 0x00000004u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_number_of_source_events()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BestAccelerationDecision::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + BestAccelerationDecision::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BestAccelerationDecision::GetClassData() const { return &_class_data_; } + +void BestAccelerationDecision::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void BestAccelerationDecision::MergeFrom(const BestAccelerationDecision& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.BestAccelerationDecision) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _internal_mutable_min_latency_event()->::tflite::proto::BenchmarkEvent::MergeFrom(from._internal_min_latency_event()); + } + if (cached_has_bits & 0x00000002u) { + min_inference_time_us_ = from.min_inference_time_us_; + } + if (cached_has_bits & 0x00000004u) { + number_of_source_events_ = from.number_of_source_events_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void BestAccelerationDecision::CopyFrom(const BestAccelerationDecision& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.BestAccelerationDecision) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BestAccelerationDecision::IsInitialized() const { + return true; +} + +void BestAccelerationDecision::InternalSwap(BestAccelerationDecision* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(BestAccelerationDecision, number_of_source_events_) + + sizeof(BestAccelerationDecision::number_of_source_events_) + - PROTOBUF_FIELD_OFFSET(BestAccelerationDecision, min_latency_event_)>( + reinterpret_cast(&min_latency_event_), + reinterpret_cast(&other->min_latency_event_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata BestAccelerationDecision::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[23]); +} + +// =================================================================== + +class BenchmarkInitializationFailure::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_initialization_status(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +BenchmarkInitializationFailure::BenchmarkInitializationFailure(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.BenchmarkInitializationFailure) +} +BenchmarkInitializationFailure::BenchmarkInitializationFailure(const BenchmarkInitializationFailure& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + initialization_status_ = from.initialization_status_; + // @@protoc_insertion_point(copy_constructor:tflite.proto.BenchmarkInitializationFailure) +} + +inline void BenchmarkInitializationFailure::SharedCtor() { +initialization_status_ = 0; +} + +BenchmarkInitializationFailure::~BenchmarkInitializationFailure() { + // @@protoc_insertion_point(destructor:tflite.proto.BenchmarkInitializationFailure) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void BenchmarkInitializationFailure::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void BenchmarkInitializationFailure::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void BenchmarkInitializationFailure::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.BenchmarkInitializationFailure) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + initialization_status_ = 0; + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* BenchmarkInitializationFailure::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int32 initialization_status = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_initialization_status(&has_bits); + initialization_status_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* BenchmarkInitializationFailure::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.BenchmarkInitializationFailure) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int32 initialization_status = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_initialization_status(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.BenchmarkInitializationFailure) + return target; +} + +size_t BenchmarkInitializationFailure::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.BenchmarkInitializationFailure) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // optional int32 initialization_status = 1; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_initialization_status()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BenchmarkInitializationFailure::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + BenchmarkInitializationFailure::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BenchmarkInitializationFailure::GetClassData() const { return &_class_data_; } + +void BenchmarkInitializationFailure::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void BenchmarkInitializationFailure::MergeFrom(const BenchmarkInitializationFailure& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.BenchmarkInitializationFailure) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_initialization_status()) { + _internal_set_initialization_status(from._internal_initialization_status()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void BenchmarkInitializationFailure::CopyFrom(const BenchmarkInitializationFailure& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.BenchmarkInitializationFailure) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BenchmarkInitializationFailure::IsInitialized() const { + return true; +} + +void BenchmarkInitializationFailure::InternalSwap(BenchmarkInitializationFailure* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + swap(initialization_status_, other->initialization_status_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata BenchmarkInitializationFailure::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[24]); +} + +// =================================================================== + +class MiniBenchmarkEvent::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_is_log_flushing_event(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static const ::tflite::proto::BestAccelerationDecision& best_acceleration_decision(const MiniBenchmarkEvent* msg); + static void set_has_best_acceleration_decision(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::tflite::proto::BenchmarkInitializationFailure& initialization_failure(const MiniBenchmarkEvent* msg); + static void set_has_initialization_failure(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static const ::tflite::proto::BenchmarkEvent& benchmark_event(const MiniBenchmarkEvent* msg); + static void set_has_benchmark_event(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } +}; + +const ::tflite::proto::BestAccelerationDecision& +MiniBenchmarkEvent::_Internal::best_acceleration_decision(const MiniBenchmarkEvent* msg) { + return *msg->best_acceleration_decision_; +} +const ::tflite::proto::BenchmarkInitializationFailure& +MiniBenchmarkEvent::_Internal::initialization_failure(const MiniBenchmarkEvent* msg) { + return *msg->initialization_failure_; +} +const ::tflite::proto::BenchmarkEvent& +MiniBenchmarkEvent::_Internal::benchmark_event(const MiniBenchmarkEvent* msg) { + return *msg->benchmark_event_; +} +MiniBenchmarkEvent::MiniBenchmarkEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.MiniBenchmarkEvent) +} +MiniBenchmarkEvent::MiniBenchmarkEvent(const MiniBenchmarkEvent& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_best_acceleration_decision()) { + best_acceleration_decision_ = new ::tflite::proto::BestAccelerationDecision(*from.best_acceleration_decision_); + } else { + best_acceleration_decision_ = nullptr; + } + if (from._internal_has_initialization_failure()) { + initialization_failure_ = new ::tflite::proto::BenchmarkInitializationFailure(*from.initialization_failure_); + } else { + initialization_failure_ = nullptr; + } + if (from._internal_has_benchmark_event()) { + benchmark_event_ = new ::tflite::proto::BenchmarkEvent(*from.benchmark_event_); + } else { + benchmark_event_ = nullptr; + } + is_log_flushing_event_ = from.is_log_flushing_event_; + // @@protoc_insertion_point(copy_constructor:tflite.proto.MiniBenchmarkEvent) +} + +inline void MiniBenchmarkEvent::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&best_acceleration_decision_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&is_log_flushing_event_) - + reinterpret_cast(&best_acceleration_decision_)) + sizeof(is_log_flushing_event_)); +} + +MiniBenchmarkEvent::~MiniBenchmarkEvent() { + // @@protoc_insertion_point(destructor:tflite.proto.MiniBenchmarkEvent) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void MiniBenchmarkEvent::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete best_acceleration_decision_; + if (this != internal_default_instance()) delete initialization_failure_; + if (this != internal_default_instance()) delete benchmark_event_; +} + +void MiniBenchmarkEvent::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void MiniBenchmarkEvent::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.MiniBenchmarkEvent) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(best_acceleration_decision_ != nullptr); + best_acceleration_decision_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(initialization_failure_ != nullptr); + initialization_failure_->Clear(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(benchmark_event_ != nullptr); + benchmark_event_->Clear(); + } + } + is_log_flushing_event_ = false; + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* MiniBenchmarkEvent::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional bool is_log_flushing_event = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_is_log_flushing_event(&has_bits); + is_log_flushing_event_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.BestAccelerationDecision best_acceleration_decision = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_best_acceleration_decision(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.BenchmarkInitializationFailure initialization_failure = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_initialization_failure(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.BenchmarkEvent benchmark_event = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_benchmark_event(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* MiniBenchmarkEvent::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.MiniBenchmarkEvent) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional bool is_log_flushing_event = 1; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteBoolToArray(1, this->_internal_is_log_flushing_event(), target); + } + + // optional .tflite.proto.BestAccelerationDecision best_acceleration_decision = 2; + if (cached_has_bits & 0x00000001u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, _Internal::best_acceleration_decision(this), + _Internal::best_acceleration_decision(this).GetCachedSize(), target, stream); + } + + // optional .tflite.proto.BenchmarkInitializationFailure initialization_failure = 3; + if (cached_has_bits & 0x00000002u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, _Internal::initialization_failure(this), + _Internal::initialization_failure(this).GetCachedSize(), target, stream); + } + + // optional .tflite.proto.BenchmarkEvent benchmark_event = 4; + if (cached_has_bits & 0x00000004u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(4, _Internal::benchmark_event(this), + _Internal::benchmark_event(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.MiniBenchmarkEvent) + return target; +} + +size_t MiniBenchmarkEvent::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.MiniBenchmarkEvent) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + // optional .tflite.proto.BestAccelerationDecision best_acceleration_decision = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *best_acceleration_decision_); + } + + // optional .tflite.proto.BenchmarkInitializationFailure initialization_failure = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *initialization_failure_); + } + + // optional .tflite.proto.BenchmarkEvent benchmark_event = 4; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *benchmark_event_); + } + + // optional bool is_log_flushing_event = 1; + if (cached_has_bits & 0x00000008u) { + total_size += 1 + 1; + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData MiniBenchmarkEvent::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + MiniBenchmarkEvent::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*MiniBenchmarkEvent::GetClassData() const { return &_class_data_; } + +void MiniBenchmarkEvent::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void MiniBenchmarkEvent::MergeFrom(const MiniBenchmarkEvent& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.MiniBenchmarkEvent) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000000fu) { + if (cached_has_bits & 0x00000001u) { + _internal_mutable_best_acceleration_decision()->::tflite::proto::BestAccelerationDecision::MergeFrom(from._internal_best_acceleration_decision()); + } + if (cached_has_bits & 0x00000002u) { + _internal_mutable_initialization_failure()->::tflite::proto::BenchmarkInitializationFailure::MergeFrom(from._internal_initialization_failure()); + } + if (cached_has_bits & 0x00000004u) { + _internal_mutable_benchmark_event()->::tflite::proto::BenchmarkEvent::MergeFrom(from._internal_benchmark_event()); + } + if (cached_has_bits & 0x00000008u) { + is_log_flushing_event_ = from.is_log_flushing_event_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void MiniBenchmarkEvent::CopyFrom(const MiniBenchmarkEvent& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.MiniBenchmarkEvent) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool MiniBenchmarkEvent::IsInitialized() const { + return true; +} + +void MiniBenchmarkEvent::InternalSwap(MiniBenchmarkEvent* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(MiniBenchmarkEvent, is_log_flushing_event_) + + sizeof(MiniBenchmarkEvent::is_log_flushing_event_) + - PROTOBUF_FIELD_OFFSET(MiniBenchmarkEvent, best_acceleration_decision_)>( + reinterpret_cast(&best_acceleration_decision_), + reinterpret_cast(&other->best_acceleration_decision_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata MiniBenchmarkEvent::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[25]); +} + +// =================================================================== + +class ModelFile::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_filename(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_fd(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } + static void set_has_offset(HasBits* has_bits) { + (*has_bits)[0] |= 8u; + } + static void set_has_length(HasBits* has_bits) { + (*has_bits)[0] |= 16u; + } + static const ::tflite::proto::ModelIdGroup& model_id_group(const ModelFile* msg); + static void set_has_model_id_group(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static void set_has_buffer_handle(HasBits* has_bits) { + (*has_bits)[0] |= 32u; + } +}; + +const ::tflite::proto::ModelIdGroup& +ModelFile::_Internal::model_id_group(const ModelFile* msg) { + return *msg->model_id_group_; +} +ModelFile::ModelFile(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.ModelFile) +} +ModelFile::ModelFile(const ModelFile& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + filename_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + filename_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_filename()) { + filename_.Set(from._internal_filename(), + GetArenaForAllocation()); + } + if (from._internal_has_model_id_group()) { + model_id_group_ = new ::tflite::proto::ModelIdGroup(*from.model_id_group_); + } else { + model_id_group_ = nullptr; + } + ::memcpy(&fd_, &from.fd_, + static_cast(reinterpret_cast(&buffer_handle_) - + reinterpret_cast(&fd_)) + sizeof(buffer_handle_)); + // @@protoc_insertion_point(copy_constructor:tflite.proto.ModelFile) +} + +inline void ModelFile::SharedCtor() { +filename_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + filename_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&model_id_group_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&buffer_handle_) - + reinterpret_cast(&model_id_group_)) + sizeof(buffer_handle_)); +} + +ModelFile::~ModelFile() { + // @@protoc_insertion_point(destructor:tflite.proto.ModelFile) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ModelFile::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + filename_.Destroy(); + if (this != internal_default_instance()) delete model_id_group_; +} + +void ModelFile::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ModelFile::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.ModelFile) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + filename_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(model_id_group_ != nullptr); + model_id_group_->Clear(); + } + } + if (cached_has_bits & 0x0000003cu) { + ::memset(&fd_, 0, static_cast( + reinterpret_cast(&buffer_handle_) - + reinterpret_cast(&fd_)) + sizeof(buffer_handle_)); + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ModelFile::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string filename = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_filename(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + #ifndef NDEBUG + ::_pbi::VerifyUTF8(str, "tflite.proto.ModelFile.filename"); + #endif // !NDEBUG + } else + goto handle_unusual; + continue; + // optional int64 fd = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 16)) { + _Internal::set_has_fd(&has_bits); + fd_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int64 offset = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 24)) { + _Internal::set_has_offset(&has_bits); + offset_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int64 length = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 32)) { + _Internal::set_has_length(&has_bits); + length_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.ModelIdGroup model_id_group = 5; + case 5: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 42)) { + ptr = ctx->ParseMessage(_internal_mutable_model_id_group(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional int64 buffer_handle = 6; + case 6: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 48)) { + _Internal::set_has_buffer_handle(&has_bits); + buffer_handle_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ModelFile::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.ModelFile) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string filename = 1; + if (cached_has_bits & 0x00000001u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_filename().data(), static_cast(this->_internal_filename().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "tflite.proto.ModelFile.filename"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_filename(), target); + } + + // optional int64 fd = 2; + if (cached_has_bits & 0x00000004u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(2, this->_internal_fd(), target); + } + + // optional int64 offset = 3; + if (cached_has_bits & 0x00000008u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(3, this->_internal_offset(), target); + } + + // optional int64 length = 4; + if (cached_has_bits & 0x00000010u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(4, this->_internal_length(), target); + } + + // optional .tflite.proto.ModelIdGroup model_id_group = 5; + if (cached_has_bits & 0x00000002u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(5, _Internal::model_id_group(this), + _Internal::model_id_group(this).GetCachedSize(), target, stream); + } + + // optional int64 buffer_handle = 6; + if (cached_has_bits & 0x00000020u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(6, this->_internal_buffer_handle(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.ModelFile) + return target; +} + +size_t ModelFile::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.ModelFile) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + // optional string filename = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_filename()); + } + + // optional .tflite.proto.ModelIdGroup model_id_group = 5; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *model_id_group_); + } + + // optional int64 fd = 2; + if (cached_has_bits & 0x00000004u) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_fd()); + } + + // optional int64 offset = 3; + if (cached_has_bits & 0x00000008u) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_offset()); + } + + // optional int64 length = 4; + if (cached_has_bits & 0x00000010u) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_length()); + } + + // optional int64 buffer_handle = 6; + if (cached_has_bits & 0x00000020u) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_buffer_handle()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ModelFile::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + ModelFile::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ModelFile::GetClassData() const { return &_class_data_; } + +void ModelFile::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void ModelFile::MergeFrom(const ModelFile& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.ModelFile) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x0000003fu) { + if (cached_has_bits & 0x00000001u) { + _internal_set_filename(from._internal_filename()); + } + if (cached_has_bits & 0x00000002u) { + _internal_mutable_model_id_group()->::tflite::proto::ModelIdGroup::MergeFrom(from._internal_model_id_group()); + } + if (cached_has_bits & 0x00000004u) { + fd_ = from.fd_; + } + if (cached_has_bits & 0x00000008u) { + offset_ = from.offset_; + } + if (cached_has_bits & 0x00000010u) { + length_ = from.length_; + } + if (cached_has_bits & 0x00000020u) { + buffer_handle_ = from.buffer_handle_; + } + _has_bits_[0] |= cached_has_bits; + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ModelFile::CopyFrom(const ModelFile& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.ModelFile) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ModelFile::IsInitialized() const { + return true; +} + +void ModelFile::InternalSwap(ModelFile* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &filename_, lhs_arena, + &other->filename_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(ModelFile, buffer_handle_) + + sizeof(ModelFile::buffer_handle_) + - PROTOBUF_FIELD_OFFSET(ModelFile, model_id_group_)>( + reinterpret_cast(&model_id_group_), + reinterpret_cast(&other->model_id_group_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ModelFile::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[26]); +} + +// =================================================================== + +class ModelIdGroup::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_model_namespace(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_model_id(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +ModelIdGroup::ModelIdGroup(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.ModelIdGroup) +} +ModelIdGroup::ModelIdGroup(const ModelIdGroup& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + model_namespace_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + model_namespace_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_model_namespace()) { + model_namespace_.Set(from._internal_model_namespace(), + GetArenaForAllocation()); + } + model_id_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + model_id_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_model_id()) { + model_id_.Set(from._internal_model_id(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:tflite.proto.ModelIdGroup) +} + +inline void ModelIdGroup::SharedCtor() { +model_namespace_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + model_namespace_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +model_id_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + model_id_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +ModelIdGroup::~ModelIdGroup() { + // @@protoc_insertion_point(destructor:tflite.proto.ModelIdGroup) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ModelIdGroup::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + model_namespace_.Destroy(); + model_id_.Destroy(); +} + +void ModelIdGroup::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ModelIdGroup::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.ModelIdGroup) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + model_namespace_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + model_id_.ClearNonDefaultToEmpty(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ModelIdGroup::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string model_namespace = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_model_namespace(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + #ifndef NDEBUG + ::_pbi::VerifyUTF8(str, "tflite.proto.ModelIdGroup.model_namespace"); + #endif // !NDEBUG + } else + goto handle_unusual; + continue; + // optional string model_id = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_model_id(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + #ifndef NDEBUG + ::_pbi::VerifyUTF8(str, "tflite.proto.ModelIdGroup.model_id"); + #endif // !NDEBUG + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ModelIdGroup::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.ModelIdGroup) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string model_namespace = 1; + if (cached_has_bits & 0x00000001u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_model_namespace().data(), static_cast(this->_internal_model_namespace().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "tflite.proto.ModelIdGroup.model_namespace"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_model_namespace(), target); + } + + // optional string model_id = 2; + if (cached_has_bits & 0x00000002u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_model_id().data(), static_cast(this->_internal_model_id().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "tflite.proto.ModelIdGroup.model_id"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_model_id(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.ModelIdGroup) + return target; +} + +size_t ModelIdGroup::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.ModelIdGroup) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string model_namespace = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_model_namespace()); + } + + // optional string model_id = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_model_id()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ModelIdGroup::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + ModelIdGroup::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ModelIdGroup::GetClassData() const { return &_class_data_; } + +void ModelIdGroup::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void ModelIdGroup::MergeFrom(const ModelIdGroup& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.ModelIdGroup) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_model_namespace(from._internal_model_namespace()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_model_id(from._internal_model_id()); + } + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ModelIdGroup::CopyFrom(const ModelIdGroup& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.ModelIdGroup) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ModelIdGroup::IsInitialized() const { + return true; +} + +void ModelIdGroup::InternalSwap(ModelIdGroup* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &model_namespace_, lhs_arena, + &other->model_namespace_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &model_id_, lhs_arena, + &other->model_id_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ModelIdGroup::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[27]); +} + +// =================================================================== + +class BenchmarkStoragePaths::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_storage_file_path(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static void set_has_data_directory_path(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +BenchmarkStoragePaths::BenchmarkStoragePaths(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.BenchmarkStoragePaths) +} +BenchmarkStoragePaths::BenchmarkStoragePaths(const BenchmarkStoragePaths& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + storage_file_path_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + storage_file_path_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_storage_file_path()) { + storage_file_path_.Set(from._internal_storage_file_path(), + GetArenaForAllocation()); + } + data_directory_path_.InitDefault(); + #ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + data_directory_path_.Set("", GetArenaForAllocation()); + #endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (from._internal_has_data_directory_path()) { + data_directory_path_.Set(from._internal_data_directory_path(), + GetArenaForAllocation()); + } + // @@protoc_insertion_point(copy_constructor:tflite.proto.BenchmarkStoragePaths) +} + +inline void BenchmarkStoragePaths::SharedCtor() { +storage_file_path_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + storage_file_path_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +data_directory_path_.InitDefault(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + data_directory_path_.Set("", GetArenaForAllocation()); +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING +} + +BenchmarkStoragePaths::~BenchmarkStoragePaths() { + // @@protoc_insertion_point(destructor:tflite.proto.BenchmarkStoragePaths) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void BenchmarkStoragePaths::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + storage_file_path_.Destroy(); + data_directory_path_.Destroy(); +} + +void BenchmarkStoragePaths::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void BenchmarkStoragePaths::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.BenchmarkStoragePaths) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + storage_file_path_.ClearNonDefaultToEmpty(); + } + if (cached_has_bits & 0x00000002u) { + data_directory_path_.ClearNonDefaultToEmpty(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* BenchmarkStoragePaths::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional string storage_file_path = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + auto str = _internal_mutable_storage_file_path(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + #ifndef NDEBUG + ::_pbi::VerifyUTF8(str, "tflite.proto.BenchmarkStoragePaths.storage_file_path"); + #endif // !NDEBUG + } else + goto handle_unusual; + continue; + // optional string data_directory_path = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + auto str = _internal_mutable_data_directory_path(); + ptr = ::_pbi::InlineGreedyStringParser(str, ptr, ctx); + CHK_(ptr); + #ifndef NDEBUG + ::_pbi::VerifyUTF8(str, "tflite.proto.BenchmarkStoragePaths.data_directory_path"); + #endif // !NDEBUG + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* BenchmarkStoragePaths::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.BenchmarkStoragePaths) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional string storage_file_path = 1; + if (cached_has_bits & 0x00000001u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_storage_file_path().data(), static_cast(this->_internal_storage_file_path().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "tflite.proto.BenchmarkStoragePaths.storage_file_path"); + target = stream->WriteStringMaybeAliased( + 1, this->_internal_storage_file_path(), target); + } + + // optional string data_directory_path = 2; + if (cached_has_bits & 0x00000002u) { + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::VerifyUTF8StringNamedField( + this->_internal_data_directory_path().data(), static_cast(this->_internal_data_directory_path().length()), + ::PROTOBUF_NAMESPACE_ID::internal::WireFormat::SERIALIZE, + "tflite.proto.BenchmarkStoragePaths.data_directory_path"); + target = stream->WriteStringMaybeAliased( + 2, this->_internal_data_directory_path(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.BenchmarkStoragePaths) + return target; +} + +size_t BenchmarkStoragePaths::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.BenchmarkStoragePaths) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional string storage_file_path = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_storage_file_path()); + } + + // optional string data_directory_path = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::StringSize( + this->_internal_data_directory_path()); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BenchmarkStoragePaths::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + BenchmarkStoragePaths::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BenchmarkStoragePaths::GetClassData() const { return &_class_data_; } + +void BenchmarkStoragePaths::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void BenchmarkStoragePaths::MergeFrom(const BenchmarkStoragePaths& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.BenchmarkStoragePaths) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_set_storage_file_path(from._internal_storage_file_path()); + } + if (cached_has_bits & 0x00000002u) { + _internal_set_data_directory_path(from._internal_data_directory_path()); + } + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void BenchmarkStoragePaths::CopyFrom(const BenchmarkStoragePaths& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.BenchmarkStoragePaths) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BenchmarkStoragePaths::IsInitialized() const { + return true; +} + +void BenchmarkStoragePaths::InternalSwap(BenchmarkStoragePaths* other) { + using std::swap; + auto* lhs_arena = GetArenaForAllocation(); + auto* rhs_arena = other->GetArenaForAllocation(); + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &storage_file_path_, lhs_arena, + &other->storage_file_path_, rhs_arena + ); + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr::InternalSwap( + &data_directory_path_, lhs_arena, + &other->data_directory_path_, rhs_arena + ); +} + +::PROTOBUF_NAMESPACE_ID::Metadata BenchmarkStoragePaths::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[28]); +} + +// =================================================================== + +class ValidationSettings::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static void set_has_per_test_timeout_ms(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } +}; + +ValidationSettings::ValidationSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.ValidationSettings) +} +ValidationSettings::ValidationSettings(const ValidationSettings& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + per_test_timeout_ms_ = from.per_test_timeout_ms_; + // @@protoc_insertion_point(copy_constructor:tflite.proto.ValidationSettings) +} + +inline void ValidationSettings::SharedCtor() { +per_test_timeout_ms_ = int64_t{0}; +} + +ValidationSettings::~ValidationSettings() { + // @@protoc_insertion_point(destructor:tflite.proto.ValidationSettings) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void ValidationSettings::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); +} + +void ValidationSettings::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void ValidationSettings::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.ValidationSettings) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + per_test_timeout_ms_ = int64_t{0}; + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* ValidationSettings::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional int64 per_test_timeout_ms = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 8)) { + _Internal::set_has_per_test_timeout_ms(&has_bits); + per_test_timeout_ms_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* ValidationSettings::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.ValidationSettings) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional int64 per_test_timeout_ms = 1; + if (cached_has_bits & 0x00000001u) { + target = stream->EnsureSpace(target); + target = ::_pbi::WireFormatLite::WriteInt64ToArray(1, this->_internal_per_test_timeout_ms(), target); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.ValidationSettings) + return target; +} + +size_t ValidationSettings::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.ValidationSettings) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // optional int64 per_test_timeout_ms = 1; + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000001u) { + total_size += ::_pbi::WireFormatLite::Int64SizePlusOne(this->_internal_per_test_timeout_ms()); + } + + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData ValidationSettings::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + ValidationSettings::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*ValidationSettings::GetClassData() const { return &_class_data_; } + +void ValidationSettings::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void ValidationSettings::MergeFrom(const ValidationSettings& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.ValidationSettings) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + if (from._internal_has_per_test_timeout_ms()) { + _internal_set_per_test_timeout_ms(from._internal_per_test_timeout_ms()); + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void ValidationSettings::CopyFrom(const ValidationSettings& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.ValidationSettings) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool ValidationSettings::IsInitialized() const { + return true; +} + +void ValidationSettings::InternalSwap(ValidationSettings* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + swap(per_test_timeout_ms_, other->per_test_timeout_ms_); +} + +::PROTOBUF_NAMESPACE_ID::Metadata ValidationSettings::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[29]); +} + +// =================================================================== + +class MinibenchmarkSettings::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static const ::tflite::proto::ModelFile& model_file(const MinibenchmarkSettings* msg); + static void set_has_model_file(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::tflite::proto::BenchmarkStoragePaths& storage_paths(const MinibenchmarkSettings* msg); + static void set_has_storage_paths(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } + static const ::tflite::proto::ValidationSettings& validation_settings(const MinibenchmarkSettings* msg); + static void set_has_validation_settings(HasBits* has_bits) { + (*has_bits)[0] |= 4u; + } +}; + +const ::tflite::proto::ModelFile& +MinibenchmarkSettings::_Internal::model_file(const MinibenchmarkSettings* msg) { + return *msg->model_file_; +} +const ::tflite::proto::BenchmarkStoragePaths& +MinibenchmarkSettings::_Internal::storage_paths(const MinibenchmarkSettings* msg) { + return *msg->storage_paths_; +} +const ::tflite::proto::ValidationSettings& +MinibenchmarkSettings::_Internal::validation_settings(const MinibenchmarkSettings* msg) { + return *msg->validation_settings_; +} +MinibenchmarkSettings::MinibenchmarkSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned), + settings_to_test_(arena) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.MinibenchmarkSettings) +} +MinibenchmarkSettings::MinibenchmarkSettings(const MinibenchmarkSettings& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_), + settings_to_test_(from.settings_to_test_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_model_file()) { + model_file_ = new ::tflite::proto::ModelFile(*from.model_file_); + } else { + model_file_ = nullptr; + } + if (from._internal_has_storage_paths()) { + storage_paths_ = new ::tflite::proto::BenchmarkStoragePaths(*from.storage_paths_); + } else { + storage_paths_ = nullptr; + } + if (from._internal_has_validation_settings()) { + validation_settings_ = new ::tflite::proto::ValidationSettings(*from.validation_settings_); + } else { + validation_settings_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:tflite.proto.MinibenchmarkSettings) +} + +inline void MinibenchmarkSettings::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&model_file_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&validation_settings_) - + reinterpret_cast(&model_file_)) + sizeof(validation_settings_)); +} + +MinibenchmarkSettings::~MinibenchmarkSettings() { + // @@protoc_insertion_point(destructor:tflite.proto.MinibenchmarkSettings) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void MinibenchmarkSettings::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete model_file_; + if (this != internal_default_instance()) delete storage_paths_; + if (this != internal_default_instance()) delete validation_settings_; +} + +void MinibenchmarkSettings::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void MinibenchmarkSettings::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.MinibenchmarkSettings) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + settings_to_test_.Clear(); + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(model_file_ != nullptr); + model_file_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(storage_paths_ != nullptr); + storage_paths_->Clear(); + } + if (cached_has_bits & 0x00000004u) { + GOOGLE_DCHECK(validation_settings_ != nullptr); + validation_settings_->Clear(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* MinibenchmarkSettings::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // repeated .tflite.proto.TFLiteSettings settings_to_test = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr -= 1; + do { + ptr += 1; + ptr = ctx->ParseMessage(_internal_add_settings_to_test(), ptr); + CHK_(ptr); + if (!ctx->DataAvailable(ptr)) break; + } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<10>(ptr)); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.ModelFile model_file = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_model_file(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.BenchmarkStoragePaths storage_paths = 3; + case 3: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 26)) { + ptr = ctx->ParseMessage(_internal_mutable_storage_paths(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.ValidationSettings validation_settings = 4; + case 4: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 34)) { + ptr = ctx->ParseMessage(_internal_mutable_validation_settings(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* MinibenchmarkSettings::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.MinibenchmarkSettings) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + // repeated .tflite.proto.TFLiteSettings settings_to_test = 1; + for (unsigned i = 0, + n = static_cast(this->_internal_settings_to_test_size()); i < n; i++) { + const auto& repfield = this->_internal_settings_to_test(i); + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, repfield, repfield.GetCachedSize(), target, stream); + } + + cached_has_bits = _has_bits_[0]; + // optional .tflite.proto.ModelFile model_file = 2; + if (cached_has_bits & 0x00000001u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, _Internal::model_file(this), + _Internal::model_file(this).GetCachedSize(), target, stream); + } + + // optional .tflite.proto.BenchmarkStoragePaths storage_paths = 3; + if (cached_has_bits & 0x00000002u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(3, _Internal::storage_paths(this), + _Internal::storage_paths(this).GetCachedSize(), target, stream); + } + + // optional .tflite.proto.ValidationSettings validation_settings = 4; + if (cached_has_bits & 0x00000004u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(4, _Internal::validation_settings(this), + _Internal::validation_settings(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.MinibenchmarkSettings) + return target; +} + +size_t MinibenchmarkSettings::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.MinibenchmarkSettings) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + // repeated .tflite.proto.TFLiteSettings settings_to_test = 1; + total_size += 1UL * this->_internal_settings_to_test_size(); + for (const auto& msg : this->settings_to_test_) { + total_size += + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg); + } + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + // optional .tflite.proto.ModelFile model_file = 2; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *model_file_); + } + + // optional .tflite.proto.BenchmarkStoragePaths storage_paths = 3; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *storage_paths_); + } + + // optional .tflite.proto.ValidationSettings validation_settings = 4; + if (cached_has_bits & 0x00000004u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *validation_settings_); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData MinibenchmarkSettings::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + MinibenchmarkSettings::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*MinibenchmarkSettings::GetClassData() const { return &_class_data_; } + +void MinibenchmarkSettings::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void MinibenchmarkSettings::MergeFrom(const MinibenchmarkSettings& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.MinibenchmarkSettings) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + settings_to_test_.MergeFrom(from.settings_to_test_); + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000007u) { + if (cached_has_bits & 0x00000001u) { + _internal_mutable_model_file()->::tflite::proto::ModelFile::MergeFrom(from._internal_model_file()); + } + if (cached_has_bits & 0x00000002u) { + _internal_mutable_storage_paths()->::tflite::proto::BenchmarkStoragePaths::MergeFrom(from._internal_storage_paths()); + } + if (cached_has_bits & 0x00000004u) { + _internal_mutable_validation_settings()->::tflite::proto::ValidationSettings::MergeFrom(from._internal_validation_settings()); + } + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void MinibenchmarkSettings::CopyFrom(const MinibenchmarkSettings& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.MinibenchmarkSettings) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool MinibenchmarkSettings::IsInitialized() const { + return true; +} + +void MinibenchmarkSettings::InternalSwap(MinibenchmarkSettings* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + settings_to_test_.InternalSwap(&other->settings_to_test_); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(MinibenchmarkSettings, validation_settings_) + + sizeof(MinibenchmarkSettings::validation_settings_) + - PROTOBUF_FIELD_OFFSET(MinibenchmarkSettings, model_file_)>( + reinterpret_cast(&model_file_), + reinterpret_cast(&other->model_file_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata MinibenchmarkSettings::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[30]); +} + +// =================================================================== + +class BenchmarkEventStorage::_Internal { + public: + using HasBits = decltype(std::declval()._has_bits_); + static const ::tflite::proto::ModelIdGroup& model_id_group(const BenchmarkEventStorage* msg); + static void set_has_model_id_group(HasBits* has_bits) { + (*has_bits)[0] |= 1u; + } + static const ::tflite::proto::BenchmarkEvent& benchmark_event(const BenchmarkEventStorage* msg); + static void set_has_benchmark_event(HasBits* has_bits) { + (*has_bits)[0] |= 2u; + } +}; + +const ::tflite::proto::ModelIdGroup& +BenchmarkEventStorage::_Internal::model_id_group(const BenchmarkEventStorage* msg) { + return *msg->model_id_group_; +} +const ::tflite::proto::BenchmarkEvent& +BenchmarkEventStorage::_Internal::benchmark_event(const BenchmarkEventStorage* msg) { + return *msg->benchmark_event_; +} +BenchmarkEventStorage::BenchmarkEventStorage(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned) + : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) { + SharedCtor(); + // @@protoc_insertion_point(arena_constructor:tflite.proto.BenchmarkEventStorage) +} +BenchmarkEventStorage::BenchmarkEventStorage(const BenchmarkEventStorage& from) + : ::PROTOBUF_NAMESPACE_ID::Message(), + _has_bits_(from._has_bits_) { + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); + if (from._internal_has_model_id_group()) { + model_id_group_ = new ::tflite::proto::ModelIdGroup(*from.model_id_group_); + } else { + model_id_group_ = nullptr; + } + if (from._internal_has_benchmark_event()) { + benchmark_event_ = new ::tflite::proto::BenchmarkEvent(*from.benchmark_event_); + } else { + benchmark_event_ = nullptr; + } + // @@protoc_insertion_point(copy_constructor:tflite.proto.BenchmarkEventStorage) +} + +inline void BenchmarkEventStorage::SharedCtor() { +::memset(reinterpret_cast(this) + static_cast( + reinterpret_cast(&model_id_group_) - reinterpret_cast(this)), + 0, static_cast(reinterpret_cast(&benchmark_event_) - + reinterpret_cast(&model_id_group_)) + sizeof(benchmark_event_)); +} + +BenchmarkEventStorage::~BenchmarkEventStorage() { + // @@protoc_insertion_point(destructor:tflite.proto.BenchmarkEventStorage) + if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) { + (void)arena; + return; + } + SharedDtor(); +} + +inline void BenchmarkEventStorage::SharedDtor() { + GOOGLE_DCHECK(GetArenaForAllocation() == nullptr); + if (this != internal_default_instance()) delete model_id_group_; + if (this != internal_default_instance()) delete benchmark_event_; +} + +void BenchmarkEventStorage::SetCachedSize(int size) const { + _cached_size_.Set(size); +} + +void BenchmarkEventStorage::Clear() { +// @@protoc_insertion_point(message_clear_start:tflite.proto.BenchmarkEventStorage) + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + GOOGLE_DCHECK(model_id_group_ != nullptr); + model_id_group_->Clear(); + } + if (cached_has_bits & 0x00000002u) { + GOOGLE_DCHECK(benchmark_event_ != nullptr); + benchmark_event_->Clear(); + } + } + _has_bits_.Clear(); + _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); +} + +const char* BenchmarkEventStorage::_InternalParse(const char* ptr, ::_pbi::ParseContext* ctx) { +#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure + _Internal::HasBits has_bits{}; + while (!ctx->Done(&ptr)) { + uint32_t tag; + ptr = ::_pbi::ReadTag(ptr, &tag); + switch (tag >> 3) { + // optional .tflite.proto.ModelIdGroup model_id_group = 1; + case 1: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 10)) { + ptr = ctx->ParseMessage(_internal_mutable_model_id_group(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + // optional .tflite.proto.BenchmarkEvent benchmark_event = 2; + case 2: + if (PROTOBUF_PREDICT_TRUE(static_cast(tag) == 18)) { + ptr = ctx->ParseMessage(_internal_mutable_benchmark_event(), ptr); + CHK_(ptr); + } else + goto handle_unusual; + continue; + default: + goto handle_unusual; + } // switch + handle_unusual: + if ((tag == 0) || ((tag & 7) == 4)) { + CHK_(ptr); + ctx->SetLastTag(tag); + goto message_done; + } + ptr = UnknownFieldParse( + tag, + _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(), + ptr, ctx); + CHK_(ptr != nullptr); + } // while +message_done: + _has_bits_.Or(has_bits); + return ptr; +failure: + ptr = nullptr; + goto message_done; +#undef CHK_ +} + +uint8_t* BenchmarkEventStorage::_InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const { + // @@protoc_insertion_point(serialize_to_array_start:tflite.proto.BenchmarkEventStorage) + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + // optional .tflite.proto.ModelIdGroup model_id_group = 1; + if (cached_has_bits & 0x00000001u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(1, _Internal::model_id_group(this), + _Internal::model_id_group(this).GetCachedSize(), target, stream); + } + + // optional .tflite.proto.BenchmarkEvent benchmark_event = 2; + if (cached_has_bits & 0x00000002u) { + target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite:: + InternalWriteMessage(2, _Internal::benchmark_event(this), + _Internal::benchmark_event(this).GetCachedSize(), target, stream); + } + + if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) { + target = ::_pbi::WireFormat::InternalSerializeUnknownFieldsToArray( + _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance), target, stream); + } + // @@protoc_insertion_point(serialize_to_array_end:tflite.proto.BenchmarkEventStorage) + return target; +} + +size_t BenchmarkEventStorage::ByteSizeLong() const { +// @@protoc_insertion_point(message_byte_size_start:tflite.proto.BenchmarkEventStorage) + size_t total_size = 0; + + uint32_t cached_has_bits = 0; + // Prevent compiler warnings about cached_has_bits being unused + (void) cached_has_bits; + + cached_has_bits = _has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + // optional .tflite.proto.ModelIdGroup model_id_group = 1; + if (cached_has_bits & 0x00000001u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *model_id_group_); + } + + // optional .tflite.proto.BenchmarkEvent benchmark_event = 2; + if (cached_has_bits & 0x00000002u) { + total_size += 1 + + ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize( + *benchmark_event_); + } + + } + return MaybeComputeUnknownFieldsSize(total_size, &_cached_size_); +} + +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData BenchmarkEventStorage::_class_data_ = { + ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSizeCheck, + BenchmarkEventStorage::MergeImpl +}; +const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*BenchmarkEventStorage::GetClassData() const { return &_class_data_; } + +void BenchmarkEventStorage::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, + const ::PROTOBUF_NAMESPACE_ID::Message& from) { + static_cast(to)->MergeFrom( + static_cast(from)); +} + + +void BenchmarkEventStorage::MergeFrom(const BenchmarkEventStorage& from) { +// @@protoc_insertion_point(class_specific_merge_from_start:tflite.proto.BenchmarkEventStorage) + GOOGLE_DCHECK_NE(&from, this); + uint32_t cached_has_bits = 0; + (void) cached_has_bits; + + cached_has_bits = from._has_bits_[0]; + if (cached_has_bits & 0x00000003u) { + if (cached_has_bits & 0x00000001u) { + _internal_mutable_model_id_group()->::tflite::proto::ModelIdGroup::MergeFrom(from._internal_model_id_group()); + } + if (cached_has_bits & 0x00000002u) { + _internal_mutable_benchmark_event()->::tflite::proto::BenchmarkEvent::MergeFrom(from._internal_benchmark_event()); + } + } + _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_); +} + +void BenchmarkEventStorage::CopyFrom(const BenchmarkEventStorage& from) { +// @@protoc_insertion_point(class_specific_copy_from_start:tflite.proto.BenchmarkEventStorage) + if (&from == this) return; + Clear(); + MergeFrom(from); +} + +bool BenchmarkEventStorage::IsInitialized() const { + return true; +} + +void BenchmarkEventStorage::InternalSwap(BenchmarkEventStorage* other) { + using std::swap; + _internal_metadata_.InternalSwap(&other->_internal_metadata_); + swap(_has_bits_[0], other->_has_bits_[0]); + ::PROTOBUF_NAMESPACE_ID::internal::memswap< + PROTOBUF_FIELD_OFFSET(BenchmarkEventStorage, benchmark_event_) + + sizeof(BenchmarkEventStorage::benchmark_event_) + - PROTOBUF_FIELD_OFFSET(BenchmarkEventStorage, model_id_group_)>( + reinterpret_cast(&model_id_group_), + reinterpret_cast(&other->model_id_group_)); +} + +::PROTOBUF_NAMESPACE_ID::Metadata BenchmarkEventStorage::GetMetadata() const { + return ::_pbi::AssignDescriptors( + &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_getter, &descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto_once, + file_level_metadata_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto[31]); +} + +// @@protoc_insertion_point(namespace_scope) +} // namespace proto +} // namespace tflite +PROTOBUF_NAMESPACE_OPEN +template<> PROTOBUF_NOINLINE ::tflite::proto::ComputeSettings* +Arena::CreateMaybeMessage< ::tflite::proto::ComputeSettings >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::ComputeSettings >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::NNAPISettings* +Arena::CreateMaybeMessage< ::tflite::proto::NNAPISettings >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::NNAPISettings >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::GPUSettings* +Arena::CreateMaybeMessage< ::tflite::proto::GPUSettings >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::GPUSettings >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::HexagonSettings* +Arena::CreateMaybeMessage< ::tflite::proto::HexagonSettings >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::HexagonSettings >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::XNNPackSettings* +Arena::CreateMaybeMessage< ::tflite::proto::XNNPackSettings >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::XNNPackSettings >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::CoreMLSettings* +Arena::CreateMaybeMessage< ::tflite::proto::CoreMLSettings >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::CoreMLSettings >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::StableDelegateLoaderSettings* +Arena::CreateMaybeMessage< ::tflite::proto::StableDelegateLoaderSettings >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::StableDelegateLoaderSettings >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::CompilationCachingSettings* +Arena::CreateMaybeMessage< ::tflite::proto::CompilationCachingSettings >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::CompilationCachingSettings >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::EdgeTpuDeviceSpec* +Arena::CreateMaybeMessage< ::tflite::proto::EdgeTpuDeviceSpec >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::EdgeTpuDeviceSpec >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::EdgeTpuInactivePowerConfig* +Arena::CreateMaybeMessage< ::tflite::proto::EdgeTpuInactivePowerConfig >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::EdgeTpuInactivePowerConfig >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::EdgeTpuSettings* +Arena::CreateMaybeMessage< ::tflite::proto::EdgeTpuSettings >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::EdgeTpuSettings >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::GoogleEdgeTpuSettings* +Arena::CreateMaybeMessage< ::tflite::proto::GoogleEdgeTpuSettings >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::GoogleEdgeTpuSettings >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::CoralSettings* +Arena::CreateMaybeMessage< ::tflite::proto::CoralSettings >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::CoralSettings >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::CPUSettings* +Arena::CreateMaybeMessage< ::tflite::proto::CPUSettings >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::CPUSettings >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::ArmNNSettings* +Arena::CreateMaybeMessage< ::tflite::proto::ArmNNSettings >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::ArmNNSettings >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::TFLiteSettings* +Arena::CreateMaybeMessage< ::tflite::proto::TFLiteSettings >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::TFLiteSettings >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::FallbackSettings* +Arena::CreateMaybeMessage< ::tflite::proto::FallbackSettings >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::FallbackSettings >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::BenchmarkMetric* +Arena::CreateMaybeMessage< ::tflite::proto::BenchmarkMetric >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::BenchmarkMetric >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::BenchmarkResult_InferenceOutput* +Arena::CreateMaybeMessage< ::tflite::proto::BenchmarkResult_InferenceOutput >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::BenchmarkResult_InferenceOutput >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::BenchmarkResult* +Arena::CreateMaybeMessage< ::tflite::proto::BenchmarkResult >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::BenchmarkResult >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::ErrorCode* +Arena::CreateMaybeMessage< ::tflite::proto::ErrorCode >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::ErrorCode >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::BenchmarkError* +Arena::CreateMaybeMessage< ::tflite::proto::BenchmarkError >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::BenchmarkError >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::BenchmarkEvent* +Arena::CreateMaybeMessage< ::tflite::proto::BenchmarkEvent >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::BenchmarkEvent >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::BestAccelerationDecision* +Arena::CreateMaybeMessage< ::tflite::proto::BestAccelerationDecision >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::BestAccelerationDecision >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::BenchmarkInitializationFailure* +Arena::CreateMaybeMessage< ::tflite::proto::BenchmarkInitializationFailure >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::BenchmarkInitializationFailure >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::MiniBenchmarkEvent* +Arena::CreateMaybeMessage< ::tflite::proto::MiniBenchmarkEvent >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::MiniBenchmarkEvent >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::ModelFile* +Arena::CreateMaybeMessage< ::tflite::proto::ModelFile >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::ModelFile >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::ModelIdGroup* +Arena::CreateMaybeMessage< ::tflite::proto::ModelIdGroup >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::ModelIdGroup >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::BenchmarkStoragePaths* +Arena::CreateMaybeMessage< ::tflite::proto::BenchmarkStoragePaths >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::BenchmarkStoragePaths >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::ValidationSettings* +Arena::CreateMaybeMessage< ::tflite::proto::ValidationSettings >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::ValidationSettings >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::MinibenchmarkSettings* +Arena::CreateMaybeMessage< ::tflite::proto::MinibenchmarkSettings >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::MinibenchmarkSettings >(arena); +} +template<> PROTOBUF_NOINLINE ::tflite::proto::BenchmarkEventStorage* +Arena::CreateMaybeMessage< ::tflite::proto::BenchmarkEventStorage >(Arena* arena) { + return Arena::CreateMessageInternal< ::tflite::proto::BenchmarkEventStorage >(arena); +} +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) +#include diff --git a/generated/tensorflow/lite/acceleration/configuration/configuration.pb.h b/generated/tensorflow/lite/acceleration/configuration/configuration.pb.h new file mode 100644 index 0000000..1c8297f --- /dev/null +++ b/generated/tensorflow/lite/acceleration/configuration/configuration.pb.h @@ -0,0 +1,15094 @@ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: tensorflow/lite/acceleration/configuration/configuration.proto + +#ifndef GOOGLE_PROTOBUF_INCLUDED_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto +#define GOOGLE_PROTOBUF_INCLUDED_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto + +#include +#include + +#include +#if PROTOBUF_VERSION < 3020000 +#error This file was generated by a newer version of protoc which is +#error incompatible with your Protocol Buffer headers. Please update +#error your headers. +#endif +#if 3020003 < PROTOBUF_MIN_PROTOC_VERSION +#error This file was generated by an older version of protoc which is +#error incompatible with your Protocol Buffer headers. Please +#error regenerate this file with a newer version of protoc. +#endif + +#include +#include +#include +#include +#include +#include +#include +#include +#include // IWYU pragma: export +#include // IWYU pragma: export +#include +#include +// @@protoc_insertion_point(includes) +#include +#define PROTOBUF_INTERNAL_EXPORT_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto +PROTOBUF_NAMESPACE_OPEN +namespace internal { +class AnyMetadata; +} // namespace internal +PROTOBUF_NAMESPACE_CLOSE + +// Internal implementation detail -- do not use these members. +struct TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto { + static const uint32_t offsets[]; +}; +extern const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +namespace tflite { +namespace proto { +class ArmNNSettings; +struct ArmNNSettingsDefaultTypeInternal; +extern ArmNNSettingsDefaultTypeInternal _ArmNNSettings_default_instance_; +class BenchmarkError; +struct BenchmarkErrorDefaultTypeInternal; +extern BenchmarkErrorDefaultTypeInternal _BenchmarkError_default_instance_; +class BenchmarkEvent; +struct BenchmarkEventDefaultTypeInternal; +extern BenchmarkEventDefaultTypeInternal _BenchmarkEvent_default_instance_; +class BenchmarkEventStorage; +struct BenchmarkEventStorageDefaultTypeInternal; +extern BenchmarkEventStorageDefaultTypeInternal _BenchmarkEventStorage_default_instance_; +class BenchmarkInitializationFailure; +struct BenchmarkInitializationFailureDefaultTypeInternal; +extern BenchmarkInitializationFailureDefaultTypeInternal _BenchmarkInitializationFailure_default_instance_; +class BenchmarkMetric; +struct BenchmarkMetricDefaultTypeInternal; +extern BenchmarkMetricDefaultTypeInternal _BenchmarkMetric_default_instance_; +class BenchmarkResult; +struct BenchmarkResultDefaultTypeInternal; +extern BenchmarkResultDefaultTypeInternal _BenchmarkResult_default_instance_; +class BenchmarkResult_InferenceOutput; +struct BenchmarkResult_InferenceOutputDefaultTypeInternal; +extern BenchmarkResult_InferenceOutputDefaultTypeInternal _BenchmarkResult_InferenceOutput_default_instance_; +class BenchmarkStoragePaths; +struct BenchmarkStoragePathsDefaultTypeInternal; +extern BenchmarkStoragePathsDefaultTypeInternal _BenchmarkStoragePaths_default_instance_; +class BestAccelerationDecision; +struct BestAccelerationDecisionDefaultTypeInternal; +extern BestAccelerationDecisionDefaultTypeInternal _BestAccelerationDecision_default_instance_; +class CPUSettings; +struct CPUSettingsDefaultTypeInternal; +extern CPUSettingsDefaultTypeInternal _CPUSettings_default_instance_; +class CompilationCachingSettings; +struct CompilationCachingSettingsDefaultTypeInternal; +extern CompilationCachingSettingsDefaultTypeInternal _CompilationCachingSettings_default_instance_; +class ComputeSettings; +struct ComputeSettingsDefaultTypeInternal; +extern ComputeSettingsDefaultTypeInternal _ComputeSettings_default_instance_; +class CoralSettings; +struct CoralSettingsDefaultTypeInternal; +extern CoralSettingsDefaultTypeInternal _CoralSettings_default_instance_; +class CoreMLSettings; +struct CoreMLSettingsDefaultTypeInternal; +extern CoreMLSettingsDefaultTypeInternal _CoreMLSettings_default_instance_; +class EdgeTpuDeviceSpec; +struct EdgeTpuDeviceSpecDefaultTypeInternal; +extern EdgeTpuDeviceSpecDefaultTypeInternal _EdgeTpuDeviceSpec_default_instance_; +class EdgeTpuInactivePowerConfig; +struct EdgeTpuInactivePowerConfigDefaultTypeInternal; +extern EdgeTpuInactivePowerConfigDefaultTypeInternal _EdgeTpuInactivePowerConfig_default_instance_; +class EdgeTpuSettings; +struct EdgeTpuSettingsDefaultTypeInternal; +extern EdgeTpuSettingsDefaultTypeInternal _EdgeTpuSettings_default_instance_; +class ErrorCode; +struct ErrorCodeDefaultTypeInternal; +extern ErrorCodeDefaultTypeInternal _ErrorCode_default_instance_; +class FallbackSettings; +struct FallbackSettingsDefaultTypeInternal; +extern FallbackSettingsDefaultTypeInternal _FallbackSettings_default_instance_; +class GPUSettings; +struct GPUSettingsDefaultTypeInternal; +extern GPUSettingsDefaultTypeInternal _GPUSettings_default_instance_; +class GoogleEdgeTpuSettings; +struct GoogleEdgeTpuSettingsDefaultTypeInternal; +extern GoogleEdgeTpuSettingsDefaultTypeInternal _GoogleEdgeTpuSettings_default_instance_; +class HexagonSettings; +struct HexagonSettingsDefaultTypeInternal; +extern HexagonSettingsDefaultTypeInternal _HexagonSettings_default_instance_; +class MiniBenchmarkEvent; +struct MiniBenchmarkEventDefaultTypeInternal; +extern MiniBenchmarkEventDefaultTypeInternal _MiniBenchmarkEvent_default_instance_; +class MinibenchmarkSettings; +struct MinibenchmarkSettingsDefaultTypeInternal; +extern MinibenchmarkSettingsDefaultTypeInternal _MinibenchmarkSettings_default_instance_; +class ModelFile; +struct ModelFileDefaultTypeInternal; +extern ModelFileDefaultTypeInternal _ModelFile_default_instance_; +class ModelIdGroup; +struct ModelIdGroupDefaultTypeInternal; +extern ModelIdGroupDefaultTypeInternal _ModelIdGroup_default_instance_; +class NNAPISettings; +struct NNAPISettingsDefaultTypeInternal; +extern NNAPISettingsDefaultTypeInternal _NNAPISettings_default_instance_; +class StableDelegateLoaderSettings; +struct StableDelegateLoaderSettingsDefaultTypeInternal; +extern StableDelegateLoaderSettingsDefaultTypeInternal _StableDelegateLoaderSettings_default_instance_; +class TFLiteSettings; +struct TFLiteSettingsDefaultTypeInternal; +extern TFLiteSettingsDefaultTypeInternal _TFLiteSettings_default_instance_; +class ValidationSettings; +struct ValidationSettingsDefaultTypeInternal; +extern ValidationSettingsDefaultTypeInternal _ValidationSettings_default_instance_; +class XNNPackSettings; +struct XNNPackSettingsDefaultTypeInternal; +extern XNNPackSettingsDefaultTypeInternal _XNNPackSettings_default_instance_; +} // namespace proto +} // namespace tflite +PROTOBUF_NAMESPACE_OPEN +template<> ::tflite::proto::ArmNNSettings* Arena::CreateMaybeMessage<::tflite::proto::ArmNNSettings>(Arena*); +template<> ::tflite::proto::BenchmarkError* Arena::CreateMaybeMessage<::tflite::proto::BenchmarkError>(Arena*); +template<> ::tflite::proto::BenchmarkEvent* Arena::CreateMaybeMessage<::tflite::proto::BenchmarkEvent>(Arena*); +template<> ::tflite::proto::BenchmarkEventStorage* Arena::CreateMaybeMessage<::tflite::proto::BenchmarkEventStorage>(Arena*); +template<> ::tflite::proto::BenchmarkInitializationFailure* Arena::CreateMaybeMessage<::tflite::proto::BenchmarkInitializationFailure>(Arena*); +template<> ::tflite::proto::BenchmarkMetric* Arena::CreateMaybeMessage<::tflite::proto::BenchmarkMetric>(Arena*); +template<> ::tflite::proto::BenchmarkResult* Arena::CreateMaybeMessage<::tflite::proto::BenchmarkResult>(Arena*); +template<> ::tflite::proto::BenchmarkResult_InferenceOutput* Arena::CreateMaybeMessage<::tflite::proto::BenchmarkResult_InferenceOutput>(Arena*); +template<> ::tflite::proto::BenchmarkStoragePaths* Arena::CreateMaybeMessage<::tflite::proto::BenchmarkStoragePaths>(Arena*); +template<> ::tflite::proto::BestAccelerationDecision* Arena::CreateMaybeMessage<::tflite::proto::BestAccelerationDecision>(Arena*); +template<> ::tflite::proto::CPUSettings* Arena::CreateMaybeMessage<::tflite::proto::CPUSettings>(Arena*); +template<> ::tflite::proto::CompilationCachingSettings* Arena::CreateMaybeMessage<::tflite::proto::CompilationCachingSettings>(Arena*); +template<> ::tflite::proto::ComputeSettings* Arena::CreateMaybeMessage<::tflite::proto::ComputeSettings>(Arena*); +template<> ::tflite::proto::CoralSettings* Arena::CreateMaybeMessage<::tflite::proto::CoralSettings>(Arena*); +template<> ::tflite::proto::CoreMLSettings* Arena::CreateMaybeMessage<::tflite::proto::CoreMLSettings>(Arena*); +template<> ::tflite::proto::EdgeTpuDeviceSpec* Arena::CreateMaybeMessage<::tflite::proto::EdgeTpuDeviceSpec>(Arena*); +template<> ::tflite::proto::EdgeTpuInactivePowerConfig* Arena::CreateMaybeMessage<::tflite::proto::EdgeTpuInactivePowerConfig>(Arena*); +template<> ::tflite::proto::EdgeTpuSettings* Arena::CreateMaybeMessage<::tflite::proto::EdgeTpuSettings>(Arena*); +template<> ::tflite::proto::ErrorCode* Arena::CreateMaybeMessage<::tflite::proto::ErrorCode>(Arena*); +template<> ::tflite::proto::FallbackSettings* Arena::CreateMaybeMessage<::tflite::proto::FallbackSettings>(Arena*); +template<> ::tflite::proto::GPUSettings* Arena::CreateMaybeMessage<::tflite::proto::GPUSettings>(Arena*); +template<> ::tflite::proto::GoogleEdgeTpuSettings* Arena::CreateMaybeMessage<::tflite::proto::GoogleEdgeTpuSettings>(Arena*); +template<> ::tflite::proto::HexagonSettings* Arena::CreateMaybeMessage<::tflite::proto::HexagonSettings>(Arena*); +template<> ::tflite::proto::MiniBenchmarkEvent* Arena::CreateMaybeMessage<::tflite::proto::MiniBenchmarkEvent>(Arena*); +template<> ::tflite::proto::MinibenchmarkSettings* Arena::CreateMaybeMessage<::tflite::proto::MinibenchmarkSettings>(Arena*); +template<> ::tflite::proto::ModelFile* Arena::CreateMaybeMessage<::tflite::proto::ModelFile>(Arena*); +template<> ::tflite::proto::ModelIdGroup* Arena::CreateMaybeMessage<::tflite::proto::ModelIdGroup>(Arena*); +template<> ::tflite::proto::NNAPISettings* Arena::CreateMaybeMessage<::tflite::proto::NNAPISettings>(Arena*); +template<> ::tflite::proto::StableDelegateLoaderSettings* Arena::CreateMaybeMessage<::tflite::proto::StableDelegateLoaderSettings>(Arena*); +template<> ::tflite::proto::TFLiteSettings* Arena::CreateMaybeMessage<::tflite::proto::TFLiteSettings>(Arena*); +template<> ::tflite::proto::ValidationSettings* Arena::CreateMaybeMessage<::tflite::proto::ValidationSettings>(Arena*); +template<> ::tflite::proto::XNNPackSettings* Arena::CreateMaybeMessage<::tflite::proto::XNNPackSettings>(Arena*); +PROTOBUF_NAMESPACE_CLOSE +namespace tflite { +namespace proto { + +enum CoreMLSettings_EnabledDevices : int { + CoreMLSettings_EnabledDevices_DEVICES_ALL = 0, + CoreMLSettings_EnabledDevices_DEVICES_WITH_NEURAL_ENGINE = 1 +}; +bool CoreMLSettings_EnabledDevices_IsValid(int value); +constexpr CoreMLSettings_EnabledDevices CoreMLSettings_EnabledDevices_EnabledDevices_MIN = CoreMLSettings_EnabledDevices_DEVICES_ALL; +constexpr CoreMLSettings_EnabledDevices CoreMLSettings_EnabledDevices_EnabledDevices_MAX = CoreMLSettings_EnabledDevices_DEVICES_WITH_NEURAL_ENGINE; +constexpr int CoreMLSettings_EnabledDevices_EnabledDevices_ARRAYSIZE = CoreMLSettings_EnabledDevices_EnabledDevices_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* CoreMLSettings_EnabledDevices_descriptor(); +template +inline const std::string& CoreMLSettings_EnabledDevices_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function CoreMLSettings_EnabledDevices_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + CoreMLSettings_EnabledDevices_descriptor(), enum_t_value); +} +inline bool CoreMLSettings_EnabledDevices_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, CoreMLSettings_EnabledDevices* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + CoreMLSettings_EnabledDevices_descriptor(), name, value); +} +enum EdgeTpuDeviceSpec_PlatformType : int { + EdgeTpuDeviceSpec_PlatformType_MMIO = 0, + EdgeTpuDeviceSpec_PlatformType_REFERENCE = 1, + EdgeTpuDeviceSpec_PlatformType_SIMULATOR = 2, + EdgeTpuDeviceSpec_PlatformType_REMOTE_SIMULATOR = 3 +}; +bool EdgeTpuDeviceSpec_PlatformType_IsValid(int value); +constexpr EdgeTpuDeviceSpec_PlatformType EdgeTpuDeviceSpec_PlatformType_PlatformType_MIN = EdgeTpuDeviceSpec_PlatformType_MMIO; +constexpr EdgeTpuDeviceSpec_PlatformType EdgeTpuDeviceSpec_PlatformType_PlatformType_MAX = EdgeTpuDeviceSpec_PlatformType_REMOTE_SIMULATOR; +constexpr int EdgeTpuDeviceSpec_PlatformType_PlatformType_ARRAYSIZE = EdgeTpuDeviceSpec_PlatformType_PlatformType_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EdgeTpuDeviceSpec_PlatformType_descriptor(); +template +inline const std::string& EdgeTpuDeviceSpec_PlatformType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EdgeTpuDeviceSpec_PlatformType_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + EdgeTpuDeviceSpec_PlatformType_descriptor(), enum_t_value); +} +inline bool EdgeTpuDeviceSpec_PlatformType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EdgeTpuDeviceSpec_PlatformType* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + EdgeTpuDeviceSpec_PlatformType_descriptor(), name, value); +} +enum EdgeTpuSettings_FloatTruncationType : int { + EdgeTpuSettings_FloatTruncationType_UNSPECIFIED = 0, + EdgeTpuSettings_FloatTruncationType_NO_TRUNCATION = 1, + EdgeTpuSettings_FloatTruncationType_BFLOAT16 = 2, + EdgeTpuSettings_FloatTruncationType_HALF = 3 +}; +bool EdgeTpuSettings_FloatTruncationType_IsValid(int value); +constexpr EdgeTpuSettings_FloatTruncationType EdgeTpuSettings_FloatTruncationType_FloatTruncationType_MIN = EdgeTpuSettings_FloatTruncationType_UNSPECIFIED; +constexpr EdgeTpuSettings_FloatTruncationType EdgeTpuSettings_FloatTruncationType_FloatTruncationType_MAX = EdgeTpuSettings_FloatTruncationType_HALF; +constexpr int EdgeTpuSettings_FloatTruncationType_FloatTruncationType_ARRAYSIZE = EdgeTpuSettings_FloatTruncationType_FloatTruncationType_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EdgeTpuSettings_FloatTruncationType_descriptor(); +template +inline const std::string& EdgeTpuSettings_FloatTruncationType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EdgeTpuSettings_FloatTruncationType_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + EdgeTpuSettings_FloatTruncationType_descriptor(), enum_t_value); +} +inline bool EdgeTpuSettings_FloatTruncationType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EdgeTpuSettings_FloatTruncationType* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + EdgeTpuSettings_FloatTruncationType_descriptor(), name, value); +} +enum EdgeTpuSettings_QosClass : int { + EdgeTpuSettings_QosClass_QOS_UNDEFINED = 0, + EdgeTpuSettings_QosClass_BEST_EFFORT = 1, + EdgeTpuSettings_QosClass_REALTIME = 2 +}; +bool EdgeTpuSettings_QosClass_IsValid(int value); +constexpr EdgeTpuSettings_QosClass EdgeTpuSettings_QosClass_QosClass_MIN = EdgeTpuSettings_QosClass_QOS_UNDEFINED; +constexpr EdgeTpuSettings_QosClass EdgeTpuSettings_QosClass_QosClass_MAX = EdgeTpuSettings_QosClass_REALTIME; +constexpr int EdgeTpuSettings_QosClass_QosClass_ARRAYSIZE = EdgeTpuSettings_QosClass_QosClass_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EdgeTpuSettings_QosClass_descriptor(); +template +inline const std::string& EdgeTpuSettings_QosClass_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EdgeTpuSettings_QosClass_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + EdgeTpuSettings_QosClass_descriptor(), enum_t_value); +} +inline bool EdgeTpuSettings_QosClass_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EdgeTpuSettings_QosClass* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + EdgeTpuSettings_QosClass_descriptor(), name, value); +} +enum GoogleEdgeTpuSettings_Priority : int { + GoogleEdgeTpuSettings_Priority_PRIORITY_UNDEFINED = 0, + GoogleEdgeTpuSettings_Priority_PRIORITY_LOW = 1, + GoogleEdgeTpuSettings_Priority_PRIORITY_MEDIUM = 2, + GoogleEdgeTpuSettings_Priority_PRIORITY_HIGH = 3 +}; +bool GoogleEdgeTpuSettings_Priority_IsValid(int value); +constexpr GoogleEdgeTpuSettings_Priority GoogleEdgeTpuSettings_Priority_Priority_MIN = GoogleEdgeTpuSettings_Priority_PRIORITY_UNDEFINED; +constexpr GoogleEdgeTpuSettings_Priority GoogleEdgeTpuSettings_Priority_Priority_MAX = GoogleEdgeTpuSettings_Priority_PRIORITY_HIGH; +constexpr int GoogleEdgeTpuSettings_Priority_Priority_ARRAYSIZE = GoogleEdgeTpuSettings_Priority_Priority_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* GoogleEdgeTpuSettings_Priority_descriptor(); +template +inline const std::string& GoogleEdgeTpuSettings_Priority_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function GoogleEdgeTpuSettings_Priority_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + GoogleEdgeTpuSettings_Priority_descriptor(), enum_t_value); +} +inline bool GoogleEdgeTpuSettings_Priority_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, GoogleEdgeTpuSettings_Priority* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + GoogleEdgeTpuSettings_Priority_descriptor(), name, value); +} +enum GoogleEdgeTpuSettings_TriState : int { + GoogleEdgeTpuSettings_TriState_TRISTATE_UNDEFINED = 0, + GoogleEdgeTpuSettings_TriState_TRISTATE_FALSE = 1, + GoogleEdgeTpuSettings_TriState_TRISTATE_TRUE = 2 +}; +bool GoogleEdgeTpuSettings_TriState_IsValid(int value); +constexpr GoogleEdgeTpuSettings_TriState GoogleEdgeTpuSettings_TriState_TriState_MIN = GoogleEdgeTpuSettings_TriState_TRISTATE_UNDEFINED; +constexpr GoogleEdgeTpuSettings_TriState GoogleEdgeTpuSettings_TriState_TriState_MAX = GoogleEdgeTpuSettings_TriState_TRISTATE_TRUE; +constexpr int GoogleEdgeTpuSettings_TriState_TriState_ARRAYSIZE = GoogleEdgeTpuSettings_TriState_TriState_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* GoogleEdgeTpuSettings_TriState_descriptor(); +template +inline const std::string& GoogleEdgeTpuSettings_TriState_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function GoogleEdgeTpuSettings_TriState_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + GoogleEdgeTpuSettings_TriState_descriptor(), enum_t_value); +} +inline bool GoogleEdgeTpuSettings_TriState_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, GoogleEdgeTpuSettings_TriState* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + GoogleEdgeTpuSettings_TriState_descriptor(), name, value); +} +enum CoralSettings_Performance : int { + CoralSettings_Performance_UNDEFINED = 0, + CoralSettings_Performance_MAXIMUM = 1, + CoralSettings_Performance_HIGH = 2, + CoralSettings_Performance_MEDIUM = 3, + CoralSettings_Performance_LOW = 4 +}; +bool CoralSettings_Performance_IsValid(int value); +constexpr CoralSettings_Performance CoralSettings_Performance_Performance_MIN = CoralSettings_Performance_UNDEFINED; +constexpr CoralSettings_Performance CoralSettings_Performance_Performance_MAX = CoralSettings_Performance_LOW; +constexpr int CoralSettings_Performance_Performance_ARRAYSIZE = CoralSettings_Performance_Performance_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* CoralSettings_Performance_descriptor(); +template +inline const std::string& CoralSettings_Performance_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function CoralSettings_Performance_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + CoralSettings_Performance_descriptor(), enum_t_value); +} +inline bool CoralSettings_Performance_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, CoralSettings_Performance* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + CoralSettings_Performance_descriptor(), name, value); +} +enum ExecutionPreference : int { + ANY = 0, + LOW_LATENCY = 1, + LOW_POWER = 2, + FORCE_CPU = 3 +}; +bool ExecutionPreference_IsValid(int value); +constexpr ExecutionPreference ExecutionPreference_MIN = ANY; +constexpr ExecutionPreference ExecutionPreference_MAX = FORCE_CPU; +constexpr int ExecutionPreference_ARRAYSIZE = ExecutionPreference_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* ExecutionPreference_descriptor(); +template +inline const std::string& ExecutionPreference_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function ExecutionPreference_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + ExecutionPreference_descriptor(), enum_t_value); +} +inline bool ExecutionPreference_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, ExecutionPreference* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + ExecutionPreference_descriptor(), name, value); +} +enum Delegate : int { + NONE = 0, + NNAPI = 1, + GPU = 2, + HEXAGON = 3, + XNNPACK = 4, + EDGETPU = 5, + EDGETPU_CORAL = 6, + CORE_ML = 7, + ARMNN = 8 +}; +bool Delegate_IsValid(int value); +constexpr Delegate Delegate_MIN = NONE; +constexpr Delegate Delegate_MAX = ARMNN; +constexpr int Delegate_ARRAYSIZE = Delegate_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* Delegate_descriptor(); +template +inline const std::string& Delegate_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Delegate_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + Delegate_descriptor(), enum_t_value); +} +inline bool Delegate_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, Delegate* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + Delegate_descriptor(), name, value); +} +enum NNAPIExecutionPreference : int { + UNDEFINED = 0, + NNAPI_LOW_POWER = 1, + NNAPI_FAST_SINGLE_ANSWER = 2, + NNAPI_SUSTAINED_SPEED = 3 +}; +bool NNAPIExecutionPreference_IsValid(int value); +constexpr NNAPIExecutionPreference NNAPIExecutionPreference_MIN = UNDEFINED; +constexpr NNAPIExecutionPreference NNAPIExecutionPreference_MAX = NNAPI_SUSTAINED_SPEED; +constexpr int NNAPIExecutionPreference_ARRAYSIZE = NNAPIExecutionPreference_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* NNAPIExecutionPreference_descriptor(); +template +inline const std::string& NNAPIExecutionPreference_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function NNAPIExecutionPreference_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + NNAPIExecutionPreference_descriptor(), enum_t_value); +} +inline bool NNAPIExecutionPreference_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, NNAPIExecutionPreference* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + NNAPIExecutionPreference_descriptor(), name, value); +} +enum NNAPIExecutionPriority : int { + NNAPI_PRIORITY_UNDEFINED = 0, + NNAPI_PRIORITY_LOW = 1, + NNAPI_PRIORITY_MEDIUM = 2, + NNAPI_PRIORITY_HIGH = 3 +}; +bool NNAPIExecutionPriority_IsValid(int value); +constexpr NNAPIExecutionPriority NNAPIExecutionPriority_MIN = NNAPI_PRIORITY_UNDEFINED; +constexpr NNAPIExecutionPriority NNAPIExecutionPriority_MAX = NNAPI_PRIORITY_HIGH; +constexpr int NNAPIExecutionPriority_ARRAYSIZE = NNAPIExecutionPriority_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* NNAPIExecutionPriority_descriptor(); +template +inline const std::string& NNAPIExecutionPriority_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function NNAPIExecutionPriority_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + NNAPIExecutionPriority_descriptor(), enum_t_value); +} +inline bool NNAPIExecutionPriority_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, NNAPIExecutionPriority* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + NNAPIExecutionPriority_descriptor(), name, value); +} +enum GPUBackend : int { + UNSET = 0, + OPENCL = 1, + OPENGL = 2 +}; +bool GPUBackend_IsValid(int value); +constexpr GPUBackend GPUBackend_MIN = UNSET; +constexpr GPUBackend GPUBackend_MAX = OPENGL; +constexpr int GPUBackend_ARRAYSIZE = GPUBackend_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* GPUBackend_descriptor(); +template +inline const std::string& GPUBackend_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function GPUBackend_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + GPUBackend_descriptor(), enum_t_value); +} +inline bool GPUBackend_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, GPUBackend* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + GPUBackend_descriptor(), name, value); +} +enum GPUInferencePriority : int { + GPU_PRIORITY_AUTO = 0, + GPU_PRIORITY_MAX_PRECISION = 1, + GPU_PRIORITY_MIN_LATENCY = 2, + GPU_PRIORITY_MIN_MEMORY_USAGE = 3 +}; +bool GPUInferencePriority_IsValid(int value); +constexpr GPUInferencePriority GPUInferencePriority_MIN = GPU_PRIORITY_AUTO; +constexpr GPUInferencePriority GPUInferencePriority_MAX = GPU_PRIORITY_MIN_MEMORY_USAGE; +constexpr int GPUInferencePriority_ARRAYSIZE = GPUInferencePriority_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* GPUInferencePriority_descriptor(); +template +inline const std::string& GPUInferencePriority_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function GPUInferencePriority_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + GPUInferencePriority_descriptor(), enum_t_value); +} +inline bool GPUInferencePriority_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, GPUInferencePriority* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + GPUInferencePriority_descriptor(), name, value); +} +enum GPUInferenceUsage : int { + GPU_INFERENCE_PREFERENCE_FAST_SINGLE_ANSWER = 0, + GPU_INFERENCE_PREFERENCE_SUSTAINED_SPEED = 1 +}; +bool GPUInferenceUsage_IsValid(int value); +constexpr GPUInferenceUsage GPUInferenceUsage_MIN = GPU_INFERENCE_PREFERENCE_FAST_SINGLE_ANSWER; +constexpr GPUInferenceUsage GPUInferenceUsage_MAX = GPU_INFERENCE_PREFERENCE_SUSTAINED_SPEED; +constexpr int GPUInferenceUsage_ARRAYSIZE = GPUInferenceUsage_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* GPUInferenceUsage_descriptor(); +template +inline const std::string& GPUInferenceUsage_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function GPUInferenceUsage_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + GPUInferenceUsage_descriptor(), enum_t_value); +} +inline bool GPUInferenceUsage_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, GPUInferenceUsage* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + GPUInferenceUsage_descriptor(), name, value); +} +enum XNNPackFlags : int { + TFLITE_XNNPACK_DELEGATE_NO_FLAGS = 0, + TFLITE_XNNPACK_DELEGATE_FLAG_QS8 = 1, + TFLITE_XNNPACK_DELEGATE_FLAG_QU8 = 2, + TFLITE_XNNPACK_DELEGATE_FLAG_QS8_QU8 = 3, + TFLITE_XNNPACK_DELEGATE_FLAG_FORCE_FP16 = 4 +}; +bool XNNPackFlags_IsValid(int value); +constexpr XNNPackFlags XNNPackFlags_MIN = TFLITE_XNNPACK_DELEGATE_NO_FLAGS; +constexpr XNNPackFlags XNNPackFlags_MAX = TFLITE_XNNPACK_DELEGATE_FLAG_FORCE_FP16; +constexpr int XNNPackFlags_ARRAYSIZE = XNNPackFlags_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* XNNPackFlags_descriptor(); +template +inline const std::string& XNNPackFlags_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function XNNPackFlags_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + XNNPackFlags_descriptor(), enum_t_value); +} +inline bool XNNPackFlags_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, XNNPackFlags* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + XNNPackFlags_descriptor(), name, value); +} +enum EdgeTpuPowerState : int { + UNDEFINED_POWERSTATE = 0, + TPU_CORE_OFF = 1, + READY = 2, + ACTIVE_MIN_POWER = 3, + ACTIVE_VERY_LOW_POWER = 4, + ACTIVE_LOW_POWER = 5, + ACTIVE = 6, + OVER_DRIVE = 7 +}; +bool EdgeTpuPowerState_IsValid(int value); +constexpr EdgeTpuPowerState EdgeTpuPowerState_MIN = UNDEFINED_POWERSTATE; +constexpr EdgeTpuPowerState EdgeTpuPowerState_MAX = OVER_DRIVE; +constexpr int EdgeTpuPowerState_ARRAYSIZE = EdgeTpuPowerState_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* EdgeTpuPowerState_descriptor(); +template +inline const std::string& EdgeTpuPowerState_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EdgeTpuPowerState_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + EdgeTpuPowerState_descriptor(), enum_t_value); +} +inline bool EdgeTpuPowerState_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, EdgeTpuPowerState* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + EdgeTpuPowerState_descriptor(), name, value); +} +enum BenchmarkEventType : int { + UNDEFINED_BENCHMARK_EVENT_TYPE = 0, + START = 1, + END = 2, + ERROR = 3, + LOGGED = 4, + RECOVERED_ERROR = 5 +}; +bool BenchmarkEventType_IsValid(int value); +constexpr BenchmarkEventType BenchmarkEventType_MIN = UNDEFINED_BENCHMARK_EVENT_TYPE; +constexpr BenchmarkEventType BenchmarkEventType_MAX = RECOVERED_ERROR; +constexpr int BenchmarkEventType_ARRAYSIZE = BenchmarkEventType_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* BenchmarkEventType_descriptor(); +template +inline const std::string& BenchmarkEventType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function BenchmarkEventType_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + BenchmarkEventType_descriptor(), enum_t_value); +} +inline bool BenchmarkEventType_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, BenchmarkEventType* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + BenchmarkEventType_descriptor(), name, value); +} +enum BenchmarkStage : int { + UNKNOWN = 0, + INITIALIZATION = 1, + INFERENCE = 2 +}; +bool BenchmarkStage_IsValid(int value); +constexpr BenchmarkStage BenchmarkStage_MIN = UNKNOWN; +constexpr BenchmarkStage BenchmarkStage_MAX = INFERENCE; +constexpr int BenchmarkStage_ARRAYSIZE = BenchmarkStage_MAX + 1; + +const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* BenchmarkStage_descriptor(); +template +inline const std::string& BenchmarkStage_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function BenchmarkStage_Name."); + return ::PROTOBUF_NAMESPACE_ID::internal::NameOfEnum( + BenchmarkStage_descriptor(), enum_t_value); +} +inline bool BenchmarkStage_Parse( + ::PROTOBUF_NAMESPACE_ID::ConstStringParam name, BenchmarkStage* value) { + return ::PROTOBUF_NAMESPACE_ID::internal::ParseNamedEnum( + BenchmarkStage_descriptor(), name, value); +} +// =================================================================== + +class ComputeSettings final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.ComputeSettings) */ { + public: + inline ComputeSettings() : ComputeSettings(nullptr) {} + ~ComputeSettings() override; + explicit PROTOBUF_CONSTEXPR ComputeSettings(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ComputeSettings(const ComputeSettings& from); + ComputeSettings(ComputeSettings&& from) noexcept + : ComputeSettings() { + *this = ::std::move(from); + } + + inline ComputeSettings& operator=(const ComputeSettings& from) { + CopyFrom(from); + return *this; + } + inline ComputeSettings& operator=(ComputeSettings&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ComputeSettings& default_instance() { + return *internal_default_instance(); + } + static inline const ComputeSettings* internal_default_instance() { + return reinterpret_cast( + &_ComputeSettings_default_instance_); + } + static constexpr int kIndexInFileMessages = + 0; + + friend void swap(ComputeSettings& a, ComputeSettings& b) { + a.Swap(&b); + } + inline void Swap(ComputeSettings* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ComputeSettings* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ComputeSettings* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ComputeSettings& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const ComputeSettings& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ComputeSettings* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.ComputeSettings"; + } + protected: + explicit ComputeSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kModelNamespaceForStatisticsFieldNumber = 3, + kModelIdentifierForStatisticsFieldNumber = 4, + kTfliteSettingsFieldNumber = 2, + kSettingsToTestLocallyFieldNumber = 5, + kPreferenceFieldNumber = 1, + }; + // optional string model_namespace_for_statistics = 3; + bool has_model_namespace_for_statistics() const; + private: + bool _internal_has_model_namespace_for_statistics() const; + public: + void clear_model_namespace_for_statistics(); + const std::string& model_namespace_for_statistics() const; + template + void set_model_namespace_for_statistics(ArgT0&& arg0, ArgT... args); + std::string* mutable_model_namespace_for_statistics(); + PROTOBUF_NODISCARD std::string* release_model_namespace_for_statistics(); + void set_allocated_model_namespace_for_statistics(std::string* model_namespace_for_statistics); + private: + const std::string& _internal_model_namespace_for_statistics() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_model_namespace_for_statistics(const std::string& value); + std::string* _internal_mutable_model_namespace_for_statistics(); + public: + + // optional string model_identifier_for_statistics = 4; + bool has_model_identifier_for_statistics() const; + private: + bool _internal_has_model_identifier_for_statistics() const; + public: + void clear_model_identifier_for_statistics(); + const std::string& model_identifier_for_statistics() const; + template + void set_model_identifier_for_statistics(ArgT0&& arg0, ArgT... args); + std::string* mutable_model_identifier_for_statistics(); + PROTOBUF_NODISCARD std::string* release_model_identifier_for_statistics(); + void set_allocated_model_identifier_for_statistics(std::string* model_identifier_for_statistics); + private: + const std::string& _internal_model_identifier_for_statistics() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_model_identifier_for_statistics(const std::string& value); + std::string* _internal_mutable_model_identifier_for_statistics(); + public: + + // optional .tflite.proto.TFLiteSettings tflite_settings = 2; + bool has_tflite_settings() const; + private: + bool _internal_has_tflite_settings() const; + public: + void clear_tflite_settings(); + const ::tflite::proto::TFLiteSettings& tflite_settings() const; + PROTOBUF_NODISCARD ::tflite::proto::TFLiteSettings* release_tflite_settings(); + ::tflite::proto::TFLiteSettings* mutable_tflite_settings(); + void set_allocated_tflite_settings(::tflite::proto::TFLiteSettings* tflite_settings); + private: + const ::tflite::proto::TFLiteSettings& _internal_tflite_settings() const; + ::tflite::proto::TFLiteSettings* _internal_mutable_tflite_settings(); + public: + void unsafe_arena_set_allocated_tflite_settings( + ::tflite::proto::TFLiteSettings* tflite_settings); + ::tflite::proto::TFLiteSettings* unsafe_arena_release_tflite_settings(); + + // optional .tflite.proto.MinibenchmarkSettings settings_to_test_locally = 5; + bool has_settings_to_test_locally() const; + private: + bool _internal_has_settings_to_test_locally() const; + public: + void clear_settings_to_test_locally(); + const ::tflite::proto::MinibenchmarkSettings& settings_to_test_locally() const; + PROTOBUF_NODISCARD ::tflite::proto::MinibenchmarkSettings* release_settings_to_test_locally(); + ::tflite::proto::MinibenchmarkSettings* mutable_settings_to_test_locally(); + void set_allocated_settings_to_test_locally(::tflite::proto::MinibenchmarkSettings* settings_to_test_locally); + private: + const ::tflite::proto::MinibenchmarkSettings& _internal_settings_to_test_locally() const; + ::tflite::proto::MinibenchmarkSettings* _internal_mutable_settings_to_test_locally(); + public: + void unsafe_arena_set_allocated_settings_to_test_locally( + ::tflite::proto::MinibenchmarkSettings* settings_to_test_locally); + ::tflite::proto::MinibenchmarkSettings* unsafe_arena_release_settings_to_test_locally(); + + // optional .tflite.proto.ExecutionPreference preference = 1; + bool has_preference() const; + private: + bool _internal_has_preference() const; + public: + void clear_preference(); + ::tflite::proto::ExecutionPreference preference() const; + void set_preference(::tflite::proto::ExecutionPreference value); + private: + ::tflite::proto::ExecutionPreference _internal_preference() const; + void _internal_set_preference(::tflite::proto::ExecutionPreference value); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.ComputeSettings) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr model_namespace_for_statistics_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr model_identifier_for_statistics_; + ::tflite::proto::TFLiteSettings* tflite_settings_; + ::tflite::proto::MinibenchmarkSettings* settings_to_test_locally_; + int preference_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class NNAPISettings final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.NNAPISettings) */ { + public: + inline NNAPISettings() : NNAPISettings(nullptr) {} + ~NNAPISettings() override; + explicit PROTOBUF_CONSTEXPR NNAPISettings(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + NNAPISettings(const NNAPISettings& from); + NNAPISettings(NNAPISettings&& from) noexcept + : NNAPISettings() { + *this = ::std::move(from); + } + + inline NNAPISettings& operator=(const NNAPISettings& from) { + CopyFrom(from); + return *this; + } + inline NNAPISettings& operator=(NNAPISettings&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const NNAPISettings& default_instance() { + return *internal_default_instance(); + } + static inline const NNAPISettings* internal_default_instance() { + return reinterpret_cast( + &_NNAPISettings_default_instance_); + } + static constexpr int kIndexInFileMessages = + 1; + + friend void swap(NNAPISettings& a, NNAPISettings& b) { + a.Swap(&b); + } + inline void Swap(NNAPISettings* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(NNAPISettings* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + NNAPISettings* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const NNAPISettings& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const NNAPISettings& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(NNAPISettings* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.NNAPISettings"; + } + protected: + explicit NNAPISettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kAcceleratorNameFieldNumber = 1, + kCacheDirectoryFieldNumber = 2, + kModelTokenFieldNumber = 3, + kFallbackSettingsFieldNumber = 6, + kExecutionPreferenceFieldNumber = 4, + kNoOfNnapiInstancesToCacheFieldNumber = 5, + kExecutionPriorityFieldNumber = 8, + kAllowNnapiCpuOnAndroid10PlusFieldNumber = 7, + kAllowDynamicDimensionsFieldNumber = 9, + kAllowFp16PrecisionForFp32FieldNumber = 10, + kUseBurstComputationFieldNumber = 11, + kSupportLibraryHandleFieldNumber = 12, + }; + // optional string accelerator_name = 1; + bool has_accelerator_name() const; + private: + bool _internal_has_accelerator_name() const; + public: + void clear_accelerator_name(); + const std::string& accelerator_name() const; + template + void set_accelerator_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_accelerator_name(); + PROTOBUF_NODISCARD std::string* release_accelerator_name(); + void set_allocated_accelerator_name(std::string* accelerator_name); + private: + const std::string& _internal_accelerator_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_accelerator_name(const std::string& value); + std::string* _internal_mutable_accelerator_name(); + public: + + // optional string cache_directory = 2 [deprecated = true]; + PROTOBUF_DEPRECATED bool has_cache_directory() const; + private: + bool _internal_has_cache_directory() const; + public: + PROTOBUF_DEPRECATED void clear_cache_directory(); + PROTOBUF_DEPRECATED const std::string& cache_directory() const; + template + PROTOBUF_DEPRECATED void set_cache_directory(ArgT0&& arg0, ArgT... args); + PROTOBUF_DEPRECATED std::string* mutable_cache_directory(); + PROTOBUF_NODISCARD PROTOBUF_DEPRECATED std::string* release_cache_directory(); + PROTOBUF_DEPRECATED void set_allocated_cache_directory(std::string* cache_directory); + private: + const std::string& _internal_cache_directory() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_cache_directory(const std::string& value); + std::string* _internal_mutable_cache_directory(); + public: + + // optional string model_token = 3 [deprecated = true]; + PROTOBUF_DEPRECATED bool has_model_token() const; + private: + bool _internal_has_model_token() const; + public: + PROTOBUF_DEPRECATED void clear_model_token(); + PROTOBUF_DEPRECATED const std::string& model_token() const; + template + PROTOBUF_DEPRECATED void set_model_token(ArgT0&& arg0, ArgT... args); + PROTOBUF_DEPRECATED std::string* mutable_model_token(); + PROTOBUF_NODISCARD PROTOBUF_DEPRECATED std::string* release_model_token(); + PROTOBUF_DEPRECATED void set_allocated_model_token(std::string* model_token); + private: + const std::string& _internal_model_token() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_model_token(const std::string& value); + std::string* _internal_mutable_model_token(); + public: + + // optional .tflite.proto.FallbackSettings fallback_settings = 6 [deprecated = true]; + PROTOBUF_DEPRECATED bool has_fallback_settings() const; + private: + bool _internal_has_fallback_settings() const; + public: + PROTOBUF_DEPRECATED void clear_fallback_settings(); + PROTOBUF_DEPRECATED const ::tflite::proto::FallbackSettings& fallback_settings() const; + PROTOBUF_NODISCARD PROTOBUF_DEPRECATED ::tflite::proto::FallbackSettings* release_fallback_settings(); + PROTOBUF_DEPRECATED ::tflite::proto::FallbackSettings* mutable_fallback_settings(); + PROTOBUF_DEPRECATED void set_allocated_fallback_settings(::tflite::proto::FallbackSettings* fallback_settings); + private: + const ::tflite::proto::FallbackSettings& _internal_fallback_settings() const; + ::tflite::proto::FallbackSettings* _internal_mutable_fallback_settings(); + public: + PROTOBUF_DEPRECATED void unsafe_arena_set_allocated_fallback_settings( + ::tflite::proto::FallbackSettings* fallback_settings); + PROTOBUF_DEPRECATED ::tflite::proto::FallbackSettings* unsafe_arena_release_fallback_settings(); + + // optional .tflite.proto.NNAPIExecutionPreference execution_preference = 4; + bool has_execution_preference() const; + private: + bool _internal_has_execution_preference() const; + public: + void clear_execution_preference(); + ::tflite::proto::NNAPIExecutionPreference execution_preference() const; + void set_execution_preference(::tflite::proto::NNAPIExecutionPreference value); + private: + ::tflite::proto::NNAPIExecutionPreference _internal_execution_preference() const; + void _internal_set_execution_preference(::tflite::proto::NNAPIExecutionPreference value); + public: + + // optional int32 no_of_nnapi_instances_to_cache = 5; + bool has_no_of_nnapi_instances_to_cache() const; + private: + bool _internal_has_no_of_nnapi_instances_to_cache() const; + public: + void clear_no_of_nnapi_instances_to_cache(); + int32_t no_of_nnapi_instances_to_cache() const; + void set_no_of_nnapi_instances_to_cache(int32_t value); + private: + int32_t _internal_no_of_nnapi_instances_to_cache() const; + void _internal_set_no_of_nnapi_instances_to_cache(int32_t value); + public: + + // optional .tflite.proto.NNAPIExecutionPriority execution_priority = 8; + bool has_execution_priority() const; + private: + bool _internal_has_execution_priority() const; + public: + void clear_execution_priority(); + ::tflite::proto::NNAPIExecutionPriority execution_priority() const; + void set_execution_priority(::tflite::proto::NNAPIExecutionPriority value); + private: + ::tflite::proto::NNAPIExecutionPriority _internal_execution_priority() const; + void _internal_set_execution_priority(::tflite::proto::NNAPIExecutionPriority value); + public: + + // optional bool allow_nnapi_cpu_on_android_10_plus = 7; + bool has_allow_nnapi_cpu_on_android_10_plus() const; + private: + bool _internal_has_allow_nnapi_cpu_on_android_10_plus() const; + public: + void clear_allow_nnapi_cpu_on_android_10_plus(); + bool allow_nnapi_cpu_on_android_10_plus() const; + void set_allow_nnapi_cpu_on_android_10_plus(bool value); + private: + bool _internal_allow_nnapi_cpu_on_android_10_plus() const; + void _internal_set_allow_nnapi_cpu_on_android_10_plus(bool value); + public: + + // optional bool allow_dynamic_dimensions = 9; + bool has_allow_dynamic_dimensions() const; + private: + bool _internal_has_allow_dynamic_dimensions() const; + public: + void clear_allow_dynamic_dimensions(); + bool allow_dynamic_dimensions() const; + void set_allow_dynamic_dimensions(bool value); + private: + bool _internal_allow_dynamic_dimensions() const; + void _internal_set_allow_dynamic_dimensions(bool value); + public: + + // optional bool allow_fp16_precision_for_fp32 = 10; + bool has_allow_fp16_precision_for_fp32() const; + private: + bool _internal_has_allow_fp16_precision_for_fp32() const; + public: + void clear_allow_fp16_precision_for_fp32(); + bool allow_fp16_precision_for_fp32() const; + void set_allow_fp16_precision_for_fp32(bool value); + private: + bool _internal_allow_fp16_precision_for_fp32() const; + void _internal_set_allow_fp16_precision_for_fp32(bool value); + public: + + // optional bool use_burst_computation = 11; + bool has_use_burst_computation() const; + private: + bool _internal_has_use_burst_computation() const; + public: + void clear_use_burst_computation(); + bool use_burst_computation() const; + void set_use_burst_computation(bool value); + private: + bool _internal_use_burst_computation() const; + void _internal_set_use_burst_computation(bool value); + public: + + // optional int64 support_library_handle = 12; + bool has_support_library_handle() const; + private: + bool _internal_has_support_library_handle() const; + public: + void clear_support_library_handle(); + int64_t support_library_handle() const; + void set_support_library_handle(int64_t value); + private: + int64_t _internal_support_library_handle() const; + void _internal_set_support_library_handle(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.NNAPISettings) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr accelerator_name_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr cache_directory_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr model_token_; + ::tflite::proto::FallbackSettings* fallback_settings_; + int execution_preference_; + int32_t no_of_nnapi_instances_to_cache_; + int execution_priority_; + bool allow_nnapi_cpu_on_android_10_plus_; + bool allow_dynamic_dimensions_; + bool allow_fp16_precision_for_fp32_; + bool use_burst_computation_; + int64_t support_library_handle_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class GPUSettings final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.GPUSettings) */ { + public: + inline GPUSettings() : GPUSettings(nullptr) {} + ~GPUSettings() override; + explicit PROTOBUF_CONSTEXPR GPUSettings(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GPUSettings(const GPUSettings& from); + GPUSettings(GPUSettings&& from) noexcept + : GPUSettings() { + *this = ::std::move(from); + } + + inline GPUSettings& operator=(const GPUSettings& from) { + CopyFrom(from); + return *this; + } + inline GPUSettings& operator=(GPUSettings&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GPUSettings& default_instance() { + return *internal_default_instance(); + } + static inline const GPUSettings* internal_default_instance() { + return reinterpret_cast( + &_GPUSettings_default_instance_); + } + static constexpr int kIndexInFileMessages = + 2; + + friend void swap(GPUSettings& a, GPUSettings& b) { + a.Swap(&b); + } + inline void Swap(GPUSettings* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GPUSettings* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GPUSettings* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GPUSettings& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const GPUSettings& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GPUSettings* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.GPUSettings"; + } + protected: + explicit GPUSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kCacheDirectoryFieldNumber = 8, + kModelTokenFieldNumber = 9, + kIsPrecisionLossAllowedFieldNumber = 1, + kForceBackendFieldNumber = 3, + kInferencePriority1FieldNumber = 4, + kInferencePriority2FieldNumber = 5, + kInferencePriority3FieldNumber = 6, + kInferencePreferenceFieldNumber = 7, + kEnableQuantizedInferenceFieldNumber = 2, + }; + // optional string cache_directory = 8; + bool has_cache_directory() const; + private: + bool _internal_has_cache_directory() const; + public: + void clear_cache_directory(); + const std::string& cache_directory() const; + template + void set_cache_directory(ArgT0&& arg0, ArgT... args); + std::string* mutable_cache_directory(); + PROTOBUF_NODISCARD std::string* release_cache_directory(); + void set_allocated_cache_directory(std::string* cache_directory); + private: + const std::string& _internal_cache_directory() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_cache_directory(const std::string& value); + std::string* _internal_mutable_cache_directory(); + public: + + // optional string model_token = 9; + bool has_model_token() const; + private: + bool _internal_has_model_token() const; + public: + void clear_model_token(); + const std::string& model_token() const; + template + void set_model_token(ArgT0&& arg0, ArgT... args); + std::string* mutable_model_token(); + PROTOBUF_NODISCARD std::string* release_model_token(); + void set_allocated_model_token(std::string* model_token); + private: + const std::string& _internal_model_token() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_model_token(const std::string& value); + std::string* _internal_mutable_model_token(); + public: + + // optional bool is_precision_loss_allowed = 1; + bool has_is_precision_loss_allowed() const; + private: + bool _internal_has_is_precision_loss_allowed() const; + public: + void clear_is_precision_loss_allowed(); + bool is_precision_loss_allowed() const; + void set_is_precision_loss_allowed(bool value); + private: + bool _internal_is_precision_loss_allowed() const; + void _internal_set_is_precision_loss_allowed(bool value); + public: + + // optional .tflite.proto.GPUBackend force_backend = 3; + bool has_force_backend() const; + private: + bool _internal_has_force_backend() const; + public: + void clear_force_backend(); + ::tflite::proto::GPUBackend force_backend() const; + void set_force_backend(::tflite::proto::GPUBackend value); + private: + ::tflite::proto::GPUBackend _internal_force_backend() const; + void _internal_set_force_backend(::tflite::proto::GPUBackend value); + public: + + // optional .tflite.proto.GPUInferencePriority inference_priority1 = 4 [default = GPU_PRIORITY_AUTO]; + bool has_inference_priority1() const; + private: + bool _internal_has_inference_priority1() const; + public: + void clear_inference_priority1(); + ::tflite::proto::GPUInferencePriority inference_priority1() const; + void set_inference_priority1(::tflite::proto::GPUInferencePriority value); + private: + ::tflite::proto::GPUInferencePriority _internal_inference_priority1() const; + void _internal_set_inference_priority1(::tflite::proto::GPUInferencePriority value); + public: + + // optional .tflite.proto.GPUInferencePriority inference_priority2 = 5 [default = GPU_PRIORITY_AUTO]; + bool has_inference_priority2() const; + private: + bool _internal_has_inference_priority2() const; + public: + void clear_inference_priority2(); + ::tflite::proto::GPUInferencePriority inference_priority2() const; + void set_inference_priority2(::tflite::proto::GPUInferencePriority value); + private: + ::tflite::proto::GPUInferencePriority _internal_inference_priority2() const; + void _internal_set_inference_priority2(::tflite::proto::GPUInferencePriority value); + public: + + // optional .tflite.proto.GPUInferencePriority inference_priority3 = 6 [default = GPU_PRIORITY_AUTO]; + bool has_inference_priority3() const; + private: + bool _internal_has_inference_priority3() const; + public: + void clear_inference_priority3(); + ::tflite::proto::GPUInferencePriority inference_priority3() const; + void set_inference_priority3(::tflite::proto::GPUInferencePriority value); + private: + ::tflite::proto::GPUInferencePriority _internal_inference_priority3() const; + void _internal_set_inference_priority3(::tflite::proto::GPUInferencePriority value); + public: + + // optional .tflite.proto.GPUInferenceUsage inference_preference = 7; + bool has_inference_preference() const; + private: + bool _internal_has_inference_preference() const; + public: + void clear_inference_preference(); + ::tflite::proto::GPUInferenceUsage inference_preference() const; + void set_inference_preference(::tflite::proto::GPUInferenceUsage value); + private: + ::tflite::proto::GPUInferenceUsage _internal_inference_preference() const; + void _internal_set_inference_preference(::tflite::proto::GPUInferenceUsage value); + public: + + // optional bool enable_quantized_inference = 2 [default = true]; + bool has_enable_quantized_inference() const; + private: + bool _internal_has_enable_quantized_inference() const; + public: + void clear_enable_quantized_inference(); + bool enable_quantized_inference() const; + void set_enable_quantized_inference(bool value); + private: + bool _internal_enable_quantized_inference() const; + void _internal_set_enable_quantized_inference(bool value); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.GPUSettings) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr cache_directory_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr model_token_; + bool is_precision_loss_allowed_; + int force_backend_; + int inference_priority1_; + int inference_priority2_; + int inference_priority3_; + int inference_preference_; + bool enable_quantized_inference_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class HexagonSettings final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.HexagonSettings) */ { + public: + inline HexagonSettings() : HexagonSettings(nullptr) {} + ~HexagonSettings() override; + explicit PROTOBUF_CONSTEXPR HexagonSettings(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + HexagonSettings(const HexagonSettings& from); + HexagonSettings(HexagonSettings&& from) noexcept + : HexagonSettings() { + *this = ::std::move(from); + } + + inline HexagonSettings& operator=(const HexagonSettings& from) { + CopyFrom(from); + return *this; + } + inline HexagonSettings& operator=(HexagonSettings&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const HexagonSettings& default_instance() { + return *internal_default_instance(); + } + static inline const HexagonSettings* internal_default_instance() { + return reinterpret_cast( + &_HexagonSettings_default_instance_); + } + static constexpr int kIndexInFileMessages = + 3; + + friend void swap(HexagonSettings& a, HexagonSettings& b) { + a.Swap(&b); + } + inline void Swap(HexagonSettings* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(HexagonSettings* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + HexagonSettings* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const HexagonSettings& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const HexagonSettings& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(HexagonSettings* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.HexagonSettings"; + } + protected: + explicit HexagonSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDebugLevelFieldNumber = 1, + kPowersaveLevelFieldNumber = 2, + kPrintGraphProfileFieldNumber = 3, + kPrintGraphDebugFieldNumber = 4, + }; + // optional int32 debug_level = 1; + bool has_debug_level() const; + private: + bool _internal_has_debug_level() const; + public: + void clear_debug_level(); + int32_t debug_level() const; + void set_debug_level(int32_t value); + private: + int32_t _internal_debug_level() const; + void _internal_set_debug_level(int32_t value); + public: + + // optional int32 powersave_level = 2; + bool has_powersave_level() const; + private: + bool _internal_has_powersave_level() const; + public: + void clear_powersave_level(); + int32_t powersave_level() const; + void set_powersave_level(int32_t value); + private: + int32_t _internal_powersave_level() const; + void _internal_set_powersave_level(int32_t value); + public: + + // optional bool print_graph_profile = 3; + bool has_print_graph_profile() const; + private: + bool _internal_has_print_graph_profile() const; + public: + void clear_print_graph_profile(); + bool print_graph_profile() const; + void set_print_graph_profile(bool value); + private: + bool _internal_print_graph_profile() const; + void _internal_set_print_graph_profile(bool value); + public: + + // optional bool print_graph_debug = 4; + bool has_print_graph_debug() const; + private: + bool _internal_has_print_graph_debug() const; + public: + void clear_print_graph_debug(); + bool print_graph_debug() const; + void set_print_graph_debug(bool value); + private: + bool _internal_print_graph_debug() const; + void _internal_set_print_graph_debug(bool value); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.HexagonSettings) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + int32_t debug_level_; + int32_t powersave_level_; + bool print_graph_profile_; + bool print_graph_debug_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class XNNPackSettings final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.XNNPackSettings) */ { + public: + inline XNNPackSettings() : XNNPackSettings(nullptr) {} + ~XNNPackSettings() override; + explicit PROTOBUF_CONSTEXPR XNNPackSettings(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + XNNPackSettings(const XNNPackSettings& from); + XNNPackSettings(XNNPackSettings&& from) noexcept + : XNNPackSettings() { + *this = ::std::move(from); + } + + inline XNNPackSettings& operator=(const XNNPackSettings& from) { + CopyFrom(from); + return *this; + } + inline XNNPackSettings& operator=(XNNPackSettings&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const XNNPackSettings& default_instance() { + return *internal_default_instance(); + } + static inline const XNNPackSettings* internal_default_instance() { + return reinterpret_cast( + &_XNNPackSettings_default_instance_); + } + static constexpr int kIndexInFileMessages = + 4; + + friend void swap(XNNPackSettings& a, XNNPackSettings& b) { + a.Swap(&b); + } + inline void Swap(XNNPackSettings* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(XNNPackSettings* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + XNNPackSettings* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const XNNPackSettings& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const XNNPackSettings& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(XNNPackSettings* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.XNNPackSettings"; + } + protected: + explicit XNNPackSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNumThreadsFieldNumber = 1, + kFlagsFieldNumber = 2, + }; + // optional int32 num_threads = 1; + bool has_num_threads() const; + private: + bool _internal_has_num_threads() const; + public: + void clear_num_threads(); + int32_t num_threads() const; + void set_num_threads(int32_t value); + private: + int32_t _internal_num_threads() const; + void _internal_set_num_threads(int32_t value); + public: + + // optional .tflite.proto.XNNPackFlags flags = 2 [default = TFLITE_XNNPACK_DELEGATE_NO_FLAGS]; + bool has_flags() const; + private: + bool _internal_has_flags() const; + public: + void clear_flags(); + ::tflite::proto::XNNPackFlags flags() const; + void set_flags(::tflite::proto::XNNPackFlags value); + private: + ::tflite::proto::XNNPackFlags _internal_flags() const; + void _internal_set_flags(::tflite::proto::XNNPackFlags value); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.XNNPackSettings) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + int32_t num_threads_; + int flags_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class CoreMLSettings final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.CoreMLSettings) */ { + public: + inline CoreMLSettings() : CoreMLSettings(nullptr) {} + ~CoreMLSettings() override; + explicit PROTOBUF_CONSTEXPR CoreMLSettings(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CoreMLSettings(const CoreMLSettings& from); + CoreMLSettings(CoreMLSettings&& from) noexcept + : CoreMLSettings() { + *this = ::std::move(from); + } + + inline CoreMLSettings& operator=(const CoreMLSettings& from) { + CopyFrom(from); + return *this; + } + inline CoreMLSettings& operator=(CoreMLSettings&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CoreMLSettings& default_instance() { + return *internal_default_instance(); + } + static inline const CoreMLSettings* internal_default_instance() { + return reinterpret_cast( + &_CoreMLSettings_default_instance_); + } + static constexpr int kIndexInFileMessages = + 5; + + friend void swap(CoreMLSettings& a, CoreMLSettings& b) { + a.Swap(&b); + } + inline void Swap(CoreMLSettings* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CoreMLSettings* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CoreMLSettings* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CoreMLSettings& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const CoreMLSettings& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CoreMLSettings* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.CoreMLSettings"; + } + protected: + explicit CoreMLSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef CoreMLSettings_EnabledDevices EnabledDevices; + static constexpr EnabledDevices DEVICES_ALL = + CoreMLSettings_EnabledDevices_DEVICES_ALL; + static constexpr EnabledDevices DEVICES_WITH_NEURAL_ENGINE = + CoreMLSettings_EnabledDevices_DEVICES_WITH_NEURAL_ENGINE; + static inline bool EnabledDevices_IsValid(int value) { + return CoreMLSettings_EnabledDevices_IsValid(value); + } + static constexpr EnabledDevices EnabledDevices_MIN = + CoreMLSettings_EnabledDevices_EnabledDevices_MIN; + static constexpr EnabledDevices EnabledDevices_MAX = + CoreMLSettings_EnabledDevices_EnabledDevices_MAX; + static constexpr int EnabledDevices_ARRAYSIZE = + CoreMLSettings_EnabledDevices_EnabledDevices_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + EnabledDevices_descriptor() { + return CoreMLSettings_EnabledDevices_descriptor(); + } + template + static inline const std::string& EnabledDevices_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function EnabledDevices_Name."); + return CoreMLSettings_EnabledDevices_Name(enum_t_value); + } + static inline bool EnabledDevices_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + EnabledDevices* value) { + return CoreMLSettings_EnabledDevices_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kEnabledDevicesFieldNumber = 1, + kCoremlVersionFieldNumber = 2, + kMaxDelegatedPartitionsFieldNumber = 3, + kMinNodesPerPartitionFieldNumber = 4, + }; + // optional .tflite.proto.CoreMLSettings.EnabledDevices enabled_devices = 1; + bool has_enabled_devices() const; + private: + bool _internal_has_enabled_devices() const; + public: + void clear_enabled_devices(); + ::tflite::proto::CoreMLSettings_EnabledDevices enabled_devices() const; + void set_enabled_devices(::tflite::proto::CoreMLSettings_EnabledDevices value); + private: + ::tflite::proto::CoreMLSettings_EnabledDevices _internal_enabled_devices() const; + void _internal_set_enabled_devices(::tflite::proto::CoreMLSettings_EnabledDevices value); + public: + + // optional int32 coreml_version = 2; + bool has_coreml_version() const; + private: + bool _internal_has_coreml_version() const; + public: + void clear_coreml_version(); + int32_t coreml_version() const; + void set_coreml_version(int32_t value); + private: + int32_t _internal_coreml_version() const; + void _internal_set_coreml_version(int32_t value); + public: + + // optional int32 max_delegated_partitions = 3 [default = 0]; + bool has_max_delegated_partitions() const; + private: + bool _internal_has_max_delegated_partitions() const; + public: + void clear_max_delegated_partitions(); + int32_t max_delegated_partitions() const; + void set_max_delegated_partitions(int32_t value); + private: + int32_t _internal_max_delegated_partitions() const; + void _internal_set_max_delegated_partitions(int32_t value); + public: + + // optional int32 min_nodes_per_partition = 4 [default = 2]; + bool has_min_nodes_per_partition() const; + private: + bool _internal_has_min_nodes_per_partition() const; + public: + void clear_min_nodes_per_partition(); + int32_t min_nodes_per_partition() const; + void set_min_nodes_per_partition(int32_t value); + private: + int32_t _internal_min_nodes_per_partition() const; + void _internal_set_min_nodes_per_partition(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.CoreMLSettings) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + int enabled_devices_; + int32_t coreml_version_; + int32_t max_delegated_partitions_; + int32_t min_nodes_per_partition_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class StableDelegateLoaderSettings final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.StableDelegateLoaderSettings) */ { + public: + inline StableDelegateLoaderSettings() : StableDelegateLoaderSettings(nullptr) {} + ~StableDelegateLoaderSettings() override; + explicit PROTOBUF_CONSTEXPR StableDelegateLoaderSettings(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + StableDelegateLoaderSettings(const StableDelegateLoaderSettings& from); + StableDelegateLoaderSettings(StableDelegateLoaderSettings&& from) noexcept + : StableDelegateLoaderSettings() { + *this = ::std::move(from); + } + + inline StableDelegateLoaderSettings& operator=(const StableDelegateLoaderSettings& from) { + CopyFrom(from); + return *this; + } + inline StableDelegateLoaderSettings& operator=(StableDelegateLoaderSettings&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const StableDelegateLoaderSettings& default_instance() { + return *internal_default_instance(); + } + static inline const StableDelegateLoaderSettings* internal_default_instance() { + return reinterpret_cast( + &_StableDelegateLoaderSettings_default_instance_); + } + static constexpr int kIndexInFileMessages = + 6; + + friend void swap(StableDelegateLoaderSettings& a, StableDelegateLoaderSettings& b) { + a.Swap(&b); + } + inline void Swap(StableDelegateLoaderSettings* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(StableDelegateLoaderSettings* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + StableDelegateLoaderSettings* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const StableDelegateLoaderSettings& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const StableDelegateLoaderSettings& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(StableDelegateLoaderSettings* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.StableDelegateLoaderSettings"; + } + protected: + explicit StableDelegateLoaderSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kDelegatePathFieldNumber = 1, + kDelegateNameFieldNumber = 2, + }; + // optional string delegate_path = 1; + bool has_delegate_path() const; + private: + bool _internal_has_delegate_path() const; + public: + void clear_delegate_path(); + const std::string& delegate_path() const; + template + void set_delegate_path(ArgT0&& arg0, ArgT... args); + std::string* mutable_delegate_path(); + PROTOBUF_NODISCARD std::string* release_delegate_path(); + void set_allocated_delegate_path(std::string* delegate_path); + private: + const std::string& _internal_delegate_path() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_delegate_path(const std::string& value); + std::string* _internal_mutable_delegate_path(); + public: + + // optional string delegate_name = 2; + bool has_delegate_name() const; + private: + bool _internal_has_delegate_name() const; + public: + void clear_delegate_name(); + const std::string& delegate_name() const; + template + void set_delegate_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_delegate_name(); + PROTOBUF_NODISCARD std::string* release_delegate_name(); + void set_allocated_delegate_name(std::string* delegate_name); + private: + const std::string& _internal_delegate_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_delegate_name(const std::string& value); + std::string* _internal_mutable_delegate_name(); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.StableDelegateLoaderSettings) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr delegate_path_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr delegate_name_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class CompilationCachingSettings final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.CompilationCachingSettings) */ { + public: + inline CompilationCachingSettings() : CompilationCachingSettings(nullptr) {} + ~CompilationCachingSettings() override; + explicit PROTOBUF_CONSTEXPR CompilationCachingSettings(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CompilationCachingSettings(const CompilationCachingSettings& from); + CompilationCachingSettings(CompilationCachingSettings&& from) noexcept + : CompilationCachingSettings() { + *this = ::std::move(from); + } + + inline CompilationCachingSettings& operator=(const CompilationCachingSettings& from) { + CopyFrom(from); + return *this; + } + inline CompilationCachingSettings& operator=(CompilationCachingSettings&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CompilationCachingSettings& default_instance() { + return *internal_default_instance(); + } + static inline const CompilationCachingSettings* internal_default_instance() { + return reinterpret_cast( + &_CompilationCachingSettings_default_instance_); + } + static constexpr int kIndexInFileMessages = + 7; + + friend void swap(CompilationCachingSettings& a, CompilationCachingSettings& b) { + a.Swap(&b); + } + inline void Swap(CompilationCachingSettings* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CompilationCachingSettings* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CompilationCachingSettings* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CompilationCachingSettings& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const CompilationCachingSettings& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CompilationCachingSettings* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.CompilationCachingSettings"; + } + protected: + explicit CompilationCachingSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kCacheDirFieldNumber = 1, + kModelTokenFieldNumber = 2, + }; + // optional string cache_dir = 1; + bool has_cache_dir() const; + private: + bool _internal_has_cache_dir() const; + public: + void clear_cache_dir(); + const std::string& cache_dir() const; + template + void set_cache_dir(ArgT0&& arg0, ArgT... args); + std::string* mutable_cache_dir(); + PROTOBUF_NODISCARD std::string* release_cache_dir(); + void set_allocated_cache_dir(std::string* cache_dir); + private: + const std::string& _internal_cache_dir() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_cache_dir(const std::string& value); + std::string* _internal_mutable_cache_dir(); + public: + + // optional string model_token = 2; + bool has_model_token() const; + private: + bool _internal_has_model_token() const; + public: + void clear_model_token(); + const std::string& model_token() const; + template + void set_model_token(ArgT0&& arg0, ArgT... args); + std::string* mutable_model_token(); + PROTOBUF_NODISCARD std::string* release_model_token(); + void set_allocated_model_token(std::string* model_token); + private: + const std::string& _internal_model_token() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_model_token(const std::string& value); + std::string* _internal_mutable_model_token(); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.CompilationCachingSettings) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr cache_dir_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr model_token_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class EdgeTpuDeviceSpec final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.EdgeTpuDeviceSpec) */ { + public: + inline EdgeTpuDeviceSpec() : EdgeTpuDeviceSpec(nullptr) {} + ~EdgeTpuDeviceSpec() override; + explicit PROTOBUF_CONSTEXPR EdgeTpuDeviceSpec(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + EdgeTpuDeviceSpec(const EdgeTpuDeviceSpec& from); + EdgeTpuDeviceSpec(EdgeTpuDeviceSpec&& from) noexcept + : EdgeTpuDeviceSpec() { + *this = ::std::move(from); + } + + inline EdgeTpuDeviceSpec& operator=(const EdgeTpuDeviceSpec& from) { + CopyFrom(from); + return *this; + } + inline EdgeTpuDeviceSpec& operator=(EdgeTpuDeviceSpec&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const EdgeTpuDeviceSpec& default_instance() { + return *internal_default_instance(); + } + static inline const EdgeTpuDeviceSpec* internal_default_instance() { + return reinterpret_cast( + &_EdgeTpuDeviceSpec_default_instance_); + } + static constexpr int kIndexInFileMessages = + 8; + + friend void swap(EdgeTpuDeviceSpec& a, EdgeTpuDeviceSpec& b) { + a.Swap(&b); + } + inline void Swap(EdgeTpuDeviceSpec* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(EdgeTpuDeviceSpec* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + EdgeTpuDeviceSpec* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const EdgeTpuDeviceSpec& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const EdgeTpuDeviceSpec& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(EdgeTpuDeviceSpec* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.EdgeTpuDeviceSpec"; + } + protected: + explicit EdgeTpuDeviceSpec(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef EdgeTpuDeviceSpec_PlatformType PlatformType; + static constexpr PlatformType MMIO = + EdgeTpuDeviceSpec_PlatformType_MMIO; + static constexpr PlatformType REFERENCE = + EdgeTpuDeviceSpec_PlatformType_REFERENCE; + static constexpr PlatformType SIMULATOR = + EdgeTpuDeviceSpec_PlatformType_SIMULATOR; + static constexpr PlatformType REMOTE_SIMULATOR = + EdgeTpuDeviceSpec_PlatformType_REMOTE_SIMULATOR; + static inline bool PlatformType_IsValid(int value) { + return EdgeTpuDeviceSpec_PlatformType_IsValid(value); + } + static constexpr PlatformType PlatformType_MIN = + EdgeTpuDeviceSpec_PlatformType_PlatformType_MIN; + static constexpr PlatformType PlatformType_MAX = + EdgeTpuDeviceSpec_PlatformType_PlatformType_MAX; + static constexpr int PlatformType_ARRAYSIZE = + EdgeTpuDeviceSpec_PlatformType_PlatformType_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + PlatformType_descriptor() { + return EdgeTpuDeviceSpec_PlatformType_descriptor(); + } + template + static inline const std::string& PlatformType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function PlatformType_Name."); + return EdgeTpuDeviceSpec_PlatformType_Name(enum_t_value); + } + static inline bool PlatformType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + PlatformType* value) { + return EdgeTpuDeviceSpec_PlatformType_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kDevicePathsFieldNumber = 3, + kPlatformTypeFieldNumber = 1, + kNumChipsFieldNumber = 2, + kChipFamilyFieldNumber = 4, + }; + // repeated string device_paths = 3; + int device_paths_size() const; + private: + int _internal_device_paths_size() const; + public: + void clear_device_paths(); + const std::string& device_paths(int index) const; + std::string* mutable_device_paths(int index); + void set_device_paths(int index, const std::string& value); + void set_device_paths(int index, std::string&& value); + void set_device_paths(int index, const char* value); + void set_device_paths(int index, const char* value, size_t size); + std::string* add_device_paths(); + void add_device_paths(const std::string& value); + void add_device_paths(std::string&& value); + void add_device_paths(const char* value); + void add_device_paths(const char* value, size_t size); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& device_paths() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* mutable_device_paths(); + private: + const std::string& _internal_device_paths(int index) const; + std::string* _internal_add_device_paths(); + public: + + // optional .tflite.proto.EdgeTpuDeviceSpec.PlatformType platform_type = 1; + bool has_platform_type() const; + private: + bool _internal_has_platform_type() const; + public: + void clear_platform_type(); + ::tflite::proto::EdgeTpuDeviceSpec_PlatformType platform_type() const; + void set_platform_type(::tflite::proto::EdgeTpuDeviceSpec_PlatformType value); + private: + ::tflite::proto::EdgeTpuDeviceSpec_PlatformType _internal_platform_type() const; + void _internal_set_platform_type(::tflite::proto::EdgeTpuDeviceSpec_PlatformType value); + public: + + // optional int32 num_chips = 2; + bool has_num_chips() const; + private: + bool _internal_has_num_chips() const; + public: + void clear_num_chips(); + int32_t num_chips() const; + void set_num_chips(int32_t value); + private: + int32_t _internal_num_chips() const; + void _internal_set_num_chips(int32_t value); + public: + + // optional int32 chip_family = 4; + bool has_chip_family() const; + private: + bool _internal_has_chip_family() const; + public: + void clear_chip_family(); + int32_t chip_family() const; + void set_chip_family(int32_t value); + private: + int32_t _internal_chip_family() const; + void _internal_set_chip_family(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.EdgeTpuDeviceSpec) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField device_paths_; + int platform_type_; + int32_t num_chips_; + int32_t chip_family_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class EdgeTpuInactivePowerConfig final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.EdgeTpuInactivePowerConfig) */ { + public: + inline EdgeTpuInactivePowerConfig() : EdgeTpuInactivePowerConfig(nullptr) {} + ~EdgeTpuInactivePowerConfig() override; + explicit PROTOBUF_CONSTEXPR EdgeTpuInactivePowerConfig(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + EdgeTpuInactivePowerConfig(const EdgeTpuInactivePowerConfig& from); + EdgeTpuInactivePowerConfig(EdgeTpuInactivePowerConfig&& from) noexcept + : EdgeTpuInactivePowerConfig() { + *this = ::std::move(from); + } + + inline EdgeTpuInactivePowerConfig& operator=(const EdgeTpuInactivePowerConfig& from) { + CopyFrom(from); + return *this; + } + inline EdgeTpuInactivePowerConfig& operator=(EdgeTpuInactivePowerConfig&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const EdgeTpuInactivePowerConfig& default_instance() { + return *internal_default_instance(); + } + static inline const EdgeTpuInactivePowerConfig* internal_default_instance() { + return reinterpret_cast( + &_EdgeTpuInactivePowerConfig_default_instance_); + } + static constexpr int kIndexInFileMessages = + 9; + + friend void swap(EdgeTpuInactivePowerConfig& a, EdgeTpuInactivePowerConfig& b) { + a.Swap(&b); + } + inline void Swap(EdgeTpuInactivePowerConfig* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(EdgeTpuInactivePowerConfig* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + EdgeTpuInactivePowerConfig* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const EdgeTpuInactivePowerConfig& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const EdgeTpuInactivePowerConfig& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(EdgeTpuInactivePowerConfig* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.EdgeTpuInactivePowerConfig"; + } + protected: + explicit EdgeTpuInactivePowerConfig(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInactiveTimeoutUsFieldNumber = 2, + kInactivePowerStateFieldNumber = 1, + }; + // optional int64 inactive_timeout_us = 2; + bool has_inactive_timeout_us() const; + private: + bool _internal_has_inactive_timeout_us() const; + public: + void clear_inactive_timeout_us(); + int64_t inactive_timeout_us() const; + void set_inactive_timeout_us(int64_t value); + private: + int64_t _internal_inactive_timeout_us() const; + void _internal_set_inactive_timeout_us(int64_t value); + public: + + // optional .tflite.proto.EdgeTpuPowerState inactive_power_state = 1; + bool has_inactive_power_state() const; + private: + bool _internal_has_inactive_power_state() const; + public: + void clear_inactive_power_state(); + ::tflite::proto::EdgeTpuPowerState inactive_power_state() const; + void set_inactive_power_state(::tflite::proto::EdgeTpuPowerState value); + private: + ::tflite::proto::EdgeTpuPowerState _internal_inactive_power_state() const; + void _internal_set_inactive_power_state(::tflite::proto::EdgeTpuPowerState value); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.EdgeTpuInactivePowerConfig) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + int64_t inactive_timeout_us_; + int inactive_power_state_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class EdgeTpuSettings final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.EdgeTpuSettings) */ { + public: + inline EdgeTpuSettings() : EdgeTpuSettings(nullptr) {} + ~EdgeTpuSettings() override; + explicit PROTOBUF_CONSTEXPR EdgeTpuSettings(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + EdgeTpuSettings(const EdgeTpuSettings& from); + EdgeTpuSettings(EdgeTpuSettings&& from) noexcept + : EdgeTpuSettings() { + *this = ::std::move(from); + } + + inline EdgeTpuSettings& operator=(const EdgeTpuSettings& from) { + CopyFrom(from); + return *this; + } + inline EdgeTpuSettings& operator=(EdgeTpuSettings&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const EdgeTpuSettings& default_instance() { + return *internal_default_instance(); + } + static inline const EdgeTpuSettings* internal_default_instance() { + return reinterpret_cast( + &_EdgeTpuSettings_default_instance_); + } + static constexpr int kIndexInFileMessages = + 10; + + friend void swap(EdgeTpuSettings& a, EdgeTpuSettings& b) { + a.Swap(&b); + } + inline void Swap(EdgeTpuSettings* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(EdgeTpuSettings* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + EdgeTpuSettings* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const EdgeTpuSettings& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const EdgeTpuSettings& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(EdgeTpuSettings* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.EdgeTpuSettings"; + } + protected: + explicit EdgeTpuSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef EdgeTpuSettings_FloatTruncationType FloatTruncationType; + static constexpr FloatTruncationType UNSPECIFIED = + EdgeTpuSettings_FloatTruncationType_UNSPECIFIED; + static constexpr FloatTruncationType NO_TRUNCATION = + EdgeTpuSettings_FloatTruncationType_NO_TRUNCATION; + static constexpr FloatTruncationType BFLOAT16 = + EdgeTpuSettings_FloatTruncationType_BFLOAT16; + static constexpr FloatTruncationType HALF = + EdgeTpuSettings_FloatTruncationType_HALF; + static inline bool FloatTruncationType_IsValid(int value) { + return EdgeTpuSettings_FloatTruncationType_IsValid(value); + } + static constexpr FloatTruncationType FloatTruncationType_MIN = + EdgeTpuSettings_FloatTruncationType_FloatTruncationType_MIN; + static constexpr FloatTruncationType FloatTruncationType_MAX = + EdgeTpuSettings_FloatTruncationType_FloatTruncationType_MAX; + static constexpr int FloatTruncationType_ARRAYSIZE = + EdgeTpuSettings_FloatTruncationType_FloatTruncationType_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + FloatTruncationType_descriptor() { + return EdgeTpuSettings_FloatTruncationType_descriptor(); + } + template + static inline const std::string& FloatTruncationType_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function FloatTruncationType_Name."); + return EdgeTpuSettings_FloatTruncationType_Name(enum_t_value); + } + static inline bool FloatTruncationType_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + FloatTruncationType* value) { + return EdgeTpuSettings_FloatTruncationType_Parse(name, value); + } + + typedef EdgeTpuSettings_QosClass QosClass; + static constexpr QosClass QOS_UNDEFINED = + EdgeTpuSettings_QosClass_QOS_UNDEFINED; + static constexpr QosClass BEST_EFFORT = + EdgeTpuSettings_QosClass_BEST_EFFORT; + static constexpr QosClass REALTIME = + EdgeTpuSettings_QosClass_REALTIME; + static inline bool QosClass_IsValid(int value) { + return EdgeTpuSettings_QosClass_IsValid(value); + } + static constexpr QosClass QosClass_MIN = + EdgeTpuSettings_QosClass_QosClass_MIN; + static constexpr QosClass QosClass_MAX = + EdgeTpuSettings_QosClass_QosClass_MAX; + static constexpr int QosClass_ARRAYSIZE = + EdgeTpuSettings_QosClass_QosClass_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + QosClass_descriptor() { + return EdgeTpuSettings_QosClass_descriptor(); + } + template + static inline const std::string& QosClass_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function QosClass_Name."); + return EdgeTpuSettings_QosClass_Name(enum_t_value); + } + static inline bool QosClass_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + QosClass* value) { + return EdgeTpuSettings_QosClass_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kInactivePowerConfigsFieldNumber = 2, + kHardwareClusterIdsFieldNumber = 8, + kModelTokenFieldNumber = 5, + kPublicModelIdFieldNumber = 9, + kEdgetpuDeviceSpecFieldNumber = 4, + kInferencePowerStateFieldNumber = 1, + kFloatTruncationTypeFieldNumber = 6, + kQosClassFieldNumber = 7, + kInferencePriorityFieldNumber = 3, + }; + // repeated .tflite.proto.EdgeTpuInactivePowerConfig inactive_power_configs = 2; + int inactive_power_configs_size() const; + private: + int _internal_inactive_power_configs_size() const; + public: + void clear_inactive_power_configs(); + ::tflite::proto::EdgeTpuInactivePowerConfig* mutable_inactive_power_configs(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tflite::proto::EdgeTpuInactivePowerConfig >* + mutable_inactive_power_configs(); + private: + const ::tflite::proto::EdgeTpuInactivePowerConfig& _internal_inactive_power_configs(int index) const; + ::tflite::proto::EdgeTpuInactivePowerConfig* _internal_add_inactive_power_configs(); + public: + const ::tflite::proto::EdgeTpuInactivePowerConfig& inactive_power_configs(int index) const; + ::tflite::proto::EdgeTpuInactivePowerConfig* add_inactive_power_configs(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tflite::proto::EdgeTpuInactivePowerConfig >& + inactive_power_configs() const; + + // repeated int32 hardware_cluster_ids = 8 [packed = true]; + int hardware_cluster_ids_size() const; + private: + int _internal_hardware_cluster_ids_size() const; + public: + void clear_hardware_cluster_ids(); + private: + int32_t _internal_hardware_cluster_ids(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + _internal_hardware_cluster_ids() const; + void _internal_add_hardware_cluster_ids(int32_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + _internal_mutable_hardware_cluster_ids(); + public: + int32_t hardware_cluster_ids(int index) const; + void set_hardware_cluster_ids(int index, int32_t value); + void add_hardware_cluster_ids(int32_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& + hardware_cluster_ids() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* + mutable_hardware_cluster_ids(); + + // optional string model_token = 5; + bool has_model_token() const; + private: + bool _internal_has_model_token() const; + public: + void clear_model_token(); + const std::string& model_token() const; + template + void set_model_token(ArgT0&& arg0, ArgT... args); + std::string* mutable_model_token(); + PROTOBUF_NODISCARD std::string* release_model_token(); + void set_allocated_model_token(std::string* model_token); + private: + const std::string& _internal_model_token() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_model_token(const std::string& value); + std::string* _internal_mutable_model_token(); + public: + + // optional string public_model_id = 9; + bool has_public_model_id() const; + private: + bool _internal_has_public_model_id() const; + public: + void clear_public_model_id(); + const std::string& public_model_id() const; + template + void set_public_model_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_public_model_id(); + PROTOBUF_NODISCARD std::string* release_public_model_id(); + void set_allocated_public_model_id(std::string* public_model_id); + private: + const std::string& _internal_public_model_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_public_model_id(const std::string& value); + std::string* _internal_mutable_public_model_id(); + public: + + // optional .tflite.proto.EdgeTpuDeviceSpec edgetpu_device_spec = 4; + bool has_edgetpu_device_spec() const; + private: + bool _internal_has_edgetpu_device_spec() const; + public: + void clear_edgetpu_device_spec(); + const ::tflite::proto::EdgeTpuDeviceSpec& edgetpu_device_spec() const; + PROTOBUF_NODISCARD ::tflite::proto::EdgeTpuDeviceSpec* release_edgetpu_device_spec(); + ::tflite::proto::EdgeTpuDeviceSpec* mutable_edgetpu_device_spec(); + void set_allocated_edgetpu_device_spec(::tflite::proto::EdgeTpuDeviceSpec* edgetpu_device_spec); + private: + const ::tflite::proto::EdgeTpuDeviceSpec& _internal_edgetpu_device_spec() const; + ::tflite::proto::EdgeTpuDeviceSpec* _internal_mutable_edgetpu_device_spec(); + public: + void unsafe_arena_set_allocated_edgetpu_device_spec( + ::tflite::proto::EdgeTpuDeviceSpec* edgetpu_device_spec); + ::tflite::proto::EdgeTpuDeviceSpec* unsafe_arena_release_edgetpu_device_spec(); + + // optional .tflite.proto.EdgeTpuPowerState inference_power_state = 1; + bool has_inference_power_state() const; + private: + bool _internal_has_inference_power_state() const; + public: + void clear_inference_power_state(); + ::tflite::proto::EdgeTpuPowerState inference_power_state() const; + void set_inference_power_state(::tflite::proto::EdgeTpuPowerState value); + private: + ::tflite::proto::EdgeTpuPowerState _internal_inference_power_state() const; + void _internal_set_inference_power_state(::tflite::proto::EdgeTpuPowerState value); + public: + + // optional .tflite.proto.EdgeTpuSettings.FloatTruncationType float_truncation_type = 6; + bool has_float_truncation_type() const; + private: + bool _internal_has_float_truncation_type() const; + public: + void clear_float_truncation_type(); + ::tflite::proto::EdgeTpuSettings_FloatTruncationType float_truncation_type() const; + void set_float_truncation_type(::tflite::proto::EdgeTpuSettings_FloatTruncationType value); + private: + ::tflite::proto::EdgeTpuSettings_FloatTruncationType _internal_float_truncation_type() const; + void _internal_set_float_truncation_type(::tflite::proto::EdgeTpuSettings_FloatTruncationType value); + public: + + // optional .tflite.proto.EdgeTpuSettings.QosClass qos_class = 7 [default = QOS_UNDEFINED]; + bool has_qos_class() const; + private: + bool _internal_has_qos_class() const; + public: + void clear_qos_class(); + ::tflite::proto::EdgeTpuSettings_QosClass qos_class() const; + void set_qos_class(::tflite::proto::EdgeTpuSettings_QosClass value); + private: + ::tflite::proto::EdgeTpuSettings_QosClass _internal_qos_class() const; + void _internal_set_qos_class(::tflite::proto::EdgeTpuSettings_QosClass value); + public: + + // optional int32 inference_priority = 3 [default = -1]; + bool has_inference_priority() const; + private: + bool _internal_has_inference_priority() const; + public: + void clear_inference_priority(); + int32_t inference_priority() const; + void set_inference_priority(int32_t value); + private: + int32_t _internal_inference_priority() const; + void _internal_set_inference_priority(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.EdgeTpuSettings) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tflite::proto::EdgeTpuInactivePowerConfig > inactive_power_configs_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t > hardware_cluster_ids_; + mutable std::atomic _hardware_cluster_ids_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr model_token_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr public_model_id_; + ::tflite::proto::EdgeTpuDeviceSpec* edgetpu_device_spec_; + int inference_power_state_; + int float_truncation_type_; + int qos_class_; + int32_t inference_priority_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class GoogleEdgeTpuSettings final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.GoogleEdgeTpuSettings) */ { + public: + inline GoogleEdgeTpuSettings() : GoogleEdgeTpuSettings(nullptr) {} + ~GoogleEdgeTpuSettings() override; + explicit PROTOBUF_CONSTEXPR GoogleEdgeTpuSettings(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + GoogleEdgeTpuSettings(const GoogleEdgeTpuSettings& from); + GoogleEdgeTpuSettings(GoogleEdgeTpuSettings&& from) noexcept + : GoogleEdgeTpuSettings() { + *this = ::std::move(from); + } + + inline GoogleEdgeTpuSettings& operator=(const GoogleEdgeTpuSettings& from) { + CopyFrom(from); + return *this; + } + inline GoogleEdgeTpuSettings& operator=(GoogleEdgeTpuSettings&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const GoogleEdgeTpuSettings& default_instance() { + return *internal_default_instance(); + } + static inline const GoogleEdgeTpuSettings* internal_default_instance() { + return reinterpret_cast( + &_GoogleEdgeTpuSettings_default_instance_); + } + static constexpr int kIndexInFileMessages = + 11; + + friend void swap(GoogleEdgeTpuSettings& a, GoogleEdgeTpuSettings& b) { + a.Swap(&b); + } + inline void Swap(GoogleEdgeTpuSettings* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(GoogleEdgeTpuSettings* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + GoogleEdgeTpuSettings* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const GoogleEdgeTpuSettings& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const GoogleEdgeTpuSettings& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(GoogleEdgeTpuSettings* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.GoogleEdgeTpuSettings"; + } + protected: + explicit GoogleEdgeTpuSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef GoogleEdgeTpuSettings_Priority Priority; + static constexpr Priority PRIORITY_UNDEFINED = + GoogleEdgeTpuSettings_Priority_PRIORITY_UNDEFINED; + static constexpr Priority PRIORITY_LOW = + GoogleEdgeTpuSettings_Priority_PRIORITY_LOW; + static constexpr Priority PRIORITY_MEDIUM = + GoogleEdgeTpuSettings_Priority_PRIORITY_MEDIUM; + static constexpr Priority PRIORITY_HIGH = + GoogleEdgeTpuSettings_Priority_PRIORITY_HIGH; + static inline bool Priority_IsValid(int value) { + return GoogleEdgeTpuSettings_Priority_IsValid(value); + } + static constexpr Priority Priority_MIN = + GoogleEdgeTpuSettings_Priority_Priority_MIN; + static constexpr Priority Priority_MAX = + GoogleEdgeTpuSettings_Priority_Priority_MAX; + static constexpr int Priority_ARRAYSIZE = + GoogleEdgeTpuSettings_Priority_Priority_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + Priority_descriptor() { + return GoogleEdgeTpuSettings_Priority_descriptor(); + } + template + static inline const std::string& Priority_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Priority_Name."); + return GoogleEdgeTpuSettings_Priority_Name(enum_t_value); + } + static inline bool Priority_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Priority* value) { + return GoogleEdgeTpuSettings_Priority_Parse(name, value); + } + + typedef GoogleEdgeTpuSettings_TriState TriState; + static constexpr TriState TRISTATE_UNDEFINED = + GoogleEdgeTpuSettings_TriState_TRISTATE_UNDEFINED; + static constexpr TriState TRISTATE_FALSE = + GoogleEdgeTpuSettings_TriState_TRISTATE_FALSE; + static constexpr TriState TRISTATE_TRUE = + GoogleEdgeTpuSettings_TriState_TRISTATE_TRUE; + static inline bool TriState_IsValid(int value) { + return GoogleEdgeTpuSettings_TriState_IsValid(value); + } + static constexpr TriState TriState_MIN = + GoogleEdgeTpuSettings_TriState_TriState_MIN; + static constexpr TriState TriState_MAX = + GoogleEdgeTpuSettings_TriState_TriState_MAX; + static constexpr int TriState_ARRAYSIZE = + GoogleEdgeTpuSettings_TriState_TriState_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + TriState_descriptor() { + return GoogleEdgeTpuSettings_TriState_descriptor(); + } + template + static inline const std::string& TriState_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function TriState_Name."); + return GoogleEdgeTpuSettings_TriState_Name(enum_t_value); + } + static inline bool TriState_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + TriState* value) { + return GoogleEdgeTpuSettings_TriState_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kExtensionDataFieldNumber = 4, + kModelIdentifierFieldNumber = 5, + kPriorityFieldNumber = 3, + kEnableTracingFieldNumber = 2, + kUseAsyncApiFieldNumber = 6, + kAllowFp16PrecisionForFp32FieldNumber = 11, + kPreferCacheCoherencyForInputsFieldNumber = 9, + kPreferCacheCoherencyForOutputsFieldNumber = 10, + kLogVerbosityFieldNumber = 1, + kDelegateShouldManageCacheForInputsFieldNumber = 7, + kDelegateShouldManageCacheForOutputsFieldNumber = 8, + }; + // optional bytes extension_data = 4; + bool has_extension_data() const; + private: + bool _internal_has_extension_data() const; + public: + void clear_extension_data(); + const std::string& extension_data() const; + template + void set_extension_data(ArgT0&& arg0, ArgT... args); + std::string* mutable_extension_data(); + PROTOBUF_NODISCARD std::string* release_extension_data(); + void set_allocated_extension_data(std::string* extension_data); + private: + const std::string& _internal_extension_data() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_extension_data(const std::string& value); + std::string* _internal_mutable_extension_data(); + public: + + // optional string model_identifier = 5 [default = ""]; + bool has_model_identifier() const; + private: + bool _internal_has_model_identifier() const; + public: + void clear_model_identifier(); + const std::string& model_identifier() const; + template + void set_model_identifier(ArgT0&& arg0, ArgT... args); + std::string* mutable_model_identifier(); + PROTOBUF_NODISCARD std::string* release_model_identifier(); + void set_allocated_model_identifier(std::string* model_identifier); + private: + const std::string& _internal_model_identifier() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_model_identifier(const std::string& value); + std::string* _internal_mutable_model_identifier(); + public: + + // optional .tflite.proto.GoogleEdgeTpuSettings.Priority priority = 3; + bool has_priority() const; + private: + bool _internal_has_priority() const; + public: + void clear_priority(); + ::tflite::proto::GoogleEdgeTpuSettings_Priority priority() const; + void set_priority(::tflite::proto::GoogleEdgeTpuSettings_Priority value); + private: + ::tflite::proto::GoogleEdgeTpuSettings_Priority _internal_priority() const; + void _internal_set_priority(::tflite::proto::GoogleEdgeTpuSettings_Priority value); + public: + + // optional bool enable_tracing = 2 [default = false]; + bool has_enable_tracing() const; + private: + bool _internal_has_enable_tracing() const; + public: + void clear_enable_tracing(); + bool enable_tracing() const; + void set_enable_tracing(bool value); + private: + bool _internal_enable_tracing() const; + void _internal_set_enable_tracing(bool value); + public: + + // optional bool use_async_api = 6 [default = false]; + bool has_use_async_api() const; + private: + bool _internal_has_use_async_api() const; + public: + void clear_use_async_api(); + bool use_async_api() const; + void set_use_async_api(bool value); + private: + bool _internal_use_async_api() const; + void _internal_set_use_async_api(bool value); + public: + + // optional bool allow_fp16_precision_for_fp32 = 11 [default = false]; + bool has_allow_fp16_precision_for_fp32() const; + private: + bool _internal_has_allow_fp16_precision_for_fp32() const; + public: + void clear_allow_fp16_precision_for_fp32(); + bool allow_fp16_precision_for_fp32() const; + void set_allow_fp16_precision_for_fp32(bool value); + private: + bool _internal_allow_fp16_precision_for_fp32() const; + void _internal_set_allow_fp16_precision_for_fp32(bool value); + public: + + // optional .tflite.proto.GoogleEdgeTpuSettings.TriState prefer_cache_coherency_for_inputs = 9; + bool has_prefer_cache_coherency_for_inputs() const; + private: + bool _internal_has_prefer_cache_coherency_for_inputs() const; + public: + void clear_prefer_cache_coherency_for_inputs(); + ::tflite::proto::GoogleEdgeTpuSettings_TriState prefer_cache_coherency_for_inputs() const; + void set_prefer_cache_coherency_for_inputs(::tflite::proto::GoogleEdgeTpuSettings_TriState value); + private: + ::tflite::proto::GoogleEdgeTpuSettings_TriState _internal_prefer_cache_coherency_for_inputs() const; + void _internal_set_prefer_cache_coherency_for_inputs(::tflite::proto::GoogleEdgeTpuSettings_TriState value); + public: + + // optional .tflite.proto.GoogleEdgeTpuSettings.TriState prefer_cache_coherency_for_outputs = 10; + bool has_prefer_cache_coherency_for_outputs() const; + private: + bool _internal_has_prefer_cache_coherency_for_outputs() const; + public: + void clear_prefer_cache_coherency_for_outputs(); + ::tflite::proto::GoogleEdgeTpuSettings_TriState prefer_cache_coherency_for_outputs() const; + void set_prefer_cache_coherency_for_outputs(::tflite::proto::GoogleEdgeTpuSettings_TriState value); + private: + ::tflite::proto::GoogleEdgeTpuSettings_TriState _internal_prefer_cache_coherency_for_outputs() const; + void _internal_set_prefer_cache_coherency_for_outputs(::tflite::proto::GoogleEdgeTpuSettings_TriState value); + public: + + // optional int32 log_verbosity = 1 [default = -1]; + bool has_log_verbosity() const; + private: + bool _internal_has_log_verbosity() const; + public: + void clear_log_verbosity(); + int32_t log_verbosity() const; + void set_log_verbosity(int32_t value); + private: + int32_t _internal_log_verbosity() const; + void _internal_set_log_verbosity(int32_t value); + public: + + // optional bool delegate_should_manage_cache_for_inputs = 7 [default = true]; + bool has_delegate_should_manage_cache_for_inputs() const; + private: + bool _internal_has_delegate_should_manage_cache_for_inputs() const; + public: + void clear_delegate_should_manage_cache_for_inputs(); + bool delegate_should_manage_cache_for_inputs() const; + void set_delegate_should_manage_cache_for_inputs(bool value); + private: + bool _internal_delegate_should_manage_cache_for_inputs() const; + void _internal_set_delegate_should_manage_cache_for_inputs(bool value); + public: + + // optional bool delegate_should_manage_cache_for_outputs = 8 [default = true]; + bool has_delegate_should_manage_cache_for_outputs() const; + private: + bool _internal_has_delegate_should_manage_cache_for_outputs() const; + public: + void clear_delegate_should_manage_cache_for_outputs(); + bool delegate_should_manage_cache_for_outputs() const; + void set_delegate_should_manage_cache_for_outputs(bool value); + private: + bool _internal_delegate_should_manage_cache_for_outputs() const; + void _internal_set_delegate_should_manage_cache_for_outputs(bool value); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.GoogleEdgeTpuSettings) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr extension_data_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr model_identifier_; + int priority_; + bool enable_tracing_; + bool use_async_api_; + bool allow_fp16_precision_for_fp32_; + int prefer_cache_coherency_for_inputs_; + int prefer_cache_coherency_for_outputs_; + int32_t log_verbosity_; + bool delegate_should_manage_cache_for_inputs_; + bool delegate_should_manage_cache_for_outputs_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class CoralSettings final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.CoralSettings) */ { + public: + inline CoralSettings() : CoralSettings(nullptr) {} + ~CoralSettings() override; + explicit PROTOBUF_CONSTEXPR CoralSettings(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CoralSettings(const CoralSettings& from); + CoralSettings(CoralSettings&& from) noexcept + : CoralSettings() { + *this = ::std::move(from); + } + + inline CoralSettings& operator=(const CoralSettings& from) { + CopyFrom(from); + return *this; + } + inline CoralSettings& operator=(CoralSettings&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CoralSettings& default_instance() { + return *internal_default_instance(); + } + static inline const CoralSettings* internal_default_instance() { + return reinterpret_cast( + &_CoralSettings_default_instance_); + } + static constexpr int kIndexInFileMessages = + 12; + + friend void swap(CoralSettings& a, CoralSettings& b) { + a.Swap(&b); + } + inline void Swap(CoralSettings* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CoralSettings* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CoralSettings* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CoralSettings& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const CoralSettings& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CoralSettings* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.CoralSettings"; + } + protected: + explicit CoralSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef CoralSettings_Performance Performance; + static constexpr Performance UNDEFINED = + CoralSettings_Performance_UNDEFINED; + static constexpr Performance MAXIMUM = + CoralSettings_Performance_MAXIMUM; + static constexpr Performance HIGH = + CoralSettings_Performance_HIGH; + static constexpr Performance MEDIUM = + CoralSettings_Performance_MEDIUM; + static constexpr Performance LOW = + CoralSettings_Performance_LOW; + static inline bool Performance_IsValid(int value) { + return CoralSettings_Performance_IsValid(value); + } + static constexpr Performance Performance_MIN = + CoralSettings_Performance_Performance_MIN; + static constexpr Performance Performance_MAX = + CoralSettings_Performance_Performance_MAX; + static constexpr int Performance_ARRAYSIZE = + CoralSettings_Performance_Performance_ARRAYSIZE; + static inline const ::PROTOBUF_NAMESPACE_ID::EnumDescriptor* + Performance_descriptor() { + return CoralSettings_Performance_descriptor(); + } + template + static inline const std::string& Performance_Name(T enum_t_value) { + static_assert(::std::is_same::value || + ::std::is_integral::value, + "Incorrect type passed to function Performance_Name."); + return CoralSettings_Performance_Name(enum_t_value); + } + static inline bool Performance_Parse(::PROTOBUF_NAMESPACE_ID::ConstStringParam name, + Performance* value) { + return CoralSettings_Performance_Parse(name, value); + } + + // accessors ------------------------------------------------------- + + enum : int { + kDeviceFieldNumber = 1, + kUsbAlwaysDfuFieldNumber = 3, + kUsbMaxBulkInQueueLengthFieldNumber = 4, + kPerformanceFieldNumber = 2, + }; + // optional string device = 1; + bool has_device() const; + private: + bool _internal_has_device() const; + public: + void clear_device(); + const std::string& device() const; + template + void set_device(ArgT0&& arg0, ArgT... args); + std::string* mutable_device(); + PROTOBUF_NODISCARD std::string* release_device(); + void set_allocated_device(std::string* device); + private: + const std::string& _internal_device() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_device(const std::string& value); + std::string* _internal_mutable_device(); + public: + + // optional bool usb_always_dfu = 3; + bool has_usb_always_dfu() const; + private: + bool _internal_has_usb_always_dfu() const; + public: + void clear_usb_always_dfu(); + bool usb_always_dfu() const; + void set_usb_always_dfu(bool value); + private: + bool _internal_usb_always_dfu() const; + void _internal_set_usb_always_dfu(bool value); + public: + + // optional int32 usb_max_bulk_in_queue_length = 4; + bool has_usb_max_bulk_in_queue_length() const; + private: + bool _internal_has_usb_max_bulk_in_queue_length() const; + public: + void clear_usb_max_bulk_in_queue_length(); + int32_t usb_max_bulk_in_queue_length() const; + void set_usb_max_bulk_in_queue_length(int32_t value); + private: + int32_t _internal_usb_max_bulk_in_queue_length() const; + void _internal_set_usb_max_bulk_in_queue_length(int32_t value); + public: + + // optional .tflite.proto.CoralSettings.Performance performance = 2 [default = MAXIMUM]; + bool has_performance() const; + private: + bool _internal_has_performance() const; + public: + void clear_performance(); + ::tflite::proto::CoralSettings_Performance performance() const; + void set_performance(::tflite::proto::CoralSettings_Performance value); + private: + ::tflite::proto::CoralSettings_Performance _internal_performance() const; + void _internal_set_performance(::tflite::proto::CoralSettings_Performance value); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.CoralSettings) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr device_; + bool usb_always_dfu_; + int32_t usb_max_bulk_in_queue_length_; + int performance_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class CPUSettings final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.CPUSettings) */ { + public: + inline CPUSettings() : CPUSettings(nullptr) {} + ~CPUSettings() override; + explicit PROTOBUF_CONSTEXPR CPUSettings(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + CPUSettings(const CPUSettings& from); + CPUSettings(CPUSettings&& from) noexcept + : CPUSettings() { + *this = ::std::move(from); + } + + inline CPUSettings& operator=(const CPUSettings& from) { + CopyFrom(from); + return *this; + } + inline CPUSettings& operator=(CPUSettings&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const CPUSettings& default_instance() { + return *internal_default_instance(); + } + static inline const CPUSettings* internal_default_instance() { + return reinterpret_cast( + &_CPUSettings_default_instance_); + } + static constexpr int kIndexInFileMessages = + 13; + + friend void swap(CPUSettings& a, CPUSettings& b) { + a.Swap(&b); + } + inline void Swap(CPUSettings* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(CPUSettings* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + CPUSettings* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const CPUSettings& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const CPUSettings& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(CPUSettings* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.CPUSettings"; + } + protected: + explicit CPUSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNumThreadsFieldNumber = 1, + }; + // optional int32 num_threads = 1 [default = -1]; + bool has_num_threads() const; + private: + bool _internal_has_num_threads() const; + public: + void clear_num_threads(); + int32_t num_threads() const; + void set_num_threads(int32_t value); + private: + int32_t _internal_num_threads() const; + void _internal_set_num_threads(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.CPUSettings) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + int32_t num_threads_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class ArmNNSettings final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.ArmNNSettings) */ { + public: + inline ArmNNSettings() : ArmNNSettings(nullptr) {} + ~ArmNNSettings() override; + explicit PROTOBUF_CONSTEXPR ArmNNSettings(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ArmNNSettings(const ArmNNSettings& from); + ArmNNSettings(ArmNNSettings&& from) noexcept + : ArmNNSettings() { + *this = ::std::move(from); + } + + inline ArmNNSettings& operator=(const ArmNNSettings& from) { + CopyFrom(from); + return *this; + } + inline ArmNNSettings& operator=(ArmNNSettings&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ArmNNSettings& default_instance() { + return *internal_default_instance(); + } + static inline const ArmNNSettings* internal_default_instance() { + return reinterpret_cast( + &_ArmNNSettings_default_instance_); + } + static constexpr int kIndexInFileMessages = + 14; + + friend void swap(ArmNNSettings& a, ArmNNSettings& b) { + a.Swap(&b); + } + inline void Swap(ArmNNSettings* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ArmNNSettings* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ArmNNSettings* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ArmNNSettings& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const ArmNNSettings& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ArmNNSettings* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.ArmNNSettings"; + } + protected: + explicit ArmNNSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kBackendsFieldNumber = 1, + kAdditionalParametersFieldNumber = 3, + kFastmathFieldNumber = 2, + }; + // optional string backends = 1; + bool has_backends() const; + private: + bool _internal_has_backends() const; + public: + void clear_backends(); + const std::string& backends() const; + template + void set_backends(ArgT0&& arg0, ArgT... args); + std::string* mutable_backends(); + PROTOBUF_NODISCARD std::string* release_backends(); + void set_allocated_backends(std::string* backends); + private: + const std::string& _internal_backends() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_backends(const std::string& value); + std::string* _internal_mutable_backends(); + public: + + // optional string additional_parameters = 3; + bool has_additional_parameters() const; + private: + bool _internal_has_additional_parameters() const; + public: + void clear_additional_parameters(); + const std::string& additional_parameters() const; + template + void set_additional_parameters(ArgT0&& arg0, ArgT... args); + std::string* mutable_additional_parameters(); + PROTOBUF_NODISCARD std::string* release_additional_parameters(); + void set_allocated_additional_parameters(std::string* additional_parameters); + private: + const std::string& _internal_additional_parameters() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_additional_parameters(const std::string& value); + std::string* _internal_mutable_additional_parameters(); + public: + + // optional bool fastmath = 2; + bool has_fastmath() const; + private: + bool _internal_has_fastmath() const; + public: + void clear_fastmath(); + bool fastmath() const; + void set_fastmath(bool value); + private: + bool _internal_fastmath() const; + void _internal_set_fastmath(bool value); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.ArmNNSettings) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr backends_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr additional_parameters_; + bool fastmath_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class TFLiteSettings final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.TFLiteSettings) */ { + public: + inline TFLiteSettings() : TFLiteSettings(nullptr) {} + ~TFLiteSettings() override; + explicit PROTOBUF_CONSTEXPR TFLiteSettings(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + TFLiteSettings(const TFLiteSettings& from); + TFLiteSettings(TFLiteSettings&& from) noexcept + : TFLiteSettings() { + *this = ::std::move(from); + } + + inline TFLiteSettings& operator=(const TFLiteSettings& from) { + CopyFrom(from); + return *this; + } + inline TFLiteSettings& operator=(TFLiteSettings&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const TFLiteSettings& default_instance() { + return *internal_default_instance(); + } + static inline const TFLiteSettings* internal_default_instance() { + return reinterpret_cast( + &_TFLiteSettings_default_instance_); + } + static constexpr int kIndexInFileMessages = + 15; + + friend void swap(TFLiteSettings& a, TFLiteSettings& b) { + a.Swap(&b); + } + inline void Swap(TFLiteSettings* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(TFLiteSettings* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + TFLiteSettings* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const TFLiteSettings& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const TFLiteSettings& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(TFLiteSettings* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.TFLiteSettings"; + } + protected: + explicit TFLiteSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kNnapiSettingsFieldNumber = 2, + kGpuSettingsFieldNumber = 3, + kHexagonSettingsFieldNumber = 4, + kXnnpackSettingsFieldNumber = 5, + kCpuSettingsFieldNumber = 6, + kEdgetpuSettingsFieldNumber = 8, + kFallbackSettingsFieldNumber = 9, + kCoralSettingsFieldNumber = 10, + kCoremlSettingsFieldNumber = 11, + kStableDelegateLoaderSettingsFieldNumber = 13, + kGoogleEdgetpuSettingsFieldNumber = 14, + kCompilationCachingSettingsFieldNumber = 15, + kArmnnSettingsFieldNumber = 16, + kDelegateFieldNumber = 1, + kMaxDelegatedPartitionsFieldNumber = 7, + kDisableDefaultDelegatesFieldNumber = 12, + }; + // optional .tflite.proto.NNAPISettings nnapi_settings = 2; + bool has_nnapi_settings() const; + private: + bool _internal_has_nnapi_settings() const; + public: + void clear_nnapi_settings(); + const ::tflite::proto::NNAPISettings& nnapi_settings() const; + PROTOBUF_NODISCARD ::tflite::proto::NNAPISettings* release_nnapi_settings(); + ::tflite::proto::NNAPISettings* mutable_nnapi_settings(); + void set_allocated_nnapi_settings(::tflite::proto::NNAPISettings* nnapi_settings); + private: + const ::tflite::proto::NNAPISettings& _internal_nnapi_settings() const; + ::tflite::proto::NNAPISettings* _internal_mutable_nnapi_settings(); + public: + void unsafe_arena_set_allocated_nnapi_settings( + ::tflite::proto::NNAPISettings* nnapi_settings); + ::tflite::proto::NNAPISettings* unsafe_arena_release_nnapi_settings(); + + // optional .tflite.proto.GPUSettings gpu_settings = 3; + bool has_gpu_settings() const; + private: + bool _internal_has_gpu_settings() const; + public: + void clear_gpu_settings(); + const ::tflite::proto::GPUSettings& gpu_settings() const; + PROTOBUF_NODISCARD ::tflite::proto::GPUSettings* release_gpu_settings(); + ::tflite::proto::GPUSettings* mutable_gpu_settings(); + void set_allocated_gpu_settings(::tflite::proto::GPUSettings* gpu_settings); + private: + const ::tflite::proto::GPUSettings& _internal_gpu_settings() const; + ::tflite::proto::GPUSettings* _internal_mutable_gpu_settings(); + public: + void unsafe_arena_set_allocated_gpu_settings( + ::tflite::proto::GPUSettings* gpu_settings); + ::tflite::proto::GPUSettings* unsafe_arena_release_gpu_settings(); + + // optional .tflite.proto.HexagonSettings hexagon_settings = 4; + bool has_hexagon_settings() const; + private: + bool _internal_has_hexagon_settings() const; + public: + void clear_hexagon_settings(); + const ::tflite::proto::HexagonSettings& hexagon_settings() const; + PROTOBUF_NODISCARD ::tflite::proto::HexagonSettings* release_hexagon_settings(); + ::tflite::proto::HexagonSettings* mutable_hexagon_settings(); + void set_allocated_hexagon_settings(::tflite::proto::HexagonSettings* hexagon_settings); + private: + const ::tflite::proto::HexagonSettings& _internal_hexagon_settings() const; + ::tflite::proto::HexagonSettings* _internal_mutable_hexagon_settings(); + public: + void unsafe_arena_set_allocated_hexagon_settings( + ::tflite::proto::HexagonSettings* hexagon_settings); + ::tflite::proto::HexagonSettings* unsafe_arena_release_hexagon_settings(); + + // optional .tflite.proto.XNNPackSettings xnnpack_settings = 5; + bool has_xnnpack_settings() const; + private: + bool _internal_has_xnnpack_settings() const; + public: + void clear_xnnpack_settings(); + const ::tflite::proto::XNNPackSettings& xnnpack_settings() const; + PROTOBUF_NODISCARD ::tflite::proto::XNNPackSettings* release_xnnpack_settings(); + ::tflite::proto::XNNPackSettings* mutable_xnnpack_settings(); + void set_allocated_xnnpack_settings(::tflite::proto::XNNPackSettings* xnnpack_settings); + private: + const ::tflite::proto::XNNPackSettings& _internal_xnnpack_settings() const; + ::tflite::proto::XNNPackSettings* _internal_mutable_xnnpack_settings(); + public: + void unsafe_arena_set_allocated_xnnpack_settings( + ::tflite::proto::XNNPackSettings* xnnpack_settings); + ::tflite::proto::XNNPackSettings* unsafe_arena_release_xnnpack_settings(); + + // optional .tflite.proto.CPUSettings cpu_settings = 6; + bool has_cpu_settings() const; + private: + bool _internal_has_cpu_settings() const; + public: + void clear_cpu_settings(); + const ::tflite::proto::CPUSettings& cpu_settings() const; + PROTOBUF_NODISCARD ::tflite::proto::CPUSettings* release_cpu_settings(); + ::tflite::proto::CPUSettings* mutable_cpu_settings(); + void set_allocated_cpu_settings(::tflite::proto::CPUSettings* cpu_settings); + private: + const ::tflite::proto::CPUSettings& _internal_cpu_settings() const; + ::tflite::proto::CPUSettings* _internal_mutable_cpu_settings(); + public: + void unsafe_arena_set_allocated_cpu_settings( + ::tflite::proto::CPUSettings* cpu_settings); + ::tflite::proto::CPUSettings* unsafe_arena_release_cpu_settings(); + + // optional .tflite.proto.EdgeTpuSettings edgetpu_settings = 8; + bool has_edgetpu_settings() const; + private: + bool _internal_has_edgetpu_settings() const; + public: + void clear_edgetpu_settings(); + const ::tflite::proto::EdgeTpuSettings& edgetpu_settings() const; + PROTOBUF_NODISCARD ::tflite::proto::EdgeTpuSettings* release_edgetpu_settings(); + ::tflite::proto::EdgeTpuSettings* mutable_edgetpu_settings(); + void set_allocated_edgetpu_settings(::tflite::proto::EdgeTpuSettings* edgetpu_settings); + private: + const ::tflite::proto::EdgeTpuSettings& _internal_edgetpu_settings() const; + ::tflite::proto::EdgeTpuSettings* _internal_mutable_edgetpu_settings(); + public: + void unsafe_arena_set_allocated_edgetpu_settings( + ::tflite::proto::EdgeTpuSettings* edgetpu_settings); + ::tflite::proto::EdgeTpuSettings* unsafe_arena_release_edgetpu_settings(); + + // optional .tflite.proto.FallbackSettings fallback_settings = 9; + bool has_fallback_settings() const; + private: + bool _internal_has_fallback_settings() const; + public: + void clear_fallback_settings(); + const ::tflite::proto::FallbackSettings& fallback_settings() const; + PROTOBUF_NODISCARD ::tflite::proto::FallbackSettings* release_fallback_settings(); + ::tflite::proto::FallbackSettings* mutable_fallback_settings(); + void set_allocated_fallback_settings(::tflite::proto::FallbackSettings* fallback_settings); + private: + const ::tflite::proto::FallbackSettings& _internal_fallback_settings() const; + ::tflite::proto::FallbackSettings* _internal_mutable_fallback_settings(); + public: + void unsafe_arena_set_allocated_fallback_settings( + ::tflite::proto::FallbackSettings* fallback_settings); + ::tflite::proto::FallbackSettings* unsafe_arena_release_fallback_settings(); + + // optional .tflite.proto.CoralSettings coral_settings = 10; + bool has_coral_settings() const; + private: + bool _internal_has_coral_settings() const; + public: + void clear_coral_settings(); + const ::tflite::proto::CoralSettings& coral_settings() const; + PROTOBUF_NODISCARD ::tflite::proto::CoralSettings* release_coral_settings(); + ::tflite::proto::CoralSettings* mutable_coral_settings(); + void set_allocated_coral_settings(::tflite::proto::CoralSettings* coral_settings); + private: + const ::tflite::proto::CoralSettings& _internal_coral_settings() const; + ::tflite::proto::CoralSettings* _internal_mutable_coral_settings(); + public: + void unsafe_arena_set_allocated_coral_settings( + ::tflite::proto::CoralSettings* coral_settings); + ::tflite::proto::CoralSettings* unsafe_arena_release_coral_settings(); + + // optional .tflite.proto.CoreMLSettings coreml_settings = 11; + bool has_coreml_settings() const; + private: + bool _internal_has_coreml_settings() const; + public: + void clear_coreml_settings(); + const ::tflite::proto::CoreMLSettings& coreml_settings() const; + PROTOBUF_NODISCARD ::tflite::proto::CoreMLSettings* release_coreml_settings(); + ::tflite::proto::CoreMLSettings* mutable_coreml_settings(); + void set_allocated_coreml_settings(::tflite::proto::CoreMLSettings* coreml_settings); + private: + const ::tflite::proto::CoreMLSettings& _internal_coreml_settings() const; + ::tflite::proto::CoreMLSettings* _internal_mutable_coreml_settings(); + public: + void unsafe_arena_set_allocated_coreml_settings( + ::tflite::proto::CoreMLSettings* coreml_settings); + ::tflite::proto::CoreMLSettings* unsafe_arena_release_coreml_settings(); + + // optional .tflite.proto.StableDelegateLoaderSettings stable_delegate_loader_settings = 13; + bool has_stable_delegate_loader_settings() const; + private: + bool _internal_has_stable_delegate_loader_settings() const; + public: + void clear_stable_delegate_loader_settings(); + const ::tflite::proto::StableDelegateLoaderSettings& stable_delegate_loader_settings() const; + PROTOBUF_NODISCARD ::tflite::proto::StableDelegateLoaderSettings* release_stable_delegate_loader_settings(); + ::tflite::proto::StableDelegateLoaderSettings* mutable_stable_delegate_loader_settings(); + void set_allocated_stable_delegate_loader_settings(::tflite::proto::StableDelegateLoaderSettings* stable_delegate_loader_settings); + private: + const ::tflite::proto::StableDelegateLoaderSettings& _internal_stable_delegate_loader_settings() const; + ::tflite::proto::StableDelegateLoaderSettings* _internal_mutable_stable_delegate_loader_settings(); + public: + void unsafe_arena_set_allocated_stable_delegate_loader_settings( + ::tflite::proto::StableDelegateLoaderSettings* stable_delegate_loader_settings); + ::tflite::proto::StableDelegateLoaderSettings* unsafe_arena_release_stable_delegate_loader_settings(); + + // optional .tflite.proto.GoogleEdgeTpuSettings google_edgetpu_settings = 14; + bool has_google_edgetpu_settings() const; + private: + bool _internal_has_google_edgetpu_settings() const; + public: + void clear_google_edgetpu_settings(); + const ::tflite::proto::GoogleEdgeTpuSettings& google_edgetpu_settings() const; + PROTOBUF_NODISCARD ::tflite::proto::GoogleEdgeTpuSettings* release_google_edgetpu_settings(); + ::tflite::proto::GoogleEdgeTpuSettings* mutable_google_edgetpu_settings(); + void set_allocated_google_edgetpu_settings(::tflite::proto::GoogleEdgeTpuSettings* google_edgetpu_settings); + private: + const ::tflite::proto::GoogleEdgeTpuSettings& _internal_google_edgetpu_settings() const; + ::tflite::proto::GoogleEdgeTpuSettings* _internal_mutable_google_edgetpu_settings(); + public: + void unsafe_arena_set_allocated_google_edgetpu_settings( + ::tflite::proto::GoogleEdgeTpuSettings* google_edgetpu_settings); + ::tflite::proto::GoogleEdgeTpuSettings* unsafe_arena_release_google_edgetpu_settings(); + + // optional .tflite.proto.CompilationCachingSettings compilation_caching_settings = 15; + bool has_compilation_caching_settings() const; + private: + bool _internal_has_compilation_caching_settings() const; + public: + void clear_compilation_caching_settings(); + const ::tflite::proto::CompilationCachingSettings& compilation_caching_settings() const; + PROTOBUF_NODISCARD ::tflite::proto::CompilationCachingSettings* release_compilation_caching_settings(); + ::tflite::proto::CompilationCachingSettings* mutable_compilation_caching_settings(); + void set_allocated_compilation_caching_settings(::tflite::proto::CompilationCachingSettings* compilation_caching_settings); + private: + const ::tflite::proto::CompilationCachingSettings& _internal_compilation_caching_settings() const; + ::tflite::proto::CompilationCachingSettings* _internal_mutable_compilation_caching_settings(); + public: + void unsafe_arena_set_allocated_compilation_caching_settings( + ::tflite::proto::CompilationCachingSettings* compilation_caching_settings); + ::tflite::proto::CompilationCachingSettings* unsafe_arena_release_compilation_caching_settings(); + + // optional .tflite.proto.ArmNNSettings armnn_settings = 16; + bool has_armnn_settings() const; + private: + bool _internal_has_armnn_settings() const; + public: + void clear_armnn_settings(); + const ::tflite::proto::ArmNNSettings& armnn_settings() const; + PROTOBUF_NODISCARD ::tflite::proto::ArmNNSettings* release_armnn_settings(); + ::tflite::proto::ArmNNSettings* mutable_armnn_settings(); + void set_allocated_armnn_settings(::tflite::proto::ArmNNSettings* armnn_settings); + private: + const ::tflite::proto::ArmNNSettings& _internal_armnn_settings() const; + ::tflite::proto::ArmNNSettings* _internal_mutable_armnn_settings(); + public: + void unsafe_arena_set_allocated_armnn_settings( + ::tflite::proto::ArmNNSettings* armnn_settings); + ::tflite::proto::ArmNNSettings* unsafe_arena_release_armnn_settings(); + + // optional .tflite.proto.Delegate delegate = 1; + bool has_delegate() const; + private: + bool _internal_has_delegate() const; + public: + void clear_delegate(); + ::tflite::proto::Delegate delegate() const; + void set_delegate(::tflite::proto::Delegate value); + private: + ::tflite::proto::Delegate _internal_delegate() const; + void _internal_set_delegate(::tflite::proto::Delegate value); + public: + + // optional int32 max_delegated_partitions = 7; + bool has_max_delegated_partitions() const; + private: + bool _internal_has_max_delegated_partitions() const; + public: + void clear_max_delegated_partitions(); + int32_t max_delegated_partitions() const; + void set_max_delegated_partitions(int32_t value); + private: + int32_t _internal_max_delegated_partitions() const; + void _internal_set_max_delegated_partitions(int32_t value); + public: + + // optional bool disable_default_delegates = 12; + bool has_disable_default_delegates() const; + private: + bool _internal_has_disable_default_delegates() const; + public: + void clear_disable_default_delegates(); + bool disable_default_delegates() const; + void set_disable_default_delegates(bool value); + private: + bool _internal_disable_default_delegates() const; + void _internal_set_disable_default_delegates(bool value); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.TFLiteSettings) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::tflite::proto::NNAPISettings* nnapi_settings_; + ::tflite::proto::GPUSettings* gpu_settings_; + ::tflite::proto::HexagonSettings* hexagon_settings_; + ::tflite::proto::XNNPackSettings* xnnpack_settings_; + ::tflite::proto::CPUSettings* cpu_settings_; + ::tflite::proto::EdgeTpuSettings* edgetpu_settings_; + ::tflite::proto::FallbackSettings* fallback_settings_; + ::tflite::proto::CoralSettings* coral_settings_; + ::tflite::proto::CoreMLSettings* coreml_settings_; + ::tflite::proto::StableDelegateLoaderSettings* stable_delegate_loader_settings_; + ::tflite::proto::GoogleEdgeTpuSettings* google_edgetpu_settings_; + ::tflite::proto::CompilationCachingSettings* compilation_caching_settings_; + ::tflite::proto::ArmNNSettings* armnn_settings_; + int delegate_; + int32_t max_delegated_partitions_; + bool disable_default_delegates_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class FallbackSettings final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.FallbackSettings) */ { + public: + inline FallbackSettings() : FallbackSettings(nullptr) {} + ~FallbackSettings() override; + explicit PROTOBUF_CONSTEXPR FallbackSettings(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + FallbackSettings(const FallbackSettings& from); + FallbackSettings(FallbackSettings&& from) noexcept + : FallbackSettings() { + *this = ::std::move(from); + } + + inline FallbackSettings& operator=(const FallbackSettings& from) { + CopyFrom(from); + return *this; + } + inline FallbackSettings& operator=(FallbackSettings&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const FallbackSettings& default_instance() { + return *internal_default_instance(); + } + static inline const FallbackSettings* internal_default_instance() { + return reinterpret_cast( + &_FallbackSettings_default_instance_); + } + static constexpr int kIndexInFileMessages = + 16; + + friend void swap(FallbackSettings& a, FallbackSettings& b) { + a.Swap(&b); + } + inline void Swap(FallbackSettings* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(FallbackSettings* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + FallbackSettings* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const FallbackSettings& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const FallbackSettings& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(FallbackSettings* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.FallbackSettings"; + } + protected: + explicit FallbackSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kAllowAutomaticFallbackOnCompilationErrorFieldNumber = 7, + kAllowAutomaticFallbackOnExecutionErrorFieldNumber = 8, + }; + // optional bool allow_automatic_fallback_on_compilation_error = 7; + bool has_allow_automatic_fallback_on_compilation_error() const; + private: + bool _internal_has_allow_automatic_fallback_on_compilation_error() const; + public: + void clear_allow_automatic_fallback_on_compilation_error(); + bool allow_automatic_fallback_on_compilation_error() const; + void set_allow_automatic_fallback_on_compilation_error(bool value); + private: + bool _internal_allow_automatic_fallback_on_compilation_error() const; + void _internal_set_allow_automatic_fallback_on_compilation_error(bool value); + public: + + // optional bool allow_automatic_fallback_on_execution_error = 8; + bool has_allow_automatic_fallback_on_execution_error() const; + private: + bool _internal_has_allow_automatic_fallback_on_execution_error() const; + public: + void clear_allow_automatic_fallback_on_execution_error(); + bool allow_automatic_fallback_on_execution_error() const; + void set_allow_automatic_fallback_on_execution_error(bool value); + private: + bool _internal_allow_automatic_fallback_on_execution_error() const; + void _internal_set_allow_automatic_fallback_on_execution_error(bool value); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.FallbackSettings) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + bool allow_automatic_fallback_on_compilation_error_; + bool allow_automatic_fallback_on_execution_error_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class BenchmarkMetric final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.BenchmarkMetric) */ { + public: + inline BenchmarkMetric() : BenchmarkMetric(nullptr) {} + ~BenchmarkMetric() override; + explicit PROTOBUF_CONSTEXPR BenchmarkMetric(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BenchmarkMetric(const BenchmarkMetric& from); + BenchmarkMetric(BenchmarkMetric&& from) noexcept + : BenchmarkMetric() { + *this = ::std::move(from); + } + + inline BenchmarkMetric& operator=(const BenchmarkMetric& from) { + CopyFrom(from); + return *this; + } + inline BenchmarkMetric& operator=(BenchmarkMetric&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const BenchmarkMetric& default_instance() { + return *internal_default_instance(); + } + static inline const BenchmarkMetric* internal_default_instance() { + return reinterpret_cast( + &_BenchmarkMetric_default_instance_); + } + static constexpr int kIndexInFileMessages = + 17; + + friend void swap(BenchmarkMetric& a, BenchmarkMetric& b) { + a.Swap(&b); + } + inline void Swap(BenchmarkMetric* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(BenchmarkMetric* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BenchmarkMetric* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const BenchmarkMetric& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const BenchmarkMetric& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(BenchmarkMetric* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.BenchmarkMetric"; + } + protected: + explicit BenchmarkMetric(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kValuesFieldNumber = 2, + kNameFieldNumber = 1, + }; + // repeated float values = 2 [packed = true]; + int values_size() const; + private: + int _internal_values_size() const; + public: + void clear_values(); + private: + float _internal_values(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >& + _internal_values() const; + void _internal_add_values(float value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >* + _internal_mutable_values(); + public: + float values(int index) const; + void set_values(int index, float value); + void add_values(float value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >& + values() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >* + mutable_values(); + + // optional string name = 1; + bool has_name() const; + private: + bool _internal_has_name() const; + public: + void clear_name(); + const std::string& name() const; + template + void set_name(ArgT0&& arg0, ArgT... args); + std::string* mutable_name(); + PROTOBUF_NODISCARD std::string* release_name(); + void set_allocated_name(std::string* name); + private: + const std::string& _internal_name() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_name(const std::string& value); + std::string* _internal_mutable_name(); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.BenchmarkMetric) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< float > values_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr name_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class BenchmarkResult_InferenceOutput final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.BenchmarkResult.InferenceOutput) */ { + public: + inline BenchmarkResult_InferenceOutput() : BenchmarkResult_InferenceOutput(nullptr) {} + ~BenchmarkResult_InferenceOutput() override; + explicit PROTOBUF_CONSTEXPR BenchmarkResult_InferenceOutput(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BenchmarkResult_InferenceOutput(const BenchmarkResult_InferenceOutput& from); + BenchmarkResult_InferenceOutput(BenchmarkResult_InferenceOutput&& from) noexcept + : BenchmarkResult_InferenceOutput() { + *this = ::std::move(from); + } + + inline BenchmarkResult_InferenceOutput& operator=(const BenchmarkResult_InferenceOutput& from) { + CopyFrom(from); + return *this; + } + inline BenchmarkResult_InferenceOutput& operator=(BenchmarkResult_InferenceOutput&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const BenchmarkResult_InferenceOutput& default_instance() { + return *internal_default_instance(); + } + static inline const BenchmarkResult_InferenceOutput* internal_default_instance() { + return reinterpret_cast( + &_BenchmarkResult_InferenceOutput_default_instance_); + } + static constexpr int kIndexInFileMessages = + 18; + + friend void swap(BenchmarkResult_InferenceOutput& a, BenchmarkResult_InferenceOutput& b) { + a.Swap(&b); + } + inline void Swap(BenchmarkResult_InferenceOutput* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(BenchmarkResult_InferenceOutput* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BenchmarkResult_InferenceOutput* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const BenchmarkResult_InferenceOutput& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const BenchmarkResult_InferenceOutput& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(BenchmarkResult_InferenceOutput* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.BenchmarkResult.InferenceOutput"; + } + protected: + explicit BenchmarkResult_InferenceOutput(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kValueFieldNumber = 1, + }; + // optional bytes value = 1; + bool has_value() const; + private: + bool _internal_has_value() const; + public: + void clear_value(); + const std::string& value() const; + template + void set_value(ArgT0&& arg0, ArgT... args); + std::string* mutable_value(); + PROTOBUF_NODISCARD std::string* release_value(); + void set_allocated_value(std::string* value); + private: + const std::string& _internal_value() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_value(const std::string& value); + std::string* _internal_mutable_value(); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.BenchmarkResult.InferenceOutput) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr value_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class BenchmarkResult final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.BenchmarkResult) */ { + public: + inline BenchmarkResult() : BenchmarkResult(nullptr) {} + ~BenchmarkResult() override; + explicit PROTOBUF_CONSTEXPR BenchmarkResult(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BenchmarkResult(const BenchmarkResult& from); + BenchmarkResult(BenchmarkResult&& from) noexcept + : BenchmarkResult() { + *this = ::std::move(from); + } + + inline BenchmarkResult& operator=(const BenchmarkResult& from) { + CopyFrom(from); + return *this; + } + inline BenchmarkResult& operator=(BenchmarkResult&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const BenchmarkResult& default_instance() { + return *internal_default_instance(); + } + static inline const BenchmarkResult* internal_default_instance() { + return reinterpret_cast( + &_BenchmarkResult_default_instance_); + } + static constexpr int kIndexInFileMessages = + 19; + + friend void swap(BenchmarkResult& a, BenchmarkResult& b) { + a.Swap(&b); + } + inline void Swap(BenchmarkResult* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(BenchmarkResult* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BenchmarkResult* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const BenchmarkResult& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const BenchmarkResult& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(BenchmarkResult* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.BenchmarkResult"; + } + protected: + explicit BenchmarkResult(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + typedef BenchmarkResult_InferenceOutput InferenceOutput; + + // accessors ------------------------------------------------------- + + enum : int { + kInitializationTimeUsFieldNumber = 1, + kInferenceTimeUsFieldNumber = 2, + kMetricsFieldNumber = 5, + kActualOutputFieldNumber = 6, + kMaxMemoryKbFieldNumber = 3, + kOkFieldNumber = 4, + }; + // repeated int64 initialization_time_us = 1 [packed = true]; + int initialization_time_us_size() const; + private: + int _internal_initialization_time_us_size() const; + public: + void clear_initialization_time_us(); + private: + int64_t _internal_initialization_time_us(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + _internal_initialization_time_us() const; + void _internal_add_initialization_time_us(int64_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + _internal_mutable_initialization_time_us(); + public: + int64_t initialization_time_us(int index) const; + void set_initialization_time_us(int index, int64_t value); + void add_initialization_time_us(int64_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + initialization_time_us() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + mutable_initialization_time_us(); + + // repeated int64 inference_time_us = 2 [packed = true]; + int inference_time_us_size() const; + private: + int _internal_inference_time_us_size() const; + public: + void clear_inference_time_us(); + private: + int64_t _internal_inference_time_us(int index) const; + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + _internal_inference_time_us() const; + void _internal_add_inference_time_us(int64_t value); + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + _internal_mutable_inference_time_us(); + public: + int64_t inference_time_us(int index) const; + void set_inference_time_us(int index, int64_t value); + void add_inference_time_us(int64_t value); + const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& + inference_time_us() const; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* + mutable_inference_time_us(); + + // repeated .tflite.proto.BenchmarkMetric metrics = 5; + int metrics_size() const; + private: + int _internal_metrics_size() const; + public: + void clear_metrics(); + ::tflite::proto::BenchmarkMetric* mutable_metrics(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tflite::proto::BenchmarkMetric >* + mutable_metrics(); + private: + const ::tflite::proto::BenchmarkMetric& _internal_metrics(int index) const; + ::tflite::proto::BenchmarkMetric* _internal_add_metrics(); + public: + const ::tflite::proto::BenchmarkMetric& metrics(int index) const; + ::tflite::proto::BenchmarkMetric* add_metrics(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tflite::proto::BenchmarkMetric >& + metrics() const; + + // repeated .tflite.proto.BenchmarkResult.InferenceOutput actual_output = 6; + int actual_output_size() const; + private: + int _internal_actual_output_size() const; + public: + void clear_actual_output(); + ::tflite::proto::BenchmarkResult_InferenceOutput* mutable_actual_output(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tflite::proto::BenchmarkResult_InferenceOutput >* + mutable_actual_output(); + private: + const ::tflite::proto::BenchmarkResult_InferenceOutput& _internal_actual_output(int index) const; + ::tflite::proto::BenchmarkResult_InferenceOutput* _internal_add_actual_output(); + public: + const ::tflite::proto::BenchmarkResult_InferenceOutput& actual_output(int index) const; + ::tflite::proto::BenchmarkResult_InferenceOutput* add_actual_output(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tflite::proto::BenchmarkResult_InferenceOutput >& + actual_output() const; + + // optional int32 max_memory_kb = 3; + bool has_max_memory_kb() const; + private: + bool _internal_has_max_memory_kb() const; + public: + void clear_max_memory_kb(); + int32_t max_memory_kb() const; + void set_max_memory_kb(int32_t value); + private: + int32_t _internal_max_memory_kb() const; + void _internal_set_max_memory_kb(int32_t value); + public: + + // optional bool ok = 4; + bool has_ok() const; + private: + bool _internal_has_ok() const; + public: + void clear_ok(); + bool ok() const; + void set_ok(bool value); + private: + bool _internal_ok() const; + void _internal_set_ok(bool value); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.BenchmarkResult) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t > initialization_time_us_; + mutable std::atomic _initialization_time_us_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t > inference_time_us_; + mutable std::atomic _inference_time_us_cached_byte_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tflite::proto::BenchmarkMetric > metrics_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tflite::proto::BenchmarkResult_InferenceOutput > actual_output_; + int32_t max_memory_kb_; + bool ok_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class ErrorCode final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.ErrorCode) */ { + public: + inline ErrorCode() : ErrorCode(nullptr) {} + ~ErrorCode() override; + explicit PROTOBUF_CONSTEXPR ErrorCode(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ErrorCode(const ErrorCode& from); + ErrorCode(ErrorCode&& from) noexcept + : ErrorCode() { + *this = ::std::move(from); + } + + inline ErrorCode& operator=(const ErrorCode& from) { + CopyFrom(from); + return *this; + } + inline ErrorCode& operator=(ErrorCode&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ErrorCode& default_instance() { + return *internal_default_instance(); + } + static inline const ErrorCode* internal_default_instance() { + return reinterpret_cast( + &_ErrorCode_default_instance_); + } + static constexpr int kIndexInFileMessages = + 20; + + friend void swap(ErrorCode& a, ErrorCode& b) { + a.Swap(&b); + } + inline void Swap(ErrorCode* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ErrorCode* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ErrorCode* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ErrorCode& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const ErrorCode& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ErrorCode* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.ErrorCode"; + } + protected: + explicit ErrorCode(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSourceFieldNumber = 1, + kTfliteErrorFieldNumber = 2, + kUnderlyingApiErrorFieldNumber = 3, + }; + // optional .tflite.proto.Delegate source = 1; + bool has_source() const; + private: + bool _internal_has_source() const; + public: + void clear_source(); + ::tflite::proto::Delegate source() const; + void set_source(::tflite::proto::Delegate value); + private: + ::tflite::proto::Delegate _internal_source() const; + void _internal_set_source(::tflite::proto::Delegate value); + public: + + // optional int32 tflite_error = 2; + bool has_tflite_error() const; + private: + bool _internal_has_tflite_error() const; + public: + void clear_tflite_error(); + int32_t tflite_error() const; + void set_tflite_error(int32_t value); + private: + int32_t _internal_tflite_error() const; + void _internal_set_tflite_error(int32_t value); + public: + + // optional int64 underlying_api_error = 3; + bool has_underlying_api_error() const; + private: + bool _internal_has_underlying_api_error() const; + public: + void clear_underlying_api_error(); + int64_t underlying_api_error() const; + void set_underlying_api_error(int64_t value); + private: + int64_t _internal_underlying_api_error() const; + void _internal_set_underlying_api_error(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.ErrorCode) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + int source_; + int32_t tflite_error_; + int64_t underlying_api_error_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class BenchmarkError final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.BenchmarkError) */ { + public: + inline BenchmarkError() : BenchmarkError(nullptr) {} + ~BenchmarkError() override; + explicit PROTOBUF_CONSTEXPR BenchmarkError(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BenchmarkError(const BenchmarkError& from); + BenchmarkError(BenchmarkError&& from) noexcept + : BenchmarkError() { + *this = ::std::move(from); + } + + inline BenchmarkError& operator=(const BenchmarkError& from) { + CopyFrom(from); + return *this; + } + inline BenchmarkError& operator=(BenchmarkError&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const BenchmarkError& default_instance() { + return *internal_default_instance(); + } + static inline const BenchmarkError* internal_default_instance() { + return reinterpret_cast( + &_BenchmarkError_default_instance_); + } + static constexpr int kIndexInFileMessages = + 21; + + friend void swap(BenchmarkError& a, BenchmarkError& b) { + a.Swap(&b); + } + inline void Swap(BenchmarkError* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(BenchmarkError* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BenchmarkError* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const BenchmarkError& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const BenchmarkError& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(BenchmarkError* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.BenchmarkError"; + } + protected: + explicit BenchmarkError(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kErrorCodeFieldNumber = 4, + kStageFieldNumber = 1, + kExitCodeFieldNumber = 2, + kSignalFieldNumber = 3, + kMiniBenchmarkErrorCodeFieldNumber = 5, + }; + // repeated .tflite.proto.ErrorCode error_code = 4; + int error_code_size() const; + private: + int _internal_error_code_size() const; + public: + void clear_error_code(); + ::tflite::proto::ErrorCode* mutable_error_code(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tflite::proto::ErrorCode >* + mutable_error_code(); + private: + const ::tflite::proto::ErrorCode& _internal_error_code(int index) const; + ::tflite::proto::ErrorCode* _internal_add_error_code(); + public: + const ::tflite::proto::ErrorCode& error_code(int index) const; + ::tflite::proto::ErrorCode* add_error_code(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tflite::proto::ErrorCode >& + error_code() const; + + // optional .tflite.proto.BenchmarkStage stage = 1; + bool has_stage() const; + private: + bool _internal_has_stage() const; + public: + void clear_stage(); + ::tflite::proto::BenchmarkStage stage() const; + void set_stage(::tflite::proto::BenchmarkStage value); + private: + ::tflite::proto::BenchmarkStage _internal_stage() const; + void _internal_set_stage(::tflite::proto::BenchmarkStage value); + public: + + // optional int32 exit_code = 2; + bool has_exit_code() const; + private: + bool _internal_has_exit_code() const; + public: + void clear_exit_code(); + int32_t exit_code() const; + void set_exit_code(int32_t value); + private: + int32_t _internal_exit_code() const; + void _internal_set_exit_code(int32_t value); + public: + + // optional int32 signal = 3; + bool has_signal() const; + private: + bool _internal_has_signal() const; + public: + void clear_signal(); + int32_t signal() const; + void set_signal(int32_t value); + private: + int32_t _internal_signal() const; + void _internal_set_signal(int32_t value); + public: + + // optional int32 mini_benchmark_error_code = 5; + bool has_mini_benchmark_error_code() const; + private: + bool _internal_has_mini_benchmark_error_code() const; + public: + void clear_mini_benchmark_error_code(); + int32_t mini_benchmark_error_code() const; + void set_mini_benchmark_error_code(int32_t value); + private: + int32_t _internal_mini_benchmark_error_code() const; + void _internal_set_mini_benchmark_error_code(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.BenchmarkError) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tflite::proto::ErrorCode > error_code_; + int stage_; + int32_t exit_code_; + int32_t signal_; + int32_t mini_benchmark_error_code_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class BenchmarkEvent final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.BenchmarkEvent) */ { + public: + inline BenchmarkEvent() : BenchmarkEvent(nullptr) {} + ~BenchmarkEvent() override; + explicit PROTOBUF_CONSTEXPR BenchmarkEvent(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BenchmarkEvent(const BenchmarkEvent& from); + BenchmarkEvent(BenchmarkEvent&& from) noexcept + : BenchmarkEvent() { + *this = ::std::move(from); + } + + inline BenchmarkEvent& operator=(const BenchmarkEvent& from) { + CopyFrom(from); + return *this; + } + inline BenchmarkEvent& operator=(BenchmarkEvent&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const BenchmarkEvent& default_instance() { + return *internal_default_instance(); + } + static inline const BenchmarkEvent* internal_default_instance() { + return reinterpret_cast( + &_BenchmarkEvent_default_instance_); + } + static constexpr int kIndexInFileMessages = + 22; + + friend void swap(BenchmarkEvent& a, BenchmarkEvent& b) { + a.Swap(&b); + } + inline void Swap(BenchmarkEvent* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(BenchmarkEvent* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BenchmarkEvent* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const BenchmarkEvent& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const BenchmarkEvent& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(BenchmarkEvent* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.BenchmarkEvent"; + } + protected: + explicit BenchmarkEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kTfliteSettingsFieldNumber = 1, + kResultFieldNumber = 3, + kErrorFieldNumber = 4, + kBoottimeUsFieldNumber = 5, + kWallclockUsFieldNumber = 6, + kEventTypeFieldNumber = 2, + }; + // optional .tflite.proto.TFLiteSettings tflite_settings = 1; + bool has_tflite_settings() const; + private: + bool _internal_has_tflite_settings() const; + public: + void clear_tflite_settings(); + const ::tflite::proto::TFLiteSettings& tflite_settings() const; + PROTOBUF_NODISCARD ::tflite::proto::TFLiteSettings* release_tflite_settings(); + ::tflite::proto::TFLiteSettings* mutable_tflite_settings(); + void set_allocated_tflite_settings(::tflite::proto::TFLiteSettings* tflite_settings); + private: + const ::tflite::proto::TFLiteSettings& _internal_tflite_settings() const; + ::tflite::proto::TFLiteSettings* _internal_mutable_tflite_settings(); + public: + void unsafe_arena_set_allocated_tflite_settings( + ::tflite::proto::TFLiteSettings* tflite_settings); + ::tflite::proto::TFLiteSettings* unsafe_arena_release_tflite_settings(); + + // optional .tflite.proto.BenchmarkResult result = 3; + bool has_result() const; + private: + bool _internal_has_result() const; + public: + void clear_result(); + const ::tflite::proto::BenchmarkResult& result() const; + PROTOBUF_NODISCARD ::tflite::proto::BenchmarkResult* release_result(); + ::tflite::proto::BenchmarkResult* mutable_result(); + void set_allocated_result(::tflite::proto::BenchmarkResult* result); + private: + const ::tflite::proto::BenchmarkResult& _internal_result() const; + ::tflite::proto::BenchmarkResult* _internal_mutable_result(); + public: + void unsafe_arena_set_allocated_result( + ::tflite::proto::BenchmarkResult* result); + ::tflite::proto::BenchmarkResult* unsafe_arena_release_result(); + + // optional .tflite.proto.BenchmarkError error = 4; + bool has_error() const; + private: + bool _internal_has_error() const; + public: + void clear_error(); + const ::tflite::proto::BenchmarkError& error() const; + PROTOBUF_NODISCARD ::tflite::proto::BenchmarkError* release_error(); + ::tflite::proto::BenchmarkError* mutable_error(); + void set_allocated_error(::tflite::proto::BenchmarkError* error); + private: + const ::tflite::proto::BenchmarkError& _internal_error() const; + ::tflite::proto::BenchmarkError* _internal_mutable_error(); + public: + void unsafe_arena_set_allocated_error( + ::tflite::proto::BenchmarkError* error); + ::tflite::proto::BenchmarkError* unsafe_arena_release_error(); + + // optional int64 boottime_us = 5; + bool has_boottime_us() const; + private: + bool _internal_has_boottime_us() const; + public: + void clear_boottime_us(); + int64_t boottime_us() const; + void set_boottime_us(int64_t value); + private: + int64_t _internal_boottime_us() const; + void _internal_set_boottime_us(int64_t value); + public: + + // optional int64 wallclock_us = 6; + bool has_wallclock_us() const; + private: + bool _internal_has_wallclock_us() const; + public: + void clear_wallclock_us(); + int64_t wallclock_us() const; + void set_wallclock_us(int64_t value); + private: + int64_t _internal_wallclock_us() const; + void _internal_set_wallclock_us(int64_t value); + public: + + // optional .tflite.proto.BenchmarkEventType event_type = 2; + bool has_event_type() const; + private: + bool _internal_has_event_type() const; + public: + void clear_event_type(); + ::tflite::proto::BenchmarkEventType event_type() const; + void set_event_type(::tflite::proto::BenchmarkEventType value); + private: + ::tflite::proto::BenchmarkEventType _internal_event_type() const; + void _internal_set_event_type(::tflite::proto::BenchmarkEventType value); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.BenchmarkEvent) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::tflite::proto::TFLiteSettings* tflite_settings_; + ::tflite::proto::BenchmarkResult* result_; + ::tflite::proto::BenchmarkError* error_; + int64_t boottime_us_; + int64_t wallclock_us_; + int event_type_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class BestAccelerationDecision final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.BestAccelerationDecision) */ { + public: + inline BestAccelerationDecision() : BestAccelerationDecision(nullptr) {} + ~BestAccelerationDecision() override; + explicit PROTOBUF_CONSTEXPR BestAccelerationDecision(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BestAccelerationDecision(const BestAccelerationDecision& from); + BestAccelerationDecision(BestAccelerationDecision&& from) noexcept + : BestAccelerationDecision() { + *this = ::std::move(from); + } + + inline BestAccelerationDecision& operator=(const BestAccelerationDecision& from) { + CopyFrom(from); + return *this; + } + inline BestAccelerationDecision& operator=(BestAccelerationDecision&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const BestAccelerationDecision& default_instance() { + return *internal_default_instance(); + } + static inline const BestAccelerationDecision* internal_default_instance() { + return reinterpret_cast( + &_BestAccelerationDecision_default_instance_); + } + static constexpr int kIndexInFileMessages = + 23; + + friend void swap(BestAccelerationDecision& a, BestAccelerationDecision& b) { + a.Swap(&b); + } + inline void Swap(BestAccelerationDecision* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(BestAccelerationDecision* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BestAccelerationDecision* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const BestAccelerationDecision& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const BestAccelerationDecision& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(BestAccelerationDecision* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.BestAccelerationDecision"; + } + protected: + explicit BestAccelerationDecision(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kMinLatencyEventFieldNumber = 2, + kMinInferenceTimeUsFieldNumber = 3, + kNumberOfSourceEventsFieldNumber = 1, + }; + // optional .tflite.proto.BenchmarkEvent min_latency_event = 2; + bool has_min_latency_event() const; + private: + bool _internal_has_min_latency_event() const; + public: + void clear_min_latency_event(); + const ::tflite::proto::BenchmarkEvent& min_latency_event() const; + PROTOBUF_NODISCARD ::tflite::proto::BenchmarkEvent* release_min_latency_event(); + ::tflite::proto::BenchmarkEvent* mutable_min_latency_event(); + void set_allocated_min_latency_event(::tflite::proto::BenchmarkEvent* min_latency_event); + private: + const ::tflite::proto::BenchmarkEvent& _internal_min_latency_event() const; + ::tflite::proto::BenchmarkEvent* _internal_mutable_min_latency_event(); + public: + void unsafe_arena_set_allocated_min_latency_event( + ::tflite::proto::BenchmarkEvent* min_latency_event); + ::tflite::proto::BenchmarkEvent* unsafe_arena_release_min_latency_event(); + + // optional int64 min_inference_time_us = 3; + bool has_min_inference_time_us() const; + private: + bool _internal_has_min_inference_time_us() const; + public: + void clear_min_inference_time_us(); + int64_t min_inference_time_us() const; + void set_min_inference_time_us(int64_t value); + private: + int64_t _internal_min_inference_time_us() const; + void _internal_set_min_inference_time_us(int64_t value); + public: + + // optional int32 number_of_source_events = 1; + bool has_number_of_source_events() const; + private: + bool _internal_has_number_of_source_events() const; + public: + void clear_number_of_source_events(); + int32_t number_of_source_events() const; + void set_number_of_source_events(int32_t value); + private: + int32_t _internal_number_of_source_events() const; + void _internal_set_number_of_source_events(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.BestAccelerationDecision) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::tflite::proto::BenchmarkEvent* min_latency_event_; + int64_t min_inference_time_us_; + int32_t number_of_source_events_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class BenchmarkInitializationFailure final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.BenchmarkInitializationFailure) */ { + public: + inline BenchmarkInitializationFailure() : BenchmarkInitializationFailure(nullptr) {} + ~BenchmarkInitializationFailure() override; + explicit PROTOBUF_CONSTEXPR BenchmarkInitializationFailure(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BenchmarkInitializationFailure(const BenchmarkInitializationFailure& from); + BenchmarkInitializationFailure(BenchmarkInitializationFailure&& from) noexcept + : BenchmarkInitializationFailure() { + *this = ::std::move(from); + } + + inline BenchmarkInitializationFailure& operator=(const BenchmarkInitializationFailure& from) { + CopyFrom(from); + return *this; + } + inline BenchmarkInitializationFailure& operator=(BenchmarkInitializationFailure&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const BenchmarkInitializationFailure& default_instance() { + return *internal_default_instance(); + } + static inline const BenchmarkInitializationFailure* internal_default_instance() { + return reinterpret_cast( + &_BenchmarkInitializationFailure_default_instance_); + } + static constexpr int kIndexInFileMessages = + 24; + + friend void swap(BenchmarkInitializationFailure& a, BenchmarkInitializationFailure& b) { + a.Swap(&b); + } + inline void Swap(BenchmarkInitializationFailure* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(BenchmarkInitializationFailure* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BenchmarkInitializationFailure* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const BenchmarkInitializationFailure& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const BenchmarkInitializationFailure& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(BenchmarkInitializationFailure* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.BenchmarkInitializationFailure"; + } + protected: + explicit BenchmarkInitializationFailure(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kInitializationStatusFieldNumber = 1, + }; + // optional int32 initialization_status = 1; + bool has_initialization_status() const; + private: + bool _internal_has_initialization_status() const; + public: + void clear_initialization_status(); + int32_t initialization_status() const; + void set_initialization_status(int32_t value); + private: + int32_t _internal_initialization_status() const; + void _internal_set_initialization_status(int32_t value); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.BenchmarkInitializationFailure) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + int32_t initialization_status_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class MiniBenchmarkEvent final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.MiniBenchmarkEvent) */ { + public: + inline MiniBenchmarkEvent() : MiniBenchmarkEvent(nullptr) {} + ~MiniBenchmarkEvent() override; + explicit PROTOBUF_CONSTEXPR MiniBenchmarkEvent(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + MiniBenchmarkEvent(const MiniBenchmarkEvent& from); + MiniBenchmarkEvent(MiniBenchmarkEvent&& from) noexcept + : MiniBenchmarkEvent() { + *this = ::std::move(from); + } + + inline MiniBenchmarkEvent& operator=(const MiniBenchmarkEvent& from) { + CopyFrom(from); + return *this; + } + inline MiniBenchmarkEvent& operator=(MiniBenchmarkEvent&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const MiniBenchmarkEvent& default_instance() { + return *internal_default_instance(); + } + static inline const MiniBenchmarkEvent* internal_default_instance() { + return reinterpret_cast( + &_MiniBenchmarkEvent_default_instance_); + } + static constexpr int kIndexInFileMessages = + 25; + + friend void swap(MiniBenchmarkEvent& a, MiniBenchmarkEvent& b) { + a.Swap(&b); + } + inline void Swap(MiniBenchmarkEvent* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MiniBenchmarkEvent* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + MiniBenchmarkEvent* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const MiniBenchmarkEvent& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const MiniBenchmarkEvent& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(MiniBenchmarkEvent* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.MiniBenchmarkEvent"; + } + protected: + explicit MiniBenchmarkEvent(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kBestAccelerationDecisionFieldNumber = 2, + kInitializationFailureFieldNumber = 3, + kBenchmarkEventFieldNumber = 4, + kIsLogFlushingEventFieldNumber = 1, + }; + // optional .tflite.proto.BestAccelerationDecision best_acceleration_decision = 2; + bool has_best_acceleration_decision() const; + private: + bool _internal_has_best_acceleration_decision() const; + public: + void clear_best_acceleration_decision(); + const ::tflite::proto::BestAccelerationDecision& best_acceleration_decision() const; + PROTOBUF_NODISCARD ::tflite::proto::BestAccelerationDecision* release_best_acceleration_decision(); + ::tflite::proto::BestAccelerationDecision* mutable_best_acceleration_decision(); + void set_allocated_best_acceleration_decision(::tflite::proto::BestAccelerationDecision* best_acceleration_decision); + private: + const ::tflite::proto::BestAccelerationDecision& _internal_best_acceleration_decision() const; + ::tflite::proto::BestAccelerationDecision* _internal_mutable_best_acceleration_decision(); + public: + void unsafe_arena_set_allocated_best_acceleration_decision( + ::tflite::proto::BestAccelerationDecision* best_acceleration_decision); + ::tflite::proto::BestAccelerationDecision* unsafe_arena_release_best_acceleration_decision(); + + // optional .tflite.proto.BenchmarkInitializationFailure initialization_failure = 3; + bool has_initialization_failure() const; + private: + bool _internal_has_initialization_failure() const; + public: + void clear_initialization_failure(); + const ::tflite::proto::BenchmarkInitializationFailure& initialization_failure() const; + PROTOBUF_NODISCARD ::tflite::proto::BenchmarkInitializationFailure* release_initialization_failure(); + ::tflite::proto::BenchmarkInitializationFailure* mutable_initialization_failure(); + void set_allocated_initialization_failure(::tflite::proto::BenchmarkInitializationFailure* initialization_failure); + private: + const ::tflite::proto::BenchmarkInitializationFailure& _internal_initialization_failure() const; + ::tflite::proto::BenchmarkInitializationFailure* _internal_mutable_initialization_failure(); + public: + void unsafe_arena_set_allocated_initialization_failure( + ::tflite::proto::BenchmarkInitializationFailure* initialization_failure); + ::tflite::proto::BenchmarkInitializationFailure* unsafe_arena_release_initialization_failure(); + + // optional .tflite.proto.BenchmarkEvent benchmark_event = 4; + bool has_benchmark_event() const; + private: + bool _internal_has_benchmark_event() const; + public: + void clear_benchmark_event(); + const ::tflite::proto::BenchmarkEvent& benchmark_event() const; + PROTOBUF_NODISCARD ::tflite::proto::BenchmarkEvent* release_benchmark_event(); + ::tflite::proto::BenchmarkEvent* mutable_benchmark_event(); + void set_allocated_benchmark_event(::tflite::proto::BenchmarkEvent* benchmark_event); + private: + const ::tflite::proto::BenchmarkEvent& _internal_benchmark_event() const; + ::tflite::proto::BenchmarkEvent* _internal_mutable_benchmark_event(); + public: + void unsafe_arena_set_allocated_benchmark_event( + ::tflite::proto::BenchmarkEvent* benchmark_event); + ::tflite::proto::BenchmarkEvent* unsafe_arena_release_benchmark_event(); + + // optional bool is_log_flushing_event = 1; + bool has_is_log_flushing_event() const; + private: + bool _internal_has_is_log_flushing_event() const; + public: + void clear_is_log_flushing_event(); + bool is_log_flushing_event() const; + void set_is_log_flushing_event(bool value); + private: + bool _internal_is_log_flushing_event() const; + void _internal_set_is_log_flushing_event(bool value); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.MiniBenchmarkEvent) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::tflite::proto::BestAccelerationDecision* best_acceleration_decision_; + ::tflite::proto::BenchmarkInitializationFailure* initialization_failure_; + ::tflite::proto::BenchmarkEvent* benchmark_event_; + bool is_log_flushing_event_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class ModelFile final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.ModelFile) */ { + public: + inline ModelFile() : ModelFile(nullptr) {} + ~ModelFile() override; + explicit PROTOBUF_CONSTEXPR ModelFile(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ModelFile(const ModelFile& from); + ModelFile(ModelFile&& from) noexcept + : ModelFile() { + *this = ::std::move(from); + } + + inline ModelFile& operator=(const ModelFile& from) { + CopyFrom(from); + return *this; + } + inline ModelFile& operator=(ModelFile&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ModelFile& default_instance() { + return *internal_default_instance(); + } + static inline const ModelFile* internal_default_instance() { + return reinterpret_cast( + &_ModelFile_default_instance_); + } + static constexpr int kIndexInFileMessages = + 26; + + friend void swap(ModelFile& a, ModelFile& b) { + a.Swap(&b); + } + inline void Swap(ModelFile* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ModelFile* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ModelFile* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ModelFile& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const ModelFile& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ModelFile* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.ModelFile"; + } + protected: + explicit ModelFile(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kFilenameFieldNumber = 1, + kModelIdGroupFieldNumber = 5, + kFdFieldNumber = 2, + kOffsetFieldNumber = 3, + kLengthFieldNumber = 4, + kBufferHandleFieldNumber = 6, + }; + // optional string filename = 1; + bool has_filename() const; + private: + bool _internal_has_filename() const; + public: + void clear_filename(); + const std::string& filename() const; + template + void set_filename(ArgT0&& arg0, ArgT... args); + std::string* mutable_filename(); + PROTOBUF_NODISCARD std::string* release_filename(); + void set_allocated_filename(std::string* filename); + private: + const std::string& _internal_filename() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_filename(const std::string& value); + std::string* _internal_mutable_filename(); + public: + + // optional .tflite.proto.ModelIdGroup model_id_group = 5; + bool has_model_id_group() const; + private: + bool _internal_has_model_id_group() const; + public: + void clear_model_id_group(); + const ::tflite::proto::ModelIdGroup& model_id_group() const; + PROTOBUF_NODISCARD ::tflite::proto::ModelIdGroup* release_model_id_group(); + ::tflite::proto::ModelIdGroup* mutable_model_id_group(); + void set_allocated_model_id_group(::tflite::proto::ModelIdGroup* model_id_group); + private: + const ::tflite::proto::ModelIdGroup& _internal_model_id_group() const; + ::tflite::proto::ModelIdGroup* _internal_mutable_model_id_group(); + public: + void unsafe_arena_set_allocated_model_id_group( + ::tflite::proto::ModelIdGroup* model_id_group); + ::tflite::proto::ModelIdGroup* unsafe_arena_release_model_id_group(); + + // optional int64 fd = 2; + bool has_fd() const; + private: + bool _internal_has_fd() const; + public: + void clear_fd(); + int64_t fd() const; + void set_fd(int64_t value); + private: + int64_t _internal_fd() const; + void _internal_set_fd(int64_t value); + public: + + // optional int64 offset = 3; + bool has_offset() const; + private: + bool _internal_has_offset() const; + public: + void clear_offset(); + int64_t offset() const; + void set_offset(int64_t value); + private: + int64_t _internal_offset() const; + void _internal_set_offset(int64_t value); + public: + + // optional int64 length = 4; + bool has_length() const; + private: + bool _internal_has_length() const; + public: + void clear_length(); + int64_t length() const; + void set_length(int64_t value); + private: + int64_t _internal_length() const; + void _internal_set_length(int64_t value); + public: + + // optional int64 buffer_handle = 6; + bool has_buffer_handle() const; + private: + bool _internal_has_buffer_handle() const; + public: + void clear_buffer_handle(); + int64_t buffer_handle() const; + void set_buffer_handle(int64_t value); + private: + int64_t _internal_buffer_handle() const; + void _internal_set_buffer_handle(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.ModelFile) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr filename_; + ::tflite::proto::ModelIdGroup* model_id_group_; + int64_t fd_; + int64_t offset_; + int64_t length_; + int64_t buffer_handle_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class ModelIdGroup final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.ModelIdGroup) */ { + public: + inline ModelIdGroup() : ModelIdGroup(nullptr) {} + ~ModelIdGroup() override; + explicit PROTOBUF_CONSTEXPR ModelIdGroup(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ModelIdGroup(const ModelIdGroup& from); + ModelIdGroup(ModelIdGroup&& from) noexcept + : ModelIdGroup() { + *this = ::std::move(from); + } + + inline ModelIdGroup& operator=(const ModelIdGroup& from) { + CopyFrom(from); + return *this; + } + inline ModelIdGroup& operator=(ModelIdGroup&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ModelIdGroup& default_instance() { + return *internal_default_instance(); + } + static inline const ModelIdGroup* internal_default_instance() { + return reinterpret_cast( + &_ModelIdGroup_default_instance_); + } + static constexpr int kIndexInFileMessages = + 27; + + friend void swap(ModelIdGroup& a, ModelIdGroup& b) { + a.Swap(&b); + } + inline void Swap(ModelIdGroup* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ModelIdGroup* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ModelIdGroup* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ModelIdGroup& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const ModelIdGroup& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ModelIdGroup* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.ModelIdGroup"; + } + protected: + explicit ModelIdGroup(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kModelNamespaceFieldNumber = 1, + kModelIdFieldNumber = 2, + }; + // optional string model_namespace = 1; + bool has_model_namespace() const; + private: + bool _internal_has_model_namespace() const; + public: + void clear_model_namespace(); + const std::string& model_namespace() const; + template + void set_model_namespace(ArgT0&& arg0, ArgT... args); + std::string* mutable_model_namespace(); + PROTOBUF_NODISCARD std::string* release_model_namespace(); + void set_allocated_model_namespace(std::string* model_namespace); + private: + const std::string& _internal_model_namespace() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_model_namespace(const std::string& value); + std::string* _internal_mutable_model_namespace(); + public: + + // optional string model_id = 2; + bool has_model_id() const; + private: + bool _internal_has_model_id() const; + public: + void clear_model_id(); + const std::string& model_id() const; + template + void set_model_id(ArgT0&& arg0, ArgT... args); + std::string* mutable_model_id(); + PROTOBUF_NODISCARD std::string* release_model_id(); + void set_allocated_model_id(std::string* model_id); + private: + const std::string& _internal_model_id() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_model_id(const std::string& value); + std::string* _internal_mutable_model_id(); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.ModelIdGroup) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr model_namespace_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr model_id_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class BenchmarkStoragePaths final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.BenchmarkStoragePaths) */ { + public: + inline BenchmarkStoragePaths() : BenchmarkStoragePaths(nullptr) {} + ~BenchmarkStoragePaths() override; + explicit PROTOBUF_CONSTEXPR BenchmarkStoragePaths(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BenchmarkStoragePaths(const BenchmarkStoragePaths& from); + BenchmarkStoragePaths(BenchmarkStoragePaths&& from) noexcept + : BenchmarkStoragePaths() { + *this = ::std::move(from); + } + + inline BenchmarkStoragePaths& operator=(const BenchmarkStoragePaths& from) { + CopyFrom(from); + return *this; + } + inline BenchmarkStoragePaths& operator=(BenchmarkStoragePaths&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const BenchmarkStoragePaths& default_instance() { + return *internal_default_instance(); + } + static inline const BenchmarkStoragePaths* internal_default_instance() { + return reinterpret_cast( + &_BenchmarkStoragePaths_default_instance_); + } + static constexpr int kIndexInFileMessages = + 28; + + friend void swap(BenchmarkStoragePaths& a, BenchmarkStoragePaths& b) { + a.Swap(&b); + } + inline void Swap(BenchmarkStoragePaths* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(BenchmarkStoragePaths* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BenchmarkStoragePaths* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const BenchmarkStoragePaths& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const BenchmarkStoragePaths& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(BenchmarkStoragePaths* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.BenchmarkStoragePaths"; + } + protected: + explicit BenchmarkStoragePaths(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kStorageFilePathFieldNumber = 1, + kDataDirectoryPathFieldNumber = 2, + }; + // optional string storage_file_path = 1; + bool has_storage_file_path() const; + private: + bool _internal_has_storage_file_path() const; + public: + void clear_storage_file_path(); + const std::string& storage_file_path() const; + template + void set_storage_file_path(ArgT0&& arg0, ArgT... args); + std::string* mutable_storage_file_path(); + PROTOBUF_NODISCARD std::string* release_storage_file_path(); + void set_allocated_storage_file_path(std::string* storage_file_path); + private: + const std::string& _internal_storage_file_path() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_storage_file_path(const std::string& value); + std::string* _internal_mutable_storage_file_path(); + public: + + // optional string data_directory_path = 2; + bool has_data_directory_path() const; + private: + bool _internal_has_data_directory_path() const; + public: + void clear_data_directory_path(); + const std::string& data_directory_path() const; + template + void set_data_directory_path(ArgT0&& arg0, ArgT... args); + std::string* mutable_data_directory_path(); + PROTOBUF_NODISCARD std::string* release_data_directory_path(); + void set_allocated_data_directory_path(std::string* data_directory_path); + private: + const std::string& _internal_data_directory_path() const; + inline PROTOBUF_ALWAYS_INLINE void _internal_set_data_directory_path(const std::string& value); + std::string* _internal_mutable_data_directory_path(); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.BenchmarkStoragePaths) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr storage_file_path_; + ::PROTOBUF_NAMESPACE_ID::internal::ArenaStringPtr data_directory_path_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class ValidationSettings final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.ValidationSettings) */ { + public: + inline ValidationSettings() : ValidationSettings(nullptr) {} + ~ValidationSettings() override; + explicit PROTOBUF_CONSTEXPR ValidationSettings(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + ValidationSettings(const ValidationSettings& from); + ValidationSettings(ValidationSettings&& from) noexcept + : ValidationSettings() { + *this = ::std::move(from); + } + + inline ValidationSettings& operator=(const ValidationSettings& from) { + CopyFrom(from); + return *this; + } + inline ValidationSettings& operator=(ValidationSettings&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const ValidationSettings& default_instance() { + return *internal_default_instance(); + } + static inline const ValidationSettings* internal_default_instance() { + return reinterpret_cast( + &_ValidationSettings_default_instance_); + } + static constexpr int kIndexInFileMessages = + 29; + + friend void swap(ValidationSettings& a, ValidationSettings& b) { + a.Swap(&b); + } + inline void Swap(ValidationSettings* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(ValidationSettings* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + ValidationSettings* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const ValidationSettings& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const ValidationSettings& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(ValidationSettings* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.ValidationSettings"; + } + protected: + explicit ValidationSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kPerTestTimeoutMsFieldNumber = 1, + }; + // optional int64 per_test_timeout_ms = 1; + bool has_per_test_timeout_ms() const; + private: + bool _internal_has_per_test_timeout_ms() const; + public: + void clear_per_test_timeout_ms(); + int64_t per_test_timeout_ms() const; + void set_per_test_timeout_ms(int64_t value); + private: + int64_t _internal_per_test_timeout_ms() const; + void _internal_set_per_test_timeout_ms(int64_t value); + public: + + // @@protoc_insertion_point(class_scope:tflite.proto.ValidationSettings) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + int64_t per_test_timeout_ms_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class MinibenchmarkSettings final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.MinibenchmarkSettings) */ { + public: + inline MinibenchmarkSettings() : MinibenchmarkSettings(nullptr) {} + ~MinibenchmarkSettings() override; + explicit PROTOBUF_CONSTEXPR MinibenchmarkSettings(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + MinibenchmarkSettings(const MinibenchmarkSettings& from); + MinibenchmarkSettings(MinibenchmarkSettings&& from) noexcept + : MinibenchmarkSettings() { + *this = ::std::move(from); + } + + inline MinibenchmarkSettings& operator=(const MinibenchmarkSettings& from) { + CopyFrom(from); + return *this; + } + inline MinibenchmarkSettings& operator=(MinibenchmarkSettings&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const MinibenchmarkSettings& default_instance() { + return *internal_default_instance(); + } + static inline const MinibenchmarkSettings* internal_default_instance() { + return reinterpret_cast( + &_MinibenchmarkSettings_default_instance_); + } + static constexpr int kIndexInFileMessages = + 30; + + friend void swap(MinibenchmarkSettings& a, MinibenchmarkSettings& b) { + a.Swap(&b); + } + inline void Swap(MinibenchmarkSettings* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(MinibenchmarkSettings* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + MinibenchmarkSettings* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const MinibenchmarkSettings& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const MinibenchmarkSettings& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(MinibenchmarkSettings* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.MinibenchmarkSettings"; + } + protected: + explicit MinibenchmarkSettings(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kSettingsToTestFieldNumber = 1, + kModelFileFieldNumber = 2, + kStoragePathsFieldNumber = 3, + kValidationSettingsFieldNumber = 4, + }; + // repeated .tflite.proto.TFLiteSettings settings_to_test = 1; + int settings_to_test_size() const; + private: + int _internal_settings_to_test_size() const; + public: + void clear_settings_to_test(); + ::tflite::proto::TFLiteSettings* mutable_settings_to_test(int index); + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tflite::proto::TFLiteSettings >* + mutable_settings_to_test(); + private: + const ::tflite::proto::TFLiteSettings& _internal_settings_to_test(int index) const; + ::tflite::proto::TFLiteSettings* _internal_add_settings_to_test(); + public: + const ::tflite::proto::TFLiteSettings& settings_to_test(int index) const; + ::tflite::proto::TFLiteSettings* add_settings_to_test(); + const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tflite::proto::TFLiteSettings >& + settings_to_test() const; + + // optional .tflite.proto.ModelFile model_file = 2; + bool has_model_file() const; + private: + bool _internal_has_model_file() const; + public: + void clear_model_file(); + const ::tflite::proto::ModelFile& model_file() const; + PROTOBUF_NODISCARD ::tflite::proto::ModelFile* release_model_file(); + ::tflite::proto::ModelFile* mutable_model_file(); + void set_allocated_model_file(::tflite::proto::ModelFile* model_file); + private: + const ::tflite::proto::ModelFile& _internal_model_file() const; + ::tflite::proto::ModelFile* _internal_mutable_model_file(); + public: + void unsafe_arena_set_allocated_model_file( + ::tflite::proto::ModelFile* model_file); + ::tflite::proto::ModelFile* unsafe_arena_release_model_file(); + + // optional .tflite.proto.BenchmarkStoragePaths storage_paths = 3; + bool has_storage_paths() const; + private: + bool _internal_has_storage_paths() const; + public: + void clear_storage_paths(); + const ::tflite::proto::BenchmarkStoragePaths& storage_paths() const; + PROTOBUF_NODISCARD ::tflite::proto::BenchmarkStoragePaths* release_storage_paths(); + ::tflite::proto::BenchmarkStoragePaths* mutable_storage_paths(); + void set_allocated_storage_paths(::tflite::proto::BenchmarkStoragePaths* storage_paths); + private: + const ::tflite::proto::BenchmarkStoragePaths& _internal_storage_paths() const; + ::tflite::proto::BenchmarkStoragePaths* _internal_mutable_storage_paths(); + public: + void unsafe_arena_set_allocated_storage_paths( + ::tflite::proto::BenchmarkStoragePaths* storage_paths); + ::tflite::proto::BenchmarkStoragePaths* unsafe_arena_release_storage_paths(); + + // optional .tflite.proto.ValidationSettings validation_settings = 4; + bool has_validation_settings() const; + private: + bool _internal_has_validation_settings() const; + public: + void clear_validation_settings(); + const ::tflite::proto::ValidationSettings& validation_settings() const; + PROTOBUF_NODISCARD ::tflite::proto::ValidationSettings* release_validation_settings(); + ::tflite::proto::ValidationSettings* mutable_validation_settings(); + void set_allocated_validation_settings(::tflite::proto::ValidationSettings* validation_settings); + private: + const ::tflite::proto::ValidationSettings& _internal_validation_settings() const; + ::tflite::proto::ValidationSettings* _internal_mutable_validation_settings(); + public: + void unsafe_arena_set_allocated_validation_settings( + ::tflite::proto::ValidationSettings* validation_settings); + ::tflite::proto::ValidationSettings* unsafe_arena_release_validation_settings(); + + // @@protoc_insertion_point(class_scope:tflite.proto.MinibenchmarkSettings) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tflite::proto::TFLiteSettings > settings_to_test_; + ::tflite::proto::ModelFile* model_file_; + ::tflite::proto::BenchmarkStoragePaths* storage_paths_; + ::tflite::proto::ValidationSettings* validation_settings_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// ------------------------------------------------------------------- + +class BenchmarkEventStorage final : + public ::PROTOBUF_NAMESPACE_ID::Message /* @@protoc_insertion_point(class_definition:tflite.proto.BenchmarkEventStorage) */ { + public: + inline BenchmarkEventStorage() : BenchmarkEventStorage(nullptr) {} + ~BenchmarkEventStorage() override; + explicit PROTOBUF_CONSTEXPR BenchmarkEventStorage(::PROTOBUF_NAMESPACE_ID::internal::ConstantInitialized); + + BenchmarkEventStorage(const BenchmarkEventStorage& from); + BenchmarkEventStorage(BenchmarkEventStorage&& from) noexcept + : BenchmarkEventStorage() { + *this = ::std::move(from); + } + + inline BenchmarkEventStorage& operator=(const BenchmarkEventStorage& from) { + CopyFrom(from); + return *this; + } + inline BenchmarkEventStorage& operator=(BenchmarkEventStorage&& from) noexcept { + if (this == &from) return *this; + if (GetOwningArena() == from.GetOwningArena() + #ifdef PROTOBUF_FORCE_COPY_IN_MOVE + && GetOwningArena() != nullptr + #endif // !PROTOBUF_FORCE_COPY_IN_MOVE + ) { + InternalSwap(&from); + } else { + CopyFrom(from); + } + return *this; + } + + inline const ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet& unknown_fields() const { + return _internal_metadata_.unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(::PROTOBUF_NAMESPACE_ID::UnknownFieldSet::default_instance); + } + inline ::PROTOBUF_NAMESPACE_ID::UnknownFieldSet* mutable_unknown_fields() { + return _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(); + } + + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* descriptor() { + return GetDescriptor(); + } + static const ::PROTOBUF_NAMESPACE_ID::Descriptor* GetDescriptor() { + return default_instance().GetMetadata().descriptor; + } + static const ::PROTOBUF_NAMESPACE_ID::Reflection* GetReflection() { + return default_instance().GetMetadata().reflection; + } + static const BenchmarkEventStorage& default_instance() { + return *internal_default_instance(); + } + static inline const BenchmarkEventStorage* internal_default_instance() { + return reinterpret_cast( + &_BenchmarkEventStorage_default_instance_); + } + static constexpr int kIndexInFileMessages = + 31; + + friend void swap(BenchmarkEventStorage& a, BenchmarkEventStorage& b) { + a.Swap(&b); + } + inline void Swap(BenchmarkEventStorage* other) { + if (other == this) return; + #ifdef PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() != nullptr && + GetOwningArena() == other->GetOwningArena()) { + #else // PROTOBUF_FORCE_COPY_IN_SWAP + if (GetOwningArena() == other->GetOwningArena()) { + #endif // !PROTOBUF_FORCE_COPY_IN_SWAP + InternalSwap(other); + } else { + ::PROTOBUF_NAMESPACE_ID::internal::GenericSwap(this, other); + } + } + void UnsafeArenaSwap(BenchmarkEventStorage* other) { + if (other == this) return; + GOOGLE_DCHECK(GetOwningArena() == other->GetOwningArena()); + InternalSwap(other); + } + + // implements Message ---------------------------------------------- + + BenchmarkEventStorage* New(::PROTOBUF_NAMESPACE_ID::Arena* arena = nullptr) const final { + return CreateMaybeMessage(arena); + } + using ::PROTOBUF_NAMESPACE_ID::Message::CopyFrom; + void CopyFrom(const BenchmarkEventStorage& from); + using ::PROTOBUF_NAMESPACE_ID::Message::MergeFrom; + void MergeFrom(const BenchmarkEventStorage& from); + private: + static void MergeImpl(::PROTOBUF_NAMESPACE_ID::Message* to, const ::PROTOBUF_NAMESPACE_ID::Message& from); + public: + PROTOBUF_ATTRIBUTE_REINITIALIZES void Clear() final; + bool IsInitialized() const final; + + size_t ByteSizeLong() const final; + const char* _InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) final; + uint8_t* _InternalSerialize( + uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const final; + int GetCachedSize() const final { return _cached_size_.Get(); } + + private: + void SharedCtor(); + void SharedDtor(); + void SetCachedSize(int size) const final; + void InternalSwap(BenchmarkEventStorage* other); + + private: + friend class ::PROTOBUF_NAMESPACE_ID::internal::AnyMetadata; + static ::PROTOBUF_NAMESPACE_ID::StringPiece FullMessageName() { + return "tflite.proto.BenchmarkEventStorage"; + } + protected: + explicit BenchmarkEventStorage(::PROTOBUF_NAMESPACE_ID::Arena* arena, + bool is_message_owned = false); + public: + + static const ClassData _class_data_; + const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*GetClassData() const final; + + ::PROTOBUF_NAMESPACE_ID::Metadata GetMetadata() const final; + + // nested types ---------------------------------------------------- + + // accessors ------------------------------------------------------- + + enum : int { + kModelIdGroupFieldNumber = 1, + kBenchmarkEventFieldNumber = 2, + }; + // optional .tflite.proto.ModelIdGroup model_id_group = 1; + bool has_model_id_group() const; + private: + bool _internal_has_model_id_group() const; + public: + void clear_model_id_group(); + const ::tflite::proto::ModelIdGroup& model_id_group() const; + PROTOBUF_NODISCARD ::tflite::proto::ModelIdGroup* release_model_id_group(); + ::tflite::proto::ModelIdGroup* mutable_model_id_group(); + void set_allocated_model_id_group(::tflite::proto::ModelIdGroup* model_id_group); + private: + const ::tflite::proto::ModelIdGroup& _internal_model_id_group() const; + ::tflite::proto::ModelIdGroup* _internal_mutable_model_id_group(); + public: + void unsafe_arena_set_allocated_model_id_group( + ::tflite::proto::ModelIdGroup* model_id_group); + ::tflite::proto::ModelIdGroup* unsafe_arena_release_model_id_group(); + + // optional .tflite.proto.BenchmarkEvent benchmark_event = 2; + bool has_benchmark_event() const; + private: + bool _internal_has_benchmark_event() const; + public: + void clear_benchmark_event(); + const ::tflite::proto::BenchmarkEvent& benchmark_event() const; + PROTOBUF_NODISCARD ::tflite::proto::BenchmarkEvent* release_benchmark_event(); + ::tflite::proto::BenchmarkEvent* mutable_benchmark_event(); + void set_allocated_benchmark_event(::tflite::proto::BenchmarkEvent* benchmark_event); + private: + const ::tflite::proto::BenchmarkEvent& _internal_benchmark_event() const; + ::tflite::proto::BenchmarkEvent* _internal_mutable_benchmark_event(); + public: + void unsafe_arena_set_allocated_benchmark_event( + ::tflite::proto::BenchmarkEvent* benchmark_event); + ::tflite::proto::BenchmarkEvent* unsafe_arena_release_benchmark_event(); + + // @@protoc_insertion_point(class_scope:tflite.proto.BenchmarkEventStorage) + private: + class _Internal; + + template friend class ::PROTOBUF_NAMESPACE_ID::Arena::InternalHelper; + typedef void InternalArenaConstructable_; + typedef void DestructorSkippable_; + ::PROTOBUF_NAMESPACE_ID::internal::HasBits<1> _has_bits_; + mutable ::PROTOBUF_NAMESPACE_ID::internal::CachedSize _cached_size_; + ::tflite::proto::ModelIdGroup* model_id_group_; + ::tflite::proto::BenchmarkEvent* benchmark_event_; + friend struct ::TableStruct_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto; +}; +// =================================================================== + + +// =================================================================== + +#ifdef __GNUC__ + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Wstrict-aliasing" +#endif // __GNUC__ +// ComputeSettings + +// optional .tflite.proto.ExecutionPreference preference = 1; +inline bool ComputeSettings::_internal_has_preference() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool ComputeSettings::has_preference() const { + return _internal_has_preference(); +} +inline void ComputeSettings::clear_preference() { + preference_ = 0; + _has_bits_[0] &= ~0x00000010u; +} +inline ::tflite::proto::ExecutionPreference ComputeSettings::_internal_preference() const { + return static_cast< ::tflite::proto::ExecutionPreference >(preference_); +} +inline ::tflite::proto::ExecutionPreference ComputeSettings::preference() const { + // @@protoc_insertion_point(field_get:tflite.proto.ComputeSettings.preference) + return _internal_preference(); +} +inline void ComputeSettings::_internal_set_preference(::tflite::proto::ExecutionPreference value) { + assert(::tflite::proto::ExecutionPreference_IsValid(value)); + _has_bits_[0] |= 0x00000010u; + preference_ = value; +} +inline void ComputeSettings::set_preference(::tflite::proto::ExecutionPreference value) { + _internal_set_preference(value); + // @@protoc_insertion_point(field_set:tflite.proto.ComputeSettings.preference) +} + +// optional .tflite.proto.TFLiteSettings tflite_settings = 2; +inline bool ComputeSettings::_internal_has_tflite_settings() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || tflite_settings_ != nullptr); + return value; +} +inline bool ComputeSettings::has_tflite_settings() const { + return _internal_has_tflite_settings(); +} +inline void ComputeSettings::clear_tflite_settings() { + if (tflite_settings_ != nullptr) tflite_settings_->Clear(); + _has_bits_[0] &= ~0x00000004u; +} +inline const ::tflite::proto::TFLiteSettings& ComputeSettings::_internal_tflite_settings() const { + const ::tflite::proto::TFLiteSettings* p = tflite_settings_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_TFLiteSettings_default_instance_); +} +inline const ::tflite::proto::TFLiteSettings& ComputeSettings::tflite_settings() const { + // @@protoc_insertion_point(field_get:tflite.proto.ComputeSettings.tflite_settings) + return _internal_tflite_settings(); +} +inline void ComputeSettings::unsafe_arena_set_allocated_tflite_settings( + ::tflite::proto::TFLiteSettings* tflite_settings) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(tflite_settings_); + } + tflite_settings_ = tflite_settings; + if (tflite_settings) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.ComputeSettings.tflite_settings) +} +inline ::tflite::proto::TFLiteSettings* ComputeSettings::release_tflite_settings() { + _has_bits_[0] &= ~0x00000004u; + ::tflite::proto::TFLiteSettings* temp = tflite_settings_; + tflite_settings_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::TFLiteSettings* ComputeSettings::unsafe_arena_release_tflite_settings() { + // @@protoc_insertion_point(field_release:tflite.proto.ComputeSettings.tflite_settings) + _has_bits_[0] &= ~0x00000004u; + ::tflite::proto::TFLiteSettings* temp = tflite_settings_; + tflite_settings_ = nullptr; + return temp; +} +inline ::tflite::proto::TFLiteSettings* ComputeSettings::_internal_mutable_tflite_settings() { + _has_bits_[0] |= 0x00000004u; + if (tflite_settings_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::TFLiteSettings>(GetArenaForAllocation()); + tflite_settings_ = p; + } + return tflite_settings_; +} +inline ::tflite::proto::TFLiteSettings* ComputeSettings::mutable_tflite_settings() { + ::tflite::proto::TFLiteSettings* _msg = _internal_mutable_tflite_settings(); + // @@protoc_insertion_point(field_mutable:tflite.proto.ComputeSettings.tflite_settings) + return _msg; +} +inline void ComputeSettings::set_allocated_tflite_settings(::tflite::proto::TFLiteSettings* tflite_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete tflite_settings_; + } + if (tflite_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(tflite_settings); + if (message_arena != submessage_arena) { + tflite_settings = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, tflite_settings, submessage_arena); + } + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + tflite_settings_ = tflite_settings; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.ComputeSettings.tflite_settings) +} + +// optional string model_namespace_for_statistics = 3; +inline bool ComputeSettings::_internal_has_model_namespace_for_statistics() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ComputeSettings::has_model_namespace_for_statistics() const { + return _internal_has_model_namespace_for_statistics(); +} +inline void ComputeSettings::clear_model_namespace_for_statistics() { + model_namespace_for_statistics_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& ComputeSettings::model_namespace_for_statistics() const { + // @@protoc_insertion_point(field_get:tflite.proto.ComputeSettings.model_namespace_for_statistics) + return _internal_model_namespace_for_statistics(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ComputeSettings::set_model_namespace_for_statistics(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + model_namespace_for_statistics_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tflite.proto.ComputeSettings.model_namespace_for_statistics) +} +inline std::string* ComputeSettings::mutable_model_namespace_for_statistics() { + std::string* _s = _internal_mutable_model_namespace_for_statistics(); + // @@protoc_insertion_point(field_mutable:tflite.proto.ComputeSettings.model_namespace_for_statistics) + return _s; +} +inline const std::string& ComputeSettings::_internal_model_namespace_for_statistics() const { + return model_namespace_for_statistics_.Get(); +} +inline void ComputeSettings::_internal_set_model_namespace_for_statistics(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + model_namespace_for_statistics_.Set(value, GetArenaForAllocation()); +} +inline std::string* ComputeSettings::_internal_mutable_model_namespace_for_statistics() { + _has_bits_[0] |= 0x00000001u; + return model_namespace_for_statistics_.Mutable(GetArenaForAllocation()); +} +inline std::string* ComputeSettings::release_model_namespace_for_statistics() { + // @@protoc_insertion_point(field_release:tflite.proto.ComputeSettings.model_namespace_for_statistics) + if (!_internal_has_model_namespace_for_statistics()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = model_namespace_for_statistics_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (model_namespace_for_statistics_.IsDefault()) { + model_namespace_for_statistics_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ComputeSettings::set_allocated_model_namespace_for_statistics(std::string* model_namespace_for_statistics) { + if (model_namespace_for_statistics != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + model_namespace_for_statistics_.SetAllocated(model_namespace_for_statistics, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (model_namespace_for_statistics_.IsDefault()) { + model_namespace_for_statistics_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tflite.proto.ComputeSettings.model_namespace_for_statistics) +} + +// optional string model_identifier_for_statistics = 4; +inline bool ComputeSettings::_internal_has_model_identifier_for_statistics() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ComputeSettings::has_model_identifier_for_statistics() const { + return _internal_has_model_identifier_for_statistics(); +} +inline void ComputeSettings::clear_model_identifier_for_statistics() { + model_identifier_for_statistics_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& ComputeSettings::model_identifier_for_statistics() const { + // @@protoc_insertion_point(field_get:tflite.proto.ComputeSettings.model_identifier_for_statistics) + return _internal_model_identifier_for_statistics(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ComputeSettings::set_model_identifier_for_statistics(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + model_identifier_for_statistics_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tflite.proto.ComputeSettings.model_identifier_for_statistics) +} +inline std::string* ComputeSettings::mutable_model_identifier_for_statistics() { + std::string* _s = _internal_mutable_model_identifier_for_statistics(); + // @@protoc_insertion_point(field_mutable:tflite.proto.ComputeSettings.model_identifier_for_statistics) + return _s; +} +inline const std::string& ComputeSettings::_internal_model_identifier_for_statistics() const { + return model_identifier_for_statistics_.Get(); +} +inline void ComputeSettings::_internal_set_model_identifier_for_statistics(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + model_identifier_for_statistics_.Set(value, GetArenaForAllocation()); +} +inline std::string* ComputeSettings::_internal_mutable_model_identifier_for_statistics() { + _has_bits_[0] |= 0x00000002u; + return model_identifier_for_statistics_.Mutable(GetArenaForAllocation()); +} +inline std::string* ComputeSettings::release_model_identifier_for_statistics() { + // @@protoc_insertion_point(field_release:tflite.proto.ComputeSettings.model_identifier_for_statistics) + if (!_internal_has_model_identifier_for_statistics()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = model_identifier_for_statistics_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (model_identifier_for_statistics_.IsDefault()) { + model_identifier_for_statistics_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ComputeSettings::set_allocated_model_identifier_for_statistics(std::string* model_identifier_for_statistics) { + if (model_identifier_for_statistics != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + model_identifier_for_statistics_.SetAllocated(model_identifier_for_statistics, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (model_identifier_for_statistics_.IsDefault()) { + model_identifier_for_statistics_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tflite.proto.ComputeSettings.model_identifier_for_statistics) +} + +// optional .tflite.proto.MinibenchmarkSettings settings_to_test_locally = 5; +inline bool ComputeSettings::_internal_has_settings_to_test_locally() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + PROTOBUF_ASSUME(!value || settings_to_test_locally_ != nullptr); + return value; +} +inline bool ComputeSettings::has_settings_to_test_locally() const { + return _internal_has_settings_to_test_locally(); +} +inline void ComputeSettings::clear_settings_to_test_locally() { + if (settings_to_test_locally_ != nullptr) settings_to_test_locally_->Clear(); + _has_bits_[0] &= ~0x00000008u; +} +inline const ::tflite::proto::MinibenchmarkSettings& ComputeSettings::_internal_settings_to_test_locally() const { + const ::tflite::proto::MinibenchmarkSettings* p = settings_to_test_locally_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_MinibenchmarkSettings_default_instance_); +} +inline const ::tflite::proto::MinibenchmarkSettings& ComputeSettings::settings_to_test_locally() const { + // @@protoc_insertion_point(field_get:tflite.proto.ComputeSettings.settings_to_test_locally) + return _internal_settings_to_test_locally(); +} +inline void ComputeSettings::unsafe_arena_set_allocated_settings_to_test_locally( + ::tflite::proto::MinibenchmarkSettings* settings_to_test_locally) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(settings_to_test_locally_); + } + settings_to_test_locally_ = settings_to_test_locally; + if (settings_to_test_locally) { + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.ComputeSettings.settings_to_test_locally) +} +inline ::tflite::proto::MinibenchmarkSettings* ComputeSettings::release_settings_to_test_locally() { + _has_bits_[0] &= ~0x00000008u; + ::tflite::proto::MinibenchmarkSettings* temp = settings_to_test_locally_; + settings_to_test_locally_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::MinibenchmarkSettings* ComputeSettings::unsafe_arena_release_settings_to_test_locally() { + // @@protoc_insertion_point(field_release:tflite.proto.ComputeSettings.settings_to_test_locally) + _has_bits_[0] &= ~0x00000008u; + ::tflite::proto::MinibenchmarkSettings* temp = settings_to_test_locally_; + settings_to_test_locally_ = nullptr; + return temp; +} +inline ::tflite::proto::MinibenchmarkSettings* ComputeSettings::_internal_mutable_settings_to_test_locally() { + _has_bits_[0] |= 0x00000008u; + if (settings_to_test_locally_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::MinibenchmarkSettings>(GetArenaForAllocation()); + settings_to_test_locally_ = p; + } + return settings_to_test_locally_; +} +inline ::tflite::proto::MinibenchmarkSettings* ComputeSettings::mutable_settings_to_test_locally() { + ::tflite::proto::MinibenchmarkSettings* _msg = _internal_mutable_settings_to_test_locally(); + // @@protoc_insertion_point(field_mutable:tflite.proto.ComputeSettings.settings_to_test_locally) + return _msg; +} +inline void ComputeSettings::set_allocated_settings_to_test_locally(::tflite::proto::MinibenchmarkSettings* settings_to_test_locally) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete settings_to_test_locally_; + } + if (settings_to_test_locally) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(settings_to_test_locally); + if (message_arena != submessage_arena) { + settings_to_test_locally = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, settings_to_test_locally, submessage_arena); + } + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + settings_to_test_locally_ = settings_to_test_locally; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.ComputeSettings.settings_to_test_locally) +} + +// ------------------------------------------------------------------- + +// NNAPISettings + +// optional string accelerator_name = 1; +inline bool NNAPISettings::_internal_has_accelerator_name() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool NNAPISettings::has_accelerator_name() const { + return _internal_has_accelerator_name(); +} +inline void NNAPISettings::clear_accelerator_name() { + accelerator_name_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& NNAPISettings::accelerator_name() const { + // @@protoc_insertion_point(field_get:tflite.proto.NNAPISettings.accelerator_name) + return _internal_accelerator_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void NNAPISettings::set_accelerator_name(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + accelerator_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tflite.proto.NNAPISettings.accelerator_name) +} +inline std::string* NNAPISettings::mutable_accelerator_name() { + std::string* _s = _internal_mutable_accelerator_name(); + // @@protoc_insertion_point(field_mutable:tflite.proto.NNAPISettings.accelerator_name) + return _s; +} +inline const std::string& NNAPISettings::_internal_accelerator_name() const { + return accelerator_name_.Get(); +} +inline void NNAPISettings::_internal_set_accelerator_name(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + accelerator_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* NNAPISettings::_internal_mutable_accelerator_name() { + _has_bits_[0] |= 0x00000001u; + return accelerator_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* NNAPISettings::release_accelerator_name() { + // @@protoc_insertion_point(field_release:tflite.proto.NNAPISettings.accelerator_name) + if (!_internal_has_accelerator_name()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = accelerator_name_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (accelerator_name_.IsDefault()) { + accelerator_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void NNAPISettings::set_allocated_accelerator_name(std::string* accelerator_name) { + if (accelerator_name != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + accelerator_name_.SetAllocated(accelerator_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (accelerator_name_.IsDefault()) { + accelerator_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tflite.proto.NNAPISettings.accelerator_name) +} + +// optional string cache_directory = 2 [deprecated = true]; +inline bool NNAPISettings::_internal_has_cache_directory() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool NNAPISettings::has_cache_directory() const { + return _internal_has_cache_directory(); +} +inline void NNAPISettings::clear_cache_directory() { + cache_directory_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& NNAPISettings::cache_directory() const { + // @@protoc_insertion_point(field_get:tflite.proto.NNAPISettings.cache_directory) + return _internal_cache_directory(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void NNAPISettings::set_cache_directory(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + cache_directory_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tflite.proto.NNAPISettings.cache_directory) +} +inline std::string* NNAPISettings::mutable_cache_directory() { + std::string* _s = _internal_mutable_cache_directory(); + // @@protoc_insertion_point(field_mutable:tflite.proto.NNAPISettings.cache_directory) + return _s; +} +inline const std::string& NNAPISettings::_internal_cache_directory() const { + return cache_directory_.Get(); +} +inline void NNAPISettings::_internal_set_cache_directory(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + cache_directory_.Set(value, GetArenaForAllocation()); +} +inline std::string* NNAPISettings::_internal_mutable_cache_directory() { + _has_bits_[0] |= 0x00000002u; + return cache_directory_.Mutable(GetArenaForAllocation()); +} +inline std::string* NNAPISettings::release_cache_directory() { + // @@protoc_insertion_point(field_release:tflite.proto.NNAPISettings.cache_directory) + if (!_internal_has_cache_directory()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = cache_directory_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (cache_directory_.IsDefault()) { + cache_directory_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void NNAPISettings::set_allocated_cache_directory(std::string* cache_directory) { + if (cache_directory != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + cache_directory_.SetAllocated(cache_directory, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (cache_directory_.IsDefault()) { + cache_directory_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tflite.proto.NNAPISettings.cache_directory) +} + +// optional string model_token = 3 [deprecated = true]; +inline bool NNAPISettings::_internal_has_model_token() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool NNAPISettings::has_model_token() const { + return _internal_has_model_token(); +} +inline void NNAPISettings::clear_model_token() { + model_token_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000004u; +} +inline const std::string& NNAPISettings::model_token() const { + // @@protoc_insertion_point(field_get:tflite.proto.NNAPISettings.model_token) + return _internal_model_token(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void NNAPISettings::set_model_token(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000004u; + model_token_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tflite.proto.NNAPISettings.model_token) +} +inline std::string* NNAPISettings::mutable_model_token() { + std::string* _s = _internal_mutable_model_token(); + // @@protoc_insertion_point(field_mutable:tflite.proto.NNAPISettings.model_token) + return _s; +} +inline const std::string& NNAPISettings::_internal_model_token() const { + return model_token_.Get(); +} +inline void NNAPISettings::_internal_set_model_token(const std::string& value) { + _has_bits_[0] |= 0x00000004u; + model_token_.Set(value, GetArenaForAllocation()); +} +inline std::string* NNAPISettings::_internal_mutable_model_token() { + _has_bits_[0] |= 0x00000004u; + return model_token_.Mutable(GetArenaForAllocation()); +} +inline std::string* NNAPISettings::release_model_token() { + // @@protoc_insertion_point(field_release:tflite.proto.NNAPISettings.model_token) + if (!_internal_has_model_token()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000004u; + auto* p = model_token_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (model_token_.IsDefault()) { + model_token_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void NNAPISettings::set_allocated_model_token(std::string* model_token) { + if (model_token != nullptr) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + model_token_.SetAllocated(model_token, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (model_token_.IsDefault()) { + model_token_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tflite.proto.NNAPISettings.model_token) +} + +// optional .tflite.proto.NNAPIExecutionPreference execution_preference = 4; +inline bool NNAPISettings::_internal_has_execution_preference() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool NNAPISettings::has_execution_preference() const { + return _internal_has_execution_preference(); +} +inline void NNAPISettings::clear_execution_preference() { + execution_preference_ = 0; + _has_bits_[0] &= ~0x00000010u; +} +inline ::tflite::proto::NNAPIExecutionPreference NNAPISettings::_internal_execution_preference() const { + return static_cast< ::tflite::proto::NNAPIExecutionPreference >(execution_preference_); +} +inline ::tflite::proto::NNAPIExecutionPreference NNAPISettings::execution_preference() const { + // @@protoc_insertion_point(field_get:tflite.proto.NNAPISettings.execution_preference) + return _internal_execution_preference(); +} +inline void NNAPISettings::_internal_set_execution_preference(::tflite::proto::NNAPIExecutionPreference value) { + assert(::tflite::proto::NNAPIExecutionPreference_IsValid(value)); + _has_bits_[0] |= 0x00000010u; + execution_preference_ = value; +} +inline void NNAPISettings::set_execution_preference(::tflite::proto::NNAPIExecutionPreference value) { + _internal_set_execution_preference(value); + // @@protoc_insertion_point(field_set:tflite.proto.NNAPISettings.execution_preference) +} + +// optional int32 no_of_nnapi_instances_to_cache = 5; +inline bool NNAPISettings::_internal_has_no_of_nnapi_instances_to_cache() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool NNAPISettings::has_no_of_nnapi_instances_to_cache() const { + return _internal_has_no_of_nnapi_instances_to_cache(); +} +inline void NNAPISettings::clear_no_of_nnapi_instances_to_cache() { + no_of_nnapi_instances_to_cache_ = 0; + _has_bits_[0] &= ~0x00000020u; +} +inline int32_t NNAPISettings::_internal_no_of_nnapi_instances_to_cache() const { + return no_of_nnapi_instances_to_cache_; +} +inline int32_t NNAPISettings::no_of_nnapi_instances_to_cache() const { + // @@protoc_insertion_point(field_get:tflite.proto.NNAPISettings.no_of_nnapi_instances_to_cache) + return _internal_no_of_nnapi_instances_to_cache(); +} +inline void NNAPISettings::_internal_set_no_of_nnapi_instances_to_cache(int32_t value) { + _has_bits_[0] |= 0x00000020u; + no_of_nnapi_instances_to_cache_ = value; +} +inline void NNAPISettings::set_no_of_nnapi_instances_to_cache(int32_t value) { + _internal_set_no_of_nnapi_instances_to_cache(value); + // @@protoc_insertion_point(field_set:tflite.proto.NNAPISettings.no_of_nnapi_instances_to_cache) +} + +// optional .tflite.proto.FallbackSettings fallback_settings = 6 [deprecated = true]; +inline bool NNAPISettings::_internal_has_fallback_settings() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + PROTOBUF_ASSUME(!value || fallback_settings_ != nullptr); + return value; +} +inline bool NNAPISettings::has_fallback_settings() const { + return _internal_has_fallback_settings(); +} +inline void NNAPISettings::clear_fallback_settings() { + if (fallback_settings_ != nullptr) fallback_settings_->Clear(); + _has_bits_[0] &= ~0x00000008u; +} +inline const ::tflite::proto::FallbackSettings& NNAPISettings::_internal_fallback_settings() const { + const ::tflite::proto::FallbackSettings* p = fallback_settings_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_FallbackSettings_default_instance_); +} +inline const ::tflite::proto::FallbackSettings& NNAPISettings::fallback_settings() const { + // @@protoc_insertion_point(field_get:tflite.proto.NNAPISettings.fallback_settings) + return _internal_fallback_settings(); +} +inline void NNAPISettings::unsafe_arena_set_allocated_fallback_settings( + ::tflite::proto::FallbackSettings* fallback_settings) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(fallback_settings_); + } + fallback_settings_ = fallback_settings; + if (fallback_settings) { + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.NNAPISettings.fallback_settings) +} +inline ::tflite::proto::FallbackSettings* NNAPISettings::release_fallback_settings() { + _has_bits_[0] &= ~0x00000008u; + ::tflite::proto::FallbackSettings* temp = fallback_settings_; + fallback_settings_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::FallbackSettings* NNAPISettings::unsafe_arena_release_fallback_settings() { + // @@protoc_insertion_point(field_release:tflite.proto.NNAPISettings.fallback_settings) + _has_bits_[0] &= ~0x00000008u; + ::tflite::proto::FallbackSettings* temp = fallback_settings_; + fallback_settings_ = nullptr; + return temp; +} +inline ::tflite::proto::FallbackSettings* NNAPISettings::_internal_mutable_fallback_settings() { + _has_bits_[0] |= 0x00000008u; + if (fallback_settings_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::FallbackSettings>(GetArenaForAllocation()); + fallback_settings_ = p; + } + return fallback_settings_; +} +inline ::tflite::proto::FallbackSettings* NNAPISettings::mutable_fallback_settings() { + ::tflite::proto::FallbackSettings* _msg = _internal_mutable_fallback_settings(); + // @@protoc_insertion_point(field_mutable:tflite.proto.NNAPISettings.fallback_settings) + return _msg; +} +inline void NNAPISettings::set_allocated_fallback_settings(::tflite::proto::FallbackSettings* fallback_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete fallback_settings_; + } + if (fallback_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(fallback_settings); + if (message_arena != submessage_arena) { + fallback_settings = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, fallback_settings, submessage_arena); + } + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + fallback_settings_ = fallback_settings; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.NNAPISettings.fallback_settings) +} + +// optional bool allow_nnapi_cpu_on_android_10_plus = 7; +inline bool NNAPISettings::_internal_has_allow_nnapi_cpu_on_android_10_plus() const { + bool value = (_has_bits_[0] & 0x00000080u) != 0; + return value; +} +inline bool NNAPISettings::has_allow_nnapi_cpu_on_android_10_plus() const { + return _internal_has_allow_nnapi_cpu_on_android_10_plus(); +} +inline void NNAPISettings::clear_allow_nnapi_cpu_on_android_10_plus() { + allow_nnapi_cpu_on_android_10_plus_ = false; + _has_bits_[0] &= ~0x00000080u; +} +inline bool NNAPISettings::_internal_allow_nnapi_cpu_on_android_10_plus() const { + return allow_nnapi_cpu_on_android_10_plus_; +} +inline bool NNAPISettings::allow_nnapi_cpu_on_android_10_plus() const { + // @@protoc_insertion_point(field_get:tflite.proto.NNAPISettings.allow_nnapi_cpu_on_android_10_plus) + return _internal_allow_nnapi_cpu_on_android_10_plus(); +} +inline void NNAPISettings::_internal_set_allow_nnapi_cpu_on_android_10_plus(bool value) { + _has_bits_[0] |= 0x00000080u; + allow_nnapi_cpu_on_android_10_plus_ = value; +} +inline void NNAPISettings::set_allow_nnapi_cpu_on_android_10_plus(bool value) { + _internal_set_allow_nnapi_cpu_on_android_10_plus(value); + // @@protoc_insertion_point(field_set:tflite.proto.NNAPISettings.allow_nnapi_cpu_on_android_10_plus) +} + +// optional .tflite.proto.NNAPIExecutionPriority execution_priority = 8; +inline bool NNAPISettings::_internal_has_execution_priority() const { + bool value = (_has_bits_[0] & 0x00000040u) != 0; + return value; +} +inline bool NNAPISettings::has_execution_priority() const { + return _internal_has_execution_priority(); +} +inline void NNAPISettings::clear_execution_priority() { + execution_priority_ = 0; + _has_bits_[0] &= ~0x00000040u; +} +inline ::tflite::proto::NNAPIExecutionPriority NNAPISettings::_internal_execution_priority() const { + return static_cast< ::tflite::proto::NNAPIExecutionPriority >(execution_priority_); +} +inline ::tflite::proto::NNAPIExecutionPriority NNAPISettings::execution_priority() const { + // @@protoc_insertion_point(field_get:tflite.proto.NNAPISettings.execution_priority) + return _internal_execution_priority(); +} +inline void NNAPISettings::_internal_set_execution_priority(::tflite::proto::NNAPIExecutionPriority value) { + assert(::tflite::proto::NNAPIExecutionPriority_IsValid(value)); + _has_bits_[0] |= 0x00000040u; + execution_priority_ = value; +} +inline void NNAPISettings::set_execution_priority(::tflite::proto::NNAPIExecutionPriority value) { + _internal_set_execution_priority(value); + // @@protoc_insertion_point(field_set:tflite.proto.NNAPISettings.execution_priority) +} + +// optional bool allow_dynamic_dimensions = 9; +inline bool NNAPISettings::_internal_has_allow_dynamic_dimensions() const { + bool value = (_has_bits_[0] & 0x00000100u) != 0; + return value; +} +inline bool NNAPISettings::has_allow_dynamic_dimensions() const { + return _internal_has_allow_dynamic_dimensions(); +} +inline void NNAPISettings::clear_allow_dynamic_dimensions() { + allow_dynamic_dimensions_ = false; + _has_bits_[0] &= ~0x00000100u; +} +inline bool NNAPISettings::_internal_allow_dynamic_dimensions() const { + return allow_dynamic_dimensions_; +} +inline bool NNAPISettings::allow_dynamic_dimensions() const { + // @@protoc_insertion_point(field_get:tflite.proto.NNAPISettings.allow_dynamic_dimensions) + return _internal_allow_dynamic_dimensions(); +} +inline void NNAPISettings::_internal_set_allow_dynamic_dimensions(bool value) { + _has_bits_[0] |= 0x00000100u; + allow_dynamic_dimensions_ = value; +} +inline void NNAPISettings::set_allow_dynamic_dimensions(bool value) { + _internal_set_allow_dynamic_dimensions(value); + // @@protoc_insertion_point(field_set:tflite.proto.NNAPISettings.allow_dynamic_dimensions) +} + +// optional bool allow_fp16_precision_for_fp32 = 10; +inline bool NNAPISettings::_internal_has_allow_fp16_precision_for_fp32() const { + bool value = (_has_bits_[0] & 0x00000200u) != 0; + return value; +} +inline bool NNAPISettings::has_allow_fp16_precision_for_fp32() const { + return _internal_has_allow_fp16_precision_for_fp32(); +} +inline void NNAPISettings::clear_allow_fp16_precision_for_fp32() { + allow_fp16_precision_for_fp32_ = false; + _has_bits_[0] &= ~0x00000200u; +} +inline bool NNAPISettings::_internal_allow_fp16_precision_for_fp32() const { + return allow_fp16_precision_for_fp32_; +} +inline bool NNAPISettings::allow_fp16_precision_for_fp32() const { + // @@protoc_insertion_point(field_get:tflite.proto.NNAPISettings.allow_fp16_precision_for_fp32) + return _internal_allow_fp16_precision_for_fp32(); +} +inline void NNAPISettings::_internal_set_allow_fp16_precision_for_fp32(bool value) { + _has_bits_[0] |= 0x00000200u; + allow_fp16_precision_for_fp32_ = value; +} +inline void NNAPISettings::set_allow_fp16_precision_for_fp32(bool value) { + _internal_set_allow_fp16_precision_for_fp32(value); + // @@protoc_insertion_point(field_set:tflite.proto.NNAPISettings.allow_fp16_precision_for_fp32) +} + +// optional bool use_burst_computation = 11; +inline bool NNAPISettings::_internal_has_use_burst_computation() const { + bool value = (_has_bits_[0] & 0x00000400u) != 0; + return value; +} +inline bool NNAPISettings::has_use_burst_computation() const { + return _internal_has_use_burst_computation(); +} +inline void NNAPISettings::clear_use_burst_computation() { + use_burst_computation_ = false; + _has_bits_[0] &= ~0x00000400u; +} +inline bool NNAPISettings::_internal_use_burst_computation() const { + return use_burst_computation_; +} +inline bool NNAPISettings::use_burst_computation() const { + // @@protoc_insertion_point(field_get:tflite.proto.NNAPISettings.use_burst_computation) + return _internal_use_burst_computation(); +} +inline void NNAPISettings::_internal_set_use_burst_computation(bool value) { + _has_bits_[0] |= 0x00000400u; + use_burst_computation_ = value; +} +inline void NNAPISettings::set_use_burst_computation(bool value) { + _internal_set_use_burst_computation(value); + // @@protoc_insertion_point(field_set:tflite.proto.NNAPISettings.use_burst_computation) +} + +// optional int64 support_library_handle = 12; +inline bool NNAPISettings::_internal_has_support_library_handle() const { + bool value = (_has_bits_[0] & 0x00000800u) != 0; + return value; +} +inline bool NNAPISettings::has_support_library_handle() const { + return _internal_has_support_library_handle(); +} +inline void NNAPISettings::clear_support_library_handle() { + support_library_handle_ = int64_t{0}; + _has_bits_[0] &= ~0x00000800u; +} +inline int64_t NNAPISettings::_internal_support_library_handle() const { + return support_library_handle_; +} +inline int64_t NNAPISettings::support_library_handle() const { + // @@protoc_insertion_point(field_get:tflite.proto.NNAPISettings.support_library_handle) + return _internal_support_library_handle(); +} +inline void NNAPISettings::_internal_set_support_library_handle(int64_t value) { + _has_bits_[0] |= 0x00000800u; + support_library_handle_ = value; +} +inline void NNAPISettings::set_support_library_handle(int64_t value) { + _internal_set_support_library_handle(value); + // @@protoc_insertion_point(field_set:tflite.proto.NNAPISettings.support_library_handle) +} + +// ------------------------------------------------------------------- + +// GPUSettings + +// optional bool is_precision_loss_allowed = 1; +inline bool GPUSettings::_internal_has_is_precision_loss_allowed() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool GPUSettings::has_is_precision_loss_allowed() const { + return _internal_has_is_precision_loss_allowed(); +} +inline void GPUSettings::clear_is_precision_loss_allowed() { + is_precision_loss_allowed_ = false; + _has_bits_[0] &= ~0x00000004u; +} +inline bool GPUSettings::_internal_is_precision_loss_allowed() const { + return is_precision_loss_allowed_; +} +inline bool GPUSettings::is_precision_loss_allowed() const { + // @@protoc_insertion_point(field_get:tflite.proto.GPUSettings.is_precision_loss_allowed) + return _internal_is_precision_loss_allowed(); +} +inline void GPUSettings::_internal_set_is_precision_loss_allowed(bool value) { + _has_bits_[0] |= 0x00000004u; + is_precision_loss_allowed_ = value; +} +inline void GPUSettings::set_is_precision_loss_allowed(bool value) { + _internal_set_is_precision_loss_allowed(value); + // @@protoc_insertion_point(field_set:tflite.proto.GPUSettings.is_precision_loss_allowed) +} + +// optional bool enable_quantized_inference = 2 [default = true]; +inline bool GPUSettings::_internal_has_enable_quantized_inference() const { + bool value = (_has_bits_[0] & 0x00000100u) != 0; + return value; +} +inline bool GPUSettings::has_enable_quantized_inference() const { + return _internal_has_enable_quantized_inference(); +} +inline void GPUSettings::clear_enable_quantized_inference() { + enable_quantized_inference_ = true; + _has_bits_[0] &= ~0x00000100u; +} +inline bool GPUSettings::_internal_enable_quantized_inference() const { + return enable_quantized_inference_; +} +inline bool GPUSettings::enable_quantized_inference() const { + // @@protoc_insertion_point(field_get:tflite.proto.GPUSettings.enable_quantized_inference) + return _internal_enable_quantized_inference(); +} +inline void GPUSettings::_internal_set_enable_quantized_inference(bool value) { + _has_bits_[0] |= 0x00000100u; + enable_quantized_inference_ = value; +} +inline void GPUSettings::set_enable_quantized_inference(bool value) { + _internal_set_enable_quantized_inference(value); + // @@protoc_insertion_point(field_set:tflite.proto.GPUSettings.enable_quantized_inference) +} + +// optional .tflite.proto.GPUBackend force_backend = 3; +inline bool GPUSettings::_internal_has_force_backend() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool GPUSettings::has_force_backend() const { + return _internal_has_force_backend(); +} +inline void GPUSettings::clear_force_backend() { + force_backend_ = 0; + _has_bits_[0] &= ~0x00000008u; +} +inline ::tflite::proto::GPUBackend GPUSettings::_internal_force_backend() const { + return static_cast< ::tflite::proto::GPUBackend >(force_backend_); +} +inline ::tflite::proto::GPUBackend GPUSettings::force_backend() const { + // @@protoc_insertion_point(field_get:tflite.proto.GPUSettings.force_backend) + return _internal_force_backend(); +} +inline void GPUSettings::_internal_set_force_backend(::tflite::proto::GPUBackend value) { + assert(::tflite::proto::GPUBackend_IsValid(value)); + _has_bits_[0] |= 0x00000008u; + force_backend_ = value; +} +inline void GPUSettings::set_force_backend(::tflite::proto::GPUBackend value) { + _internal_set_force_backend(value); + // @@protoc_insertion_point(field_set:tflite.proto.GPUSettings.force_backend) +} + +// optional .tflite.proto.GPUInferencePriority inference_priority1 = 4 [default = GPU_PRIORITY_AUTO]; +inline bool GPUSettings::_internal_has_inference_priority1() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool GPUSettings::has_inference_priority1() const { + return _internal_has_inference_priority1(); +} +inline void GPUSettings::clear_inference_priority1() { + inference_priority1_ = 0; + _has_bits_[0] &= ~0x00000010u; +} +inline ::tflite::proto::GPUInferencePriority GPUSettings::_internal_inference_priority1() const { + return static_cast< ::tflite::proto::GPUInferencePriority >(inference_priority1_); +} +inline ::tflite::proto::GPUInferencePriority GPUSettings::inference_priority1() const { + // @@protoc_insertion_point(field_get:tflite.proto.GPUSettings.inference_priority1) + return _internal_inference_priority1(); +} +inline void GPUSettings::_internal_set_inference_priority1(::tflite::proto::GPUInferencePriority value) { + assert(::tflite::proto::GPUInferencePriority_IsValid(value)); + _has_bits_[0] |= 0x00000010u; + inference_priority1_ = value; +} +inline void GPUSettings::set_inference_priority1(::tflite::proto::GPUInferencePriority value) { + _internal_set_inference_priority1(value); + // @@protoc_insertion_point(field_set:tflite.proto.GPUSettings.inference_priority1) +} + +// optional .tflite.proto.GPUInferencePriority inference_priority2 = 5 [default = GPU_PRIORITY_AUTO]; +inline bool GPUSettings::_internal_has_inference_priority2() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool GPUSettings::has_inference_priority2() const { + return _internal_has_inference_priority2(); +} +inline void GPUSettings::clear_inference_priority2() { + inference_priority2_ = 0; + _has_bits_[0] &= ~0x00000020u; +} +inline ::tflite::proto::GPUInferencePriority GPUSettings::_internal_inference_priority2() const { + return static_cast< ::tflite::proto::GPUInferencePriority >(inference_priority2_); +} +inline ::tflite::proto::GPUInferencePriority GPUSettings::inference_priority2() const { + // @@protoc_insertion_point(field_get:tflite.proto.GPUSettings.inference_priority2) + return _internal_inference_priority2(); +} +inline void GPUSettings::_internal_set_inference_priority2(::tflite::proto::GPUInferencePriority value) { + assert(::tflite::proto::GPUInferencePriority_IsValid(value)); + _has_bits_[0] |= 0x00000020u; + inference_priority2_ = value; +} +inline void GPUSettings::set_inference_priority2(::tflite::proto::GPUInferencePriority value) { + _internal_set_inference_priority2(value); + // @@protoc_insertion_point(field_set:tflite.proto.GPUSettings.inference_priority2) +} + +// optional .tflite.proto.GPUInferencePriority inference_priority3 = 6 [default = GPU_PRIORITY_AUTO]; +inline bool GPUSettings::_internal_has_inference_priority3() const { + bool value = (_has_bits_[0] & 0x00000040u) != 0; + return value; +} +inline bool GPUSettings::has_inference_priority3() const { + return _internal_has_inference_priority3(); +} +inline void GPUSettings::clear_inference_priority3() { + inference_priority3_ = 0; + _has_bits_[0] &= ~0x00000040u; +} +inline ::tflite::proto::GPUInferencePriority GPUSettings::_internal_inference_priority3() const { + return static_cast< ::tflite::proto::GPUInferencePriority >(inference_priority3_); +} +inline ::tflite::proto::GPUInferencePriority GPUSettings::inference_priority3() const { + // @@protoc_insertion_point(field_get:tflite.proto.GPUSettings.inference_priority3) + return _internal_inference_priority3(); +} +inline void GPUSettings::_internal_set_inference_priority3(::tflite::proto::GPUInferencePriority value) { + assert(::tflite::proto::GPUInferencePriority_IsValid(value)); + _has_bits_[0] |= 0x00000040u; + inference_priority3_ = value; +} +inline void GPUSettings::set_inference_priority3(::tflite::proto::GPUInferencePriority value) { + _internal_set_inference_priority3(value); + // @@protoc_insertion_point(field_set:tflite.proto.GPUSettings.inference_priority3) +} + +// optional .tflite.proto.GPUInferenceUsage inference_preference = 7; +inline bool GPUSettings::_internal_has_inference_preference() const { + bool value = (_has_bits_[0] & 0x00000080u) != 0; + return value; +} +inline bool GPUSettings::has_inference_preference() const { + return _internal_has_inference_preference(); +} +inline void GPUSettings::clear_inference_preference() { + inference_preference_ = 0; + _has_bits_[0] &= ~0x00000080u; +} +inline ::tflite::proto::GPUInferenceUsage GPUSettings::_internal_inference_preference() const { + return static_cast< ::tflite::proto::GPUInferenceUsage >(inference_preference_); +} +inline ::tflite::proto::GPUInferenceUsage GPUSettings::inference_preference() const { + // @@protoc_insertion_point(field_get:tflite.proto.GPUSettings.inference_preference) + return _internal_inference_preference(); +} +inline void GPUSettings::_internal_set_inference_preference(::tflite::proto::GPUInferenceUsage value) { + assert(::tflite::proto::GPUInferenceUsage_IsValid(value)); + _has_bits_[0] |= 0x00000080u; + inference_preference_ = value; +} +inline void GPUSettings::set_inference_preference(::tflite::proto::GPUInferenceUsage value) { + _internal_set_inference_preference(value); + // @@protoc_insertion_point(field_set:tflite.proto.GPUSettings.inference_preference) +} + +// optional string cache_directory = 8; +inline bool GPUSettings::_internal_has_cache_directory() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool GPUSettings::has_cache_directory() const { + return _internal_has_cache_directory(); +} +inline void GPUSettings::clear_cache_directory() { + cache_directory_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& GPUSettings::cache_directory() const { + // @@protoc_insertion_point(field_get:tflite.proto.GPUSettings.cache_directory) + return _internal_cache_directory(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GPUSettings::set_cache_directory(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + cache_directory_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tflite.proto.GPUSettings.cache_directory) +} +inline std::string* GPUSettings::mutable_cache_directory() { + std::string* _s = _internal_mutable_cache_directory(); + // @@protoc_insertion_point(field_mutable:tflite.proto.GPUSettings.cache_directory) + return _s; +} +inline const std::string& GPUSettings::_internal_cache_directory() const { + return cache_directory_.Get(); +} +inline void GPUSettings::_internal_set_cache_directory(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + cache_directory_.Set(value, GetArenaForAllocation()); +} +inline std::string* GPUSettings::_internal_mutable_cache_directory() { + _has_bits_[0] |= 0x00000001u; + return cache_directory_.Mutable(GetArenaForAllocation()); +} +inline std::string* GPUSettings::release_cache_directory() { + // @@protoc_insertion_point(field_release:tflite.proto.GPUSettings.cache_directory) + if (!_internal_has_cache_directory()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = cache_directory_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (cache_directory_.IsDefault()) { + cache_directory_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void GPUSettings::set_allocated_cache_directory(std::string* cache_directory) { + if (cache_directory != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + cache_directory_.SetAllocated(cache_directory, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (cache_directory_.IsDefault()) { + cache_directory_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tflite.proto.GPUSettings.cache_directory) +} + +// optional string model_token = 9; +inline bool GPUSettings::_internal_has_model_token() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool GPUSettings::has_model_token() const { + return _internal_has_model_token(); +} +inline void GPUSettings::clear_model_token() { + model_token_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& GPUSettings::model_token() const { + // @@protoc_insertion_point(field_get:tflite.proto.GPUSettings.model_token) + return _internal_model_token(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GPUSettings::set_model_token(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + model_token_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tflite.proto.GPUSettings.model_token) +} +inline std::string* GPUSettings::mutable_model_token() { + std::string* _s = _internal_mutable_model_token(); + // @@protoc_insertion_point(field_mutable:tflite.proto.GPUSettings.model_token) + return _s; +} +inline const std::string& GPUSettings::_internal_model_token() const { + return model_token_.Get(); +} +inline void GPUSettings::_internal_set_model_token(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + model_token_.Set(value, GetArenaForAllocation()); +} +inline std::string* GPUSettings::_internal_mutable_model_token() { + _has_bits_[0] |= 0x00000002u; + return model_token_.Mutable(GetArenaForAllocation()); +} +inline std::string* GPUSettings::release_model_token() { + // @@protoc_insertion_point(field_release:tflite.proto.GPUSettings.model_token) + if (!_internal_has_model_token()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = model_token_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (model_token_.IsDefault()) { + model_token_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void GPUSettings::set_allocated_model_token(std::string* model_token) { + if (model_token != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + model_token_.SetAllocated(model_token, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (model_token_.IsDefault()) { + model_token_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tflite.proto.GPUSettings.model_token) +} + +// ------------------------------------------------------------------- + +// HexagonSettings + +// optional int32 debug_level = 1; +inline bool HexagonSettings::_internal_has_debug_level() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool HexagonSettings::has_debug_level() const { + return _internal_has_debug_level(); +} +inline void HexagonSettings::clear_debug_level() { + debug_level_ = 0; + _has_bits_[0] &= ~0x00000001u; +} +inline int32_t HexagonSettings::_internal_debug_level() const { + return debug_level_; +} +inline int32_t HexagonSettings::debug_level() const { + // @@protoc_insertion_point(field_get:tflite.proto.HexagonSettings.debug_level) + return _internal_debug_level(); +} +inline void HexagonSettings::_internal_set_debug_level(int32_t value) { + _has_bits_[0] |= 0x00000001u; + debug_level_ = value; +} +inline void HexagonSettings::set_debug_level(int32_t value) { + _internal_set_debug_level(value); + // @@protoc_insertion_point(field_set:tflite.proto.HexagonSettings.debug_level) +} + +// optional int32 powersave_level = 2; +inline bool HexagonSettings::_internal_has_powersave_level() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool HexagonSettings::has_powersave_level() const { + return _internal_has_powersave_level(); +} +inline void HexagonSettings::clear_powersave_level() { + powersave_level_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline int32_t HexagonSettings::_internal_powersave_level() const { + return powersave_level_; +} +inline int32_t HexagonSettings::powersave_level() const { + // @@protoc_insertion_point(field_get:tflite.proto.HexagonSettings.powersave_level) + return _internal_powersave_level(); +} +inline void HexagonSettings::_internal_set_powersave_level(int32_t value) { + _has_bits_[0] |= 0x00000002u; + powersave_level_ = value; +} +inline void HexagonSettings::set_powersave_level(int32_t value) { + _internal_set_powersave_level(value); + // @@protoc_insertion_point(field_set:tflite.proto.HexagonSettings.powersave_level) +} + +// optional bool print_graph_profile = 3; +inline bool HexagonSettings::_internal_has_print_graph_profile() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool HexagonSettings::has_print_graph_profile() const { + return _internal_has_print_graph_profile(); +} +inline void HexagonSettings::clear_print_graph_profile() { + print_graph_profile_ = false; + _has_bits_[0] &= ~0x00000004u; +} +inline bool HexagonSettings::_internal_print_graph_profile() const { + return print_graph_profile_; +} +inline bool HexagonSettings::print_graph_profile() const { + // @@protoc_insertion_point(field_get:tflite.proto.HexagonSettings.print_graph_profile) + return _internal_print_graph_profile(); +} +inline void HexagonSettings::_internal_set_print_graph_profile(bool value) { + _has_bits_[0] |= 0x00000004u; + print_graph_profile_ = value; +} +inline void HexagonSettings::set_print_graph_profile(bool value) { + _internal_set_print_graph_profile(value); + // @@protoc_insertion_point(field_set:tflite.proto.HexagonSettings.print_graph_profile) +} + +// optional bool print_graph_debug = 4; +inline bool HexagonSettings::_internal_has_print_graph_debug() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool HexagonSettings::has_print_graph_debug() const { + return _internal_has_print_graph_debug(); +} +inline void HexagonSettings::clear_print_graph_debug() { + print_graph_debug_ = false; + _has_bits_[0] &= ~0x00000008u; +} +inline bool HexagonSettings::_internal_print_graph_debug() const { + return print_graph_debug_; +} +inline bool HexagonSettings::print_graph_debug() const { + // @@protoc_insertion_point(field_get:tflite.proto.HexagonSettings.print_graph_debug) + return _internal_print_graph_debug(); +} +inline void HexagonSettings::_internal_set_print_graph_debug(bool value) { + _has_bits_[0] |= 0x00000008u; + print_graph_debug_ = value; +} +inline void HexagonSettings::set_print_graph_debug(bool value) { + _internal_set_print_graph_debug(value); + // @@protoc_insertion_point(field_set:tflite.proto.HexagonSettings.print_graph_debug) +} + +// ------------------------------------------------------------------- + +// XNNPackSettings + +// optional int32 num_threads = 1; +inline bool XNNPackSettings::_internal_has_num_threads() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool XNNPackSettings::has_num_threads() const { + return _internal_has_num_threads(); +} +inline void XNNPackSettings::clear_num_threads() { + num_threads_ = 0; + _has_bits_[0] &= ~0x00000001u; +} +inline int32_t XNNPackSettings::_internal_num_threads() const { + return num_threads_; +} +inline int32_t XNNPackSettings::num_threads() const { + // @@protoc_insertion_point(field_get:tflite.proto.XNNPackSettings.num_threads) + return _internal_num_threads(); +} +inline void XNNPackSettings::_internal_set_num_threads(int32_t value) { + _has_bits_[0] |= 0x00000001u; + num_threads_ = value; +} +inline void XNNPackSettings::set_num_threads(int32_t value) { + _internal_set_num_threads(value); + // @@protoc_insertion_point(field_set:tflite.proto.XNNPackSettings.num_threads) +} + +// optional .tflite.proto.XNNPackFlags flags = 2 [default = TFLITE_XNNPACK_DELEGATE_NO_FLAGS]; +inline bool XNNPackSettings::_internal_has_flags() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool XNNPackSettings::has_flags() const { + return _internal_has_flags(); +} +inline void XNNPackSettings::clear_flags() { + flags_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline ::tflite::proto::XNNPackFlags XNNPackSettings::_internal_flags() const { + return static_cast< ::tflite::proto::XNNPackFlags >(flags_); +} +inline ::tflite::proto::XNNPackFlags XNNPackSettings::flags() const { + // @@protoc_insertion_point(field_get:tflite.proto.XNNPackSettings.flags) + return _internal_flags(); +} +inline void XNNPackSettings::_internal_set_flags(::tflite::proto::XNNPackFlags value) { + assert(::tflite::proto::XNNPackFlags_IsValid(value)); + _has_bits_[0] |= 0x00000002u; + flags_ = value; +} +inline void XNNPackSettings::set_flags(::tflite::proto::XNNPackFlags value) { + _internal_set_flags(value); + // @@protoc_insertion_point(field_set:tflite.proto.XNNPackSettings.flags) +} + +// ------------------------------------------------------------------- + +// CoreMLSettings + +// optional .tflite.proto.CoreMLSettings.EnabledDevices enabled_devices = 1; +inline bool CoreMLSettings::_internal_has_enabled_devices() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool CoreMLSettings::has_enabled_devices() const { + return _internal_has_enabled_devices(); +} +inline void CoreMLSettings::clear_enabled_devices() { + enabled_devices_ = 0; + _has_bits_[0] &= ~0x00000001u; +} +inline ::tflite::proto::CoreMLSettings_EnabledDevices CoreMLSettings::_internal_enabled_devices() const { + return static_cast< ::tflite::proto::CoreMLSettings_EnabledDevices >(enabled_devices_); +} +inline ::tflite::proto::CoreMLSettings_EnabledDevices CoreMLSettings::enabled_devices() const { + // @@protoc_insertion_point(field_get:tflite.proto.CoreMLSettings.enabled_devices) + return _internal_enabled_devices(); +} +inline void CoreMLSettings::_internal_set_enabled_devices(::tflite::proto::CoreMLSettings_EnabledDevices value) { + assert(::tflite::proto::CoreMLSettings_EnabledDevices_IsValid(value)); + _has_bits_[0] |= 0x00000001u; + enabled_devices_ = value; +} +inline void CoreMLSettings::set_enabled_devices(::tflite::proto::CoreMLSettings_EnabledDevices value) { + _internal_set_enabled_devices(value); + // @@protoc_insertion_point(field_set:tflite.proto.CoreMLSettings.enabled_devices) +} + +// optional int32 coreml_version = 2; +inline bool CoreMLSettings::_internal_has_coreml_version() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool CoreMLSettings::has_coreml_version() const { + return _internal_has_coreml_version(); +} +inline void CoreMLSettings::clear_coreml_version() { + coreml_version_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline int32_t CoreMLSettings::_internal_coreml_version() const { + return coreml_version_; +} +inline int32_t CoreMLSettings::coreml_version() const { + // @@protoc_insertion_point(field_get:tflite.proto.CoreMLSettings.coreml_version) + return _internal_coreml_version(); +} +inline void CoreMLSettings::_internal_set_coreml_version(int32_t value) { + _has_bits_[0] |= 0x00000002u; + coreml_version_ = value; +} +inline void CoreMLSettings::set_coreml_version(int32_t value) { + _internal_set_coreml_version(value); + // @@protoc_insertion_point(field_set:tflite.proto.CoreMLSettings.coreml_version) +} + +// optional int32 max_delegated_partitions = 3 [default = 0]; +inline bool CoreMLSettings::_internal_has_max_delegated_partitions() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool CoreMLSettings::has_max_delegated_partitions() const { + return _internal_has_max_delegated_partitions(); +} +inline void CoreMLSettings::clear_max_delegated_partitions() { + max_delegated_partitions_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline int32_t CoreMLSettings::_internal_max_delegated_partitions() const { + return max_delegated_partitions_; +} +inline int32_t CoreMLSettings::max_delegated_partitions() const { + // @@protoc_insertion_point(field_get:tflite.proto.CoreMLSettings.max_delegated_partitions) + return _internal_max_delegated_partitions(); +} +inline void CoreMLSettings::_internal_set_max_delegated_partitions(int32_t value) { + _has_bits_[0] |= 0x00000004u; + max_delegated_partitions_ = value; +} +inline void CoreMLSettings::set_max_delegated_partitions(int32_t value) { + _internal_set_max_delegated_partitions(value); + // @@protoc_insertion_point(field_set:tflite.proto.CoreMLSettings.max_delegated_partitions) +} + +// optional int32 min_nodes_per_partition = 4 [default = 2]; +inline bool CoreMLSettings::_internal_has_min_nodes_per_partition() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool CoreMLSettings::has_min_nodes_per_partition() const { + return _internal_has_min_nodes_per_partition(); +} +inline void CoreMLSettings::clear_min_nodes_per_partition() { + min_nodes_per_partition_ = 2; + _has_bits_[0] &= ~0x00000008u; +} +inline int32_t CoreMLSettings::_internal_min_nodes_per_partition() const { + return min_nodes_per_partition_; +} +inline int32_t CoreMLSettings::min_nodes_per_partition() const { + // @@protoc_insertion_point(field_get:tflite.proto.CoreMLSettings.min_nodes_per_partition) + return _internal_min_nodes_per_partition(); +} +inline void CoreMLSettings::_internal_set_min_nodes_per_partition(int32_t value) { + _has_bits_[0] |= 0x00000008u; + min_nodes_per_partition_ = value; +} +inline void CoreMLSettings::set_min_nodes_per_partition(int32_t value) { + _internal_set_min_nodes_per_partition(value); + // @@protoc_insertion_point(field_set:tflite.proto.CoreMLSettings.min_nodes_per_partition) +} + +// ------------------------------------------------------------------- + +// StableDelegateLoaderSettings + +// optional string delegate_path = 1; +inline bool StableDelegateLoaderSettings::_internal_has_delegate_path() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool StableDelegateLoaderSettings::has_delegate_path() const { + return _internal_has_delegate_path(); +} +inline void StableDelegateLoaderSettings::clear_delegate_path() { + delegate_path_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& StableDelegateLoaderSettings::delegate_path() const { + // @@protoc_insertion_point(field_get:tflite.proto.StableDelegateLoaderSettings.delegate_path) + return _internal_delegate_path(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void StableDelegateLoaderSettings::set_delegate_path(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + delegate_path_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tflite.proto.StableDelegateLoaderSettings.delegate_path) +} +inline std::string* StableDelegateLoaderSettings::mutable_delegate_path() { + std::string* _s = _internal_mutable_delegate_path(); + // @@protoc_insertion_point(field_mutable:tflite.proto.StableDelegateLoaderSettings.delegate_path) + return _s; +} +inline const std::string& StableDelegateLoaderSettings::_internal_delegate_path() const { + return delegate_path_.Get(); +} +inline void StableDelegateLoaderSettings::_internal_set_delegate_path(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + delegate_path_.Set(value, GetArenaForAllocation()); +} +inline std::string* StableDelegateLoaderSettings::_internal_mutable_delegate_path() { + _has_bits_[0] |= 0x00000001u; + return delegate_path_.Mutable(GetArenaForAllocation()); +} +inline std::string* StableDelegateLoaderSettings::release_delegate_path() { + // @@protoc_insertion_point(field_release:tflite.proto.StableDelegateLoaderSettings.delegate_path) + if (!_internal_has_delegate_path()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = delegate_path_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (delegate_path_.IsDefault()) { + delegate_path_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void StableDelegateLoaderSettings::set_allocated_delegate_path(std::string* delegate_path) { + if (delegate_path != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + delegate_path_.SetAllocated(delegate_path, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (delegate_path_.IsDefault()) { + delegate_path_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tflite.proto.StableDelegateLoaderSettings.delegate_path) +} + +// optional string delegate_name = 2; +inline bool StableDelegateLoaderSettings::_internal_has_delegate_name() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool StableDelegateLoaderSettings::has_delegate_name() const { + return _internal_has_delegate_name(); +} +inline void StableDelegateLoaderSettings::clear_delegate_name() { + delegate_name_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& StableDelegateLoaderSettings::delegate_name() const { + // @@protoc_insertion_point(field_get:tflite.proto.StableDelegateLoaderSettings.delegate_name) + return _internal_delegate_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void StableDelegateLoaderSettings::set_delegate_name(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + delegate_name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tflite.proto.StableDelegateLoaderSettings.delegate_name) +} +inline std::string* StableDelegateLoaderSettings::mutable_delegate_name() { + std::string* _s = _internal_mutable_delegate_name(); + // @@protoc_insertion_point(field_mutable:tflite.proto.StableDelegateLoaderSettings.delegate_name) + return _s; +} +inline const std::string& StableDelegateLoaderSettings::_internal_delegate_name() const { + return delegate_name_.Get(); +} +inline void StableDelegateLoaderSettings::_internal_set_delegate_name(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + delegate_name_.Set(value, GetArenaForAllocation()); +} +inline std::string* StableDelegateLoaderSettings::_internal_mutable_delegate_name() { + _has_bits_[0] |= 0x00000002u; + return delegate_name_.Mutable(GetArenaForAllocation()); +} +inline std::string* StableDelegateLoaderSettings::release_delegate_name() { + // @@protoc_insertion_point(field_release:tflite.proto.StableDelegateLoaderSettings.delegate_name) + if (!_internal_has_delegate_name()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = delegate_name_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (delegate_name_.IsDefault()) { + delegate_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void StableDelegateLoaderSettings::set_allocated_delegate_name(std::string* delegate_name) { + if (delegate_name != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + delegate_name_.SetAllocated(delegate_name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (delegate_name_.IsDefault()) { + delegate_name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tflite.proto.StableDelegateLoaderSettings.delegate_name) +} + +// ------------------------------------------------------------------- + +// CompilationCachingSettings + +// optional string cache_dir = 1; +inline bool CompilationCachingSettings::_internal_has_cache_dir() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool CompilationCachingSettings::has_cache_dir() const { + return _internal_has_cache_dir(); +} +inline void CompilationCachingSettings::clear_cache_dir() { + cache_dir_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& CompilationCachingSettings::cache_dir() const { + // @@protoc_insertion_point(field_get:tflite.proto.CompilationCachingSettings.cache_dir) + return _internal_cache_dir(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CompilationCachingSettings::set_cache_dir(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + cache_dir_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tflite.proto.CompilationCachingSettings.cache_dir) +} +inline std::string* CompilationCachingSettings::mutable_cache_dir() { + std::string* _s = _internal_mutable_cache_dir(); + // @@protoc_insertion_point(field_mutable:tflite.proto.CompilationCachingSettings.cache_dir) + return _s; +} +inline const std::string& CompilationCachingSettings::_internal_cache_dir() const { + return cache_dir_.Get(); +} +inline void CompilationCachingSettings::_internal_set_cache_dir(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + cache_dir_.Set(value, GetArenaForAllocation()); +} +inline std::string* CompilationCachingSettings::_internal_mutable_cache_dir() { + _has_bits_[0] |= 0x00000001u; + return cache_dir_.Mutable(GetArenaForAllocation()); +} +inline std::string* CompilationCachingSettings::release_cache_dir() { + // @@protoc_insertion_point(field_release:tflite.proto.CompilationCachingSettings.cache_dir) + if (!_internal_has_cache_dir()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = cache_dir_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (cache_dir_.IsDefault()) { + cache_dir_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void CompilationCachingSettings::set_allocated_cache_dir(std::string* cache_dir) { + if (cache_dir != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + cache_dir_.SetAllocated(cache_dir, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (cache_dir_.IsDefault()) { + cache_dir_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tflite.proto.CompilationCachingSettings.cache_dir) +} + +// optional string model_token = 2; +inline bool CompilationCachingSettings::_internal_has_model_token() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool CompilationCachingSettings::has_model_token() const { + return _internal_has_model_token(); +} +inline void CompilationCachingSettings::clear_model_token() { + model_token_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& CompilationCachingSettings::model_token() const { + // @@protoc_insertion_point(field_get:tflite.proto.CompilationCachingSettings.model_token) + return _internal_model_token(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CompilationCachingSettings::set_model_token(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + model_token_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tflite.proto.CompilationCachingSettings.model_token) +} +inline std::string* CompilationCachingSettings::mutable_model_token() { + std::string* _s = _internal_mutable_model_token(); + // @@protoc_insertion_point(field_mutable:tflite.proto.CompilationCachingSettings.model_token) + return _s; +} +inline const std::string& CompilationCachingSettings::_internal_model_token() const { + return model_token_.Get(); +} +inline void CompilationCachingSettings::_internal_set_model_token(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + model_token_.Set(value, GetArenaForAllocation()); +} +inline std::string* CompilationCachingSettings::_internal_mutable_model_token() { + _has_bits_[0] |= 0x00000002u; + return model_token_.Mutable(GetArenaForAllocation()); +} +inline std::string* CompilationCachingSettings::release_model_token() { + // @@protoc_insertion_point(field_release:tflite.proto.CompilationCachingSettings.model_token) + if (!_internal_has_model_token()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = model_token_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (model_token_.IsDefault()) { + model_token_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void CompilationCachingSettings::set_allocated_model_token(std::string* model_token) { + if (model_token != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + model_token_.SetAllocated(model_token, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (model_token_.IsDefault()) { + model_token_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tflite.proto.CompilationCachingSettings.model_token) +} + +// ------------------------------------------------------------------- + +// EdgeTpuDeviceSpec + +// optional .tflite.proto.EdgeTpuDeviceSpec.PlatformType platform_type = 1; +inline bool EdgeTpuDeviceSpec::_internal_has_platform_type() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool EdgeTpuDeviceSpec::has_platform_type() const { + return _internal_has_platform_type(); +} +inline void EdgeTpuDeviceSpec::clear_platform_type() { + platform_type_ = 0; + _has_bits_[0] &= ~0x00000001u; +} +inline ::tflite::proto::EdgeTpuDeviceSpec_PlatformType EdgeTpuDeviceSpec::_internal_platform_type() const { + return static_cast< ::tflite::proto::EdgeTpuDeviceSpec_PlatformType >(platform_type_); +} +inline ::tflite::proto::EdgeTpuDeviceSpec_PlatformType EdgeTpuDeviceSpec::platform_type() const { + // @@protoc_insertion_point(field_get:tflite.proto.EdgeTpuDeviceSpec.platform_type) + return _internal_platform_type(); +} +inline void EdgeTpuDeviceSpec::_internal_set_platform_type(::tflite::proto::EdgeTpuDeviceSpec_PlatformType value) { + assert(::tflite::proto::EdgeTpuDeviceSpec_PlatformType_IsValid(value)); + _has_bits_[0] |= 0x00000001u; + platform_type_ = value; +} +inline void EdgeTpuDeviceSpec::set_platform_type(::tflite::proto::EdgeTpuDeviceSpec_PlatformType value) { + _internal_set_platform_type(value); + // @@protoc_insertion_point(field_set:tflite.proto.EdgeTpuDeviceSpec.platform_type) +} + +// optional int32 num_chips = 2; +inline bool EdgeTpuDeviceSpec::_internal_has_num_chips() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool EdgeTpuDeviceSpec::has_num_chips() const { + return _internal_has_num_chips(); +} +inline void EdgeTpuDeviceSpec::clear_num_chips() { + num_chips_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline int32_t EdgeTpuDeviceSpec::_internal_num_chips() const { + return num_chips_; +} +inline int32_t EdgeTpuDeviceSpec::num_chips() const { + // @@protoc_insertion_point(field_get:tflite.proto.EdgeTpuDeviceSpec.num_chips) + return _internal_num_chips(); +} +inline void EdgeTpuDeviceSpec::_internal_set_num_chips(int32_t value) { + _has_bits_[0] |= 0x00000002u; + num_chips_ = value; +} +inline void EdgeTpuDeviceSpec::set_num_chips(int32_t value) { + _internal_set_num_chips(value); + // @@protoc_insertion_point(field_set:tflite.proto.EdgeTpuDeviceSpec.num_chips) +} + +// repeated string device_paths = 3; +inline int EdgeTpuDeviceSpec::_internal_device_paths_size() const { + return device_paths_.size(); +} +inline int EdgeTpuDeviceSpec::device_paths_size() const { + return _internal_device_paths_size(); +} +inline void EdgeTpuDeviceSpec::clear_device_paths() { + device_paths_.Clear(); +} +inline std::string* EdgeTpuDeviceSpec::add_device_paths() { + std::string* _s = _internal_add_device_paths(); + // @@protoc_insertion_point(field_add_mutable:tflite.proto.EdgeTpuDeviceSpec.device_paths) + return _s; +} +inline const std::string& EdgeTpuDeviceSpec::_internal_device_paths(int index) const { + return device_paths_.Get(index); +} +inline const std::string& EdgeTpuDeviceSpec::device_paths(int index) const { + // @@protoc_insertion_point(field_get:tflite.proto.EdgeTpuDeviceSpec.device_paths) + return _internal_device_paths(index); +} +inline std::string* EdgeTpuDeviceSpec::mutable_device_paths(int index) { + // @@protoc_insertion_point(field_mutable:tflite.proto.EdgeTpuDeviceSpec.device_paths) + return device_paths_.Mutable(index); +} +inline void EdgeTpuDeviceSpec::set_device_paths(int index, const std::string& value) { + device_paths_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set:tflite.proto.EdgeTpuDeviceSpec.device_paths) +} +inline void EdgeTpuDeviceSpec::set_device_paths(int index, std::string&& value) { + device_paths_.Mutable(index)->assign(std::move(value)); + // @@protoc_insertion_point(field_set:tflite.proto.EdgeTpuDeviceSpec.device_paths) +} +inline void EdgeTpuDeviceSpec::set_device_paths(int index, const char* value) { + GOOGLE_DCHECK(value != nullptr); + device_paths_.Mutable(index)->assign(value); + // @@protoc_insertion_point(field_set_char:tflite.proto.EdgeTpuDeviceSpec.device_paths) +} +inline void EdgeTpuDeviceSpec::set_device_paths(int index, const char* value, size_t size) { + device_paths_.Mutable(index)->assign( + reinterpret_cast(value), size); + // @@protoc_insertion_point(field_set_pointer:tflite.proto.EdgeTpuDeviceSpec.device_paths) +} +inline std::string* EdgeTpuDeviceSpec::_internal_add_device_paths() { + return device_paths_.Add(); +} +inline void EdgeTpuDeviceSpec::add_device_paths(const std::string& value) { + device_paths_.Add()->assign(value); + // @@protoc_insertion_point(field_add:tflite.proto.EdgeTpuDeviceSpec.device_paths) +} +inline void EdgeTpuDeviceSpec::add_device_paths(std::string&& value) { + device_paths_.Add(std::move(value)); + // @@protoc_insertion_point(field_add:tflite.proto.EdgeTpuDeviceSpec.device_paths) +} +inline void EdgeTpuDeviceSpec::add_device_paths(const char* value) { + GOOGLE_DCHECK(value != nullptr); + device_paths_.Add()->assign(value); + // @@protoc_insertion_point(field_add_char:tflite.proto.EdgeTpuDeviceSpec.device_paths) +} +inline void EdgeTpuDeviceSpec::add_device_paths(const char* value, size_t size) { + device_paths_.Add()->assign(reinterpret_cast(value), size); + // @@protoc_insertion_point(field_add_pointer:tflite.proto.EdgeTpuDeviceSpec.device_paths) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField& +EdgeTpuDeviceSpec::device_paths() const { + // @@protoc_insertion_point(field_list:tflite.proto.EdgeTpuDeviceSpec.device_paths) + return device_paths_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField* +EdgeTpuDeviceSpec::mutable_device_paths() { + // @@protoc_insertion_point(field_mutable_list:tflite.proto.EdgeTpuDeviceSpec.device_paths) + return &device_paths_; +} + +// optional int32 chip_family = 4; +inline bool EdgeTpuDeviceSpec::_internal_has_chip_family() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool EdgeTpuDeviceSpec::has_chip_family() const { + return _internal_has_chip_family(); +} +inline void EdgeTpuDeviceSpec::clear_chip_family() { + chip_family_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline int32_t EdgeTpuDeviceSpec::_internal_chip_family() const { + return chip_family_; +} +inline int32_t EdgeTpuDeviceSpec::chip_family() const { + // @@protoc_insertion_point(field_get:tflite.proto.EdgeTpuDeviceSpec.chip_family) + return _internal_chip_family(); +} +inline void EdgeTpuDeviceSpec::_internal_set_chip_family(int32_t value) { + _has_bits_[0] |= 0x00000004u; + chip_family_ = value; +} +inline void EdgeTpuDeviceSpec::set_chip_family(int32_t value) { + _internal_set_chip_family(value); + // @@protoc_insertion_point(field_set:tflite.proto.EdgeTpuDeviceSpec.chip_family) +} + +// ------------------------------------------------------------------- + +// EdgeTpuInactivePowerConfig + +// optional .tflite.proto.EdgeTpuPowerState inactive_power_state = 1; +inline bool EdgeTpuInactivePowerConfig::_internal_has_inactive_power_state() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool EdgeTpuInactivePowerConfig::has_inactive_power_state() const { + return _internal_has_inactive_power_state(); +} +inline void EdgeTpuInactivePowerConfig::clear_inactive_power_state() { + inactive_power_state_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline ::tflite::proto::EdgeTpuPowerState EdgeTpuInactivePowerConfig::_internal_inactive_power_state() const { + return static_cast< ::tflite::proto::EdgeTpuPowerState >(inactive_power_state_); +} +inline ::tflite::proto::EdgeTpuPowerState EdgeTpuInactivePowerConfig::inactive_power_state() const { + // @@protoc_insertion_point(field_get:tflite.proto.EdgeTpuInactivePowerConfig.inactive_power_state) + return _internal_inactive_power_state(); +} +inline void EdgeTpuInactivePowerConfig::_internal_set_inactive_power_state(::tflite::proto::EdgeTpuPowerState value) { + assert(::tflite::proto::EdgeTpuPowerState_IsValid(value)); + _has_bits_[0] |= 0x00000002u; + inactive_power_state_ = value; +} +inline void EdgeTpuInactivePowerConfig::set_inactive_power_state(::tflite::proto::EdgeTpuPowerState value) { + _internal_set_inactive_power_state(value); + // @@protoc_insertion_point(field_set:tflite.proto.EdgeTpuInactivePowerConfig.inactive_power_state) +} + +// optional int64 inactive_timeout_us = 2; +inline bool EdgeTpuInactivePowerConfig::_internal_has_inactive_timeout_us() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool EdgeTpuInactivePowerConfig::has_inactive_timeout_us() const { + return _internal_has_inactive_timeout_us(); +} +inline void EdgeTpuInactivePowerConfig::clear_inactive_timeout_us() { + inactive_timeout_us_ = int64_t{0}; + _has_bits_[0] &= ~0x00000001u; +} +inline int64_t EdgeTpuInactivePowerConfig::_internal_inactive_timeout_us() const { + return inactive_timeout_us_; +} +inline int64_t EdgeTpuInactivePowerConfig::inactive_timeout_us() const { + // @@protoc_insertion_point(field_get:tflite.proto.EdgeTpuInactivePowerConfig.inactive_timeout_us) + return _internal_inactive_timeout_us(); +} +inline void EdgeTpuInactivePowerConfig::_internal_set_inactive_timeout_us(int64_t value) { + _has_bits_[0] |= 0x00000001u; + inactive_timeout_us_ = value; +} +inline void EdgeTpuInactivePowerConfig::set_inactive_timeout_us(int64_t value) { + _internal_set_inactive_timeout_us(value); + // @@protoc_insertion_point(field_set:tflite.proto.EdgeTpuInactivePowerConfig.inactive_timeout_us) +} + +// ------------------------------------------------------------------- + +// EdgeTpuSettings + +// optional .tflite.proto.EdgeTpuPowerState inference_power_state = 1; +inline bool EdgeTpuSettings::_internal_has_inference_power_state() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool EdgeTpuSettings::has_inference_power_state() const { + return _internal_has_inference_power_state(); +} +inline void EdgeTpuSettings::clear_inference_power_state() { + inference_power_state_ = 0; + _has_bits_[0] &= ~0x00000008u; +} +inline ::tflite::proto::EdgeTpuPowerState EdgeTpuSettings::_internal_inference_power_state() const { + return static_cast< ::tflite::proto::EdgeTpuPowerState >(inference_power_state_); +} +inline ::tflite::proto::EdgeTpuPowerState EdgeTpuSettings::inference_power_state() const { + // @@protoc_insertion_point(field_get:tflite.proto.EdgeTpuSettings.inference_power_state) + return _internal_inference_power_state(); +} +inline void EdgeTpuSettings::_internal_set_inference_power_state(::tflite::proto::EdgeTpuPowerState value) { + assert(::tflite::proto::EdgeTpuPowerState_IsValid(value)); + _has_bits_[0] |= 0x00000008u; + inference_power_state_ = value; +} +inline void EdgeTpuSettings::set_inference_power_state(::tflite::proto::EdgeTpuPowerState value) { + _internal_set_inference_power_state(value); + // @@protoc_insertion_point(field_set:tflite.proto.EdgeTpuSettings.inference_power_state) +} + +// repeated .tflite.proto.EdgeTpuInactivePowerConfig inactive_power_configs = 2; +inline int EdgeTpuSettings::_internal_inactive_power_configs_size() const { + return inactive_power_configs_.size(); +} +inline int EdgeTpuSettings::inactive_power_configs_size() const { + return _internal_inactive_power_configs_size(); +} +inline void EdgeTpuSettings::clear_inactive_power_configs() { + inactive_power_configs_.Clear(); +} +inline ::tflite::proto::EdgeTpuInactivePowerConfig* EdgeTpuSettings::mutable_inactive_power_configs(int index) { + // @@protoc_insertion_point(field_mutable:tflite.proto.EdgeTpuSettings.inactive_power_configs) + return inactive_power_configs_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tflite::proto::EdgeTpuInactivePowerConfig >* +EdgeTpuSettings::mutable_inactive_power_configs() { + // @@protoc_insertion_point(field_mutable_list:tflite.proto.EdgeTpuSettings.inactive_power_configs) + return &inactive_power_configs_; +} +inline const ::tflite::proto::EdgeTpuInactivePowerConfig& EdgeTpuSettings::_internal_inactive_power_configs(int index) const { + return inactive_power_configs_.Get(index); +} +inline const ::tflite::proto::EdgeTpuInactivePowerConfig& EdgeTpuSettings::inactive_power_configs(int index) const { + // @@protoc_insertion_point(field_get:tflite.proto.EdgeTpuSettings.inactive_power_configs) + return _internal_inactive_power_configs(index); +} +inline ::tflite::proto::EdgeTpuInactivePowerConfig* EdgeTpuSettings::_internal_add_inactive_power_configs() { + return inactive_power_configs_.Add(); +} +inline ::tflite::proto::EdgeTpuInactivePowerConfig* EdgeTpuSettings::add_inactive_power_configs() { + ::tflite::proto::EdgeTpuInactivePowerConfig* _add = _internal_add_inactive_power_configs(); + // @@protoc_insertion_point(field_add:tflite.proto.EdgeTpuSettings.inactive_power_configs) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tflite::proto::EdgeTpuInactivePowerConfig >& +EdgeTpuSettings::inactive_power_configs() const { + // @@protoc_insertion_point(field_list:tflite.proto.EdgeTpuSettings.inactive_power_configs) + return inactive_power_configs_; +} + +// optional int32 inference_priority = 3 [default = -1]; +inline bool EdgeTpuSettings::_internal_has_inference_priority() const { + bool value = (_has_bits_[0] & 0x00000040u) != 0; + return value; +} +inline bool EdgeTpuSettings::has_inference_priority() const { + return _internal_has_inference_priority(); +} +inline void EdgeTpuSettings::clear_inference_priority() { + inference_priority_ = -1; + _has_bits_[0] &= ~0x00000040u; +} +inline int32_t EdgeTpuSettings::_internal_inference_priority() const { + return inference_priority_; +} +inline int32_t EdgeTpuSettings::inference_priority() const { + // @@protoc_insertion_point(field_get:tflite.proto.EdgeTpuSettings.inference_priority) + return _internal_inference_priority(); +} +inline void EdgeTpuSettings::_internal_set_inference_priority(int32_t value) { + _has_bits_[0] |= 0x00000040u; + inference_priority_ = value; +} +inline void EdgeTpuSettings::set_inference_priority(int32_t value) { + _internal_set_inference_priority(value); + // @@protoc_insertion_point(field_set:tflite.proto.EdgeTpuSettings.inference_priority) +} + +// optional .tflite.proto.EdgeTpuDeviceSpec edgetpu_device_spec = 4; +inline bool EdgeTpuSettings::_internal_has_edgetpu_device_spec() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || edgetpu_device_spec_ != nullptr); + return value; +} +inline bool EdgeTpuSettings::has_edgetpu_device_spec() const { + return _internal_has_edgetpu_device_spec(); +} +inline void EdgeTpuSettings::clear_edgetpu_device_spec() { + if (edgetpu_device_spec_ != nullptr) edgetpu_device_spec_->Clear(); + _has_bits_[0] &= ~0x00000004u; +} +inline const ::tflite::proto::EdgeTpuDeviceSpec& EdgeTpuSettings::_internal_edgetpu_device_spec() const { + const ::tflite::proto::EdgeTpuDeviceSpec* p = edgetpu_device_spec_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_EdgeTpuDeviceSpec_default_instance_); +} +inline const ::tflite::proto::EdgeTpuDeviceSpec& EdgeTpuSettings::edgetpu_device_spec() const { + // @@protoc_insertion_point(field_get:tflite.proto.EdgeTpuSettings.edgetpu_device_spec) + return _internal_edgetpu_device_spec(); +} +inline void EdgeTpuSettings::unsafe_arena_set_allocated_edgetpu_device_spec( + ::tflite::proto::EdgeTpuDeviceSpec* edgetpu_device_spec) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(edgetpu_device_spec_); + } + edgetpu_device_spec_ = edgetpu_device_spec; + if (edgetpu_device_spec) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.EdgeTpuSettings.edgetpu_device_spec) +} +inline ::tflite::proto::EdgeTpuDeviceSpec* EdgeTpuSettings::release_edgetpu_device_spec() { + _has_bits_[0] &= ~0x00000004u; + ::tflite::proto::EdgeTpuDeviceSpec* temp = edgetpu_device_spec_; + edgetpu_device_spec_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::EdgeTpuDeviceSpec* EdgeTpuSettings::unsafe_arena_release_edgetpu_device_spec() { + // @@protoc_insertion_point(field_release:tflite.proto.EdgeTpuSettings.edgetpu_device_spec) + _has_bits_[0] &= ~0x00000004u; + ::tflite::proto::EdgeTpuDeviceSpec* temp = edgetpu_device_spec_; + edgetpu_device_spec_ = nullptr; + return temp; +} +inline ::tflite::proto::EdgeTpuDeviceSpec* EdgeTpuSettings::_internal_mutable_edgetpu_device_spec() { + _has_bits_[0] |= 0x00000004u; + if (edgetpu_device_spec_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::EdgeTpuDeviceSpec>(GetArenaForAllocation()); + edgetpu_device_spec_ = p; + } + return edgetpu_device_spec_; +} +inline ::tflite::proto::EdgeTpuDeviceSpec* EdgeTpuSettings::mutable_edgetpu_device_spec() { + ::tflite::proto::EdgeTpuDeviceSpec* _msg = _internal_mutable_edgetpu_device_spec(); + // @@protoc_insertion_point(field_mutable:tflite.proto.EdgeTpuSettings.edgetpu_device_spec) + return _msg; +} +inline void EdgeTpuSettings::set_allocated_edgetpu_device_spec(::tflite::proto::EdgeTpuDeviceSpec* edgetpu_device_spec) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete edgetpu_device_spec_; + } + if (edgetpu_device_spec) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(edgetpu_device_spec); + if (message_arena != submessage_arena) { + edgetpu_device_spec = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, edgetpu_device_spec, submessage_arena); + } + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + edgetpu_device_spec_ = edgetpu_device_spec; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.EdgeTpuSettings.edgetpu_device_spec) +} + +// optional string model_token = 5; +inline bool EdgeTpuSettings::_internal_has_model_token() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool EdgeTpuSettings::has_model_token() const { + return _internal_has_model_token(); +} +inline void EdgeTpuSettings::clear_model_token() { + model_token_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& EdgeTpuSettings::model_token() const { + // @@protoc_insertion_point(field_get:tflite.proto.EdgeTpuSettings.model_token) + return _internal_model_token(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void EdgeTpuSettings::set_model_token(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + model_token_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tflite.proto.EdgeTpuSettings.model_token) +} +inline std::string* EdgeTpuSettings::mutable_model_token() { + std::string* _s = _internal_mutable_model_token(); + // @@protoc_insertion_point(field_mutable:tflite.proto.EdgeTpuSettings.model_token) + return _s; +} +inline const std::string& EdgeTpuSettings::_internal_model_token() const { + return model_token_.Get(); +} +inline void EdgeTpuSettings::_internal_set_model_token(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + model_token_.Set(value, GetArenaForAllocation()); +} +inline std::string* EdgeTpuSettings::_internal_mutable_model_token() { + _has_bits_[0] |= 0x00000001u; + return model_token_.Mutable(GetArenaForAllocation()); +} +inline std::string* EdgeTpuSettings::release_model_token() { + // @@protoc_insertion_point(field_release:tflite.proto.EdgeTpuSettings.model_token) + if (!_internal_has_model_token()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = model_token_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (model_token_.IsDefault()) { + model_token_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void EdgeTpuSettings::set_allocated_model_token(std::string* model_token) { + if (model_token != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + model_token_.SetAllocated(model_token, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (model_token_.IsDefault()) { + model_token_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tflite.proto.EdgeTpuSettings.model_token) +} + +// optional .tflite.proto.EdgeTpuSettings.FloatTruncationType float_truncation_type = 6; +inline bool EdgeTpuSettings::_internal_has_float_truncation_type() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool EdgeTpuSettings::has_float_truncation_type() const { + return _internal_has_float_truncation_type(); +} +inline void EdgeTpuSettings::clear_float_truncation_type() { + float_truncation_type_ = 0; + _has_bits_[0] &= ~0x00000010u; +} +inline ::tflite::proto::EdgeTpuSettings_FloatTruncationType EdgeTpuSettings::_internal_float_truncation_type() const { + return static_cast< ::tflite::proto::EdgeTpuSettings_FloatTruncationType >(float_truncation_type_); +} +inline ::tflite::proto::EdgeTpuSettings_FloatTruncationType EdgeTpuSettings::float_truncation_type() const { + // @@protoc_insertion_point(field_get:tflite.proto.EdgeTpuSettings.float_truncation_type) + return _internal_float_truncation_type(); +} +inline void EdgeTpuSettings::_internal_set_float_truncation_type(::tflite::proto::EdgeTpuSettings_FloatTruncationType value) { + assert(::tflite::proto::EdgeTpuSettings_FloatTruncationType_IsValid(value)); + _has_bits_[0] |= 0x00000010u; + float_truncation_type_ = value; +} +inline void EdgeTpuSettings::set_float_truncation_type(::tflite::proto::EdgeTpuSettings_FloatTruncationType value) { + _internal_set_float_truncation_type(value); + // @@protoc_insertion_point(field_set:tflite.proto.EdgeTpuSettings.float_truncation_type) +} + +// optional .tflite.proto.EdgeTpuSettings.QosClass qos_class = 7 [default = QOS_UNDEFINED]; +inline bool EdgeTpuSettings::_internal_has_qos_class() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool EdgeTpuSettings::has_qos_class() const { + return _internal_has_qos_class(); +} +inline void EdgeTpuSettings::clear_qos_class() { + qos_class_ = 0; + _has_bits_[0] &= ~0x00000020u; +} +inline ::tflite::proto::EdgeTpuSettings_QosClass EdgeTpuSettings::_internal_qos_class() const { + return static_cast< ::tflite::proto::EdgeTpuSettings_QosClass >(qos_class_); +} +inline ::tflite::proto::EdgeTpuSettings_QosClass EdgeTpuSettings::qos_class() const { + // @@protoc_insertion_point(field_get:tflite.proto.EdgeTpuSettings.qos_class) + return _internal_qos_class(); +} +inline void EdgeTpuSettings::_internal_set_qos_class(::tflite::proto::EdgeTpuSettings_QosClass value) { + assert(::tflite::proto::EdgeTpuSettings_QosClass_IsValid(value)); + _has_bits_[0] |= 0x00000020u; + qos_class_ = value; +} +inline void EdgeTpuSettings::set_qos_class(::tflite::proto::EdgeTpuSettings_QosClass value) { + _internal_set_qos_class(value); + // @@protoc_insertion_point(field_set:tflite.proto.EdgeTpuSettings.qos_class) +} + +// repeated int32 hardware_cluster_ids = 8 [packed = true]; +inline int EdgeTpuSettings::_internal_hardware_cluster_ids_size() const { + return hardware_cluster_ids_.size(); +} +inline int EdgeTpuSettings::hardware_cluster_ids_size() const { + return _internal_hardware_cluster_ids_size(); +} +inline void EdgeTpuSettings::clear_hardware_cluster_ids() { + hardware_cluster_ids_.Clear(); +} +inline int32_t EdgeTpuSettings::_internal_hardware_cluster_ids(int index) const { + return hardware_cluster_ids_.Get(index); +} +inline int32_t EdgeTpuSettings::hardware_cluster_ids(int index) const { + // @@protoc_insertion_point(field_get:tflite.proto.EdgeTpuSettings.hardware_cluster_ids) + return _internal_hardware_cluster_ids(index); +} +inline void EdgeTpuSettings::set_hardware_cluster_ids(int index, int32_t value) { + hardware_cluster_ids_.Set(index, value); + // @@protoc_insertion_point(field_set:tflite.proto.EdgeTpuSettings.hardware_cluster_ids) +} +inline void EdgeTpuSettings::_internal_add_hardware_cluster_ids(int32_t value) { + hardware_cluster_ids_.Add(value); +} +inline void EdgeTpuSettings::add_hardware_cluster_ids(int32_t value) { + _internal_add_hardware_cluster_ids(value); + // @@protoc_insertion_point(field_add:tflite.proto.EdgeTpuSettings.hardware_cluster_ids) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +EdgeTpuSettings::_internal_hardware_cluster_ids() const { + return hardware_cluster_ids_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >& +EdgeTpuSettings::hardware_cluster_ids() const { + // @@protoc_insertion_point(field_list:tflite.proto.EdgeTpuSettings.hardware_cluster_ids) + return _internal_hardware_cluster_ids(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +EdgeTpuSettings::_internal_mutable_hardware_cluster_ids() { + return &hardware_cluster_ids_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int32_t >* +EdgeTpuSettings::mutable_hardware_cluster_ids() { + // @@protoc_insertion_point(field_mutable_list:tflite.proto.EdgeTpuSettings.hardware_cluster_ids) + return _internal_mutable_hardware_cluster_ids(); +} + +// optional string public_model_id = 9; +inline bool EdgeTpuSettings::_internal_has_public_model_id() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool EdgeTpuSettings::has_public_model_id() const { + return _internal_has_public_model_id(); +} +inline void EdgeTpuSettings::clear_public_model_id() { + public_model_id_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& EdgeTpuSettings::public_model_id() const { + // @@protoc_insertion_point(field_get:tflite.proto.EdgeTpuSettings.public_model_id) + return _internal_public_model_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void EdgeTpuSettings::set_public_model_id(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + public_model_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tflite.proto.EdgeTpuSettings.public_model_id) +} +inline std::string* EdgeTpuSettings::mutable_public_model_id() { + std::string* _s = _internal_mutable_public_model_id(); + // @@protoc_insertion_point(field_mutable:tflite.proto.EdgeTpuSettings.public_model_id) + return _s; +} +inline const std::string& EdgeTpuSettings::_internal_public_model_id() const { + return public_model_id_.Get(); +} +inline void EdgeTpuSettings::_internal_set_public_model_id(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + public_model_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* EdgeTpuSettings::_internal_mutable_public_model_id() { + _has_bits_[0] |= 0x00000002u; + return public_model_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* EdgeTpuSettings::release_public_model_id() { + // @@protoc_insertion_point(field_release:tflite.proto.EdgeTpuSettings.public_model_id) + if (!_internal_has_public_model_id()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = public_model_id_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (public_model_id_.IsDefault()) { + public_model_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void EdgeTpuSettings::set_allocated_public_model_id(std::string* public_model_id) { + if (public_model_id != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + public_model_id_.SetAllocated(public_model_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (public_model_id_.IsDefault()) { + public_model_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tflite.proto.EdgeTpuSettings.public_model_id) +} + +// ------------------------------------------------------------------- + +// GoogleEdgeTpuSettings + +// optional int32 log_verbosity = 1 [default = -1]; +inline bool GoogleEdgeTpuSettings::_internal_has_log_verbosity() const { + bool value = (_has_bits_[0] & 0x00000100u) != 0; + return value; +} +inline bool GoogleEdgeTpuSettings::has_log_verbosity() const { + return _internal_has_log_verbosity(); +} +inline void GoogleEdgeTpuSettings::clear_log_verbosity() { + log_verbosity_ = -1; + _has_bits_[0] &= ~0x00000100u; +} +inline int32_t GoogleEdgeTpuSettings::_internal_log_verbosity() const { + return log_verbosity_; +} +inline int32_t GoogleEdgeTpuSettings::log_verbosity() const { + // @@protoc_insertion_point(field_get:tflite.proto.GoogleEdgeTpuSettings.log_verbosity) + return _internal_log_verbosity(); +} +inline void GoogleEdgeTpuSettings::_internal_set_log_verbosity(int32_t value) { + _has_bits_[0] |= 0x00000100u; + log_verbosity_ = value; +} +inline void GoogleEdgeTpuSettings::set_log_verbosity(int32_t value) { + _internal_set_log_verbosity(value); + // @@protoc_insertion_point(field_set:tflite.proto.GoogleEdgeTpuSettings.log_verbosity) +} + +// optional bool enable_tracing = 2 [default = false]; +inline bool GoogleEdgeTpuSettings::_internal_has_enable_tracing() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool GoogleEdgeTpuSettings::has_enable_tracing() const { + return _internal_has_enable_tracing(); +} +inline void GoogleEdgeTpuSettings::clear_enable_tracing() { + enable_tracing_ = false; + _has_bits_[0] &= ~0x00000008u; +} +inline bool GoogleEdgeTpuSettings::_internal_enable_tracing() const { + return enable_tracing_; +} +inline bool GoogleEdgeTpuSettings::enable_tracing() const { + // @@protoc_insertion_point(field_get:tflite.proto.GoogleEdgeTpuSettings.enable_tracing) + return _internal_enable_tracing(); +} +inline void GoogleEdgeTpuSettings::_internal_set_enable_tracing(bool value) { + _has_bits_[0] |= 0x00000008u; + enable_tracing_ = value; +} +inline void GoogleEdgeTpuSettings::set_enable_tracing(bool value) { + _internal_set_enable_tracing(value); + // @@protoc_insertion_point(field_set:tflite.proto.GoogleEdgeTpuSettings.enable_tracing) +} + +// optional .tflite.proto.GoogleEdgeTpuSettings.Priority priority = 3; +inline bool GoogleEdgeTpuSettings::_internal_has_priority() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool GoogleEdgeTpuSettings::has_priority() const { + return _internal_has_priority(); +} +inline void GoogleEdgeTpuSettings::clear_priority() { + priority_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline ::tflite::proto::GoogleEdgeTpuSettings_Priority GoogleEdgeTpuSettings::_internal_priority() const { + return static_cast< ::tflite::proto::GoogleEdgeTpuSettings_Priority >(priority_); +} +inline ::tflite::proto::GoogleEdgeTpuSettings_Priority GoogleEdgeTpuSettings::priority() const { + // @@protoc_insertion_point(field_get:tflite.proto.GoogleEdgeTpuSettings.priority) + return _internal_priority(); +} +inline void GoogleEdgeTpuSettings::_internal_set_priority(::tflite::proto::GoogleEdgeTpuSettings_Priority value) { + assert(::tflite::proto::GoogleEdgeTpuSettings_Priority_IsValid(value)); + _has_bits_[0] |= 0x00000004u; + priority_ = value; +} +inline void GoogleEdgeTpuSettings::set_priority(::tflite::proto::GoogleEdgeTpuSettings_Priority value) { + _internal_set_priority(value); + // @@protoc_insertion_point(field_set:tflite.proto.GoogleEdgeTpuSettings.priority) +} + +// optional bytes extension_data = 4; +inline bool GoogleEdgeTpuSettings::_internal_has_extension_data() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool GoogleEdgeTpuSettings::has_extension_data() const { + return _internal_has_extension_data(); +} +inline void GoogleEdgeTpuSettings::clear_extension_data() { + extension_data_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& GoogleEdgeTpuSettings::extension_data() const { + // @@protoc_insertion_point(field_get:tflite.proto.GoogleEdgeTpuSettings.extension_data) + return _internal_extension_data(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GoogleEdgeTpuSettings::set_extension_data(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + extension_data_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tflite.proto.GoogleEdgeTpuSettings.extension_data) +} +inline std::string* GoogleEdgeTpuSettings::mutable_extension_data() { + std::string* _s = _internal_mutable_extension_data(); + // @@protoc_insertion_point(field_mutable:tflite.proto.GoogleEdgeTpuSettings.extension_data) + return _s; +} +inline const std::string& GoogleEdgeTpuSettings::_internal_extension_data() const { + return extension_data_.Get(); +} +inline void GoogleEdgeTpuSettings::_internal_set_extension_data(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + extension_data_.Set(value, GetArenaForAllocation()); +} +inline std::string* GoogleEdgeTpuSettings::_internal_mutable_extension_data() { + _has_bits_[0] |= 0x00000001u; + return extension_data_.Mutable(GetArenaForAllocation()); +} +inline std::string* GoogleEdgeTpuSettings::release_extension_data() { + // @@protoc_insertion_point(field_release:tflite.proto.GoogleEdgeTpuSettings.extension_data) + if (!_internal_has_extension_data()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = extension_data_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (extension_data_.IsDefault()) { + extension_data_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void GoogleEdgeTpuSettings::set_allocated_extension_data(std::string* extension_data) { + if (extension_data != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + extension_data_.SetAllocated(extension_data, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (extension_data_.IsDefault()) { + extension_data_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tflite.proto.GoogleEdgeTpuSettings.extension_data) +} + +// optional string model_identifier = 5 [default = ""]; +inline bool GoogleEdgeTpuSettings::_internal_has_model_identifier() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool GoogleEdgeTpuSettings::has_model_identifier() const { + return _internal_has_model_identifier(); +} +inline void GoogleEdgeTpuSettings::clear_model_identifier() { + model_identifier_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& GoogleEdgeTpuSettings::model_identifier() const { + // @@protoc_insertion_point(field_get:tflite.proto.GoogleEdgeTpuSettings.model_identifier) + return _internal_model_identifier(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void GoogleEdgeTpuSettings::set_model_identifier(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + model_identifier_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tflite.proto.GoogleEdgeTpuSettings.model_identifier) +} +inline std::string* GoogleEdgeTpuSettings::mutable_model_identifier() { + std::string* _s = _internal_mutable_model_identifier(); + // @@protoc_insertion_point(field_mutable:tflite.proto.GoogleEdgeTpuSettings.model_identifier) + return _s; +} +inline const std::string& GoogleEdgeTpuSettings::_internal_model_identifier() const { + return model_identifier_.Get(); +} +inline void GoogleEdgeTpuSettings::_internal_set_model_identifier(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + model_identifier_.Set(value, GetArenaForAllocation()); +} +inline std::string* GoogleEdgeTpuSettings::_internal_mutable_model_identifier() { + _has_bits_[0] |= 0x00000002u; + return model_identifier_.Mutable(GetArenaForAllocation()); +} +inline std::string* GoogleEdgeTpuSettings::release_model_identifier() { + // @@protoc_insertion_point(field_release:tflite.proto.GoogleEdgeTpuSettings.model_identifier) + if (!_internal_has_model_identifier()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = model_identifier_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (model_identifier_.IsDefault()) { + model_identifier_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void GoogleEdgeTpuSettings::set_allocated_model_identifier(std::string* model_identifier) { + if (model_identifier != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + model_identifier_.SetAllocated(model_identifier, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (model_identifier_.IsDefault()) { + model_identifier_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tflite.proto.GoogleEdgeTpuSettings.model_identifier) +} + +// optional bool use_async_api = 6 [default = false]; +inline bool GoogleEdgeTpuSettings::_internal_has_use_async_api() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool GoogleEdgeTpuSettings::has_use_async_api() const { + return _internal_has_use_async_api(); +} +inline void GoogleEdgeTpuSettings::clear_use_async_api() { + use_async_api_ = false; + _has_bits_[0] &= ~0x00000010u; +} +inline bool GoogleEdgeTpuSettings::_internal_use_async_api() const { + return use_async_api_; +} +inline bool GoogleEdgeTpuSettings::use_async_api() const { + // @@protoc_insertion_point(field_get:tflite.proto.GoogleEdgeTpuSettings.use_async_api) + return _internal_use_async_api(); +} +inline void GoogleEdgeTpuSettings::_internal_set_use_async_api(bool value) { + _has_bits_[0] |= 0x00000010u; + use_async_api_ = value; +} +inline void GoogleEdgeTpuSettings::set_use_async_api(bool value) { + _internal_set_use_async_api(value); + // @@protoc_insertion_point(field_set:tflite.proto.GoogleEdgeTpuSettings.use_async_api) +} + +// optional bool delegate_should_manage_cache_for_inputs = 7 [default = true]; +inline bool GoogleEdgeTpuSettings::_internal_has_delegate_should_manage_cache_for_inputs() const { + bool value = (_has_bits_[0] & 0x00000200u) != 0; + return value; +} +inline bool GoogleEdgeTpuSettings::has_delegate_should_manage_cache_for_inputs() const { + return _internal_has_delegate_should_manage_cache_for_inputs(); +} +inline void GoogleEdgeTpuSettings::clear_delegate_should_manage_cache_for_inputs() { + delegate_should_manage_cache_for_inputs_ = true; + _has_bits_[0] &= ~0x00000200u; +} +inline bool GoogleEdgeTpuSettings::_internal_delegate_should_manage_cache_for_inputs() const { + return delegate_should_manage_cache_for_inputs_; +} +inline bool GoogleEdgeTpuSettings::delegate_should_manage_cache_for_inputs() const { + // @@protoc_insertion_point(field_get:tflite.proto.GoogleEdgeTpuSettings.delegate_should_manage_cache_for_inputs) + return _internal_delegate_should_manage_cache_for_inputs(); +} +inline void GoogleEdgeTpuSettings::_internal_set_delegate_should_manage_cache_for_inputs(bool value) { + _has_bits_[0] |= 0x00000200u; + delegate_should_manage_cache_for_inputs_ = value; +} +inline void GoogleEdgeTpuSettings::set_delegate_should_manage_cache_for_inputs(bool value) { + _internal_set_delegate_should_manage_cache_for_inputs(value); + // @@protoc_insertion_point(field_set:tflite.proto.GoogleEdgeTpuSettings.delegate_should_manage_cache_for_inputs) +} + +// optional bool delegate_should_manage_cache_for_outputs = 8 [default = true]; +inline bool GoogleEdgeTpuSettings::_internal_has_delegate_should_manage_cache_for_outputs() const { + bool value = (_has_bits_[0] & 0x00000400u) != 0; + return value; +} +inline bool GoogleEdgeTpuSettings::has_delegate_should_manage_cache_for_outputs() const { + return _internal_has_delegate_should_manage_cache_for_outputs(); +} +inline void GoogleEdgeTpuSettings::clear_delegate_should_manage_cache_for_outputs() { + delegate_should_manage_cache_for_outputs_ = true; + _has_bits_[0] &= ~0x00000400u; +} +inline bool GoogleEdgeTpuSettings::_internal_delegate_should_manage_cache_for_outputs() const { + return delegate_should_manage_cache_for_outputs_; +} +inline bool GoogleEdgeTpuSettings::delegate_should_manage_cache_for_outputs() const { + // @@protoc_insertion_point(field_get:tflite.proto.GoogleEdgeTpuSettings.delegate_should_manage_cache_for_outputs) + return _internal_delegate_should_manage_cache_for_outputs(); +} +inline void GoogleEdgeTpuSettings::_internal_set_delegate_should_manage_cache_for_outputs(bool value) { + _has_bits_[0] |= 0x00000400u; + delegate_should_manage_cache_for_outputs_ = value; +} +inline void GoogleEdgeTpuSettings::set_delegate_should_manage_cache_for_outputs(bool value) { + _internal_set_delegate_should_manage_cache_for_outputs(value); + // @@protoc_insertion_point(field_set:tflite.proto.GoogleEdgeTpuSettings.delegate_should_manage_cache_for_outputs) +} + +// optional .tflite.proto.GoogleEdgeTpuSettings.TriState prefer_cache_coherency_for_inputs = 9; +inline bool GoogleEdgeTpuSettings::_internal_has_prefer_cache_coherency_for_inputs() const { + bool value = (_has_bits_[0] & 0x00000040u) != 0; + return value; +} +inline bool GoogleEdgeTpuSettings::has_prefer_cache_coherency_for_inputs() const { + return _internal_has_prefer_cache_coherency_for_inputs(); +} +inline void GoogleEdgeTpuSettings::clear_prefer_cache_coherency_for_inputs() { + prefer_cache_coherency_for_inputs_ = 0; + _has_bits_[0] &= ~0x00000040u; +} +inline ::tflite::proto::GoogleEdgeTpuSettings_TriState GoogleEdgeTpuSettings::_internal_prefer_cache_coherency_for_inputs() const { + return static_cast< ::tflite::proto::GoogleEdgeTpuSettings_TriState >(prefer_cache_coherency_for_inputs_); +} +inline ::tflite::proto::GoogleEdgeTpuSettings_TriState GoogleEdgeTpuSettings::prefer_cache_coherency_for_inputs() const { + // @@protoc_insertion_point(field_get:tflite.proto.GoogleEdgeTpuSettings.prefer_cache_coherency_for_inputs) + return _internal_prefer_cache_coherency_for_inputs(); +} +inline void GoogleEdgeTpuSettings::_internal_set_prefer_cache_coherency_for_inputs(::tflite::proto::GoogleEdgeTpuSettings_TriState value) { + assert(::tflite::proto::GoogleEdgeTpuSettings_TriState_IsValid(value)); + _has_bits_[0] |= 0x00000040u; + prefer_cache_coherency_for_inputs_ = value; +} +inline void GoogleEdgeTpuSettings::set_prefer_cache_coherency_for_inputs(::tflite::proto::GoogleEdgeTpuSettings_TriState value) { + _internal_set_prefer_cache_coherency_for_inputs(value); + // @@protoc_insertion_point(field_set:tflite.proto.GoogleEdgeTpuSettings.prefer_cache_coherency_for_inputs) +} + +// optional .tflite.proto.GoogleEdgeTpuSettings.TriState prefer_cache_coherency_for_outputs = 10; +inline bool GoogleEdgeTpuSettings::_internal_has_prefer_cache_coherency_for_outputs() const { + bool value = (_has_bits_[0] & 0x00000080u) != 0; + return value; +} +inline bool GoogleEdgeTpuSettings::has_prefer_cache_coherency_for_outputs() const { + return _internal_has_prefer_cache_coherency_for_outputs(); +} +inline void GoogleEdgeTpuSettings::clear_prefer_cache_coherency_for_outputs() { + prefer_cache_coherency_for_outputs_ = 0; + _has_bits_[0] &= ~0x00000080u; +} +inline ::tflite::proto::GoogleEdgeTpuSettings_TriState GoogleEdgeTpuSettings::_internal_prefer_cache_coherency_for_outputs() const { + return static_cast< ::tflite::proto::GoogleEdgeTpuSettings_TriState >(prefer_cache_coherency_for_outputs_); +} +inline ::tflite::proto::GoogleEdgeTpuSettings_TriState GoogleEdgeTpuSettings::prefer_cache_coherency_for_outputs() const { + // @@protoc_insertion_point(field_get:tflite.proto.GoogleEdgeTpuSettings.prefer_cache_coherency_for_outputs) + return _internal_prefer_cache_coherency_for_outputs(); +} +inline void GoogleEdgeTpuSettings::_internal_set_prefer_cache_coherency_for_outputs(::tflite::proto::GoogleEdgeTpuSettings_TriState value) { + assert(::tflite::proto::GoogleEdgeTpuSettings_TriState_IsValid(value)); + _has_bits_[0] |= 0x00000080u; + prefer_cache_coherency_for_outputs_ = value; +} +inline void GoogleEdgeTpuSettings::set_prefer_cache_coherency_for_outputs(::tflite::proto::GoogleEdgeTpuSettings_TriState value) { + _internal_set_prefer_cache_coherency_for_outputs(value); + // @@protoc_insertion_point(field_set:tflite.proto.GoogleEdgeTpuSettings.prefer_cache_coherency_for_outputs) +} + +// optional bool allow_fp16_precision_for_fp32 = 11 [default = false]; +inline bool GoogleEdgeTpuSettings::_internal_has_allow_fp16_precision_for_fp32() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool GoogleEdgeTpuSettings::has_allow_fp16_precision_for_fp32() const { + return _internal_has_allow_fp16_precision_for_fp32(); +} +inline void GoogleEdgeTpuSettings::clear_allow_fp16_precision_for_fp32() { + allow_fp16_precision_for_fp32_ = false; + _has_bits_[0] &= ~0x00000020u; +} +inline bool GoogleEdgeTpuSettings::_internal_allow_fp16_precision_for_fp32() const { + return allow_fp16_precision_for_fp32_; +} +inline bool GoogleEdgeTpuSettings::allow_fp16_precision_for_fp32() const { + // @@protoc_insertion_point(field_get:tflite.proto.GoogleEdgeTpuSettings.allow_fp16_precision_for_fp32) + return _internal_allow_fp16_precision_for_fp32(); +} +inline void GoogleEdgeTpuSettings::_internal_set_allow_fp16_precision_for_fp32(bool value) { + _has_bits_[0] |= 0x00000020u; + allow_fp16_precision_for_fp32_ = value; +} +inline void GoogleEdgeTpuSettings::set_allow_fp16_precision_for_fp32(bool value) { + _internal_set_allow_fp16_precision_for_fp32(value); + // @@protoc_insertion_point(field_set:tflite.proto.GoogleEdgeTpuSettings.allow_fp16_precision_for_fp32) +} + +// ------------------------------------------------------------------- + +// CoralSettings + +// optional string device = 1; +inline bool CoralSettings::_internal_has_device() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool CoralSettings::has_device() const { + return _internal_has_device(); +} +inline void CoralSettings::clear_device() { + device_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& CoralSettings::device() const { + // @@protoc_insertion_point(field_get:tflite.proto.CoralSettings.device) + return _internal_device(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void CoralSettings::set_device(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + device_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tflite.proto.CoralSettings.device) +} +inline std::string* CoralSettings::mutable_device() { + std::string* _s = _internal_mutable_device(); + // @@protoc_insertion_point(field_mutable:tflite.proto.CoralSettings.device) + return _s; +} +inline const std::string& CoralSettings::_internal_device() const { + return device_.Get(); +} +inline void CoralSettings::_internal_set_device(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + device_.Set(value, GetArenaForAllocation()); +} +inline std::string* CoralSettings::_internal_mutable_device() { + _has_bits_[0] |= 0x00000001u; + return device_.Mutable(GetArenaForAllocation()); +} +inline std::string* CoralSettings::release_device() { + // @@protoc_insertion_point(field_release:tflite.proto.CoralSettings.device) + if (!_internal_has_device()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = device_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (device_.IsDefault()) { + device_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void CoralSettings::set_allocated_device(std::string* device) { + if (device != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + device_.SetAllocated(device, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (device_.IsDefault()) { + device_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tflite.proto.CoralSettings.device) +} + +// optional .tflite.proto.CoralSettings.Performance performance = 2 [default = MAXIMUM]; +inline bool CoralSettings::_internal_has_performance() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool CoralSettings::has_performance() const { + return _internal_has_performance(); +} +inline void CoralSettings::clear_performance() { + performance_ = 1; + _has_bits_[0] &= ~0x00000008u; +} +inline ::tflite::proto::CoralSettings_Performance CoralSettings::_internal_performance() const { + return static_cast< ::tflite::proto::CoralSettings_Performance >(performance_); +} +inline ::tflite::proto::CoralSettings_Performance CoralSettings::performance() const { + // @@protoc_insertion_point(field_get:tflite.proto.CoralSettings.performance) + return _internal_performance(); +} +inline void CoralSettings::_internal_set_performance(::tflite::proto::CoralSettings_Performance value) { + assert(::tflite::proto::CoralSettings_Performance_IsValid(value)); + _has_bits_[0] |= 0x00000008u; + performance_ = value; +} +inline void CoralSettings::set_performance(::tflite::proto::CoralSettings_Performance value) { + _internal_set_performance(value); + // @@protoc_insertion_point(field_set:tflite.proto.CoralSettings.performance) +} + +// optional bool usb_always_dfu = 3; +inline bool CoralSettings::_internal_has_usb_always_dfu() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool CoralSettings::has_usb_always_dfu() const { + return _internal_has_usb_always_dfu(); +} +inline void CoralSettings::clear_usb_always_dfu() { + usb_always_dfu_ = false; + _has_bits_[0] &= ~0x00000002u; +} +inline bool CoralSettings::_internal_usb_always_dfu() const { + return usb_always_dfu_; +} +inline bool CoralSettings::usb_always_dfu() const { + // @@protoc_insertion_point(field_get:tflite.proto.CoralSettings.usb_always_dfu) + return _internal_usb_always_dfu(); +} +inline void CoralSettings::_internal_set_usb_always_dfu(bool value) { + _has_bits_[0] |= 0x00000002u; + usb_always_dfu_ = value; +} +inline void CoralSettings::set_usb_always_dfu(bool value) { + _internal_set_usb_always_dfu(value); + // @@protoc_insertion_point(field_set:tflite.proto.CoralSettings.usb_always_dfu) +} + +// optional int32 usb_max_bulk_in_queue_length = 4; +inline bool CoralSettings::_internal_has_usb_max_bulk_in_queue_length() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool CoralSettings::has_usb_max_bulk_in_queue_length() const { + return _internal_has_usb_max_bulk_in_queue_length(); +} +inline void CoralSettings::clear_usb_max_bulk_in_queue_length() { + usb_max_bulk_in_queue_length_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline int32_t CoralSettings::_internal_usb_max_bulk_in_queue_length() const { + return usb_max_bulk_in_queue_length_; +} +inline int32_t CoralSettings::usb_max_bulk_in_queue_length() const { + // @@protoc_insertion_point(field_get:tflite.proto.CoralSettings.usb_max_bulk_in_queue_length) + return _internal_usb_max_bulk_in_queue_length(); +} +inline void CoralSettings::_internal_set_usb_max_bulk_in_queue_length(int32_t value) { + _has_bits_[0] |= 0x00000004u; + usb_max_bulk_in_queue_length_ = value; +} +inline void CoralSettings::set_usb_max_bulk_in_queue_length(int32_t value) { + _internal_set_usb_max_bulk_in_queue_length(value); + // @@protoc_insertion_point(field_set:tflite.proto.CoralSettings.usb_max_bulk_in_queue_length) +} + +// ------------------------------------------------------------------- + +// CPUSettings + +// optional int32 num_threads = 1 [default = -1]; +inline bool CPUSettings::_internal_has_num_threads() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool CPUSettings::has_num_threads() const { + return _internal_has_num_threads(); +} +inline void CPUSettings::clear_num_threads() { + num_threads_ = -1; + _has_bits_[0] &= ~0x00000001u; +} +inline int32_t CPUSettings::_internal_num_threads() const { + return num_threads_; +} +inline int32_t CPUSettings::num_threads() const { + // @@protoc_insertion_point(field_get:tflite.proto.CPUSettings.num_threads) + return _internal_num_threads(); +} +inline void CPUSettings::_internal_set_num_threads(int32_t value) { + _has_bits_[0] |= 0x00000001u; + num_threads_ = value; +} +inline void CPUSettings::set_num_threads(int32_t value) { + _internal_set_num_threads(value); + // @@protoc_insertion_point(field_set:tflite.proto.CPUSettings.num_threads) +} + +// ------------------------------------------------------------------- + +// ArmNNSettings + +// optional string backends = 1; +inline bool ArmNNSettings::_internal_has_backends() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ArmNNSettings::has_backends() const { + return _internal_has_backends(); +} +inline void ArmNNSettings::clear_backends() { + backends_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& ArmNNSettings::backends() const { + // @@protoc_insertion_point(field_get:tflite.proto.ArmNNSettings.backends) + return _internal_backends(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ArmNNSettings::set_backends(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + backends_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tflite.proto.ArmNNSettings.backends) +} +inline std::string* ArmNNSettings::mutable_backends() { + std::string* _s = _internal_mutable_backends(); + // @@protoc_insertion_point(field_mutable:tflite.proto.ArmNNSettings.backends) + return _s; +} +inline const std::string& ArmNNSettings::_internal_backends() const { + return backends_.Get(); +} +inline void ArmNNSettings::_internal_set_backends(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + backends_.Set(value, GetArenaForAllocation()); +} +inline std::string* ArmNNSettings::_internal_mutable_backends() { + _has_bits_[0] |= 0x00000001u; + return backends_.Mutable(GetArenaForAllocation()); +} +inline std::string* ArmNNSettings::release_backends() { + // @@protoc_insertion_point(field_release:tflite.proto.ArmNNSettings.backends) + if (!_internal_has_backends()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = backends_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (backends_.IsDefault()) { + backends_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ArmNNSettings::set_allocated_backends(std::string* backends) { + if (backends != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + backends_.SetAllocated(backends, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (backends_.IsDefault()) { + backends_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tflite.proto.ArmNNSettings.backends) +} + +// optional bool fastmath = 2; +inline bool ArmNNSettings::_internal_has_fastmath() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool ArmNNSettings::has_fastmath() const { + return _internal_has_fastmath(); +} +inline void ArmNNSettings::clear_fastmath() { + fastmath_ = false; + _has_bits_[0] &= ~0x00000004u; +} +inline bool ArmNNSettings::_internal_fastmath() const { + return fastmath_; +} +inline bool ArmNNSettings::fastmath() const { + // @@protoc_insertion_point(field_get:tflite.proto.ArmNNSettings.fastmath) + return _internal_fastmath(); +} +inline void ArmNNSettings::_internal_set_fastmath(bool value) { + _has_bits_[0] |= 0x00000004u; + fastmath_ = value; +} +inline void ArmNNSettings::set_fastmath(bool value) { + _internal_set_fastmath(value); + // @@protoc_insertion_point(field_set:tflite.proto.ArmNNSettings.fastmath) +} + +// optional string additional_parameters = 3; +inline bool ArmNNSettings::_internal_has_additional_parameters() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ArmNNSettings::has_additional_parameters() const { + return _internal_has_additional_parameters(); +} +inline void ArmNNSettings::clear_additional_parameters() { + additional_parameters_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& ArmNNSettings::additional_parameters() const { + // @@protoc_insertion_point(field_get:tflite.proto.ArmNNSettings.additional_parameters) + return _internal_additional_parameters(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ArmNNSettings::set_additional_parameters(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + additional_parameters_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tflite.proto.ArmNNSettings.additional_parameters) +} +inline std::string* ArmNNSettings::mutable_additional_parameters() { + std::string* _s = _internal_mutable_additional_parameters(); + // @@protoc_insertion_point(field_mutable:tflite.proto.ArmNNSettings.additional_parameters) + return _s; +} +inline const std::string& ArmNNSettings::_internal_additional_parameters() const { + return additional_parameters_.Get(); +} +inline void ArmNNSettings::_internal_set_additional_parameters(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + additional_parameters_.Set(value, GetArenaForAllocation()); +} +inline std::string* ArmNNSettings::_internal_mutable_additional_parameters() { + _has_bits_[0] |= 0x00000002u; + return additional_parameters_.Mutable(GetArenaForAllocation()); +} +inline std::string* ArmNNSettings::release_additional_parameters() { + // @@protoc_insertion_point(field_release:tflite.proto.ArmNNSettings.additional_parameters) + if (!_internal_has_additional_parameters()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = additional_parameters_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (additional_parameters_.IsDefault()) { + additional_parameters_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ArmNNSettings::set_allocated_additional_parameters(std::string* additional_parameters) { + if (additional_parameters != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + additional_parameters_.SetAllocated(additional_parameters, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (additional_parameters_.IsDefault()) { + additional_parameters_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tflite.proto.ArmNNSettings.additional_parameters) +} + +// ------------------------------------------------------------------- + +// TFLiteSettings + +// optional .tflite.proto.Delegate delegate = 1; +inline bool TFLiteSettings::_internal_has_delegate() const { + bool value = (_has_bits_[0] & 0x00002000u) != 0; + return value; +} +inline bool TFLiteSettings::has_delegate() const { + return _internal_has_delegate(); +} +inline void TFLiteSettings::clear_delegate() { + delegate_ = 0; + _has_bits_[0] &= ~0x00002000u; +} +inline ::tflite::proto::Delegate TFLiteSettings::_internal_delegate() const { + return static_cast< ::tflite::proto::Delegate >(delegate_); +} +inline ::tflite::proto::Delegate TFLiteSettings::delegate() const { + // @@protoc_insertion_point(field_get:tflite.proto.TFLiteSettings.delegate) + return _internal_delegate(); +} +inline void TFLiteSettings::_internal_set_delegate(::tflite::proto::Delegate value) { + assert(::tflite::proto::Delegate_IsValid(value)); + _has_bits_[0] |= 0x00002000u; + delegate_ = value; +} +inline void TFLiteSettings::set_delegate(::tflite::proto::Delegate value) { + _internal_set_delegate(value); + // @@protoc_insertion_point(field_set:tflite.proto.TFLiteSettings.delegate) +} + +// optional .tflite.proto.NNAPISettings nnapi_settings = 2; +inline bool TFLiteSettings::_internal_has_nnapi_settings() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || nnapi_settings_ != nullptr); + return value; +} +inline bool TFLiteSettings::has_nnapi_settings() const { + return _internal_has_nnapi_settings(); +} +inline void TFLiteSettings::clear_nnapi_settings() { + if (nnapi_settings_ != nullptr) nnapi_settings_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::tflite::proto::NNAPISettings& TFLiteSettings::_internal_nnapi_settings() const { + const ::tflite::proto::NNAPISettings* p = nnapi_settings_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_NNAPISettings_default_instance_); +} +inline const ::tflite::proto::NNAPISettings& TFLiteSettings::nnapi_settings() const { + // @@protoc_insertion_point(field_get:tflite.proto.TFLiteSettings.nnapi_settings) + return _internal_nnapi_settings(); +} +inline void TFLiteSettings::unsafe_arena_set_allocated_nnapi_settings( + ::tflite::proto::NNAPISettings* nnapi_settings) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(nnapi_settings_); + } + nnapi_settings_ = nnapi_settings; + if (nnapi_settings) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.TFLiteSettings.nnapi_settings) +} +inline ::tflite::proto::NNAPISettings* TFLiteSettings::release_nnapi_settings() { + _has_bits_[0] &= ~0x00000001u; + ::tflite::proto::NNAPISettings* temp = nnapi_settings_; + nnapi_settings_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::NNAPISettings* TFLiteSettings::unsafe_arena_release_nnapi_settings() { + // @@protoc_insertion_point(field_release:tflite.proto.TFLiteSettings.nnapi_settings) + _has_bits_[0] &= ~0x00000001u; + ::tflite::proto::NNAPISettings* temp = nnapi_settings_; + nnapi_settings_ = nullptr; + return temp; +} +inline ::tflite::proto::NNAPISettings* TFLiteSettings::_internal_mutable_nnapi_settings() { + _has_bits_[0] |= 0x00000001u; + if (nnapi_settings_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::NNAPISettings>(GetArenaForAllocation()); + nnapi_settings_ = p; + } + return nnapi_settings_; +} +inline ::tflite::proto::NNAPISettings* TFLiteSettings::mutable_nnapi_settings() { + ::tflite::proto::NNAPISettings* _msg = _internal_mutable_nnapi_settings(); + // @@protoc_insertion_point(field_mutable:tflite.proto.TFLiteSettings.nnapi_settings) + return _msg; +} +inline void TFLiteSettings::set_allocated_nnapi_settings(::tflite::proto::NNAPISettings* nnapi_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete nnapi_settings_; + } + if (nnapi_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(nnapi_settings); + if (message_arena != submessage_arena) { + nnapi_settings = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, nnapi_settings, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + nnapi_settings_ = nnapi_settings; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.TFLiteSettings.nnapi_settings) +} + +// optional .tflite.proto.GPUSettings gpu_settings = 3; +inline bool TFLiteSettings::_internal_has_gpu_settings() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || gpu_settings_ != nullptr); + return value; +} +inline bool TFLiteSettings::has_gpu_settings() const { + return _internal_has_gpu_settings(); +} +inline void TFLiteSettings::clear_gpu_settings() { + if (gpu_settings_ != nullptr) gpu_settings_->Clear(); + _has_bits_[0] &= ~0x00000002u; +} +inline const ::tflite::proto::GPUSettings& TFLiteSettings::_internal_gpu_settings() const { + const ::tflite::proto::GPUSettings* p = gpu_settings_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_GPUSettings_default_instance_); +} +inline const ::tflite::proto::GPUSettings& TFLiteSettings::gpu_settings() const { + // @@protoc_insertion_point(field_get:tflite.proto.TFLiteSettings.gpu_settings) + return _internal_gpu_settings(); +} +inline void TFLiteSettings::unsafe_arena_set_allocated_gpu_settings( + ::tflite::proto::GPUSettings* gpu_settings) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(gpu_settings_); + } + gpu_settings_ = gpu_settings; + if (gpu_settings) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.TFLiteSettings.gpu_settings) +} +inline ::tflite::proto::GPUSettings* TFLiteSettings::release_gpu_settings() { + _has_bits_[0] &= ~0x00000002u; + ::tflite::proto::GPUSettings* temp = gpu_settings_; + gpu_settings_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::GPUSettings* TFLiteSettings::unsafe_arena_release_gpu_settings() { + // @@protoc_insertion_point(field_release:tflite.proto.TFLiteSettings.gpu_settings) + _has_bits_[0] &= ~0x00000002u; + ::tflite::proto::GPUSettings* temp = gpu_settings_; + gpu_settings_ = nullptr; + return temp; +} +inline ::tflite::proto::GPUSettings* TFLiteSettings::_internal_mutable_gpu_settings() { + _has_bits_[0] |= 0x00000002u; + if (gpu_settings_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::GPUSettings>(GetArenaForAllocation()); + gpu_settings_ = p; + } + return gpu_settings_; +} +inline ::tflite::proto::GPUSettings* TFLiteSettings::mutable_gpu_settings() { + ::tflite::proto::GPUSettings* _msg = _internal_mutable_gpu_settings(); + // @@protoc_insertion_point(field_mutable:tflite.proto.TFLiteSettings.gpu_settings) + return _msg; +} +inline void TFLiteSettings::set_allocated_gpu_settings(::tflite::proto::GPUSettings* gpu_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete gpu_settings_; + } + if (gpu_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(gpu_settings); + if (message_arena != submessage_arena) { + gpu_settings = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, gpu_settings, submessage_arena); + } + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + gpu_settings_ = gpu_settings; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.TFLiteSettings.gpu_settings) +} + +// optional .tflite.proto.HexagonSettings hexagon_settings = 4; +inline bool TFLiteSettings::_internal_has_hexagon_settings() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || hexagon_settings_ != nullptr); + return value; +} +inline bool TFLiteSettings::has_hexagon_settings() const { + return _internal_has_hexagon_settings(); +} +inline void TFLiteSettings::clear_hexagon_settings() { + if (hexagon_settings_ != nullptr) hexagon_settings_->Clear(); + _has_bits_[0] &= ~0x00000004u; +} +inline const ::tflite::proto::HexagonSettings& TFLiteSettings::_internal_hexagon_settings() const { + const ::tflite::proto::HexagonSettings* p = hexagon_settings_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_HexagonSettings_default_instance_); +} +inline const ::tflite::proto::HexagonSettings& TFLiteSettings::hexagon_settings() const { + // @@protoc_insertion_point(field_get:tflite.proto.TFLiteSettings.hexagon_settings) + return _internal_hexagon_settings(); +} +inline void TFLiteSettings::unsafe_arena_set_allocated_hexagon_settings( + ::tflite::proto::HexagonSettings* hexagon_settings) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(hexagon_settings_); + } + hexagon_settings_ = hexagon_settings; + if (hexagon_settings) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.TFLiteSettings.hexagon_settings) +} +inline ::tflite::proto::HexagonSettings* TFLiteSettings::release_hexagon_settings() { + _has_bits_[0] &= ~0x00000004u; + ::tflite::proto::HexagonSettings* temp = hexagon_settings_; + hexagon_settings_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::HexagonSettings* TFLiteSettings::unsafe_arena_release_hexagon_settings() { + // @@protoc_insertion_point(field_release:tflite.proto.TFLiteSettings.hexagon_settings) + _has_bits_[0] &= ~0x00000004u; + ::tflite::proto::HexagonSettings* temp = hexagon_settings_; + hexagon_settings_ = nullptr; + return temp; +} +inline ::tflite::proto::HexagonSettings* TFLiteSettings::_internal_mutable_hexagon_settings() { + _has_bits_[0] |= 0x00000004u; + if (hexagon_settings_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::HexagonSettings>(GetArenaForAllocation()); + hexagon_settings_ = p; + } + return hexagon_settings_; +} +inline ::tflite::proto::HexagonSettings* TFLiteSettings::mutable_hexagon_settings() { + ::tflite::proto::HexagonSettings* _msg = _internal_mutable_hexagon_settings(); + // @@protoc_insertion_point(field_mutable:tflite.proto.TFLiteSettings.hexagon_settings) + return _msg; +} +inline void TFLiteSettings::set_allocated_hexagon_settings(::tflite::proto::HexagonSettings* hexagon_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete hexagon_settings_; + } + if (hexagon_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(hexagon_settings); + if (message_arena != submessage_arena) { + hexagon_settings = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, hexagon_settings, submessage_arena); + } + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + hexagon_settings_ = hexagon_settings; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.TFLiteSettings.hexagon_settings) +} + +// optional .tflite.proto.XNNPackSettings xnnpack_settings = 5; +inline bool TFLiteSettings::_internal_has_xnnpack_settings() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + PROTOBUF_ASSUME(!value || xnnpack_settings_ != nullptr); + return value; +} +inline bool TFLiteSettings::has_xnnpack_settings() const { + return _internal_has_xnnpack_settings(); +} +inline void TFLiteSettings::clear_xnnpack_settings() { + if (xnnpack_settings_ != nullptr) xnnpack_settings_->Clear(); + _has_bits_[0] &= ~0x00000008u; +} +inline const ::tflite::proto::XNNPackSettings& TFLiteSettings::_internal_xnnpack_settings() const { + const ::tflite::proto::XNNPackSettings* p = xnnpack_settings_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_XNNPackSettings_default_instance_); +} +inline const ::tflite::proto::XNNPackSettings& TFLiteSettings::xnnpack_settings() const { + // @@protoc_insertion_point(field_get:tflite.proto.TFLiteSettings.xnnpack_settings) + return _internal_xnnpack_settings(); +} +inline void TFLiteSettings::unsafe_arena_set_allocated_xnnpack_settings( + ::tflite::proto::XNNPackSettings* xnnpack_settings) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(xnnpack_settings_); + } + xnnpack_settings_ = xnnpack_settings; + if (xnnpack_settings) { + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.TFLiteSettings.xnnpack_settings) +} +inline ::tflite::proto::XNNPackSettings* TFLiteSettings::release_xnnpack_settings() { + _has_bits_[0] &= ~0x00000008u; + ::tflite::proto::XNNPackSettings* temp = xnnpack_settings_; + xnnpack_settings_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::XNNPackSettings* TFLiteSettings::unsafe_arena_release_xnnpack_settings() { + // @@protoc_insertion_point(field_release:tflite.proto.TFLiteSettings.xnnpack_settings) + _has_bits_[0] &= ~0x00000008u; + ::tflite::proto::XNNPackSettings* temp = xnnpack_settings_; + xnnpack_settings_ = nullptr; + return temp; +} +inline ::tflite::proto::XNNPackSettings* TFLiteSettings::_internal_mutable_xnnpack_settings() { + _has_bits_[0] |= 0x00000008u; + if (xnnpack_settings_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::XNNPackSettings>(GetArenaForAllocation()); + xnnpack_settings_ = p; + } + return xnnpack_settings_; +} +inline ::tflite::proto::XNNPackSettings* TFLiteSettings::mutable_xnnpack_settings() { + ::tflite::proto::XNNPackSettings* _msg = _internal_mutable_xnnpack_settings(); + // @@protoc_insertion_point(field_mutable:tflite.proto.TFLiteSettings.xnnpack_settings) + return _msg; +} +inline void TFLiteSettings::set_allocated_xnnpack_settings(::tflite::proto::XNNPackSettings* xnnpack_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete xnnpack_settings_; + } + if (xnnpack_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(xnnpack_settings); + if (message_arena != submessage_arena) { + xnnpack_settings = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, xnnpack_settings, submessage_arena); + } + _has_bits_[0] |= 0x00000008u; + } else { + _has_bits_[0] &= ~0x00000008u; + } + xnnpack_settings_ = xnnpack_settings; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.TFLiteSettings.xnnpack_settings) +} + +// optional .tflite.proto.CoreMLSettings coreml_settings = 11; +inline bool TFLiteSettings::_internal_has_coreml_settings() const { + bool value = (_has_bits_[0] & 0x00000100u) != 0; + PROTOBUF_ASSUME(!value || coreml_settings_ != nullptr); + return value; +} +inline bool TFLiteSettings::has_coreml_settings() const { + return _internal_has_coreml_settings(); +} +inline void TFLiteSettings::clear_coreml_settings() { + if (coreml_settings_ != nullptr) coreml_settings_->Clear(); + _has_bits_[0] &= ~0x00000100u; +} +inline const ::tflite::proto::CoreMLSettings& TFLiteSettings::_internal_coreml_settings() const { + const ::tflite::proto::CoreMLSettings* p = coreml_settings_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_CoreMLSettings_default_instance_); +} +inline const ::tflite::proto::CoreMLSettings& TFLiteSettings::coreml_settings() const { + // @@protoc_insertion_point(field_get:tflite.proto.TFLiteSettings.coreml_settings) + return _internal_coreml_settings(); +} +inline void TFLiteSettings::unsafe_arena_set_allocated_coreml_settings( + ::tflite::proto::CoreMLSettings* coreml_settings) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(coreml_settings_); + } + coreml_settings_ = coreml_settings; + if (coreml_settings) { + _has_bits_[0] |= 0x00000100u; + } else { + _has_bits_[0] &= ~0x00000100u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.TFLiteSettings.coreml_settings) +} +inline ::tflite::proto::CoreMLSettings* TFLiteSettings::release_coreml_settings() { + _has_bits_[0] &= ~0x00000100u; + ::tflite::proto::CoreMLSettings* temp = coreml_settings_; + coreml_settings_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::CoreMLSettings* TFLiteSettings::unsafe_arena_release_coreml_settings() { + // @@protoc_insertion_point(field_release:tflite.proto.TFLiteSettings.coreml_settings) + _has_bits_[0] &= ~0x00000100u; + ::tflite::proto::CoreMLSettings* temp = coreml_settings_; + coreml_settings_ = nullptr; + return temp; +} +inline ::tflite::proto::CoreMLSettings* TFLiteSettings::_internal_mutable_coreml_settings() { + _has_bits_[0] |= 0x00000100u; + if (coreml_settings_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::CoreMLSettings>(GetArenaForAllocation()); + coreml_settings_ = p; + } + return coreml_settings_; +} +inline ::tflite::proto::CoreMLSettings* TFLiteSettings::mutable_coreml_settings() { + ::tflite::proto::CoreMLSettings* _msg = _internal_mutable_coreml_settings(); + // @@protoc_insertion_point(field_mutable:tflite.proto.TFLiteSettings.coreml_settings) + return _msg; +} +inline void TFLiteSettings::set_allocated_coreml_settings(::tflite::proto::CoreMLSettings* coreml_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete coreml_settings_; + } + if (coreml_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(coreml_settings); + if (message_arena != submessage_arena) { + coreml_settings = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, coreml_settings, submessage_arena); + } + _has_bits_[0] |= 0x00000100u; + } else { + _has_bits_[0] &= ~0x00000100u; + } + coreml_settings_ = coreml_settings; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.TFLiteSettings.coreml_settings) +} + +// optional .tflite.proto.CPUSettings cpu_settings = 6; +inline bool TFLiteSettings::_internal_has_cpu_settings() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + PROTOBUF_ASSUME(!value || cpu_settings_ != nullptr); + return value; +} +inline bool TFLiteSettings::has_cpu_settings() const { + return _internal_has_cpu_settings(); +} +inline void TFLiteSettings::clear_cpu_settings() { + if (cpu_settings_ != nullptr) cpu_settings_->Clear(); + _has_bits_[0] &= ~0x00000010u; +} +inline const ::tflite::proto::CPUSettings& TFLiteSettings::_internal_cpu_settings() const { + const ::tflite::proto::CPUSettings* p = cpu_settings_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_CPUSettings_default_instance_); +} +inline const ::tflite::proto::CPUSettings& TFLiteSettings::cpu_settings() const { + // @@protoc_insertion_point(field_get:tflite.proto.TFLiteSettings.cpu_settings) + return _internal_cpu_settings(); +} +inline void TFLiteSettings::unsafe_arena_set_allocated_cpu_settings( + ::tflite::proto::CPUSettings* cpu_settings) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(cpu_settings_); + } + cpu_settings_ = cpu_settings; + if (cpu_settings) { + _has_bits_[0] |= 0x00000010u; + } else { + _has_bits_[0] &= ~0x00000010u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.TFLiteSettings.cpu_settings) +} +inline ::tflite::proto::CPUSettings* TFLiteSettings::release_cpu_settings() { + _has_bits_[0] &= ~0x00000010u; + ::tflite::proto::CPUSettings* temp = cpu_settings_; + cpu_settings_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::CPUSettings* TFLiteSettings::unsafe_arena_release_cpu_settings() { + // @@protoc_insertion_point(field_release:tflite.proto.TFLiteSettings.cpu_settings) + _has_bits_[0] &= ~0x00000010u; + ::tflite::proto::CPUSettings* temp = cpu_settings_; + cpu_settings_ = nullptr; + return temp; +} +inline ::tflite::proto::CPUSettings* TFLiteSettings::_internal_mutable_cpu_settings() { + _has_bits_[0] |= 0x00000010u; + if (cpu_settings_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::CPUSettings>(GetArenaForAllocation()); + cpu_settings_ = p; + } + return cpu_settings_; +} +inline ::tflite::proto::CPUSettings* TFLiteSettings::mutable_cpu_settings() { + ::tflite::proto::CPUSettings* _msg = _internal_mutable_cpu_settings(); + // @@protoc_insertion_point(field_mutable:tflite.proto.TFLiteSettings.cpu_settings) + return _msg; +} +inline void TFLiteSettings::set_allocated_cpu_settings(::tflite::proto::CPUSettings* cpu_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete cpu_settings_; + } + if (cpu_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(cpu_settings); + if (message_arena != submessage_arena) { + cpu_settings = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, cpu_settings, submessage_arena); + } + _has_bits_[0] |= 0x00000010u; + } else { + _has_bits_[0] &= ~0x00000010u; + } + cpu_settings_ = cpu_settings; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.TFLiteSettings.cpu_settings) +} + +// optional int32 max_delegated_partitions = 7; +inline bool TFLiteSettings::_internal_has_max_delegated_partitions() const { + bool value = (_has_bits_[0] & 0x00004000u) != 0; + return value; +} +inline bool TFLiteSettings::has_max_delegated_partitions() const { + return _internal_has_max_delegated_partitions(); +} +inline void TFLiteSettings::clear_max_delegated_partitions() { + max_delegated_partitions_ = 0; + _has_bits_[0] &= ~0x00004000u; +} +inline int32_t TFLiteSettings::_internal_max_delegated_partitions() const { + return max_delegated_partitions_; +} +inline int32_t TFLiteSettings::max_delegated_partitions() const { + // @@protoc_insertion_point(field_get:tflite.proto.TFLiteSettings.max_delegated_partitions) + return _internal_max_delegated_partitions(); +} +inline void TFLiteSettings::_internal_set_max_delegated_partitions(int32_t value) { + _has_bits_[0] |= 0x00004000u; + max_delegated_partitions_ = value; +} +inline void TFLiteSettings::set_max_delegated_partitions(int32_t value) { + _internal_set_max_delegated_partitions(value); + // @@protoc_insertion_point(field_set:tflite.proto.TFLiteSettings.max_delegated_partitions) +} + +// optional .tflite.proto.EdgeTpuSettings edgetpu_settings = 8; +inline bool TFLiteSettings::_internal_has_edgetpu_settings() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + PROTOBUF_ASSUME(!value || edgetpu_settings_ != nullptr); + return value; +} +inline bool TFLiteSettings::has_edgetpu_settings() const { + return _internal_has_edgetpu_settings(); +} +inline void TFLiteSettings::clear_edgetpu_settings() { + if (edgetpu_settings_ != nullptr) edgetpu_settings_->Clear(); + _has_bits_[0] &= ~0x00000020u; +} +inline const ::tflite::proto::EdgeTpuSettings& TFLiteSettings::_internal_edgetpu_settings() const { + const ::tflite::proto::EdgeTpuSettings* p = edgetpu_settings_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_EdgeTpuSettings_default_instance_); +} +inline const ::tflite::proto::EdgeTpuSettings& TFLiteSettings::edgetpu_settings() const { + // @@protoc_insertion_point(field_get:tflite.proto.TFLiteSettings.edgetpu_settings) + return _internal_edgetpu_settings(); +} +inline void TFLiteSettings::unsafe_arena_set_allocated_edgetpu_settings( + ::tflite::proto::EdgeTpuSettings* edgetpu_settings) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(edgetpu_settings_); + } + edgetpu_settings_ = edgetpu_settings; + if (edgetpu_settings) { + _has_bits_[0] |= 0x00000020u; + } else { + _has_bits_[0] &= ~0x00000020u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.TFLiteSettings.edgetpu_settings) +} +inline ::tflite::proto::EdgeTpuSettings* TFLiteSettings::release_edgetpu_settings() { + _has_bits_[0] &= ~0x00000020u; + ::tflite::proto::EdgeTpuSettings* temp = edgetpu_settings_; + edgetpu_settings_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::EdgeTpuSettings* TFLiteSettings::unsafe_arena_release_edgetpu_settings() { + // @@protoc_insertion_point(field_release:tflite.proto.TFLiteSettings.edgetpu_settings) + _has_bits_[0] &= ~0x00000020u; + ::tflite::proto::EdgeTpuSettings* temp = edgetpu_settings_; + edgetpu_settings_ = nullptr; + return temp; +} +inline ::tflite::proto::EdgeTpuSettings* TFLiteSettings::_internal_mutable_edgetpu_settings() { + _has_bits_[0] |= 0x00000020u; + if (edgetpu_settings_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::EdgeTpuSettings>(GetArenaForAllocation()); + edgetpu_settings_ = p; + } + return edgetpu_settings_; +} +inline ::tflite::proto::EdgeTpuSettings* TFLiteSettings::mutable_edgetpu_settings() { + ::tflite::proto::EdgeTpuSettings* _msg = _internal_mutable_edgetpu_settings(); + // @@protoc_insertion_point(field_mutable:tflite.proto.TFLiteSettings.edgetpu_settings) + return _msg; +} +inline void TFLiteSettings::set_allocated_edgetpu_settings(::tflite::proto::EdgeTpuSettings* edgetpu_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete edgetpu_settings_; + } + if (edgetpu_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(edgetpu_settings); + if (message_arena != submessage_arena) { + edgetpu_settings = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, edgetpu_settings, submessage_arena); + } + _has_bits_[0] |= 0x00000020u; + } else { + _has_bits_[0] &= ~0x00000020u; + } + edgetpu_settings_ = edgetpu_settings; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.TFLiteSettings.edgetpu_settings) +} + +// optional .tflite.proto.CoralSettings coral_settings = 10; +inline bool TFLiteSettings::_internal_has_coral_settings() const { + bool value = (_has_bits_[0] & 0x00000080u) != 0; + PROTOBUF_ASSUME(!value || coral_settings_ != nullptr); + return value; +} +inline bool TFLiteSettings::has_coral_settings() const { + return _internal_has_coral_settings(); +} +inline void TFLiteSettings::clear_coral_settings() { + if (coral_settings_ != nullptr) coral_settings_->Clear(); + _has_bits_[0] &= ~0x00000080u; +} +inline const ::tflite::proto::CoralSettings& TFLiteSettings::_internal_coral_settings() const { + const ::tflite::proto::CoralSettings* p = coral_settings_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_CoralSettings_default_instance_); +} +inline const ::tflite::proto::CoralSettings& TFLiteSettings::coral_settings() const { + // @@protoc_insertion_point(field_get:tflite.proto.TFLiteSettings.coral_settings) + return _internal_coral_settings(); +} +inline void TFLiteSettings::unsafe_arena_set_allocated_coral_settings( + ::tflite::proto::CoralSettings* coral_settings) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(coral_settings_); + } + coral_settings_ = coral_settings; + if (coral_settings) { + _has_bits_[0] |= 0x00000080u; + } else { + _has_bits_[0] &= ~0x00000080u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.TFLiteSettings.coral_settings) +} +inline ::tflite::proto::CoralSettings* TFLiteSettings::release_coral_settings() { + _has_bits_[0] &= ~0x00000080u; + ::tflite::proto::CoralSettings* temp = coral_settings_; + coral_settings_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::CoralSettings* TFLiteSettings::unsafe_arena_release_coral_settings() { + // @@protoc_insertion_point(field_release:tflite.proto.TFLiteSettings.coral_settings) + _has_bits_[0] &= ~0x00000080u; + ::tflite::proto::CoralSettings* temp = coral_settings_; + coral_settings_ = nullptr; + return temp; +} +inline ::tflite::proto::CoralSettings* TFLiteSettings::_internal_mutable_coral_settings() { + _has_bits_[0] |= 0x00000080u; + if (coral_settings_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::CoralSettings>(GetArenaForAllocation()); + coral_settings_ = p; + } + return coral_settings_; +} +inline ::tflite::proto::CoralSettings* TFLiteSettings::mutable_coral_settings() { + ::tflite::proto::CoralSettings* _msg = _internal_mutable_coral_settings(); + // @@protoc_insertion_point(field_mutable:tflite.proto.TFLiteSettings.coral_settings) + return _msg; +} +inline void TFLiteSettings::set_allocated_coral_settings(::tflite::proto::CoralSettings* coral_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete coral_settings_; + } + if (coral_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(coral_settings); + if (message_arena != submessage_arena) { + coral_settings = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, coral_settings, submessage_arena); + } + _has_bits_[0] |= 0x00000080u; + } else { + _has_bits_[0] &= ~0x00000080u; + } + coral_settings_ = coral_settings; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.TFLiteSettings.coral_settings) +} + +// optional .tflite.proto.FallbackSettings fallback_settings = 9; +inline bool TFLiteSettings::_internal_has_fallback_settings() const { + bool value = (_has_bits_[0] & 0x00000040u) != 0; + PROTOBUF_ASSUME(!value || fallback_settings_ != nullptr); + return value; +} +inline bool TFLiteSettings::has_fallback_settings() const { + return _internal_has_fallback_settings(); +} +inline void TFLiteSettings::clear_fallback_settings() { + if (fallback_settings_ != nullptr) fallback_settings_->Clear(); + _has_bits_[0] &= ~0x00000040u; +} +inline const ::tflite::proto::FallbackSettings& TFLiteSettings::_internal_fallback_settings() const { + const ::tflite::proto::FallbackSettings* p = fallback_settings_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_FallbackSettings_default_instance_); +} +inline const ::tflite::proto::FallbackSettings& TFLiteSettings::fallback_settings() const { + // @@protoc_insertion_point(field_get:tflite.proto.TFLiteSettings.fallback_settings) + return _internal_fallback_settings(); +} +inline void TFLiteSettings::unsafe_arena_set_allocated_fallback_settings( + ::tflite::proto::FallbackSettings* fallback_settings) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(fallback_settings_); + } + fallback_settings_ = fallback_settings; + if (fallback_settings) { + _has_bits_[0] |= 0x00000040u; + } else { + _has_bits_[0] &= ~0x00000040u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.TFLiteSettings.fallback_settings) +} +inline ::tflite::proto::FallbackSettings* TFLiteSettings::release_fallback_settings() { + _has_bits_[0] &= ~0x00000040u; + ::tflite::proto::FallbackSettings* temp = fallback_settings_; + fallback_settings_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::FallbackSettings* TFLiteSettings::unsafe_arena_release_fallback_settings() { + // @@protoc_insertion_point(field_release:tflite.proto.TFLiteSettings.fallback_settings) + _has_bits_[0] &= ~0x00000040u; + ::tflite::proto::FallbackSettings* temp = fallback_settings_; + fallback_settings_ = nullptr; + return temp; +} +inline ::tflite::proto::FallbackSettings* TFLiteSettings::_internal_mutable_fallback_settings() { + _has_bits_[0] |= 0x00000040u; + if (fallback_settings_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::FallbackSettings>(GetArenaForAllocation()); + fallback_settings_ = p; + } + return fallback_settings_; +} +inline ::tflite::proto::FallbackSettings* TFLiteSettings::mutable_fallback_settings() { + ::tflite::proto::FallbackSettings* _msg = _internal_mutable_fallback_settings(); + // @@protoc_insertion_point(field_mutable:tflite.proto.TFLiteSettings.fallback_settings) + return _msg; +} +inline void TFLiteSettings::set_allocated_fallback_settings(::tflite::proto::FallbackSettings* fallback_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete fallback_settings_; + } + if (fallback_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(fallback_settings); + if (message_arena != submessage_arena) { + fallback_settings = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, fallback_settings, submessage_arena); + } + _has_bits_[0] |= 0x00000040u; + } else { + _has_bits_[0] &= ~0x00000040u; + } + fallback_settings_ = fallback_settings; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.TFLiteSettings.fallback_settings) +} + +// optional bool disable_default_delegates = 12; +inline bool TFLiteSettings::_internal_has_disable_default_delegates() const { + bool value = (_has_bits_[0] & 0x00008000u) != 0; + return value; +} +inline bool TFLiteSettings::has_disable_default_delegates() const { + return _internal_has_disable_default_delegates(); +} +inline void TFLiteSettings::clear_disable_default_delegates() { + disable_default_delegates_ = false; + _has_bits_[0] &= ~0x00008000u; +} +inline bool TFLiteSettings::_internal_disable_default_delegates() const { + return disable_default_delegates_; +} +inline bool TFLiteSettings::disable_default_delegates() const { + // @@protoc_insertion_point(field_get:tflite.proto.TFLiteSettings.disable_default_delegates) + return _internal_disable_default_delegates(); +} +inline void TFLiteSettings::_internal_set_disable_default_delegates(bool value) { + _has_bits_[0] |= 0x00008000u; + disable_default_delegates_ = value; +} +inline void TFLiteSettings::set_disable_default_delegates(bool value) { + _internal_set_disable_default_delegates(value); + // @@protoc_insertion_point(field_set:tflite.proto.TFLiteSettings.disable_default_delegates) +} + +// optional .tflite.proto.StableDelegateLoaderSettings stable_delegate_loader_settings = 13; +inline bool TFLiteSettings::_internal_has_stable_delegate_loader_settings() const { + bool value = (_has_bits_[0] & 0x00000200u) != 0; + PROTOBUF_ASSUME(!value || stable_delegate_loader_settings_ != nullptr); + return value; +} +inline bool TFLiteSettings::has_stable_delegate_loader_settings() const { + return _internal_has_stable_delegate_loader_settings(); +} +inline void TFLiteSettings::clear_stable_delegate_loader_settings() { + if (stable_delegate_loader_settings_ != nullptr) stable_delegate_loader_settings_->Clear(); + _has_bits_[0] &= ~0x00000200u; +} +inline const ::tflite::proto::StableDelegateLoaderSettings& TFLiteSettings::_internal_stable_delegate_loader_settings() const { + const ::tflite::proto::StableDelegateLoaderSettings* p = stable_delegate_loader_settings_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_StableDelegateLoaderSettings_default_instance_); +} +inline const ::tflite::proto::StableDelegateLoaderSettings& TFLiteSettings::stable_delegate_loader_settings() const { + // @@protoc_insertion_point(field_get:tflite.proto.TFLiteSettings.stable_delegate_loader_settings) + return _internal_stable_delegate_loader_settings(); +} +inline void TFLiteSettings::unsafe_arena_set_allocated_stable_delegate_loader_settings( + ::tflite::proto::StableDelegateLoaderSettings* stable_delegate_loader_settings) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(stable_delegate_loader_settings_); + } + stable_delegate_loader_settings_ = stable_delegate_loader_settings; + if (stable_delegate_loader_settings) { + _has_bits_[0] |= 0x00000200u; + } else { + _has_bits_[0] &= ~0x00000200u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.TFLiteSettings.stable_delegate_loader_settings) +} +inline ::tflite::proto::StableDelegateLoaderSettings* TFLiteSettings::release_stable_delegate_loader_settings() { + _has_bits_[0] &= ~0x00000200u; + ::tflite::proto::StableDelegateLoaderSettings* temp = stable_delegate_loader_settings_; + stable_delegate_loader_settings_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::StableDelegateLoaderSettings* TFLiteSettings::unsafe_arena_release_stable_delegate_loader_settings() { + // @@protoc_insertion_point(field_release:tflite.proto.TFLiteSettings.stable_delegate_loader_settings) + _has_bits_[0] &= ~0x00000200u; + ::tflite::proto::StableDelegateLoaderSettings* temp = stable_delegate_loader_settings_; + stable_delegate_loader_settings_ = nullptr; + return temp; +} +inline ::tflite::proto::StableDelegateLoaderSettings* TFLiteSettings::_internal_mutable_stable_delegate_loader_settings() { + _has_bits_[0] |= 0x00000200u; + if (stable_delegate_loader_settings_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::StableDelegateLoaderSettings>(GetArenaForAllocation()); + stable_delegate_loader_settings_ = p; + } + return stable_delegate_loader_settings_; +} +inline ::tflite::proto::StableDelegateLoaderSettings* TFLiteSettings::mutable_stable_delegate_loader_settings() { + ::tflite::proto::StableDelegateLoaderSettings* _msg = _internal_mutable_stable_delegate_loader_settings(); + // @@protoc_insertion_point(field_mutable:tflite.proto.TFLiteSettings.stable_delegate_loader_settings) + return _msg; +} +inline void TFLiteSettings::set_allocated_stable_delegate_loader_settings(::tflite::proto::StableDelegateLoaderSettings* stable_delegate_loader_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete stable_delegate_loader_settings_; + } + if (stable_delegate_loader_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(stable_delegate_loader_settings); + if (message_arena != submessage_arena) { + stable_delegate_loader_settings = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, stable_delegate_loader_settings, submessage_arena); + } + _has_bits_[0] |= 0x00000200u; + } else { + _has_bits_[0] &= ~0x00000200u; + } + stable_delegate_loader_settings_ = stable_delegate_loader_settings; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.TFLiteSettings.stable_delegate_loader_settings) +} + +// optional .tflite.proto.GoogleEdgeTpuSettings google_edgetpu_settings = 14; +inline bool TFLiteSettings::_internal_has_google_edgetpu_settings() const { + bool value = (_has_bits_[0] & 0x00000400u) != 0; + PROTOBUF_ASSUME(!value || google_edgetpu_settings_ != nullptr); + return value; +} +inline bool TFLiteSettings::has_google_edgetpu_settings() const { + return _internal_has_google_edgetpu_settings(); +} +inline void TFLiteSettings::clear_google_edgetpu_settings() { + if (google_edgetpu_settings_ != nullptr) google_edgetpu_settings_->Clear(); + _has_bits_[0] &= ~0x00000400u; +} +inline const ::tflite::proto::GoogleEdgeTpuSettings& TFLiteSettings::_internal_google_edgetpu_settings() const { + const ::tflite::proto::GoogleEdgeTpuSettings* p = google_edgetpu_settings_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_GoogleEdgeTpuSettings_default_instance_); +} +inline const ::tflite::proto::GoogleEdgeTpuSettings& TFLiteSettings::google_edgetpu_settings() const { + // @@protoc_insertion_point(field_get:tflite.proto.TFLiteSettings.google_edgetpu_settings) + return _internal_google_edgetpu_settings(); +} +inline void TFLiteSettings::unsafe_arena_set_allocated_google_edgetpu_settings( + ::tflite::proto::GoogleEdgeTpuSettings* google_edgetpu_settings) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(google_edgetpu_settings_); + } + google_edgetpu_settings_ = google_edgetpu_settings; + if (google_edgetpu_settings) { + _has_bits_[0] |= 0x00000400u; + } else { + _has_bits_[0] &= ~0x00000400u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.TFLiteSettings.google_edgetpu_settings) +} +inline ::tflite::proto::GoogleEdgeTpuSettings* TFLiteSettings::release_google_edgetpu_settings() { + _has_bits_[0] &= ~0x00000400u; + ::tflite::proto::GoogleEdgeTpuSettings* temp = google_edgetpu_settings_; + google_edgetpu_settings_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::GoogleEdgeTpuSettings* TFLiteSettings::unsafe_arena_release_google_edgetpu_settings() { + // @@protoc_insertion_point(field_release:tflite.proto.TFLiteSettings.google_edgetpu_settings) + _has_bits_[0] &= ~0x00000400u; + ::tflite::proto::GoogleEdgeTpuSettings* temp = google_edgetpu_settings_; + google_edgetpu_settings_ = nullptr; + return temp; +} +inline ::tflite::proto::GoogleEdgeTpuSettings* TFLiteSettings::_internal_mutable_google_edgetpu_settings() { + _has_bits_[0] |= 0x00000400u; + if (google_edgetpu_settings_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::GoogleEdgeTpuSettings>(GetArenaForAllocation()); + google_edgetpu_settings_ = p; + } + return google_edgetpu_settings_; +} +inline ::tflite::proto::GoogleEdgeTpuSettings* TFLiteSettings::mutable_google_edgetpu_settings() { + ::tflite::proto::GoogleEdgeTpuSettings* _msg = _internal_mutable_google_edgetpu_settings(); + // @@protoc_insertion_point(field_mutable:tflite.proto.TFLiteSettings.google_edgetpu_settings) + return _msg; +} +inline void TFLiteSettings::set_allocated_google_edgetpu_settings(::tflite::proto::GoogleEdgeTpuSettings* google_edgetpu_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete google_edgetpu_settings_; + } + if (google_edgetpu_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(google_edgetpu_settings); + if (message_arena != submessage_arena) { + google_edgetpu_settings = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, google_edgetpu_settings, submessage_arena); + } + _has_bits_[0] |= 0x00000400u; + } else { + _has_bits_[0] &= ~0x00000400u; + } + google_edgetpu_settings_ = google_edgetpu_settings; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.TFLiteSettings.google_edgetpu_settings) +} + +// optional .tflite.proto.CompilationCachingSettings compilation_caching_settings = 15; +inline bool TFLiteSettings::_internal_has_compilation_caching_settings() const { + bool value = (_has_bits_[0] & 0x00000800u) != 0; + PROTOBUF_ASSUME(!value || compilation_caching_settings_ != nullptr); + return value; +} +inline bool TFLiteSettings::has_compilation_caching_settings() const { + return _internal_has_compilation_caching_settings(); +} +inline void TFLiteSettings::clear_compilation_caching_settings() { + if (compilation_caching_settings_ != nullptr) compilation_caching_settings_->Clear(); + _has_bits_[0] &= ~0x00000800u; +} +inline const ::tflite::proto::CompilationCachingSettings& TFLiteSettings::_internal_compilation_caching_settings() const { + const ::tflite::proto::CompilationCachingSettings* p = compilation_caching_settings_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_CompilationCachingSettings_default_instance_); +} +inline const ::tflite::proto::CompilationCachingSettings& TFLiteSettings::compilation_caching_settings() const { + // @@protoc_insertion_point(field_get:tflite.proto.TFLiteSettings.compilation_caching_settings) + return _internal_compilation_caching_settings(); +} +inline void TFLiteSettings::unsafe_arena_set_allocated_compilation_caching_settings( + ::tflite::proto::CompilationCachingSettings* compilation_caching_settings) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(compilation_caching_settings_); + } + compilation_caching_settings_ = compilation_caching_settings; + if (compilation_caching_settings) { + _has_bits_[0] |= 0x00000800u; + } else { + _has_bits_[0] &= ~0x00000800u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.TFLiteSettings.compilation_caching_settings) +} +inline ::tflite::proto::CompilationCachingSettings* TFLiteSettings::release_compilation_caching_settings() { + _has_bits_[0] &= ~0x00000800u; + ::tflite::proto::CompilationCachingSettings* temp = compilation_caching_settings_; + compilation_caching_settings_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::CompilationCachingSettings* TFLiteSettings::unsafe_arena_release_compilation_caching_settings() { + // @@protoc_insertion_point(field_release:tflite.proto.TFLiteSettings.compilation_caching_settings) + _has_bits_[0] &= ~0x00000800u; + ::tflite::proto::CompilationCachingSettings* temp = compilation_caching_settings_; + compilation_caching_settings_ = nullptr; + return temp; +} +inline ::tflite::proto::CompilationCachingSettings* TFLiteSettings::_internal_mutable_compilation_caching_settings() { + _has_bits_[0] |= 0x00000800u; + if (compilation_caching_settings_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::CompilationCachingSettings>(GetArenaForAllocation()); + compilation_caching_settings_ = p; + } + return compilation_caching_settings_; +} +inline ::tflite::proto::CompilationCachingSettings* TFLiteSettings::mutable_compilation_caching_settings() { + ::tflite::proto::CompilationCachingSettings* _msg = _internal_mutable_compilation_caching_settings(); + // @@protoc_insertion_point(field_mutable:tflite.proto.TFLiteSettings.compilation_caching_settings) + return _msg; +} +inline void TFLiteSettings::set_allocated_compilation_caching_settings(::tflite::proto::CompilationCachingSettings* compilation_caching_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete compilation_caching_settings_; + } + if (compilation_caching_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(compilation_caching_settings); + if (message_arena != submessage_arena) { + compilation_caching_settings = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, compilation_caching_settings, submessage_arena); + } + _has_bits_[0] |= 0x00000800u; + } else { + _has_bits_[0] &= ~0x00000800u; + } + compilation_caching_settings_ = compilation_caching_settings; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.TFLiteSettings.compilation_caching_settings) +} + +// optional .tflite.proto.ArmNNSettings armnn_settings = 16; +inline bool TFLiteSettings::_internal_has_armnn_settings() const { + bool value = (_has_bits_[0] & 0x00001000u) != 0; + PROTOBUF_ASSUME(!value || armnn_settings_ != nullptr); + return value; +} +inline bool TFLiteSettings::has_armnn_settings() const { + return _internal_has_armnn_settings(); +} +inline void TFLiteSettings::clear_armnn_settings() { + if (armnn_settings_ != nullptr) armnn_settings_->Clear(); + _has_bits_[0] &= ~0x00001000u; +} +inline const ::tflite::proto::ArmNNSettings& TFLiteSettings::_internal_armnn_settings() const { + const ::tflite::proto::ArmNNSettings* p = armnn_settings_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_ArmNNSettings_default_instance_); +} +inline const ::tflite::proto::ArmNNSettings& TFLiteSettings::armnn_settings() const { + // @@protoc_insertion_point(field_get:tflite.proto.TFLiteSettings.armnn_settings) + return _internal_armnn_settings(); +} +inline void TFLiteSettings::unsafe_arena_set_allocated_armnn_settings( + ::tflite::proto::ArmNNSettings* armnn_settings) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(armnn_settings_); + } + armnn_settings_ = armnn_settings; + if (armnn_settings) { + _has_bits_[0] |= 0x00001000u; + } else { + _has_bits_[0] &= ~0x00001000u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.TFLiteSettings.armnn_settings) +} +inline ::tflite::proto::ArmNNSettings* TFLiteSettings::release_armnn_settings() { + _has_bits_[0] &= ~0x00001000u; + ::tflite::proto::ArmNNSettings* temp = armnn_settings_; + armnn_settings_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::ArmNNSettings* TFLiteSettings::unsafe_arena_release_armnn_settings() { + // @@protoc_insertion_point(field_release:tflite.proto.TFLiteSettings.armnn_settings) + _has_bits_[0] &= ~0x00001000u; + ::tflite::proto::ArmNNSettings* temp = armnn_settings_; + armnn_settings_ = nullptr; + return temp; +} +inline ::tflite::proto::ArmNNSettings* TFLiteSettings::_internal_mutable_armnn_settings() { + _has_bits_[0] |= 0x00001000u; + if (armnn_settings_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::ArmNNSettings>(GetArenaForAllocation()); + armnn_settings_ = p; + } + return armnn_settings_; +} +inline ::tflite::proto::ArmNNSettings* TFLiteSettings::mutable_armnn_settings() { + ::tflite::proto::ArmNNSettings* _msg = _internal_mutable_armnn_settings(); + // @@protoc_insertion_point(field_mutable:tflite.proto.TFLiteSettings.armnn_settings) + return _msg; +} +inline void TFLiteSettings::set_allocated_armnn_settings(::tflite::proto::ArmNNSettings* armnn_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete armnn_settings_; + } + if (armnn_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(armnn_settings); + if (message_arena != submessage_arena) { + armnn_settings = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, armnn_settings, submessage_arena); + } + _has_bits_[0] |= 0x00001000u; + } else { + _has_bits_[0] &= ~0x00001000u; + } + armnn_settings_ = armnn_settings; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.TFLiteSettings.armnn_settings) +} + +// ------------------------------------------------------------------- + +// FallbackSettings + +// optional bool allow_automatic_fallback_on_compilation_error = 7; +inline bool FallbackSettings::_internal_has_allow_automatic_fallback_on_compilation_error() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool FallbackSettings::has_allow_automatic_fallback_on_compilation_error() const { + return _internal_has_allow_automatic_fallback_on_compilation_error(); +} +inline void FallbackSettings::clear_allow_automatic_fallback_on_compilation_error() { + allow_automatic_fallback_on_compilation_error_ = false; + _has_bits_[0] &= ~0x00000001u; +} +inline bool FallbackSettings::_internal_allow_automatic_fallback_on_compilation_error() const { + return allow_automatic_fallback_on_compilation_error_; +} +inline bool FallbackSettings::allow_automatic_fallback_on_compilation_error() const { + // @@protoc_insertion_point(field_get:tflite.proto.FallbackSettings.allow_automatic_fallback_on_compilation_error) + return _internal_allow_automatic_fallback_on_compilation_error(); +} +inline void FallbackSettings::_internal_set_allow_automatic_fallback_on_compilation_error(bool value) { + _has_bits_[0] |= 0x00000001u; + allow_automatic_fallback_on_compilation_error_ = value; +} +inline void FallbackSettings::set_allow_automatic_fallback_on_compilation_error(bool value) { + _internal_set_allow_automatic_fallback_on_compilation_error(value); + // @@protoc_insertion_point(field_set:tflite.proto.FallbackSettings.allow_automatic_fallback_on_compilation_error) +} + +// optional bool allow_automatic_fallback_on_execution_error = 8; +inline bool FallbackSettings::_internal_has_allow_automatic_fallback_on_execution_error() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool FallbackSettings::has_allow_automatic_fallback_on_execution_error() const { + return _internal_has_allow_automatic_fallback_on_execution_error(); +} +inline void FallbackSettings::clear_allow_automatic_fallback_on_execution_error() { + allow_automatic_fallback_on_execution_error_ = false; + _has_bits_[0] &= ~0x00000002u; +} +inline bool FallbackSettings::_internal_allow_automatic_fallback_on_execution_error() const { + return allow_automatic_fallback_on_execution_error_; +} +inline bool FallbackSettings::allow_automatic_fallback_on_execution_error() const { + // @@protoc_insertion_point(field_get:tflite.proto.FallbackSettings.allow_automatic_fallback_on_execution_error) + return _internal_allow_automatic_fallback_on_execution_error(); +} +inline void FallbackSettings::_internal_set_allow_automatic_fallback_on_execution_error(bool value) { + _has_bits_[0] |= 0x00000002u; + allow_automatic_fallback_on_execution_error_ = value; +} +inline void FallbackSettings::set_allow_automatic_fallback_on_execution_error(bool value) { + _internal_set_allow_automatic_fallback_on_execution_error(value); + // @@protoc_insertion_point(field_set:tflite.proto.FallbackSettings.allow_automatic_fallback_on_execution_error) +} + +// ------------------------------------------------------------------- + +// BenchmarkMetric + +// optional string name = 1; +inline bool BenchmarkMetric::_internal_has_name() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool BenchmarkMetric::has_name() const { + return _internal_has_name(); +} +inline void BenchmarkMetric::clear_name() { + name_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& BenchmarkMetric::name() const { + // @@protoc_insertion_point(field_get:tflite.proto.BenchmarkMetric.name) + return _internal_name(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void BenchmarkMetric::set_name(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + name_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tflite.proto.BenchmarkMetric.name) +} +inline std::string* BenchmarkMetric::mutable_name() { + std::string* _s = _internal_mutable_name(); + // @@protoc_insertion_point(field_mutable:tflite.proto.BenchmarkMetric.name) + return _s; +} +inline const std::string& BenchmarkMetric::_internal_name() const { + return name_.Get(); +} +inline void BenchmarkMetric::_internal_set_name(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + name_.Set(value, GetArenaForAllocation()); +} +inline std::string* BenchmarkMetric::_internal_mutable_name() { + _has_bits_[0] |= 0x00000001u; + return name_.Mutable(GetArenaForAllocation()); +} +inline std::string* BenchmarkMetric::release_name() { + // @@protoc_insertion_point(field_release:tflite.proto.BenchmarkMetric.name) + if (!_internal_has_name()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = name_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (name_.IsDefault()) { + name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void BenchmarkMetric::set_allocated_name(std::string* name) { + if (name != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + name_.SetAllocated(name, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (name_.IsDefault()) { + name_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tflite.proto.BenchmarkMetric.name) +} + +// repeated float values = 2 [packed = true]; +inline int BenchmarkMetric::_internal_values_size() const { + return values_.size(); +} +inline int BenchmarkMetric::values_size() const { + return _internal_values_size(); +} +inline void BenchmarkMetric::clear_values() { + values_.Clear(); +} +inline float BenchmarkMetric::_internal_values(int index) const { + return values_.Get(index); +} +inline float BenchmarkMetric::values(int index) const { + // @@protoc_insertion_point(field_get:tflite.proto.BenchmarkMetric.values) + return _internal_values(index); +} +inline void BenchmarkMetric::set_values(int index, float value) { + values_.Set(index, value); + // @@protoc_insertion_point(field_set:tflite.proto.BenchmarkMetric.values) +} +inline void BenchmarkMetric::_internal_add_values(float value) { + values_.Add(value); +} +inline void BenchmarkMetric::add_values(float value) { + _internal_add_values(value); + // @@protoc_insertion_point(field_add:tflite.proto.BenchmarkMetric.values) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >& +BenchmarkMetric::_internal_values() const { + return values_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >& +BenchmarkMetric::values() const { + // @@protoc_insertion_point(field_list:tflite.proto.BenchmarkMetric.values) + return _internal_values(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >* +BenchmarkMetric::_internal_mutable_values() { + return &values_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< float >* +BenchmarkMetric::mutable_values() { + // @@protoc_insertion_point(field_mutable_list:tflite.proto.BenchmarkMetric.values) + return _internal_mutable_values(); +} + +// ------------------------------------------------------------------- + +// BenchmarkResult_InferenceOutput + +// optional bytes value = 1; +inline bool BenchmarkResult_InferenceOutput::_internal_has_value() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool BenchmarkResult_InferenceOutput::has_value() const { + return _internal_has_value(); +} +inline void BenchmarkResult_InferenceOutput::clear_value() { + value_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& BenchmarkResult_InferenceOutput::value() const { + // @@protoc_insertion_point(field_get:tflite.proto.BenchmarkResult.InferenceOutput.value) + return _internal_value(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void BenchmarkResult_InferenceOutput::set_value(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + value_.SetBytes(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tflite.proto.BenchmarkResult.InferenceOutput.value) +} +inline std::string* BenchmarkResult_InferenceOutput::mutable_value() { + std::string* _s = _internal_mutable_value(); + // @@protoc_insertion_point(field_mutable:tflite.proto.BenchmarkResult.InferenceOutput.value) + return _s; +} +inline const std::string& BenchmarkResult_InferenceOutput::_internal_value() const { + return value_.Get(); +} +inline void BenchmarkResult_InferenceOutput::_internal_set_value(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + value_.Set(value, GetArenaForAllocation()); +} +inline std::string* BenchmarkResult_InferenceOutput::_internal_mutable_value() { + _has_bits_[0] |= 0x00000001u; + return value_.Mutable(GetArenaForAllocation()); +} +inline std::string* BenchmarkResult_InferenceOutput::release_value() { + // @@protoc_insertion_point(field_release:tflite.proto.BenchmarkResult.InferenceOutput.value) + if (!_internal_has_value()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = value_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (value_.IsDefault()) { + value_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void BenchmarkResult_InferenceOutput::set_allocated_value(std::string* value) { + if (value != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + value_.SetAllocated(value, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (value_.IsDefault()) { + value_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tflite.proto.BenchmarkResult.InferenceOutput.value) +} + +// ------------------------------------------------------------------- + +// BenchmarkResult + +// repeated int64 initialization_time_us = 1 [packed = true]; +inline int BenchmarkResult::_internal_initialization_time_us_size() const { + return initialization_time_us_.size(); +} +inline int BenchmarkResult::initialization_time_us_size() const { + return _internal_initialization_time_us_size(); +} +inline void BenchmarkResult::clear_initialization_time_us() { + initialization_time_us_.Clear(); +} +inline int64_t BenchmarkResult::_internal_initialization_time_us(int index) const { + return initialization_time_us_.Get(index); +} +inline int64_t BenchmarkResult::initialization_time_us(int index) const { + // @@protoc_insertion_point(field_get:tflite.proto.BenchmarkResult.initialization_time_us) + return _internal_initialization_time_us(index); +} +inline void BenchmarkResult::set_initialization_time_us(int index, int64_t value) { + initialization_time_us_.Set(index, value); + // @@protoc_insertion_point(field_set:tflite.proto.BenchmarkResult.initialization_time_us) +} +inline void BenchmarkResult::_internal_add_initialization_time_us(int64_t value) { + initialization_time_us_.Add(value); +} +inline void BenchmarkResult::add_initialization_time_us(int64_t value) { + _internal_add_initialization_time_us(value); + // @@protoc_insertion_point(field_add:tflite.proto.BenchmarkResult.initialization_time_us) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +BenchmarkResult::_internal_initialization_time_us() const { + return initialization_time_us_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +BenchmarkResult::initialization_time_us() const { + // @@protoc_insertion_point(field_list:tflite.proto.BenchmarkResult.initialization_time_us) + return _internal_initialization_time_us(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +BenchmarkResult::_internal_mutable_initialization_time_us() { + return &initialization_time_us_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +BenchmarkResult::mutable_initialization_time_us() { + // @@protoc_insertion_point(field_mutable_list:tflite.proto.BenchmarkResult.initialization_time_us) + return _internal_mutable_initialization_time_us(); +} + +// repeated int64 inference_time_us = 2 [packed = true]; +inline int BenchmarkResult::_internal_inference_time_us_size() const { + return inference_time_us_.size(); +} +inline int BenchmarkResult::inference_time_us_size() const { + return _internal_inference_time_us_size(); +} +inline void BenchmarkResult::clear_inference_time_us() { + inference_time_us_.Clear(); +} +inline int64_t BenchmarkResult::_internal_inference_time_us(int index) const { + return inference_time_us_.Get(index); +} +inline int64_t BenchmarkResult::inference_time_us(int index) const { + // @@protoc_insertion_point(field_get:tflite.proto.BenchmarkResult.inference_time_us) + return _internal_inference_time_us(index); +} +inline void BenchmarkResult::set_inference_time_us(int index, int64_t value) { + inference_time_us_.Set(index, value); + // @@protoc_insertion_point(field_set:tflite.proto.BenchmarkResult.inference_time_us) +} +inline void BenchmarkResult::_internal_add_inference_time_us(int64_t value) { + inference_time_us_.Add(value); +} +inline void BenchmarkResult::add_inference_time_us(int64_t value) { + _internal_add_inference_time_us(value); + // @@protoc_insertion_point(field_add:tflite.proto.BenchmarkResult.inference_time_us) +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +BenchmarkResult::_internal_inference_time_us() const { + return inference_time_us_; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >& +BenchmarkResult::inference_time_us() const { + // @@protoc_insertion_point(field_list:tflite.proto.BenchmarkResult.inference_time_us) + return _internal_inference_time_us(); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +BenchmarkResult::_internal_mutable_inference_time_us() { + return &inference_time_us_; +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedField< int64_t >* +BenchmarkResult::mutable_inference_time_us() { + // @@protoc_insertion_point(field_mutable_list:tflite.proto.BenchmarkResult.inference_time_us) + return _internal_mutable_inference_time_us(); +} + +// optional int32 max_memory_kb = 3; +inline bool BenchmarkResult::_internal_has_max_memory_kb() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool BenchmarkResult::has_max_memory_kb() const { + return _internal_has_max_memory_kb(); +} +inline void BenchmarkResult::clear_max_memory_kb() { + max_memory_kb_ = 0; + _has_bits_[0] &= ~0x00000001u; +} +inline int32_t BenchmarkResult::_internal_max_memory_kb() const { + return max_memory_kb_; +} +inline int32_t BenchmarkResult::max_memory_kb() const { + // @@protoc_insertion_point(field_get:tflite.proto.BenchmarkResult.max_memory_kb) + return _internal_max_memory_kb(); +} +inline void BenchmarkResult::_internal_set_max_memory_kb(int32_t value) { + _has_bits_[0] |= 0x00000001u; + max_memory_kb_ = value; +} +inline void BenchmarkResult::set_max_memory_kb(int32_t value) { + _internal_set_max_memory_kb(value); + // @@protoc_insertion_point(field_set:tflite.proto.BenchmarkResult.max_memory_kb) +} + +// optional bool ok = 4; +inline bool BenchmarkResult::_internal_has_ok() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool BenchmarkResult::has_ok() const { + return _internal_has_ok(); +} +inline void BenchmarkResult::clear_ok() { + ok_ = false; + _has_bits_[0] &= ~0x00000002u; +} +inline bool BenchmarkResult::_internal_ok() const { + return ok_; +} +inline bool BenchmarkResult::ok() const { + // @@protoc_insertion_point(field_get:tflite.proto.BenchmarkResult.ok) + return _internal_ok(); +} +inline void BenchmarkResult::_internal_set_ok(bool value) { + _has_bits_[0] |= 0x00000002u; + ok_ = value; +} +inline void BenchmarkResult::set_ok(bool value) { + _internal_set_ok(value); + // @@protoc_insertion_point(field_set:tflite.proto.BenchmarkResult.ok) +} + +// repeated .tflite.proto.BenchmarkMetric metrics = 5; +inline int BenchmarkResult::_internal_metrics_size() const { + return metrics_.size(); +} +inline int BenchmarkResult::metrics_size() const { + return _internal_metrics_size(); +} +inline void BenchmarkResult::clear_metrics() { + metrics_.Clear(); +} +inline ::tflite::proto::BenchmarkMetric* BenchmarkResult::mutable_metrics(int index) { + // @@protoc_insertion_point(field_mutable:tflite.proto.BenchmarkResult.metrics) + return metrics_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tflite::proto::BenchmarkMetric >* +BenchmarkResult::mutable_metrics() { + // @@protoc_insertion_point(field_mutable_list:tflite.proto.BenchmarkResult.metrics) + return &metrics_; +} +inline const ::tflite::proto::BenchmarkMetric& BenchmarkResult::_internal_metrics(int index) const { + return metrics_.Get(index); +} +inline const ::tflite::proto::BenchmarkMetric& BenchmarkResult::metrics(int index) const { + // @@protoc_insertion_point(field_get:tflite.proto.BenchmarkResult.metrics) + return _internal_metrics(index); +} +inline ::tflite::proto::BenchmarkMetric* BenchmarkResult::_internal_add_metrics() { + return metrics_.Add(); +} +inline ::tflite::proto::BenchmarkMetric* BenchmarkResult::add_metrics() { + ::tflite::proto::BenchmarkMetric* _add = _internal_add_metrics(); + // @@protoc_insertion_point(field_add:tflite.proto.BenchmarkResult.metrics) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tflite::proto::BenchmarkMetric >& +BenchmarkResult::metrics() const { + // @@protoc_insertion_point(field_list:tflite.proto.BenchmarkResult.metrics) + return metrics_; +} + +// repeated .tflite.proto.BenchmarkResult.InferenceOutput actual_output = 6; +inline int BenchmarkResult::_internal_actual_output_size() const { + return actual_output_.size(); +} +inline int BenchmarkResult::actual_output_size() const { + return _internal_actual_output_size(); +} +inline void BenchmarkResult::clear_actual_output() { + actual_output_.Clear(); +} +inline ::tflite::proto::BenchmarkResult_InferenceOutput* BenchmarkResult::mutable_actual_output(int index) { + // @@protoc_insertion_point(field_mutable:tflite.proto.BenchmarkResult.actual_output) + return actual_output_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tflite::proto::BenchmarkResult_InferenceOutput >* +BenchmarkResult::mutable_actual_output() { + // @@protoc_insertion_point(field_mutable_list:tflite.proto.BenchmarkResult.actual_output) + return &actual_output_; +} +inline const ::tflite::proto::BenchmarkResult_InferenceOutput& BenchmarkResult::_internal_actual_output(int index) const { + return actual_output_.Get(index); +} +inline const ::tflite::proto::BenchmarkResult_InferenceOutput& BenchmarkResult::actual_output(int index) const { + // @@protoc_insertion_point(field_get:tflite.proto.BenchmarkResult.actual_output) + return _internal_actual_output(index); +} +inline ::tflite::proto::BenchmarkResult_InferenceOutput* BenchmarkResult::_internal_add_actual_output() { + return actual_output_.Add(); +} +inline ::tflite::proto::BenchmarkResult_InferenceOutput* BenchmarkResult::add_actual_output() { + ::tflite::proto::BenchmarkResult_InferenceOutput* _add = _internal_add_actual_output(); + // @@protoc_insertion_point(field_add:tflite.proto.BenchmarkResult.actual_output) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tflite::proto::BenchmarkResult_InferenceOutput >& +BenchmarkResult::actual_output() const { + // @@protoc_insertion_point(field_list:tflite.proto.BenchmarkResult.actual_output) + return actual_output_; +} + +// ------------------------------------------------------------------- + +// ErrorCode + +// optional .tflite.proto.Delegate source = 1; +inline bool ErrorCode::_internal_has_source() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ErrorCode::has_source() const { + return _internal_has_source(); +} +inline void ErrorCode::clear_source() { + source_ = 0; + _has_bits_[0] &= ~0x00000001u; +} +inline ::tflite::proto::Delegate ErrorCode::_internal_source() const { + return static_cast< ::tflite::proto::Delegate >(source_); +} +inline ::tflite::proto::Delegate ErrorCode::source() const { + // @@protoc_insertion_point(field_get:tflite.proto.ErrorCode.source) + return _internal_source(); +} +inline void ErrorCode::_internal_set_source(::tflite::proto::Delegate value) { + assert(::tflite::proto::Delegate_IsValid(value)); + _has_bits_[0] |= 0x00000001u; + source_ = value; +} +inline void ErrorCode::set_source(::tflite::proto::Delegate value) { + _internal_set_source(value); + // @@protoc_insertion_point(field_set:tflite.proto.ErrorCode.source) +} + +// optional int32 tflite_error = 2; +inline bool ErrorCode::_internal_has_tflite_error() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ErrorCode::has_tflite_error() const { + return _internal_has_tflite_error(); +} +inline void ErrorCode::clear_tflite_error() { + tflite_error_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline int32_t ErrorCode::_internal_tflite_error() const { + return tflite_error_; +} +inline int32_t ErrorCode::tflite_error() const { + // @@protoc_insertion_point(field_get:tflite.proto.ErrorCode.tflite_error) + return _internal_tflite_error(); +} +inline void ErrorCode::_internal_set_tflite_error(int32_t value) { + _has_bits_[0] |= 0x00000002u; + tflite_error_ = value; +} +inline void ErrorCode::set_tflite_error(int32_t value) { + _internal_set_tflite_error(value); + // @@protoc_insertion_point(field_set:tflite.proto.ErrorCode.tflite_error) +} + +// optional int64 underlying_api_error = 3; +inline bool ErrorCode::_internal_has_underlying_api_error() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool ErrorCode::has_underlying_api_error() const { + return _internal_has_underlying_api_error(); +} +inline void ErrorCode::clear_underlying_api_error() { + underlying_api_error_ = int64_t{0}; + _has_bits_[0] &= ~0x00000004u; +} +inline int64_t ErrorCode::_internal_underlying_api_error() const { + return underlying_api_error_; +} +inline int64_t ErrorCode::underlying_api_error() const { + // @@protoc_insertion_point(field_get:tflite.proto.ErrorCode.underlying_api_error) + return _internal_underlying_api_error(); +} +inline void ErrorCode::_internal_set_underlying_api_error(int64_t value) { + _has_bits_[0] |= 0x00000004u; + underlying_api_error_ = value; +} +inline void ErrorCode::set_underlying_api_error(int64_t value) { + _internal_set_underlying_api_error(value); + // @@protoc_insertion_point(field_set:tflite.proto.ErrorCode.underlying_api_error) +} + +// ------------------------------------------------------------------- + +// BenchmarkError + +// optional .tflite.proto.BenchmarkStage stage = 1; +inline bool BenchmarkError::_internal_has_stage() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool BenchmarkError::has_stage() const { + return _internal_has_stage(); +} +inline void BenchmarkError::clear_stage() { + stage_ = 0; + _has_bits_[0] &= ~0x00000001u; +} +inline ::tflite::proto::BenchmarkStage BenchmarkError::_internal_stage() const { + return static_cast< ::tflite::proto::BenchmarkStage >(stage_); +} +inline ::tflite::proto::BenchmarkStage BenchmarkError::stage() const { + // @@protoc_insertion_point(field_get:tflite.proto.BenchmarkError.stage) + return _internal_stage(); +} +inline void BenchmarkError::_internal_set_stage(::tflite::proto::BenchmarkStage value) { + assert(::tflite::proto::BenchmarkStage_IsValid(value)); + _has_bits_[0] |= 0x00000001u; + stage_ = value; +} +inline void BenchmarkError::set_stage(::tflite::proto::BenchmarkStage value) { + _internal_set_stage(value); + // @@protoc_insertion_point(field_set:tflite.proto.BenchmarkError.stage) +} + +// optional int32 exit_code = 2; +inline bool BenchmarkError::_internal_has_exit_code() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool BenchmarkError::has_exit_code() const { + return _internal_has_exit_code(); +} +inline void BenchmarkError::clear_exit_code() { + exit_code_ = 0; + _has_bits_[0] &= ~0x00000002u; +} +inline int32_t BenchmarkError::_internal_exit_code() const { + return exit_code_; +} +inline int32_t BenchmarkError::exit_code() const { + // @@protoc_insertion_point(field_get:tflite.proto.BenchmarkError.exit_code) + return _internal_exit_code(); +} +inline void BenchmarkError::_internal_set_exit_code(int32_t value) { + _has_bits_[0] |= 0x00000002u; + exit_code_ = value; +} +inline void BenchmarkError::set_exit_code(int32_t value) { + _internal_set_exit_code(value); + // @@protoc_insertion_point(field_set:tflite.proto.BenchmarkError.exit_code) +} + +// optional int32 signal = 3; +inline bool BenchmarkError::_internal_has_signal() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool BenchmarkError::has_signal() const { + return _internal_has_signal(); +} +inline void BenchmarkError::clear_signal() { + signal_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline int32_t BenchmarkError::_internal_signal() const { + return signal_; +} +inline int32_t BenchmarkError::signal() const { + // @@protoc_insertion_point(field_get:tflite.proto.BenchmarkError.signal) + return _internal_signal(); +} +inline void BenchmarkError::_internal_set_signal(int32_t value) { + _has_bits_[0] |= 0x00000004u; + signal_ = value; +} +inline void BenchmarkError::set_signal(int32_t value) { + _internal_set_signal(value); + // @@protoc_insertion_point(field_set:tflite.proto.BenchmarkError.signal) +} + +// repeated .tflite.proto.ErrorCode error_code = 4; +inline int BenchmarkError::_internal_error_code_size() const { + return error_code_.size(); +} +inline int BenchmarkError::error_code_size() const { + return _internal_error_code_size(); +} +inline void BenchmarkError::clear_error_code() { + error_code_.Clear(); +} +inline ::tflite::proto::ErrorCode* BenchmarkError::mutable_error_code(int index) { + // @@protoc_insertion_point(field_mutable:tflite.proto.BenchmarkError.error_code) + return error_code_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tflite::proto::ErrorCode >* +BenchmarkError::mutable_error_code() { + // @@protoc_insertion_point(field_mutable_list:tflite.proto.BenchmarkError.error_code) + return &error_code_; +} +inline const ::tflite::proto::ErrorCode& BenchmarkError::_internal_error_code(int index) const { + return error_code_.Get(index); +} +inline const ::tflite::proto::ErrorCode& BenchmarkError::error_code(int index) const { + // @@protoc_insertion_point(field_get:tflite.proto.BenchmarkError.error_code) + return _internal_error_code(index); +} +inline ::tflite::proto::ErrorCode* BenchmarkError::_internal_add_error_code() { + return error_code_.Add(); +} +inline ::tflite::proto::ErrorCode* BenchmarkError::add_error_code() { + ::tflite::proto::ErrorCode* _add = _internal_add_error_code(); + // @@protoc_insertion_point(field_add:tflite.proto.BenchmarkError.error_code) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tflite::proto::ErrorCode >& +BenchmarkError::error_code() const { + // @@protoc_insertion_point(field_list:tflite.proto.BenchmarkError.error_code) + return error_code_; +} + +// optional int32 mini_benchmark_error_code = 5; +inline bool BenchmarkError::_internal_has_mini_benchmark_error_code() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool BenchmarkError::has_mini_benchmark_error_code() const { + return _internal_has_mini_benchmark_error_code(); +} +inline void BenchmarkError::clear_mini_benchmark_error_code() { + mini_benchmark_error_code_ = 0; + _has_bits_[0] &= ~0x00000008u; +} +inline int32_t BenchmarkError::_internal_mini_benchmark_error_code() const { + return mini_benchmark_error_code_; +} +inline int32_t BenchmarkError::mini_benchmark_error_code() const { + // @@protoc_insertion_point(field_get:tflite.proto.BenchmarkError.mini_benchmark_error_code) + return _internal_mini_benchmark_error_code(); +} +inline void BenchmarkError::_internal_set_mini_benchmark_error_code(int32_t value) { + _has_bits_[0] |= 0x00000008u; + mini_benchmark_error_code_ = value; +} +inline void BenchmarkError::set_mini_benchmark_error_code(int32_t value) { + _internal_set_mini_benchmark_error_code(value); + // @@protoc_insertion_point(field_set:tflite.proto.BenchmarkError.mini_benchmark_error_code) +} + +// ------------------------------------------------------------------- + +// BenchmarkEvent + +// optional .tflite.proto.TFLiteSettings tflite_settings = 1; +inline bool BenchmarkEvent::_internal_has_tflite_settings() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || tflite_settings_ != nullptr); + return value; +} +inline bool BenchmarkEvent::has_tflite_settings() const { + return _internal_has_tflite_settings(); +} +inline void BenchmarkEvent::clear_tflite_settings() { + if (tflite_settings_ != nullptr) tflite_settings_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::tflite::proto::TFLiteSettings& BenchmarkEvent::_internal_tflite_settings() const { + const ::tflite::proto::TFLiteSettings* p = tflite_settings_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_TFLiteSettings_default_instance_); +} +inline const ::tflite::proto::TFLiteSettings& BenchmarkEvent::tflite_settings() const { + // @@protoc_insertion_point(field_get:tflite.proto.BenchmarkEvent.tflite_settings) + return _internal_tflite_settings(); +} +inline void BenchmarkEvent::unsafe_arena_set_allocated_tflite_settings( + ::tflite::proto::TFLiteSettings* tflite_settings) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(tflite_settings_); + } + tflite_settings_ = tflite_settings; + if (tflite_settings) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.BenchmarkEvent.tflite_settings) +} +inline ::tflite::proto::TFLiteSettings* BenchmarkEvent::release_tflite_settings() { + _has_bits_[0] &= ~0x00000001u; + ::tflite::proto::TFLiteSettings* temp = tflite_settings_; + tflite_settings_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::TFLiteSettings* BenchmarkEvent::unsafe_arena_release_tflite_settings() { + // @@protoc_insertion_point(field_release:tflite.proto.BenchmarkEvent.tflite_settings) + _has_bits_[0] &= ~0x00000001u; + ::tflite::proto::TFLiteSettings* temp = tflite_settings_; + tflite_settings_ = nullptr; + return temp; +} +inline ::tflite::proto::TFLiteSettings* BenchmarkEvent::_internal_mutable_tflite_settings() { + _has_bits_[0] |= 0x00000001u; + if (tflite_settings_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::TFLiteSettings>(GetArenaForAllocation()); + tflite_settings_ = p; + } + return tflite_settings_; +} +inline ::tflite::proto::TFLiteSettings* BenchmarkEvent::mutable_tflite_settings() { + ::tflite::proto::TFLiteSettings* _msg = _internal_mutable_tflite_settings(); + // @@protoc_insertion_point(field_mutable:tflite.proto.BenchmarkEvent.tflite_settings) + return _msg; +} +inline void BenchmarkEvent::set_allocated_tflite_settings(::tflite::proto::TFLiteSettings* tflite_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete tflite_settings_; + } + if (tflite_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(tflite_settings); + if (message_arena != submessage_arena) { + tflite_settings = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, tflite_settings, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + tflite_settings_ = tflite_settings; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.BenchmarkEvent.tflite_settings) +} + +// optional .tflite.proto.BenchmarkEventType event_type = 2; +inline bool BenchmarkEvent::_internal_has_event_type() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool BenchmarkEvent::has_event_type() const { + return _internal_has_event_type(); +} +inline void BenchmarkEvent::clear_event_type() { + event_type_ = 0; + _has_bits_[0] &= ~0x00000020u; +} +inline ::tflite::proto::BenchmarkEventType BenchmarkEvent::_internal_event_type() const { + return static_cast< ::tflite::proto::BenchmarkEventType >(event_type_); +} +inline ::tflite::proto::BenchmarkEventType BenchmarkEvent::event_type() const { + // @@protoc_insertion_point(field_get:tflite.proto.BenchmarkEvent.event_type) + return _internal_event_type(); +} +inline void BenchmarkEvent::_internal_set_event_type(::tflite::proto::BenchmarkEventType value) { + assert(::tflite::proto::BenchmarkEventType_IsValid(value)); + _has_bits_[0] |= 0x00000020u; + event_type_ = value; +} +inline void BenchmarkEvent::set_event_type(::tflite::proto::BenchmarkEventType value) { + _internal_set_event_type(value); + // @@protoc_insertion_point(field_set:tflite.proto.BenchmarkEvent.event_type) +} + +// optional .tflite.proto.BenchmarkResult result = 3; +inline bool BenchmarkEvent::_internal_has_result() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || result_ != nullptr); + return value; +} +inline bool BenchmarkEvent::has_result() const { + return _internal_has_result(); +} +inline void BenchmarkEvent::clear_result() { + if (result_ != nullptr) result_->Clear(); + _has_bits_[0] &= ~0x00000002u; +} +inline const ::tflite::proto::BenchmarkResult& BenchmarkEvent::_internal_result() const { + const ::tflite::proto::BenchmarkResult* p = result_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_BenchmarkResult_default_instance_); +} +inline const ::tflite::proto::BenchmarkResult& BenchmarkEvent::result() const { + // @@protoc_insertion_point(field_get:tflite.proto.BenchmarkEvent.result) + return _internal_result(); +} +inline void BenchmarkEvent::unsafe_arena_set_allocated_result( + ::tflite::proto::BenchmarkResult* result) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(result_); + } + result_ = result; + if (result) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.BenchmarkEvent.result) +} +inline ::tflite::proto::BenchmarkResult* BenchmarkEvent::release_result() { + _has_bits_[0] &= ~0x00000002u; + ::tflite::proto::BenchmarkResult* temp = result_; + result_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::BenchmarkResult* BenchmarkEvent::unsafe_arena_release_result() { + // @@protoc_insertion_point(field_release:tflite.proto.BenchmarkEvent.result) + _has_bits_[0] &= ~0x00000002u; + ::tflite::proto::BenchmarkResult* temp = result_; + result_ = nullptr; + return temp; +} +inline ::tflite::proto::BenchmarkResult* BenchmarkEvent::_internal_mutable_result() { + _has_bits_[0] |= 0x00000002u; + if (result_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::BenchmarkResult>(GetArenaForAllocation()); + result_ = p; + } + return result_; +} +inline ::tflite::proto::BenchmarkResult* BenchmarkEvent::mutable_result() { + ::tflite::proto::BenchmarkResult* _msg = _internal_mutable_result(); + // @@protoc_insertion_point(field_mutable:tflite.proto.BenchmarkEvent.result) + return _msg; +} +inline void BenchmarkEvent::set_allocated_result(::tflite::proto::BenchmarkResult* result) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete result_; + } + if (result) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(result); + if (message_arena != submessage_arena) { + result = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, result, submessage_arena); + } + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + result_ = result; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.BenchmarkEvent.result) +} + +// optional .tflite.proto.BenchmarkError error = 4; +inline bool BenchmarkEvent::_internal_has_error() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || error_ != nullptr); + return value; +} +inline bool BenchmarkEvent::has_error() const { + return _internal_has_error(); +} +inline void BenchmarkEvent::clear_error() { + if (error_ != nullptr) error_->Clear(); + _has_bits_[0] &= ~0x00000004u; +} +inline const ::tflite::proto::BenchmarkError& BenchmarkEvent::_internal_error() const { + const ::tflite::proto::BenchmarkError* p = error_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_BenchmarkError_default_instance_); +} +inline const ::tflite::proto::BenchmarkError& BenchmarkEvent::error() const { + // @@protoc_insertion_point(field_get:tflite.proto.BenchmarkEvent.error) + return _internal_error(); +} +inline void BenchmarkEvent::unsafe_arena_set_allocated_error( + ::tflite::proto::BenchmarkError* error) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(error_); + } + error_ = error; + if (error) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.BenchmarkEvent.error) +} +inline ::tflite::proto::BenchmarkError* BenchmarkEvent::release_error() { + _has_bits_[0] &= ~0x00000004u; + ::tflite::proto::BenchmarkError* temp = error_; + error_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::BenchmarkError* BenchmarkEvent::unsafe_arena_release_error() { + // @@protoc_insertion_point(field_release:tflite.proto.BenchmarkEvent.error) + _has_bits_[0] &= ~0x00000004u; + ::tflite::proto::BenchmarkError* temp = error_; + error_ = nullptr; + return temp; +} +inline ::tflite::proto::BenchmarkError* BenchmarkEvent::_internal_mutable_error() { + _has_bits_[0] |= 0x00000004u; + if (error_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::BenchmarkError>(GetArenaForAllocation()); + error_ = p; + } + return error_; +} +inline ::tflite::proto::BenchmarkError* BenchmarkEvent::mutable_error() { + ::tflite::proto::BenchmarkError* _msg = _internal_mutable_error(); + // @@protoc_insertion_point(field_mutable:tflite.proto.BenchmarkEvent.error) + return _msg; +} +inline void BenchmarkEvent::set_allocated_error(::tflite::proto::BenchmarkError* error) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete error_; + } + if (error) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(error); + if (message_arena != submessage_arena) { + error = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, error, submessage_arena); + } + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + error_ = error; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.BenchmarkEvent.error) +} + +// optional int64 boottime_us = 5; +inline bool BenchmarkEvent::_internal_has_boottime_us() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool BenchmarkEvent::has_boottime_us() const { + return _internal_has_boottime_us(); +} +inline void BenchmarkEvent::clear_boottime_us() { + boottime_us_ = int64_t{0}; + _has_bits_[0] &= ~0x00000008u; +} +inline int64_t BenchmarkEvent::_internal_boottime_us() const { + return boottime_us_; +} +inline int64_t BenchmarkEvent::boottime_us() const { + // @@protoc_insertion_point(field_get:tflite.proto.BenchmarkEvent.boottime_us) + return _internal_boottime_us(); +} +inline void BenchmarkEvent::_internal_set_boottime_us(int64_t value) { + _has_bits_[0] |= 0x00000008u; + boottime_us_ = value; +} +inline void BenchmarkEvent::set_boottime_us(int64_t value) { + _internal_set_boottime_us(value); + // @@protoc_insertion_point(field_set:tflite.proto.BenchmarkEvent.boottime_us) +} + +// optional int64 wallclock_us = 6; +inline bool BenchmarkEvent::_internal_has_wallclock_us() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool BenchmarkEvent::has_wallclock_us() const { + return _internal_has_wallclock_us(); +} +inline void BenchmarkEvent::clear_wallclock_us() { + wallclock_us_ = int64_t{0}; + _has_bits_[0] &= ~0x00000010u; +} +inline int64_t BenchmarkEvent::_internal_wallclock_us() const { + return wallclock_us_; +} +inline int64_t BenchmarkEvent::wallclock_us() const { + // @@protoc_insertion_point(field_get:tflite.proto.BenchmarkEvent.wallclock_us) + return _internal_wallclock_us(); +} +inline void BenchmarkEvent::_internal_set_wallclock_us(int64_t value) { + _has_bits_[0] |= 0x00000010u; + wallclock_us_ = value; +} +inline void BenchmarkEvent::set_wallclock_us(int64_t value) { + _internal_set_wallclock_us(value); + // @@protoc_insertion_point(field_set:tflite.proto.BenchmarkEvent.wallclock_us) +} + +// ------------------------------------------------------------------- + +// BestAccelerationDecision + +// optional int32 number_of_source_events = 1; +inline bool BestAccelerationDecision::_internal_has_number_of_source_events() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool BestAccelerationDecision::has_number_of_source_events() const { + return _internal_has_number_of_source_events(); +} +inline void BestAccelerationDecision::clear_number_of_source_events() { + number_of_source_events_ = 0; + _has_bits_[0] &= ~0x00000004u; +} +inline int32_t BestAccelerationDecision::_internal_number_of_source_events() const { + return number_of_source_events_; +} +inline int32_t BestAccelerationDecision::number_of_source_events() const { + // @@protoc_insertion_point(field_get:tflite.proto.BestAccelerationDecision.number_of_source_events) + return _internal_number_of_source_events(); +} +inline void BestAccelerationDecision::_internal_set_number_of_source_events(int32_t value) { + _has_bits_[0] |= 0x00000004u; + number_of_source_events_ = value; +} +inline void BestAccelerationDecision::set_number_of_source_events(int32_t value) { + _internal_set_number_of_source_events(value); + // @@protoc_insertion_point(field_set:tflite.proto.BestAccelerationDecision.number_of_source_events) +} + +// optional .tflite.proto.BenchmarkEvent min_latency_event = 2; +inline bool BestAccelerationDecision::_internal_has_min_latency_event() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || min_latency_event_ != nullptr); + return value; +} +inline bool BestAccelerationDecision::has_min_latency_event() const { + return _internal_has_min_latency_event(); +} +inline void BestAccelerationDecision::clear_min_latency_event() { + if (min_latency_event_ != nullptr) min_latency_event_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::tflite::proto::BenchmarkEvent& BestAccelerationDecision::_internal_min_latency_event() const { + const ::tflite::proto::BenchmarkEvent* p = min_latency_event_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_BenchmarkEvent_default_instance_); +} +inline const ::tflite::proto::BenchmarkEvent& BestAccelerationDecision::min_latency_event() const { + // @@protoc_insertion_point(field_get:tflite.proto.BestAccelerationDecision.min_latency_event) + return _internal_min_latency_event(); +} +inline void BestAccelerationDecision::unsafe_arena_set_allocated_min_latency_event( + ::tflite::proto::BenchmarkEvent* min_latency_event) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(min_latency_event_); + } + min_latency_event_ = min_latency_event; + if (min_latency_event) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.BestAccelerationDecision.min_latency_event) +} +inline ::tflite::proto::BenchmarkEvent* BestAccelerationDecision::release_min_latency_event() { + _has_bits_[0] &= ~0x00000001u; + ::tflite::proto::BenchmarkEvent* temp = min_latency_event_; + min_latency_event_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::BenchmarkEvent* BestAccelerationDecision::unsafe_arena_release_min_latency_event() { + // @@protoc_insertion_point(field_release:tflite.proto.BestAccelerationDecision.min_latency_event) + _has_bits_[0] &= ~0x00000001u; + ::tflite::proto::BenchmarkEvent* temp = min_latency_event_; + min_latency_event_ = nullptr; + return temp; +} +inline ::tflite::proto::BenchmarkEvent* BestAccelerationDecision::_internal_mutable_min_latency_event() { + _has_bits_[0] |= 0x00000001u; + if (min_latency_event_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::BenchmarkEvent>(GetArenaForAllocation()); + min_latency_event_ = p; + } + return min_latency_event_; +} +inline ::tflite::proto::BenchmarkEvent* BestAccelerationDecision::mutable_min_latency_event() { + ::tflite::proto::BenchmarkEvent* _msg = _internal_mutable_min_latency_event(); + // @@protoc_insertion_point(field_mutable:tflite.proto.BestAccelerationDecision.min_latency_event) + return _msg; +} +inline void BestAccelerationDecision::set_allocated_min_latency_event(::tflite::proto::BenchmarkEvent* min_latency_event) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete min_latency_event_; + } + if (min_latency_event) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(min_latency_event); + if (message_arena != submessage_arena) { + min_latency_event = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, min_latency_event, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + min_latency_event_ = min_latency_event; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.BestAccelerationDecision.min_latency_event) +} + +// optional int64 min_inference_time_us = 3; +inline bool BestAccelerationDecision::_internal_has_min_inference_time_us() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool BestAccelerationDecision::has_min_inference_time_us() const { + return _internal_has_min_inference_time_us(); +} +inline void BestAccelerationDecision::clear_min_inference_time_us() { + min_inference_time_us_ = int64_t{0}; + _has_bits_[0] &= ~0x00000002u; +} +inline int64_t BestAccelerationDecision::_internal_min_inference_time_us() const { + return min_inference_time_us_; +} +inline int64_t BestAccelerationDecision::min_inference_time_us() const { + // @@protoc_insertion_point(field_get:tflite.proto.BestAccelerationDecision.min_inference_time_us) + return _internal_min_inference_time_us(); +} +inline void BestAccelerationDecision::_internal_set_min_inference_time_us(int64_t value) { + _has_bits_[0] |= 0x00000002u; + min_inference_time_us_ = value; +} +inline void BestAccelerationDecision::set_min_inference_time_us(int64_t value) { + _internal_set_min_inference_time_us(value); + // @@protoc_insertion_point(field_set:tflite.proto.BestAccelerationDecision.min_inference_time_us) +} + +// ------------------------------------------------------------------- + +// BenchmarkInitializationFailure + +// optional int32 initialization_status = 1; +inline bool BenchmarkInitializationFailure::_internal_has_initialization_status() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool BenchmarkInitializationFailure::has_initialization_status() const { + return _internal_has_initialization_status(); +} +inline void BenchmarkInitializationFailure::clear_initialization_status() { + initialization_status_ = 0; + _has_bits_[0] &= ~0x00000001u; +} +inline int32_t BenchmarkInitializationFailure::_internal_initialization_status() const { + return initialization_status_; +} +inline int32_t BenchmarkInitializationFailure::initialization_status() const { + // @@protoc_insertion_point(field_get:tflite.proto.BenchmarkInitializationFailure.initialization_status) + return _internal_initialization_status(); +} +inline void BenchmarkInitializationFailure::_internal_set_initialization_status(int32_t value) { + _has_bits_[0] |= 0x00000001u; + initialization_status_ = value; +} +inline void BenchmarkInitializationFailure::set_initialization_status(int32_t value) { + _internal_set_initialization_status(value); + // @@protoc_insertion_point(field_set:tflite.proto.BenchmarkInitializationFailure.initialization_status) +} + +// ------------------------------------------------------------------- + +// MiniBenchmarkEvent + +// optional bool is_log_flushing_event = 1; +inline bool MiniBenchmarkEvent::_internal_has_is_log_flushing_event() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool MiniBenchmarkEvent::has_is_log_flushing_event() const { + return _internal_has_is_log_flushing_event(); +} +inline void MiniBenchmarkEvent::clear_is_log_flushing_event() { + is_log_flushing_event_ = false; + _has_bits_[0] &= ~0x00000008u; +} +inline bool MiniBenchmarkEvent::_internal_is_log_flushing_event() const { + return is_log_flushing_event_; +} +inline bool MiniBenchmarkEvent::is_log_flushing_event() const { + // @@protoc_insertion_point(field_get:tflite.proto.MiniBenchmarkEvent.is_log_flushing_event) + return _internal_is_log_flushing_event(); +} +inline void MiniBenchmarkEvent::_internal_set_is_log_flushing_event(bool value) { + _has_bits_[0] |= 0x00000008u; + is_log_flushing_event_ = value; +} +inline void MiniBenchmarkEvent::set_is_log_flushing_event(bool value) { + _internal_set_is_log_flushing_event(value); + // @@protoc_insertion_point(field_set:tflite.proto.MiniBenchmarkEvent.is_log_flushing_event) +} + +// optional .tflite.proto.BestAccelerationDecision best_acceleration_decision = 2; +inline bool MiniBenchmarkEvent::_internal_has_best_acceleration_decision() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || best_acceleration_decision_ != nullptr); + return value; +} +inline bool MiniBenchmarkEvent::has_best_acceleration_decision() const { + return _internal_has_best_acceleration_decision(); +} +inline void MiniBenchmarkEvent::clear_best_acceleration_decision() { + if (best_acceleration_decision_ != nullptr) best_acceleration_decision_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::tflite::proto::BestAccelerationDecision& MiniBenchmarkEvent::_internal_best_acceleration_decision() const { + const ::tflite::proto::BestAccelerationDecision* p = best_acceleration_decision_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_BestAccelerationDecision_default_instance_); +} +inline const ::tflite::proto::BestAccelerationDecision& MiniBenchmarkEvent::best_acceleration_decision() const { + // @@protoc_insertion_point(field_get:tflite.proto.MiniBenchmarkEvent.best_acceleration_decision) + return _internal_best_acceleration_decision(); +} +inline void MiniBenchmarkEvent::unsafe_arena_set_allocated_best_acceleration_decision( + ::tflite::proto::BestAccelerationDecision* best_acceleration_decision) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(best_acceleration_decision_); + } + best_acceleration_decision_ = best_acceleration_decision; + if (best_acceleration_decision) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.MiniBenchmarkEvent.best_acceleration_decision) +} +inline ::tflite::proto::BestAccelerationDecision* MiniBenchmarkEvent::release_best_acceleration_decision() { + _has_bits_[0] &= ~0x00000001u; + ::tflite::proto::BestAccelerationDecision* temp = best_acceleration_decision_; + best_acceleration_decision_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::BestAccelerationDecision* MiniBenchmarkEvent::unsafe_arena_release_best_acceleration_decision() { + // @@protoc_insertion_point(field_release:tflite.proto.MiniBenchmarkEvent.best_acceleration_decision) + _has_bits_[0] &= ~0x00000001u; + ::tflite::proto::BestAccelerationDecision* temp = best_acceleration_decision_; + best_acceleration_decision_ = nullptr; + return temp; +} +inline ::tflite::proto::BestAccelerationDecision* MiniBenchmarkEvent::_internal_mutable_best_acceleration_decision() { + _has_bits_[0] |= 0x00000001u; + if (best_acceleration_decision_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::BestAccelerationDecision>(GetArenaForAllocation()); + best_acceleration_decision_ = p; + } + return best_acceleration_decision_; +} +inline ::tflite::proto::BestAccelerationDecision* MiniBenchmarkEvent::mutable_best_acceleration_decision() { + ::tflite::proto::BestAccelerationDecision* _msg = _internal_mutable_best_acceleration_decision(); + // @@protoc_insertion_point(field_mutable:tflite.proto.MiniBenchmarkEvent.best_acceleration_decision) + return _msg; +} +inline void MiniBenchmarkEvent::set_allocated_best_acceleration_decision(::tflite::proto::BestAccelerationDecision* best_acceleration_decision) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete best_acceleration_decision_; + } + if (best_acceleration_decision) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(best_acceleration_decision); + if (message_arena != submessage_arena) { + best_acceleration_decision = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, best_acceleration_decision, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + best_acceleration_decision_ = best_acceleration_decision; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.MiniBenchmarkEvent.best_acceleration_decision) +} + +// optional .tflite.proto.BenchmarkInitializationFailure initialization_failure = 3; +inline bool MiniBenchmarkEvent::_internal_has_initialization_failure() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || initialization_failure_ != nullptr); + return value; +} +inline bool MiniBenchmarkEvent::has_initialization_failure() const { + return _internal_has_initialization_failure(); +} +inline void MiniBenchmarkEvent::clear_initialization_failure() { + if (initialization_failure_ != nullptr) initialization_failure_->Clear(); + _has_bits_[0] &= ~0x00000002u; +} +inline const ::tflite::proto::BenchmarkInitializationFailure& MiniBenchmarkEvent::_internal_initialization_failure() const { + const ::tflite::proto::BenchmarkInitializationFailure* p = initialization_failure_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_BenchmarkInitializationFailure_default_instance_); +} +inline const ::tflite::proto::BenchmarkInitializationFailure& MiniBenchmarkEvent::initialization_failure() const { + // @@protoc_insertion_point(field_get:tflite.proto.MiniBenchmarkEvent.initialization_failure) + return _internal_initialization_failure(); +} +inline void MiniBenchmarkEvent::unsafe_arena_set_allocated_initialization_failure( + ::tflite::proto::BenchmarkInitializationFailure* initialization_failure) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(initialization_failure_); + } + initialization_failure_ = initialization_failure; + if (initialization_failure) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.MiniBenchmarkEvent.initialization_failure) +} +inline ::tflite::proto::BenchmarkInitializationFailure* MiniBenchmarkEvent::release_initialization_failure() { + _has_bits_[0] &= ~0x00000002u; + ::tflite::proto::BenchmarkInitializationFailure* temp = initialization_failure_; + initialization_failure_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::BenchmarkInitializationFailure* MiniBenchmarkEvent::unsafe_arena_release_initialization_failure() { + // @@protoc_insertion_point(field_release:tflite.proto.MiniBenchmarkEvent.initialization_failure) + _has_bits_[0] &= ~0x00000002u; + ::tflite::proto::BenchmarkInitializationFailure* temp = initialization_failure_; + initialization_failure_ = nullptr; + return temp; +} +inline ::tflite::proto::BenchmarkInitializationFailure* MiniBenchmarkEvent::_internal_mutable_initialization_failure() { + _has_bits_[0] |= 0x00000002u; + if (initialization_failure_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::BenchmarkInitializationFailure>(GetArenaForAllocation()); + initialization_failure_ = p; + } + return initialization_failure_; +} +inline ::tflite::proto::BenchmarkInitializationFailure* MiniBenchmarkEvent::mutable_initialization_failure() { + ::tflite::proto::BenchmarkInitializationFailure* _msg = _internal_mutable_initialization_failure(); + // @@protoc_insertion_point(field_mutable:tflite.proto.MiniBenchmarkEvent.initialization_failure) + return _msg; +} +inline void MiniBenchmarkEvent::set_allocated_initialization_failure(::tflite::proto::BenchmarkInitializationFailure* initialization_failure) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete initialization_failure_; + } + if (initialization_failure) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(initialization_failure); + if (message_arena != submessage_arena) { + initialization_failure = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, initialization_failure, submessage_arena); + } + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + initialization_failure_ = initialization_failure; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.MiniBenchmarkEvent.initialization_failure) +} + +// optional .tflite.proto.BenchmarkEvent benchmark_event = 4; +inline bool MiniBenchmarkEvent::_internal_has_benchmark_event() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || benchmark_event_ != nullptr); + return value; +} +inline bool MiniBenchmarkEvent::has_benchmark_event() const { + return _internal_has_benchmark_event(); +} +inline void MiniBenchmarkEvent::clear_benchmark_event() { + if (benchmark_event_ != nullptr) benchmark_event_->Clear(); + _has_bits_[0] &= ~0x00000004u; +} +inline const ::tflite::proto::BenchmarkEvent& MiniBenchmarkEvent::_internal_benchmark_event() const { + const ::tflite::proto::BenchmarkEvent* p = benchmark_event_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_BenchmarkEvent_default_instance_); +} +inline const ::tflite::proto::BenchmarkEvent& MiniBenchmarkEvent::benchmark_event() const { + // @@protoc_insertion_point(field_get:tflite.proto.MiniBenchmarkEvent.benchmark_event) + return _internal_benchmark_event(); +} +inline void MiniBenchmarkEvent::unsafe_arena_set_allocated_benchmark_event( + ::tflite::proto::BenchmarkEvent* benchmark_event) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(benchmark_event_); + } + benchmark_event_ = benchmark_event; + if (benchmark_event) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.MiniBenchmarkEvent.benchmark_event) +} +inline ::tflite::proto::BenchmarkEvent* MiniBenchmarkEvent::release_benchmark_event() { + _has_bits_[0] &= ~0x00000004u; + ::tflite::proto::BenchmarkEvent* temp = benchmark_event_; + benchmark_event_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::BenchmarkEvent* MiniBenchmarkEvent::unsafe_arena_release_benchmark_event() { + // @@protoc_insertion_point(field_release:tflite.proto.MiniBenchmarkEvent.benchmark_event) + _has_bits_[0] &= ~0x00000004u; + ::tflite::proto::BenchmarkEvent* temp = benchmark_event_; + benchmark_event_ = nullptr; + return temp; +} +inline ::tflite::proto::BenchmarkEvent* MiniBenchmarkEvent::_internal_mutable_benchmark_event() { + _has_bits_[0] |= 0x00000004u; + if (benchmark_event_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::BenchmarkEvent>(GetArenaForAllocation()); + benchmark_event_ = p; + } + return benchmark_event_; +} +inline ::tflite::proto::BenchmarkEvent* MiniBenchmarkEvent::mutable_benchmark_event() { + ::tflite::proto::BenchmarkEvent* _msg = _internal_mutable_benchmark_event(); + // @@protoc_insertion_point(field_mutable:tflite.proto.MiniBenchmarkEvent.benchmark_event) + return _msg; +} +inline void MiniBenchmarkEvent::set_allocated_benchmark_event(::tflite::proto::BenchmarkEvent* benchmark_event) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete benchmark_event_; + } + if (benchmark_event) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(benchmark_event); + if (message_arena != submessage_arena) { + benchmark_event = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, benchmark_event, submessage_arena); + } + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + benchmark_event_ = benchmark_event; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.MiniBenchmarkEvent.benchmark_event) +} + +// ------------------------------------------------------------------- + +// ModelFile + +// optional string filename = 1; +inline bool ModelFile::_internal_has_filename() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ModelFile::has_filename() const { + return _internal_has_filename(); +} +inline void ModelFile::clear_filename() { + filename_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& ModelFile::filename() const { + // @@protoc_insertion_point(field_get:tflite.proto.ModelFile.filename) + return _internal_filename(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ModelFile::set_filename(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + filename_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tflite.proto.ModelFile.filename) +} +inline std::string* ModelFile::mutable_filename() { + std::string* _s = _internal_mutable_filename(); + // @@protoc_insertion_point(field_mutable:tflite.proto.ModelFile.filename) + return _s; +} +inline const std::string& ModelFile::_internal_filename() const { + return filename_.Get(); +} +inline void ModelFile::_internal_set_filename(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + filename_.Set(value, GetArenaForAllocation()); +} +inline std::string* ModelFile::_internal_mutable_filename() { + _has_bits_[0] |= 0x00000001u; + return filename_.Mutable(GetArenaForAllocation()); +} +inline std::string* ModelFile::release_filename() { + // @@protoc_insertion_point(field_release:tflite.proto.ModelFile.filename) + if (!_internal_has_filename()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = filename_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (filename_.IsDefault()) { + filename_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ModelFile::set_allocated_filename(std::string* filename) { + if (filename != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + filename_.SetAllocated(filename, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (filename_.IsDefault()) { + filename_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tflite.proto.ModelFile.filename) +} + +// optional int64 fd = 2; +inline bool ModelFile::_internal_has_fd() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + return value; +} +inline bool ModelFile::has_fd() const { + return _internal_has_fd(); +} +inline void ModelFile::clear_fd() { + fd_ = int64_t{0}; + _has_bits_[0] &= ~0x00000004u; +} +inline int64_t ModelFile::_internal_fd() const { + return fd_; +} +inline int64_t ModelFile::fd() const { + // @@protoc_insertion_point(field_get:tflite.proto.ModelFile.fd) + return _internal_fd(); +} +inline void ModelFile::_internal_set_fd(int64_t value) { + _has_bits_[0] |= 0x00000004u; + fd_ = value; +} +inline void ModelFile::set_fd(int64_t value) { + _internal_set_fd(value); + // @@protoc_insertion_point(field_set:tflite.proto.ModelFile.fd) +} + +// optional int64 offset = 3; +inline bool ModelFile::_internal_has_offset() const { + bool value = (_has_bits_[0] & 0x00000008u) != 0; + return value; +} +inline bool ModelFile::has_offset() const { + return _internal_has_offset(); +} +inline void ModelFile::clear_offset() { + offset_ = int64_t{0}; + _has_bits_[0] &= ~0x00000008u; +} +inline int64_t ModelFile::_internal_offset() const { + return offset_; +} +inline int64_t ModelFile::offset() const { + // @@protoc_insertion_point(field_get:tflite.proto.ModelFile.offset) + return _internal_offset(); +} +inline void ModelFile::_internal_set_offset(int64_t value) { + _has_bits_[0] |= 0x00000008u; + offset_ = value; +} +inline void ModelFile::set_offset(int64_t value) { + _internal_set_offset(value); + // @@protoc_insertion_point(field_set:tflite.proto.ModelFile.offset) +} + +// optional int64 length = 4; +inline bool ModelFile::_internal_has_length() const { + bool value = (_has_bits_[0] & 0x00000010u) != 0; + return value; +} +inline bool ModelFile::has_length() const { + return _internal_has_length(); +} +inline void ModelFile::clear_length() { + length_ = int64_t{0}; + _has_bits_[0] &= ~0x00000010u; +} +inline int64_t ModelFile::_internal_length() const { + return length_; +} +inline int64_t ModelFile::length() const { + // @@protoc_insertion_point(field_get:tflite.proto.ModelFile.length) + return _internal_length(); +} +inline void ModelFile::_internal_set_length(int64_t value) { + _has_bits_[0] |= 0x00000010u; + length_ = value; +} +inline void ModelFile::set_length(int64_t value) { + _internal_set_length(value); + // @@protoc_insertion_point(field_set:tflite.proto.ModelFile.length) +} + +// optional .tflite.proto.ModelIdGroup model_id_group = 5; +inline bool ModelFile::_internal_has_model_id_group() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || model_id_group_ != nullptr); + return value; +} +inline bool ModelFile::has_model_id_group() const { + return _internal_has_model_id_group(); +} +inline void ModelFile::clear_model_id_group() { + if (model_id_group_ != nullptr) model_id_group_->Clear(); + _has_bits_[0] &= ~0x00000002u; +} +inline const ::tflite::proto::ModelIdGroup& ModelFile::_internal_model_id_group() const { + const ::tflite::proto::ModelIdGroup* p = model_id_group_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_ModelIdGroup_default_instance_); +} +inline const ::tflite::proto::ModelIdGroup& ModelFile::model_id_group() const { + // @@protoc_insertion_point(field_get:tflite.proto.ModelFile.model_id_group) + return _internal_model_id_group(); +} +inline void ModelFile::unsafe_arena_set_allocated_model_id_group( + ::tflite::proto::ModelIdGroup* model_id_group) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(model_id_group_); + } + model_id_group_ = model_id_group; + if (model_id_group) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.ModelFile.model_id_group) +} +inline ::tflite::proto::ModelIdGroup* ModelFile::release_model_id_group() { + _has_bits_[0] &= ~0x00000002u; + ::tflite::proto::ModelIdGroup* temp = model_id_group_; + model_id_group_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::ModelIdGroup* ModelFile::unsafe_arena_release_model_id_group() { + // @@protoc_insertion_point(field_release:tflite.proto.ModelFile.model_id_group) + _has_bits_[0] &= ~0x00000002u; + ::tflite::proto::ModelIdGroup* temp = model_id_group_; + model_id_group_ = nullptr; + return temp; +} +inline ::tflite::proto::ModelIdGroup* ModelFile::_internal_mutable_model_id_group() { + _has_bits_[0] |= 0x00000002u; + if (model_id_group_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::ModelIdGroup>(GetArenaForAllocation()); + model_id_group_ = p; + } + return model_id_group_; +} +inline ::tflite::proto::ModelIdGroup* ModelFile::mutable_model_id_group() { + ::tflite::proto::ModelIdGroup* _msg = _internal_mutable_model_id_group(); + // @@protoc_insertion_point(field_mutable:tflite.proto.ModelFile.model_id_group) + return _msg; +} +inline void ModelFile::set_allocated_model_id_group(::tflite::proto::ModelIdGroup* model_id_group) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete model_id_group_; + } + if (model_id_group) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(model_id_group); + if (message_arena != submessage_arena) { + model_id_group = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, model_id_group, submessage_arena); + } + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + model_id_group_ = model_id_group; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.ModelFile.model_id_group) +} + +// optional int64 buffer_handle = 6; +inline bool ModelFile::_internal_has_buffer_handle() const { + bool value = (_has_bits_[0] & 0x00000020u) != 0; + return value; +} +inline bool ModelFile::has_buffer_handle() const { + return _internal_has_buffer_handle(); +} +inline void ModelFile::clear_buffer_handle() { + buffer_handle_ = int64_t{0}; + _has_bits_[0] &= ~0x00000020u; +} +inline int64_t ModelFile::_internal_buffer_handle() const { + return buffer_handle_; +} +inline int64_t ModelFile::buffer_handle() const { + // @@protoc_insertion_point(field_get:tflite.proto.ModelFile.buffer_handle) + return _internal_buffer_handle(); +} +inline void ModelFile::_internal_set_buffer_handle(int64_t value) { + _has_bits_[0] |= 0x00000020u; + buffer_handle_ = value; +} +inline void ModelFile::set_buffer_handle(int64_t value) { + _internal_set_buffer_handle(value); + // @@protoc_insertion_point(field_set:tflite.proto.ModelFile.buffer_handle) +} + +// ------------------------------------------------------------------- + +// ModelIdGroup + +// optional string model_namespace = 1; +inline bool ModelIdGroup::_internal_has_model_namespace() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ModelIdGroup::has_model_namespace() const { + return _internal_has_model_namespace(); +} +inline void ModelIdGroup::clear_model_namespace() { + model_namespace_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& ModelIdGroup::model_namespace() const { + // @@protoc_insertion_point(field_get:tflite.proto.ModelIdGroup.model_namespace) + return _internal_model_namespace(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ModelIdGroup::set_model_namespace(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + model_namespace_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tflite.proto.ModelIdGroup.model_namespace) +} +inline std::string* ModelIdGroup::mutable_model_namespace() { + std::string* _s = _internal_mutable_model_namespace(); + // @@protoc_insertion_point(field_mutable:tflite.proto.ModelIdGroup.model_namespace) + return _s; +} +inline const std::string& ModelIdGroup::_internal_model_namespace() const { + return model_namespace_.Get(); +} +inline void ModelIdGroup::_internal_set_model_namespace(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + model_namespace_.Set(value, GetArenaForAllocation()); +} +inline std::string* ModelIdGroup::_internal_mutable_model_namespace() { + _has_bits_[0] |= 0x00000001u; + return model_namespace_.Mutable(GetArenaForAllocation()); +} +inline std::string* ModelIdGroup::release_model_namespace() { + // @@protoc_insertion_point(field_release:tflite.proto.ModelIdGroup.model_namespace) + if (!_internal_has_model_namespace()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = model_namespace_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (model_namespace_.IsDefault()) { + model_namespace_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ModelIdGroup::set_allocated_model_namespace(std::string* model_namespace) { + if (model_namespace != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + model_namespace_.SetAllocated(model_namespace, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (model_namespace_.IsDefault()) { + model_namespace_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tflite.proto.ModelIdGroup.model_namespace) +} + +// optional string model_id = 2; +inline bool ModelIdGroup::_internal_has_model_id() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool ModelIdGroup::has_model_id() const { + return _internal_has_model_id(); +} +inline void ModelIdGroup::clear_model_id() { + model_id_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& ModelIdGroup::model_id() const { + // @@protoc_insertion_point(field_get:tflite.proto.ModelIdGroup.model_id) + return _internal_model_id(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void ModelIdGroup::set_model_id(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + model_id_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tflite.proto.ModelIdGroup.model_id) +} +inline std::string* ModelIdGroup::mutable_model_id() { + std::string* _s = _internal_mutable_model_id(); + // @@protoc_insertion_point(field_mutable:tflite.proto.ModelIdGroup.model_id) + return _s; +} +inline const std::string& ModelIdGroup::_internal_model_id() const { + return model_id_.Get(); +} +inline void ModelIdGroup::_internal_set_model_id(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + model_id_.Set(value, GetArenaForAllocation()); +} +inline std::string* ModelIdGroup::_internal_mutable_model_id() { + _has_bits_[0] |= 0x00000002u; + return model_id_.Mutable(GetArenaForAllocation()); +} +inline std::string* ModelIdGroup::release_model_id() { + // @@protoc_insertion_point(field_release:tflite.proto.ModelIdGroup.model_id) + if (!_internal_has_model_id()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = model_id_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (model_id_.IsDefault()) { + model_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void ModelIdGroup::set_allocated_model_id(std::string* model_id) { + if (model_id != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + model_id_.SetAllocated(model_id, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (model_id_.IsDefault()) { + model_id_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tflite.proto.ModelIdGroup.model_id) +} + +// ------------------------------------------------------------------- + +// BenchmarkStoragePaths + +// optional string storage_file_path = 1; +inline bool BenchmarkStoragePaths::_internal_has_storage_file_path() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool BenchmarkStoragePaths::has_storage_file_path() const { + return _internal_has_storage_file_path(); +} +inline void BenchmarkStoragePaths::clear_storage_file_path() { + storage_file_path_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000001u; +} +inline const std::string& BenchmarkStoragePaths::storage_file_path() const { + // @@protoc_insertion_point(field_get:tflite.proto.BenchmarkStoragePaths.storage_file_path) + return _internal_storage_file_path(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void BenchmarkStoragePaths::set_storage_file_path(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000001u; + storage_file_path_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tflite.proto.BenchmarkStoragePaths.storage_file_path) +} +inline std::string* BenchmarkStoragePaths::mutable_storage_file_path() { + std::string* _s = _internal_mutable_storage_file_path(); + // @@protoc_insertion_point(field_mutable:tflite.proto.BenchmarkStoragePaths.storage_file_path) + return _s; +} +inline const std::string& BenchmarkStoragePaths::_internal_storage_file_path() const { + return storage_file_path_.Get(); +} +inline void BenchmarkStoragePaths::_internal_set_storage_file_path(const std::string& value) { + _has_bits_[0] |= 0x00000001u; + storage_file_path_.Set(value, GetArenaForAllocation()); +} +inline std::string* BenchmarkStoragePaths::_internal_mutable_storage_file_path() { + _has_bits_[0] |= 0x00000001u; + return storage_file_path_.Mutable(GetArenaForAllocation()); +} +inline std::string* BenchmarkStoragePaths::release_storage_file_path() { + // @@protoc_insertion_point(field_release:tflite.proto.BenchmarkStoragePaths.storage_file_path) + if (!_internal_has_storage_file_path()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000001u; + auto* p = storage_file_path_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (storage_file_path_.IsDefault()) { + storage_file_path_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void BenchmarkStoragePaths::set_allocated_storage_file_path(std::string* storage_file_path) { + if (storage_file_path != nullptr) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + storage_file_path_.SetAllocated(storage_file_path, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (storage_file_path_.IsDefault()) { + storage_file_path_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tflite.proto.BenchmarkStoragePaths.storage_file_path) +} + +// optional string data_directory_path = 2; +inline bool BenchmarkStoragePaths::_internal_has_data_directory_path() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + return value; +} +inline bool BenchmarkStoragePaths::has_data_directory_path() const { + return _internal_has_data_directory_path(); +} +inline void BenchmarkStoragePaths::clear_data_directory_path() { + data_directory_path_.ClearToEmpty(); + _has_bits_[0] &= ~0x00000002u; +} +inline const std::string& BenchmarkStoragePaths::data_directory_path() const { + // @@protoc_insertion_point(field_get:tflite.proto.BenchmarkStoragePaths.data_directory_path) + return _internal_data_directory_path(); +} +template +inline PROTOBUF_ALWAYS_INLINE +void BenchmarkStoragePaths::set_data_directory_path(ArgT0&& arg0, ArgT... args) { + _has_bits_[0] |= 0x00000002u; + data_directory_path_.Set(static_cast(arg0), args..., GetArenaForAllocation()); + // @@protoc_insertion_point(field_set:tflite.proto.BenchmarkStoragePaths.data_directory_path) +} +inline std::string* BenchmarkStoragePaths::mutable_data_directory_path() { + std::string* _s = _internal_mutable_data_directory_path(); + // @@protoc_insertion_point(field_mutable:tflite.proto.BenchmarkStoragePaths.data_directory_path) + return _s; +} +inline const std::string& BenchmarkStoragePaths::_internal_data_directory_path() const { + return data_directory_path_.Get(); +} +inline void BenchmarkStoragePaths::_internal_set_data_directory_path(const std::string& value) { + _has_bits_[0] |= 0x00000002u; + data_directory_path_.Set(value, GetArenaForAllocation()); +} +inline std::string* BenchmarkStoragePaths::_internal_mutable_data_directory_path() { + _has_bits_[0] |= 0x00000002u; + return data_directory_path_.Mutable(GetArenaForAllocation()); +} +inline std::string* BenchmarkStoragePaths::release_data_directory_path() { + // @@protoc_insertion_point(field_release:tflite.proto.BenchmarkStoragePaths.data_directory_path) + if (!_internal_has_data_directory_path()) { + return nullptr; + } + _has_bits_[0] &= ~0x00000002u; + auto* p = data_directory_path_.Release(); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (data_directory_path_.IsDefault()) { + data_directory_path_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + return p; +} +inline void BenchmarkStoragePaths::set_allocated_data_directory_path(std::string* data_directory_path) { + if (data_directory_path != nullptr) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + data_directory_path_.SetAllocated(data_directory_path, GetArenaForAllocation()); +#ifdef PROTOBUF_FORCE_COPY_DEFAULT_STRING + if (data_directory_path_.IsDefault()) { + data_directory_path_.Set("", GetArenaForAllocation()); + } +#endif // PROTOBUF_FORCE_COPY_DEFAULT_STRING + // @@protoc_insertion_point(field_set_allocated:tflite.proto.BenchmarkStoragePaths.data_directory_path) +} + +// ------------------------------------------------------------------- + +// ValidationSettings + +// optional int64 per_test_timeout_ms = 1; +inline bool ValidationSettings::_internal_has_per_test_timeout_ms() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + return value; +} +inline bool ValidationSettings::has_per_test_timeout_ms() const { + return _internal_has_per_test_timeout_ms(); +} +inline void ValidationSettings::clear_per_test_timeout_ms() { + per_test_timeout_ms_ = int64_t{0}; + _has_bits_[0] &= ~0x00000001u; +} +inline int64_t ValidationSettings::_internal_per_test_timeout_ms() const { + return per_test_timeout_ms_; +} +inline int64_t ValidationSettings::per_test_timeout_ms() const { + // @@protoc_insertion_point(field_get:tflite.proto.ValidationSettings.per_test_timeout_ms) + return _internal_per_test_timeout_ms(); +} +inline void ValidationSettings::_internal_set_per_test_timeout_ms(int64_t value) { + _has_bits_[0] |= 0x00000001u; + per_test_timeout_ms_ = value; +} +inline void ValidationSettings::set_per_test_timeout_ms(int64_t value) { + _internal_set_per_test_timeout_ms(value); + // @@protoc_insertion_point(field_set:tflite.proto.ValidationSettings.per_test_timeout_ms) +} + +// ------------------------------------------------------------------- + +// MinibenchmarkSettings + +// repeated .tflite.proto.TFLiteSettings settings_to_test = 1; +inline int MinibenchmarkSettings::_internal_settings_to_test_size() const { + return settings_to_test_.size(); +} +inline int MinibenchmarkSettings::settings_to_test_size() const { + return _internal_settings_to_test_size(); +} +inline void MinibenchmarkSettings::clear_settings_to_test() { + settings_to_test_.Clear(); +} +inline ::tflite::proto::TFLiteSettings* MinibenchmarkSettings::mutable_settings_to_test(int index) { + // @@protoc_insertion_point(field_mutable:tflite.proto.MinibenchmarkSettings.settings_to_test) + return settings_to_test_.Mutable(index); +} +inline ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tflite::proto::TFLiteSettings >* +MinibenchmarkSettings::mutable_settings_to_test() { + // @@protoc_insertion_point(field_mutable_list:tflite.proto.MinibenchmarkSettings.settings_to_test) + return &settings_to_test_; +} +inline const ::tflite::proto::TFLiteSettings& MinibenchmarkSettings::_internal_settings_to_test(int index) const { + return settings_to_test_.Get(index); +} +inline const ::tflite::proto::TFLiteSettings& MinibenchmarkSettings::settings_to_test(int index) const { + // @@protoc_insertion_point(field_get:tflite.proto.MinibenchmarkSettings.settings_to_test) + return _internal_settings_to_test(index); +} +inline ::tflite::proto::TFLiteSettings* MinibenchmarkSettings::_internal_add_settings_to_test() { + return settings_to_test_.Add(); +} +inline ::tflite::proto::TFLiteSettings* MinibenchmarkSettings::add_settings_to_test() { + ::tflite::proto::TFLiteSettings* _add = _internal_add_settings_to_test(); + // @@protoc_insertion_point(field_add:tflite.proto.MinibenchmarkSettings.settings_to_test) + return _add; +} +inline const ::PROTOBUF_NAMESPACE_ID::RepeatedPtrField< ::tflite::proto::TFLiteSettings >& +MinibenchmarkSettings::settings_to_test() const { + // @@protoc_insertion_point(field_list:tflite.proto.MinibenchmarkSettings.settings_to_test) + return settings_to_test_; +} + +// optional .tflite.proto.ModelFile model_file = 2; +inline bool MinibenchmarkSettings::_internal_has_model_file() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || model_file_ != nullptr); + return value; +} +inline bool MinibenchmarkSettings::has_model_file() const { + return _internal_has_model_file(); +} +inline void MinibenchmarkSettings::clear_model_file() { + if (model_file_ != nullptr) model_file_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::tflite::proto::ModelFile& MinibenchmarkSettings::_internal_model_file() const { + const ::tflite::proto::ModelFile* p = model_file_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_ModelFile_default_instance_); +} +inline const ::tflite::proto::ModelFile& MinibenchmarkSettings::model_file() const { + // @@protoc_insertion_point(field_get:tflite.proto.MinibenchmarkSettings.model_file) + return _internal_model_file(); +} +inline void MinibenchmarkSettings::unsafe_arena_set_allocated_model_file( + ::tflite::proto::ModelFile* model_file) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(model_file_); + } + model_file_ = model_file; + if (model_file) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.MinibenchmarkSettings.model_file) +} +inline ::tflite::proto::ModelFile* MinibenchmarkSettings::release_model_file() { + _has_bits_[0] &= ~0x00000001u; + ::tflite::proto::ModelFile* temp = model_file_; + model_file_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::ModelFile* MinibenchmarkSettings::unsafe_arena_release_model_file() { + // @@protoc_insertion_point(field_release:tflite.proto.MinibenchmarkSettings.model_file) + _has_bits_[0] &= ~0x00000001u; + ::tflite::proto::ModelFile* temp = model_file_; + model_file_ = nullptr; + return temp; +} +inline ::tflite::proto::ModelFile* MinibenchmarkSettings::_internal_mutable_model_file() { + _has_bits_[0] |= 0x00000001u; + if (model_file_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::ModelFile>(GetArenaForAllocation()); + model_file_ = p; + } + return model_file_; +} +inline ::tflite::proto::ModelFile* MinibenchmarkSettings::mutable_model_file() { + ::tflite::proto::ModelFile* _msg = _internal_mutable_model_file(); + // @@protoc_insertion_point(field_mutable:tflite.proto.MinibenchmarkSettings.model_file) + return _msg; +} +inline void MinibenchmarkSettings::set_allocated_model_file(::tflite::proto::ModelFile* model_file) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete model_file_; + } + if (model_file) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(model_file); + if (message_arena != submessage_arena) { + model_file = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, model_file, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + model_file_ = model_file; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.MinibenchmarkSettings.model_file) +} + +// optional .tflite.proto.BenchmarkStoragePaths storage_paths = 3; +inline bool MinibenchmarkSettings::_internal_has_storage_paths() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || storage_paths_ != nullptr); + return value; +} +inline bool MinibenchmarkSettings::has_storage_paths() const { + return _internal_has_storage_paths(); +} +inline void MinibenchmarkSettings::clear_storage_paths() { + if (storage_paths_ != nullptr) storage_paths_->Clear(); + _has_bits_[0] &= ~0x00000002u; +} +inline const ::tflite::proto::BenchmarkStoragePaths& MinibenchmarkSettings::_internal_storage_paths() const { + const ::tflite::proto::BenchmarkStoragePaths* p = storage_paths_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_BenchmarkStoragePaths_default_instance_); +} +inline const ::tflite::proto::BenchmarkStoragePaths& MinibenchmarkSettings::storage_paths() const { + // @@protoc_insertion_point(field_get:tflite.proto.MinibenchmarkSettings.storage_paths) + return _internal_storage_paths(); +} +inline void MinibenchmarkSettings::unsafe_arena_set_allocated_storage_paths( + ::tflite::proto::BenchmarkStoragePaths* storage_paths) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(storage_paths_); + } + storage_paths_ = storage_paths; + if (storage_paths) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.MinibenchmarkSettings.storage_paths) +} +inline ::tflite::proto::BenchmarkStoragePaths* MinibenchmarkSettings::release_storage_paths() { + _has_bits_[0] &= ~0x00000002u; + ::tflite::proto::BenchmarkStoragePaths* temp = storage_paths_; + storage_paths_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::BenchmarkStoragePaths* MinibenchmarkSettings::unsafe_arena_release_storage_paths() { + // @@protoc_insertion_point(field_release:tflite.proto.MinibenchmarkSettings.storage_paths) + _has_bits_[0] &= ~0x00000002u; + ::tflite::proto::BenchmarkStoragePaths* temp = storage_paths_; + storage_paths_ = nullptr; + return temp; +} +inline ::tflite::proto::BenchmarkStoragePaths* MinibenchmarkSettings::_internal_mutable_storage_paths() { + _has_bits_[0] |= 0x00000002u; + if (storage_paths_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::BenchmarkStoragePaths>(GetArenaForAllocation()); + storage_paths_ = p; + } + return storage_paths_; +} +inline ::tflite::proto::BenchmarkStoragePaths* MinibenchmarkSettings::mutable_storage_paths() { + ::tflite::proto::BenchmarkStoragePaths* _msg = _internal_mutable_storage_paths(); + // @@protoc_insertion_point(field_mutable:tflite.proto.MinibenchmarkSettings.storage_paths) + return _msg; +} +inline void MinibenchmarkSettings::set_allocated_storage_paths(::tflite::proto::BenchmarkStoragePaths* storage_paths) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete storage_paths_; + } + if (storage_paths) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(storage_paths); + if (message_arena != submessage_arena) { + storage_paths = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, storage_paths, submessage_arena); + } + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + storage_paths_ = storage_paths; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.MinibenchmarkSettings.storage_paths) +} + +// optional .tflite.proto.ValidationSettings validation_settings = 4; +inline bool MinibenchmarkSettings::_internal_has_validation_settings() const { + bool value = (_has_bits_[0] & 0x00000004u) != 0; + PROTOBUF_ASSUME(!value || validation_settings_ != nullptr); + return value; +} +inline bool MinibenchmarkSettings::has_validation_settings() const { + return _internal_has_validation_settings(); +} +inline void MinibenchmarkSettings::clear_validation_settings() { + if (validation_settings_ != nullptr) validation_settings_->Clear(); + _has_bits_[0] &= ~0x00000004u; +} +inline const ::tflite::proto::ValidationSettings& MinibenchmarkSettings::_internal_validation_settings() const { + const ::tflite::proto::ValidationSettings* p = validation_settings_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_ValidationSettings_default_instance_); +} +inline const ::tflite::proto::ValidationSettings& MinibenchmarkSettings::validation_settings() const { + // @@protoc_insertion_point(field_get:tflite.proto.MinibenchmarkSettings.validation_settings) + return _internal_validation_settings(); +} +inline void MinibenchmarkSettings::unsafe_arena_set_allocated_validation_settings( + ::tflite::proto::ValidationSettings* validation_settings) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(validation_settings_); + } + validation_settings_ = validation_settings; + if (validation_settings) { + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.MinibenchmarkSettings.validation_settings) +} +inline ::tflite::proto::ValidationSettings* MinibenchmarkSettings::release_validation_settings() { + _has_bits_[0] &= ~0x00000004u; + ::tflite::proto::ValidationSettings* temp = validation_settings_; + validation_settings_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::ValidationSettings* MinibenchmarkSettings::unsafe_arena_release_validation_settings() { + // @@protoc_insertion_point(field_release:tflite.proto.MinibenchmarkSettings.validation_settings) + _has_bits_[0] &= ~0x00000004u; + ::tflite::proto::ValidationSettings* temp = validation_settings_; + validation_settings_ = nullptr; + return temp; +} +inline ::tflite::proto::ValidationSettings* MinibenchmarkSettings::_internal_mutable_validation_settings() { + _has_bits_[0] |= 0x00000004u; + if (validation_settings_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::ValidationSettings>(GetArenaForAllocation()); + validation_settings_ = p; + } + return validation_settings_; +} +inline ::tflite::proto::ValidationSettings* MinibenchmarkSettings::mutable_validation_settings() { + ::tflite::proto::ValidationSettings* _msg = _internal_mutable_validation_settings(); + // @@protoc_insertion_point(field_mutable:tflite.proto.MinibenchmarkSettings.validation_settings) + return _msg; +} +inline void MinibenchmarkSettings::set_allocated_validation_settings(::tflite::proto::ValidationSettings* validation_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete validation_settings_; + } + if (validation_settings) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(validation_settings); + if (message_arena != submessage_arena) { + validation_settings = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, validation_settings, submessage_arena); + } + _has_bits_[0] |= 0x00000004u; + } else { + _has_bits_[0] &= ~0x00000004u; + } + validation_settings_ = validation_settings; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.MinibenchmarkSettings.validation_settings) +} + +// ------------------------------------------------------------------- + +// BenchmarkEventStorage + +// optional .tflite.proto.ModelIdGroup model_id_group = 1; +inline bool BenchmarkEventStorage::_internal_has_model_id_group() const { + bool value = (_has_bits_[0] & 0x00000001u) != 0; + PROTOBUF_ASSUME(!value || model_id_group_ != nullptr); + return value; +} +inline bool BenchmarkEventStorage::has_model_id_group() const { + return _internal_has_model_id_group(); +} +inline void BenchmarkEventStorage::clear_model_id_group() { + if (model_id_group_ != nullptr) model_id_group_->Clear(); + _has_bits_[0] &= ~0x00000001u; +} +inline const ::tflite::proto::ModelIdGroup& BenchmarkEventStorage::_internal_model_id_group() const { + const ::tflite::proto::ModelIdGroup* p = model_id_group_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_ModelIdGroup_default_instance_); +} +inline const ::tflite::proto::ModelIdGroup& BenchmarkEventStorage::model_id_group() const { + // @@protoc_insertion_point(field_get:tflite.proto.BenchmarkEventStorage.model_id_group) + return _internal_model_id_group(); +} +inline void BenchmarkEventStorage::unsafe_arena_set_allocated_model_id_group( + ::tflite::proto::ModelIdGroup* model_id_group) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(model_id_group_); + } + model_id_group_ = model_id_group; + if (model_id_group) { + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.BenchmarkEventStorage.model_id_group) +} +inline ::tflite::proto::ModelIdGroup* BenchmarkEventStorage::release_model_id_group() { + _has_bits_[0] &= ~0x00000001u; + ::tflite::proto::ModelIdGroup* temp = model_id_group_; + model_id_group_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::ModelIdGroup* BenchmarkEventStorage::unsafe_arena_release_model_id_group() { + // @@protoc_insertion_point(field_release:tflite.proto.BenchmarkEventStorage.model_id_group) + _has_bits_[0] &= ~0x00000001u; + ::tflite::proto::ModelIdGroup* temp = model_id_group_; + model_id_group_ = nullptr; + return temp; +} +inline ::tflite::proto::ModelIdGroup* BenchmarkEventStorage::_internal_mutable_model_id_group() { + _has_bits_[0] |= 0x00000001u; + if (model_id_group_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::ModelIdGroup>(GetArenaForAllocation()); + model_id_group_ = p; + } + return model_id_group_; +} +inline ::tflite::proto::ModelIdGroup* BenchmarkEventStorage::mutable_model_id_group() { + ::tflite::proto::ModelIdGroup* _msg = _internal_mutable_model_id_group(); + // @@protoc_insertion_point(field_mutable:tflite.proto.BenchmarkEventStorage.model_id_group) + return _msg; +} +inline void BenchmarkEventStorage::set_allocated_model_id_group(::tflite::proto::ModelIdGroup* model_id_group) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete model_id_group_; + } + if (model_id_group) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(model_id_group); + if (message_arena != submessage_arena) { + model_id_group = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, model_id_group, submessage_arena); + } + _has_bits_[0] |= 0x00000001u; + } else { + _has_bits_[0] &= ~0x00000001u; + } + model_id_group_ = model_id_group; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.BenchmarkEventStorage.model_id_group) +} + +// optional .tflite.proto.BenchmarkEvent benchmark_event = 2; +inline bool BenchmarkEventStorage::_internal_has_benchmark_event() const { + bool value = (_has_bits_[0] & 0x00000002u) != 0; + PROTOBUF_ASSUME(!value || benchmark_event_ != nullptr); + return value; +} +inline bool BenchmarkEventStorage::has_benchmark_event() const { + return _internal_has_benchmark_event(); +} +inline void BenchmarkEventStorage::clear_benchmark_event() { + if (benchmark_event_ != nullptr) benchmark_event_->Clear(); + _has_bits_[0] &= ~0x00000002u; +} +inline const ::tflite::proto::BenchmarkEvent& BenchmarkEventStorage::_internal_benchmark_event() const { + const ::tflite::proto::BenchmarkEvent* p = benchmark_event_; + return p != nullptr ? *p : reinterpret_cast( + ::tflite::proto::_BenchmarkEvent_default_instance_); +} +inline const ::tflite::proto::BenchmarkEvent& BenchmarkEventStorage::benchmark_event() const { + // @@protoc_insertion_point(field_get:tflite.proto.BenchmarkEventStorage.benchmark_event) + return _internal_benchmark_event(); +} +inline void BenchmarkEventStorage::unsafe_arena_set_allocated_benchmark_event( + ::tflite::proto::BenchmarkEvent* benchmark_event) { + if (GetArenaForAllocation() == nullptr) { + delete reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(benchmark_event_); + } + benchmark_event_ = benchmark_event; + if (benchmark_event) { + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + // @@protoc_insertion_point(field_unsafe_arena_set_allocated:tflite.proto.BenchmarkEventStorage.benchmark_event) +} +inline ::tflite::proto::BenchmarkEvent* BenchmarkEventStorage::release_benchmark_event() { + _has_bits_[0] &= ~0x00000002u; + ::tflite::proto::BenchmarkEvent* temp = benchmark_event_; + benchmark_event_ = nullptr; +#ifdef PROTOBUF_FORCE_COPY_IN_RELEASE + auto* old = reinterpret_cast<::PROTOBUF_NAMESPACE_ID::MessageLite*>(temp); + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + if (GetArenaForAllocation() == nullptr) { delete old; } +#else // PROTOBUF_FORCE_COPY_IN_RELEASE + if (GetArenaForAllocation() != nullptr) { + temp = ::PROTOBUF_NAMESPACE_ID::internal::DuplicateIfNonNull(temp); + } +#endif // !PROTOBUF_FORCE_COPY_IN_RELEASE + return temp; +} +inline ::tflite::proto::BenchmarkEvent* BenchmarkEventStorage::unsafe_arena_release_benchmark_event() { + // @@protoc_insertion_point(field_release:tflite.proto.BenchmarkEventStorage.benchmark_event) + _has_bits_[0] &= ~0x00000002u; + ::tflite::proto::BenchmarkEvent* temp = benchmark_event_; + benchmark_event_ = nullptr; + return temp; +} +inline ::tflite::proto::BenchmarkEvent* BenchmarkEventStorage::_internal_mutable_benchmark_event() { + _has_bits_[0] |= 0x00000002u; + if (benchmark_event_ == nullptr) { + auto* p = CreateMaybeMessage<::tflite::proto::BenchmarkEvent>(GetArenaForAllocation()); + benchmark_event_ = p; + } + return benchmark_event_; +} +inline ::tflite::proto::BenchmarkEvent* BenchmarkEventStorage::mutable_benchmark_event() { + ::tflite::proto::BenchmarkEvent* _msg = _internal_mutable_benchmark_event(); + // @@protoc_insertion_point(field_mutable:tflite.proto.BenchmarkEventStorage.benchmark_event) + return _msg; +} +inline void BenchmarkEventStorage::set_allocated_benchmark_event(::tflite::proto::BenchmarkEvent* benchmark_event) { + ::PROTOBUF_NAMESPACE_ID::Arena* message_arena = GetArenaForAllocation(); + if (message_arena == nullptr) { + delete benchmark_event_; + } + if (benchmark_event) { + ::PROTOBUF_NAMESPACE_ID::Arena* submessage_arena = + ::PROTOBUF_NAMESPACE_ID::Arena::InternalGetOwningArena(benchmark_event); + if (message_arena != submessage_arena) { + benchmark_event = ::PROTOBUF_NAMESPACE_ID::internal::GetOwnedMessage( + message_arena, benchmark_event, submessage_arena); + } + _has_bits_[0] |= 0x00000002u; + } else { + _has_bits_[0] &= ~0x00000002u; + } + benchmark_event_ = benchmark_event; + // @@protoc_insertion_point(field_set_allocated:tflite.proto.BenchmarkEventStorage.benchmark_event) +} + +#ifdef __GNUC__ + #pragma GCC diagnostic pop +#endif // __GNUC__ +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + +// ------------------------------------------------------------------- + + +// @@protoc_insertion_point(namespace_scope) + +} // namespace proto +} // namespace tflite + +PROTOBUF_NAMESPACE_OPEN + +template <> struct is_proto_enum< ::tflite::proto::CoreMLSettings_EnabledDevices> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tflite::proto::CoreMLSettings_EnabledDevices>() { + return ::tflite::proto::CoreMLSettings_EnabledDevices_descriptor(); +} +template <> struct is_proto_enum< ::tflite::proto::EdgeTpuDeviceSpec_PlatformType> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tflite::proto::EdgeTpuDeviceSpec_PlatformType>() { + return ::tflite::proto::EdgeTpuDeviceSpec_PlatformType_descriptor(); +} +template <> struct is_proto_enum< ::tflite::proto::EdgeTpuSettings_FloatTruncationType> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tflite::proto::EdgeTpuSettings_FloatTruncationType>() { + return ::tflite::proto::EdgeTpuSettings_FloatTruncationType_descriptor(); +} +template <> struct is_proto_enum< ::tflite::proto::EdgeTpuSettings_QosClass> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tflite::proto::EdgeTpuSettings_QosClass>() { + return ::tflite::proto::EdgeTpuSettings_QosClass_descriptor(); +} +template <> struct is_proto_enum< ::tflite::proto::GoogleEdgeTpuSettings_Priority> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tflite::proto::GoogleEdgeTpuSettings_Priority>() { + return ::tflite::proto::GoogleEdgeTpuSettings_Priority_descriptor(); +} +template <> struct is_proto_enum< ::tflite::proto::GoogleEdgeTpuSettings_TriState> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tflite::proto::GoogleEdgeTpuSettings_TriState>() { + return ::tflite::proto::GoogleEdgeTpuSettings_TriState_descriptor(); +} +template <> struct is_proto_enum< ::tflite::proto::CoralSettings_Performance> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tflite::proto::CoralSettings_Performance>() { + return ::tflite::proto::CoralSettings_Performance_descriptor(); +} +template <> struct is_proto_enum< ::tflite::proto::ExecutionPreference> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tflite::proto::ExecutionPreference>() { + return ::tflite::proto::ExecutionPreference_descriptor(); +} +template <> struct is_proto_enum< ::tflite::proto::Delegate> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tflite::proto::Delegate>() { + return ::tflite::proto::Delegate_descriptor(); +} +template <> struct is_proto_enum< ::tflite::proto::NNAPIExecutionPreference> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tflite::proto::NNAPIExecutionPreference>() { + return ::tflite::proto::NNAPIExecutionPreference_descriptor(); +} +template <> struct is_proto_enum< ::tflite::proto::NNAPIExecutionPriority> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tflite::proto::NNAPIExecutionPriority>() { + return ::tflite::proto::NNAPIExecutionPriority_descriptor(); +} +template <> struct is_proto_enum< ::tflite::proto::GPUBackend> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tflite::proto::GPUBackend>() { + return ::tflite::proto::GPUBackend_descriptor(); +} +template <> struct is_proto_enum< ::tflite::proto::GPUInferencePriority> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tflite::proto::GPUInferencePriority>() { + return ::tflite::proto::GPUInferencePriority_descriptor(); +} +template <> struct is_proto_enum< ::tflite::proto::GPUInferenceUsage> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tflite::proto::GPUInferenceUsage>() { + return ::tflite::proto::GPUInferenceUsage_descriptor(); +} +template <> struct is_proto_enum< ::tflite::proto::XNNPackFlags> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tflite::proto::XNNPackFlags>() { + return ::tflite::proto::XNNPackFlags_descriptor(); +} +template <> struct is_proto_enum< ::tflite::proto::EdgeTpuPowerState> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tflite::proto::EdgeTpuPowerState>() { + return ::tflite::proto::EdgeTpuPowerState_descriptor(); +} +template <> struct is_proto_enum< ::tflite::proto::BenchmarkEventType> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tflite::proto::BenchmarkEventType>() { + return ::tflite::proto::BenchmarkEventType_descriptor(); +} +template <> struct is_proto_enum< ::tflite::proto::BenchmarkStage> : ::std::true_type {}; +template <> +inline const EnumDescriptor* GetEnumDescriptor< ::tflite::proto::BenchmarkStage>() { + return ::tflite::proto::BenchmarkStage_descriptor(); +} + +PROTOBUF_NAMESPACE_CLOSE + +// @@protoc_insertion_point(global_scope) + +#include +#endif // GOOGLE_PROTOBUF_INCLUDED_GOOGLE_PROTOBUF_INCLUDED_tensorflow_2flite_2facceleration_2fconfiguration_2fconfiguration_2eproto diff --git a/patches/0001-Change-zu-to-lu.patch b/patches/0001-Change-zu-to-lu.patch deleted file mode 100644 index d68a26e..0000000 --- a/patches/0001-Change-zu-to-lu.patch +++ /dev/null @@ -1,47 +0,0 @@ -From f34b41fd728c06517a1223178af2fbb97dce5dfe Mon Sep 17 00:00:00 2001 -From: George Muraru -Date: Tue, 21 Apr 2020 23:16:50 +0300 -Subject: [PATCH 1/1] Change zu to lu - ---- - tensorflow/lite/optional_debug_tools.cc | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/tensorflow/lite/optional_debug_tools.cc b/tensorflow/lite/optional_debug_tools.cc -index a59af3d..c9339b0 100644 ---- a/tensorflow/lite/optional_debug_tools.cc -+++ b/tensorflow/lite/optional_debug_tools.cc -@@ -80,7 +80,7 @@ const char* AllocTypeName(TfLiteAllocationType type) { - - // Prints a dump of what tensors and what nodes are in the interpreter. - void PrintInterpreterState(Interpreter* interpreter) { -- printf("Interpreter has %zu tensors and %zu nodes\n", -+ printf("Interpreter has %lu tensors and %lu nodes\n", - interpreter->tensors_size(), interpreter->nodes_size()); - printf("Inputs:"); - PrintIntVector(interpreter->inputs()); -@@ -90,7 +90,7 @@ void PrintInterpreterState(Interpreter* interpreter) { - for (size_t tensor_index = 0; tensor_index < interpreter->tensors_size(); - tensor_index++) { - TfLiteTensor* tensor = interpreter->tensor(static_cast(tensor_index)); -- printf("Tensor %3zu %-20s %10s %15s %10zu bytes (%4.1f MB) ", tensor_index, -+ printf("Tensor %3lu %-20s %10s %15s %10lu bytes (%4.1f MB) ", tensor_index, - tensor->name, TensorTypeName(tensor->type), - AllocTypeName(tensor->allocation_type), tensor->bytes, - (static_cast(tensor->bytes) / (1 << 20))); -@@ -104,10 +104,10 @@ void PrintInterpreterState(Interpreter* interpreter) { - const TfLiteNode& node = node_and_reg->first; - const TfLiteRegistration& reg = node_and_reg->second; - if (reg.custom_name != nullptr) { -- printf("Node %3zu Operator Custom Name %s\n", node_index, -+ printf("Node %3lu Operator Custom Name %s\n", node_index, - reg.custom_name); - } else { -- printf("Node %3zu Operator Builtin Code %3d\n", node_index, -+ printf("Node %3lu Operator Builtin Code %3d\n", node_index, - reg.builtin_code); - } - printf(" Inputs:"); --- -2.17.1 - diff --git a/patches/0001-Remove-__builtln_clrsbdi2.patch b/patches/0001-Remove-__builtln_clrsbdi2.patch new file mode 100644 index 0000000..42d90f9 --- /dev/null +++ b/patches/0001-Remove-__builtln_clrsbdi2.patch @@ -0,0 +1,22 @@ +diff --git a/tensorflow/lite/kernels/internal/common.h b/tensorflow/lite/kernels/internal/common.h +index 949791f..b37809d 100644 +--- a/tensorflow/lite/kernels/internal/common.h ++++ b/tensorflow/lite/kernels/internal/common.h +@@ -349,17 +349,12 @@ int CountLeadingZeros(T integer_input) { + template + inline int CountLeadingSignBits(T integer_input) { + static_assert(std::is_signed::value, "Only signed integer types handled."); +-#if defined(__GNUC__) && !defined(__clang__) +- return integer_input ? __builtin_clrsb(integer_input) +- : std::numeric_limits::digits; +-#else + using U = typename std::make_unsigned::type; + return integer_input >= 0 + ? CountLeadingZeros(static_cast(integer_input)) - 1 + : integer_input != std::numeric_limits::min() + ? CountLeadingZeros(2 * static_cast(-integer_input) - 1) + : 0; +-#endif + } + + // Use "count leading zeros" helper functions to do a fast Floor(log_2(x)). diff --git a/patches/0002-solve-the-problem-of-the-file-link-of-the-same-name.patch b/patches/0002-solve-the-problem-of-the-file-link-of-the-same-name.patch new file mode 100644 index 0000000..292bbd3 --- /dev/null +++ b/patches/0002-solve-the-problem-of-the-file-link-of-the-same-name.patch @@ -0,0 +1,30 @@ +From 9c82a81c1df62ab471fdfb63f5330b407c60b4ce Mon Sep 17 00:00:00 2001 +From: wangguokun +Date: Wed, 7 Aug 2024 15:16:23 +0800 +Subject: [PATCH] solve the problem of the file link of the same name + +Signed-off-by: wangguokun +--- + .../lite/kernels/internal/{common.cc => common_noinline.cc} | 0 + ...portable_tensor_utils.cc => portable_tensor_utils_noinline.cc} | 0 + .../reference/{comparisons.cc => comparisons_noinline.cc} | 0 + 3 files changed, 0 insertions(+), 0 deletions(-) + rename tensorflow/lite/kernels/internal/{common.cc => common_noinline.cc} (100%) + rename tensorflow/lite/kernels/internal/{portable_tensor_utils.cc => portable_tensor_utils_noinline.cc} (100%) + rename tensorflow/lite/kernels/internal/reference/{comparisons.cc => comparisons_noinline.cc} (100%) + +diff --git a/tensorflow/lite/kernels/internal/common.cc b/tensorflow/lite/kernels/internal/common_noinline.cc +similarity index 100% +rename from tensorflow/lite/kernels/internal/common.cc +rename to tensorflow/lite/kernels/internal/common_noinline.cc +diff --git a/tensorflow/lite/kernels/internal/portable_tensor_utils.cc b/tensorflow/lite/kernels/internal/portable_tensor_utils_noinline.cc +similarity index 100% +rename from tensorflow/lite/kernels/internal/portable_tensor_utils.cc +rename to tensorflow/lite/kernels/internal/portable_tensor_utils_noinline.cc +diff --git a/tensorflow/lite/kernels/internal/reference/comparisons.cc b/tensorflow/lite/kernels/internal/reference/comparisons_noinline.cc +similarity index 100% +rename from tensorflow/lite/kernels/internal/reference/comparisons.cc +rename to tensorflow/lite/kernels/internal/reference/comparisons_noinline.cc +-- +2.34.1 + -- Gitee