// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: object_detection/protos/ssd_anchor_generator.proto

#include "object_detection/protos/ssd_anchor_generator.pb.h"

#include <algorithm>

#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/extension_set.h>
#include <google/protobuf/wire_format_lite.h>
#include <google/protobuf/descriptor.h>
#include <google/protobuf/generated_message_reflection.h>
#include <google/protobuf/reflection_ops.h>
#include <google/protobuf/wire_format.h>
// @@protoc_insertion_point(includes)
#include <google/protobuf/port_def.inc>

PROTOBUF_PRAGMA_INIT_SEG

namespace _pb = ::PROTOBUF_NAMESPACE_ID;
namespace _pbi = _pb::internal;

namespace object_detection {
namespace protos {
PROTOBUF_CONSTEXPR SsdAnchorGenerator::SsdAnchorGenerator(
    ::_pbi::ConstantInitialized): _impl_{
    /*decltype(_impl_._has_bits_)*/{}
  , /*decltype(_impl_._cached_size_)*/{}
  , /*decltype(_impl_.aspect_ratios_)*/{}
  , /*decltype(_impl_.height_stride_)*/{}
  , /*decltype(_impl_.width_stride_)*/{}
  , /*decltype(_impl_.height_offset_)*/{}
  , /*decltype(_impl_.width_offset_)*/{}
  , /*decltype(_impl_.scales_)*/{}
  , /*decltype(_impl_.interpolated_scale_aspect_ratio_)*/1
  , /*decltype(_impl_.num_layers_)*/6
  , /*decltype(_impl_.min_scale_)*/0.2f
  , /*decltype(_impl_.max_scale_)*/0.95f
  , /*decltype(_impl_.reduce_boxes_in_lowest_layer_)*/true
  , /*decltype(_impl_.base_anchor_height_)*/1
  , /*decltype(_impl_.base_anchor_width_)*/1} {}
struct SsdAnchorGeneratorDefaultTypeInternal {
  PROTOBUF_CONSTEXPR SsdAnchorGeneratorDefaultTypeInternal()
      : _instance(::_pbi::ConstantInitialized{}) {}
  ~SsdAnchorGeneratorDefaultTypeInternal() {}
  union {
    SsdAnchorGenerator _instance;
  };
};
PROTOBUF_ATTRIBUTE_NO_DESTROY PROTOBUF_CONSTINIT PROTOBUF_ATTRIBUTE_INIT_PRIORITY1 SsdAnchorGeneratorDefaultTypeInternal _SsdAnchorGenerator_default_instance_;
}  // namespace protos
}  // namespace object_detection
static ::_pb::Metadata file_level_metadata_object_5fdetection_2fprotos_2fssd_5fanchor_5fgenerator_2eproto[1];
static constexpr ::_pb::EnumDescriptor const** file_level_enum_descriptors_object_5fdetection_2fprotos_2fssd_5fanchor_5fgenerator_2eproto = nullptr;
static constexpr ::_pb::ServiceDescriptor const** file_level_service_descriptors_object_5fdetection_2fprotos_2fssd_5fanchor_5fgenerator_2eproto = nullptr;

const uint32_t TableStruct_object_5fdetection_2fprotos_2fssd_5fanchor_5fgenerator_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::SsdAnchorGenerator, _impl_._has_bits_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::SsdAnchorGenerator, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  ~0u,  // no _inlined_string_donated_
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::SsdAnchorGenerator, _impl_.num_layers_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::SsdAnchorGenerator, _impl_.min_scale_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::SsdAnchorGenerator, _impl_.max_scale_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::SsdAnchorGenerator, _impl_.scales_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::SsdAnchorGenerator, _impl_.aspect_ratios_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::SsdAnchorGenerator, _impl_.interpolated_scale_aspect_ratio_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::SsdAnchorGenerator, _impl_.reduce_boxes_in_lowest_layer_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::SsdAnchorGenerator, _impl_.base_anchor_height_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::SsdAnchorGenerator, _impl_.base_anchor_width_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::SsdAnchorGenerator, _impl_.height_stride_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::SsdAnchorGenerator, _impl_.width_stride_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::SsdAnchorGenerator, _impl_.height_offset_),
  PROTOBUF_FIELD_OFFSET(::object_detection::protos::SsdAnchorGenerator, _impl_.width_offset_),
  1,
  2,
  3,
  ~0u,
  ~0u,
  0,
  4,
  5,
  6,
  ~0u,
  ~0u,
  ~0u,
  ~0u,
};
static const ::_pbi::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, 19, -1, sizeof(::object_detection::protos::SsdAnchorGenerator)},
};

static const ::_pb::Message* const file_default_instances[] = {
  &::object_detection::protos::_SsdAnchorGenerator_default_instance_._instance,
};

const char descriptor_table_protodef_object_5fdetection_2fprotos_2fssd_5fanchor_5fgenerator_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n2object_detection/protos/ssd_anchor_gen"
  "erator.proto\022\027object_detection.protos\"\362\002"
  "\n\022SsdAnchorGenerator\022\025\n\nnum_layers\030\001 \001(\005"
  ":\0016\022\026\n\tmin_scale\030\002 \001(\002:\0030.2\022\027\n\tmax_scale"
  "\030\003 \001(\002:\0040.95\022\016\n\006scales\030\014 \003(\002\022\025\n\raspect_r"
  "atios\030\004 \003(\002\022*\n\037interpolated_scale_aspect"
  "_ratio\030\r \001(\002:\0011\022*\n\034reduce_boxes_in_lowes"
  "t_layer\030\005 \001(\010:\004true\022\035\n\022base_anchor_heigh"
  "t\030\006 \001(\002:\0011\022\034\n\021base_anchor_width\030\007 \001(\002:\0011"
  "\022\025\n\rheight_stride\030\010 \003(\005\022\024\n\014width_stride\030"
  "\t \003(\005\022\025\n\rheight_offset\030\n \003(\005\022\024\n\014width_of"
  "fset\030\013 \003(\005"
  ;
static ::_pbi::once_flag descriptor_table_object_5fdetection_2fprotos_2fssd_5fanchor_5fgenerator_2eproto_once;
const ::_pbi::DescriptorTable descriptor_table_object_5fdetection_2fprotos_2fssd_5fanchor_5fgenerator_2eproto = {
    false, false, 450, descriptor_table_protodef_object_5fdetection_2fprotos_2fssd_5fanchor_5fgenerator_2eproto,
    "object_detection/protos/ssd_anchor_generator.proto",
    &descriptor_table_object_5fdetection_2fprotos_2fssd_5fanchor_5fgenerator_2eproto_once, nullptr, 0, 1,
    schemas, file_default_instances, TableStruct_object_5fdetection_2fprotos_2fssd_5fanchor_5fgenerator_2eproto::offsets,
    file_level_metadata_object_5fdetection_2fprotos_2fssd_5fanchor_5fgenerator_2eproto, file_level_enum_descriptors_object_5fdetection_2fprotos_2fssd_5fanchor_5fgenerator_2eproto,
    file_level_service_descriptors_object_5fdetection_2fprotos_2fssd_5fanchor_5fgenerator_2eproto,
};
PROTOBUF_ATTRIBUTE_WEAK const ::_pbi::DescriptorTable* descriptor_table_object_5fdetection_2fprotos_2fssd_5fanchor_5fgenerator_2eproto_getter() {
  return &descriptor_table_object_5fdetection_2fprotos_2fssd_5fanchor_5fgenerator_2eproto;
}

// Force running AddDescriptors() at dynamic initialization time.
PROTOBUF_ATTRIBUTE_INIT_PRIORITY2 static ::_pbi::AddDescriptorsRunner dynamic_init_dummy_object_5fdetection_2fprotos_2fssd_5fanchor_5fgenerator_2eproto(&descriptor_table_object_5fdetection_2fprotos_2fssd_5fanchor_5fgenerator_2eproto);
namespace object_detection {
namespace protos {

// ===================================================================

class SsdAnchorGenerator::_Internal {
 public:
  using HasBits = decltype(std::declval<SsdAnchorGenerator>()._impl_._has_bits_);
  static void set_has_num_layers(HasBits* has_bits) {
    (*has_bits)[0] |= 2u;
  }
  static void set_has_min_scale(HasBits* has_bits) {
    (*has_bits)[0] |= 4u;
  }
  static void set_has_max_scale(HasBits* has_bits) {
    (*has_bits)[0] |= 8u;
  }
  static void set_has_interpolated_scale_aspect_ratio(HasBits* has_bits) {
    (*has_bits)[0] |= 1u;
  }
  static void set_has_reduce_boxes_in_lowest_layer(HasBits* has_bits) {
    (*has_bits)[0] |= 16u;
  }
  static void set_has_base_anchor_height(HasBits* has_bits) {
    (*has_bits)[0] |= 32u;
  }
  static void set_has_base_anchor_width(HasBits* has_bits) {
    (*has_bits)[0] |= 64u;
  }
};

SsdAnchorGenerator::SsdAnchorGenerator(::PROTOBUF_NAMESPACE_ID::Arena* arena,
                         bool is_message_owned)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena, is_message_owned) {
  SharedCtor(arena, is_message_owned);
  // @@protoc_insertion_point(arena_constructor:object_detection.protos.SsdAnchorGenerator)
}
SsdAnchorGenerator::SsdAnchorGenerator(const SsdAnchorGenerator& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  SsdAnchorGenerator* const _this = this; (void)_this;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){from._impl_._has_bits_}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.aspect_ratios_){from._impl_.aspect_ratios_}
    , decltype(_impl_.height_stride_){from._impl_.height_stride_}
    , decltype(_impl_.width_stride_){from._impl_.width_stride_}
    , decltype(_impl_.height_offset_){from._impl_.height_offset_}
    , decltype(_impl_.width_offset_){from._impl_.width_offset_}
    , decltype(_impl_.scales_){from._impl_.scales_}
    , decltype(_impl_.interpolated_scale_aspect_ratio_){}
    , decltype(_impl_.num_layers_){}
    , decltype(_impl_.min_scale_){}
    , decltype(_impl_.max_scale_){}
    , decltype(_impl_.reduce_boxes_in_lowest_layer_){}
    , decltype(_impl_.base_anchor_height_){}
    , decltype(_impl_.base_anchor_width_){}};

  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&_impl_.interpolated_scale_aspect_ratio_, &from._impl_.interpolated_scale_aspect_ratio_,
    static_cast<size_t>(reinterpret_cast<char*>(&_impl_.base_anchor_width_) -
    reinterpret_cast<char*>(&_impl_.interpolated_scale_aspect_ratio_)) + sizeof(_impl_.base_anchor_width_));
  // @@protoc_insertion_point(copy_constructor:object_detection.protos.SsdAnchorGenerator)
}

inline void SsdAnchorGenerator::SharedCtor(
    ::_pb::Arena* arena, bool is_message_owned) {
  (void)arena;
  (void)is_message_owned;
  new (&_impl_) Impl_{
      decltype(_impl_._has_bits_){}
    , /*decltype(_impl_._cached_size_)*/{}
    , decltype(_impl_.aspect_ratios_){arena}
    , decltype(_impl_.height_stride_){arena}
    , decltype(_impl_.width_stride_){arena}
    , decltype(_impl_.height_offset_){arena}
    , decltype(_impl_.width_offset_){arena}
    , decltype(_impl_.scales_){arena}
    , decltype(_impl_.interpolated_scale_aspect_ratio_){1}
    , decltype(_impl_.num_layers_){6}
    , decltype(_impl_.min_scale_){0.2f}
    , decltype(_impl_.max_scale_){0.95f}
    , decltype(_impl_.reduce_boxes_in_lowest_layer_){true}
    , decltype(_impl_.base_anchor_height_){1}
    , decltype(_impl_.base_anchor_width_){1}
  };
}

SsdAnchorGenerator::~SsdAnchorGenerator() {
  // @@protoc_insertion_point(destructor:object_detection.protos.SsdAnchorGenerator)
  if (auto *arena = _internal_metadata_.DeleteReturnArena<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>()) {
  (void)arena;
    return;
  }
  SharedDtor();
}

inline void SsdAnchorGenerator::SharedDtor() {
  GOOGLE_DCHECK(GetArenaForAllocation() == nullptr);
  _impl_.aspect_ratios_.~RepeatedField();
  _impl_.height_stride_.~RepeatedField();
  _impl_.width_stride_.~RepeatedField();
  _impl_.height_offset_.~RepeatedField();
  _impl_.width_offset_.~RepeatedField();
  _impl_.scales_.~RepeatedField();
}

void SsdAnchorGenerator::SetCachedSize(int size) const {
  _impl_._cached_size_.Set(size);
}

void SsdAnchorGenerator::Clear() {
// @@protoc_insertion_point(message_clear_start:object_detection.protos.SsdAnchorGenerator)
  uint32_t cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  _impl_.aspect_ratios_.Clear();
  _impl_.height_stride_.Clear();
  _impl_.width_stride_.Clear();
  _impl_.height_offset_.Clear();
  _impl_.width_offset_.Clear();
  _impl_.scales_.Clear();
  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000007fu) {
    _impl_.interpolated_scale_aspect_ratio_ = 1;
    _impl_.num_layers_ = 6;
    _impl_.min_scale_ = 0.2f;
    _impl_.max_scale_ = 0.95f;
    _impl_.reduce_boxes_in_lowest_layer_ = true;
    _impl_.base_anchor_height_ = 1;
    _impl_.base_anchor_width_ = 1;
  }
  _impl_._has_bits_.Clear();
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* SsdAnchorGenerator::_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_layers = 1 [default = 6];
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 8)) {
          _Internal::set_has_num_layers(&has_bits);
          _impl_.num_layers_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float min_scale = 2 [default = 0.2];
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 21)) {
          _Internal::set_has_min_scale(&has_bits);
          _impl_.min_scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float max_scale = 3 [default = 0.95];
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 29)) {
          _Internal::set_has_max_scale(&has_bits);
          _impl_.max_scale_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // repeated float aspect_ratios = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 37)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_aspect_ratios(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
            ptr += sizeof(float);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<37>(ptr));
        } else if (static_cast<uint8_t>(tag) == 34) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_aspect_ratios(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional bool reduce_boxes_in_lowest_layer = 5 [default = true];
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 40)) {
          _Internal::set_has_reduce_boxes_in_lowest_layer(&has_bits);
          _impl_.reduce_boxes_in_lowest_layer_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float base_anchor_height = 6 [default = 1];
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 53)) {
          _Internal::set_has_base_anchor_height(&has_bits);
          _impl_.base_anchor_height_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // optional float base_anchor_width = 7 [default = 1];
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 61)) {
          _Internal::set_has_base_anchor_width(&has_bits);
          _impl_.base_anchor_width_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr);
          ptr += sizeof(float);
        } else
          goto handle_unusual;
        continue;
      // repeated int32 height_stride = 8;
      case 8:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 64)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_height_stride(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<64>(ptr));
        } else if (static_cast<uint8_t>(tag) == 66) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_height_stride(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated int32 width_stride = 9;
      case 9:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 72)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_width_stride(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<72>(ptr));
        } else if (static_cast<uint8_t>(tag) == 74) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_width_stride(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated int32 height_offset = 10;
      case 10:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 80)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_height_offset(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<80>(ptr));
        } else if (static_cast<uint8_t>(tag) == 82) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_height_offset(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated int32 width_offset = 11;
      case 11:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 88)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_width_offset(::PROTOBUF_NAMESPACE_ID::internal::ReadVarint32(&ptr));
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<88>(ptr));
        } else if (static_cast<uint8_t>(tag) == 90) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedInt32Parser(_internal_mutable_width_offset(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // repeated float scales = 12;
      case 12:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 101)) {
          ptr -= 1;
          do {
            ptr += 1;
            _internal_add_scales(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
            ptr += sizeof(float);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<101>(ptr));
        } else if (static_cast<uint8_t>(tag) == 98) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_scales(), ptr, ctx);
          CHK_(ptr);
        } else
          goto handle_unusual;
        continue;
      // optional float interpolated_scale_aspect_ratio = 13 [default = 1];
      case 13:
        if (PROTOBUF_PREDICT_TRUE(static_cast<uint8_t>(tag) == 109)) {
          _Internal::set_has_interpolated_scale_aspect_ratio(&has_bits);
          _impl_.interpolated_scale_aspect_ratio_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(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:
  _impl_._has_bits_.Or(has_bits);
  return ptr;
failure:
  ptr = nullptr;
  goto message_done;
#undef CHK_
}

uint8_t* SsdAnchorGenerator::_InternalSerialize(
    uint8_t* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:object_detection.protos.SsdAnchorGenerator)
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _impl_._has_bits_[0];
  // optional int32 num_layers = 1 [default = 6];
  if (cached_has_bits & 0x00000002u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(1, this->_internal_num_layers(), target);
  }

  // optional float min_scale = 2 [default = 0.2];
  if (cached_has_bits & 0x00000004u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(2, this->_internal_min_scale(), target);
  }

  // optional float max_scale = 3 [default = 0.95];
  if (cached_has_bits & 0x00000008u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(3, this->_internal_max_scale(), target);
  }

  // repeated float aspect_ratios = 4;
  for (int i = 0, n = this->_internal_aspect_ratios_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(4, this->_internal_aspect_ratios(i), target);
  }

  // optional bool reduce_boxes_in_lowest_layer = 5 [default = true];
  if (cached_has_bits & 0x00000010u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteBoolToArray(5, this->_internal_reduce_boxes_in_lowest_layer(), target);
  }

  // optional float base_anchor_height = 6 [default = 1];
  if (cached_has_bits & 0x00000020u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(6, this->_internal_base_anchor_height(), target);
  }

  // optional float base_anchor_width = 7 [default = 1];
  if (cached_has_bits & 0x00000040u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(7, this->_internal_base_anchor_width(), target);
  }

  // repeated int32 height_stride = 8;
  for (int i = 0, n = this->_internal_height_stride_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(8, this->_internal_height_stride(i), target);
  }

  // repeated int32 width_stride = 9;
  for (int i = 0, n = this->_internal_width_stride_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(9, this->_internal_width_stride(i), target);
  }

  // repeated int32 height_offset = 10;
  for (int i = 0, n = this->_internal_height_offset_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(10, this->_internal_height_offset(i), target);
  }

  // repeated int32 width_offset = 11;
  for (int i = 0, n = this->_internal_width_offset_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteInt32ToArray(11, this->_internal_width_offset(i), target);
  }

  // repeated float scales = 12;
  for (int i = 0, n = this->_internal_scales_size(); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(12, this->_internal_scales(i), target);
  }

  // optional float interpolated_scale_aspect_ratio = 13 [default = 1];
  if (cached_has_bits & 0x00000001u) {
    target = stream->EnsureSpace(target);
    target = ::_pbi::WireFormatLite::WriteFloatToArray(13, this->_internal_interpolated_scale_aspect_ratio(), 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:object_detection.protos.SsdAnchorGenerator)
  return target;
}

size_t SsdAnchorGenerator::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:object_detection.protos.SsdAnchorGenerator)
  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 aspect_ratios = 4;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_aspect_ratios_size());
    size_t data_size = 4UL * count;
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_aspect_ratios_size());
    total_size += data_size;
  }

  // repeated int32 height_stride = 8;
  {
    size_t data_size = ::_pbi::WireFormatLite::
      Int32Size(this->_impl_.height_stride_);
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_height_stride_size());
    total_size += data_size;
  }

  // repeated int32 width_stride = 9;
  {
    size_t data_size = ::_pbi::WireFormatLite::
      Int32Size(this->_impl_.width_stride_);
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_width_stride_size());
    total_size += data_size;
  }

  // repeated int32 height_offset = 10;
  {
    size_t data_size = ::_pbi::WireFormatLite::
      Int32Size(this->_impl_.height_offset_);
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_height_offset_size());
    total_size += data_size;
  }

  // repeated int32 width_offset = 11;
  {
    size_t data_size = ::_pbi::WireFormatLite::
      Int32Size(this->_impl_.width_offset_);
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_width_offset_size());
    total_size += data_size;
  }

  // repeated float scales = 12;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_scales_size());
    size_t data_size = 4UL * count;
    total_size += 1 *
                  ::_pbi::FromIntSize(this->_internal_scales_size());
    total_size += data_size;
  }

  cached_has_bits = _impl_._has_bits_[0];
  if (cached_has_bits & 0x0000007fu) {
    // optional float interpolated_scale_aspect_ratio = 13 [default = 1];
    if (cached_has_bits & 0x00000001u) {
      total_size += 1 + 4;
    }

    // optional int32 num_layers = 1 [default = 6];
    if (cached_has_bits & 0x00000002u) {
      total_size += ::_pbi::WireFormatLite::Int32SizePlusOne(this->_internal_num_layers());
    }

    // optional float min_scale = 2 [default = 0.2];
    if (cached_has_bits & 0x00000004u) {
      total_size += 1 + 4;
    }

    // optional float max_scale = 3 [default = 0.95];
    if (cached_has_bits & 0x00000008u) {
      total_size += 1 + 4;
    }

    // optional bool reduce_boxes_in_lowest_layer = 5 [default = true];
    if (cached_has_bits & 0x00000010u) {
      total_size += 1 + 1;
    }

    // optional float base_anchor_height = 6 [default = 1];
    if (cached_has_bits & 0x00000020u) {
      total_size += 1 + 4;
    }

    // optional float base_anchor_width = 7 [default = 1];
    if (cached_has_bits & 0x00000040u) {
      total_size += 1 + 4;
    }

  }
  return MaybeComputeUnknownFieldsSize(total_size, &_impl_._cached_size_);
}

const ::PROTOBUF_NAMESPACE_ID::Message::ClassData SsdAnchorGenerator::_class_data_ = {
    ::PROTOBUF_NAMESPACE_ID::Message::CopyWithSourceCheck,
    SsdAnchorGenerator::MergeImpl
};
const ::PROTOBUF_NAMESPACE_ID::Message::ClassData*SsdAnchorGenerator::GetClassData() const { return &_class_data_; }


void SsdAnchorGenerator::MergeImpl(::PROTOBUF_NAMESPACE_ID::Message& to_msg, const ::PROTOBUF_NAMESPACE_ID::Message& from_msg) {
  auto* const _this = static_cast<SsdAnchorGenerator*>(&to_msg);
  auto& from = static_cast<const SsdAnchorGenerator&>(from_msg);
  // @@protoc_insertion_point(class_specific_merge_from_start:object_detection.protos.SsdAnchorGenerator)
  GOOGLE_DCHECK_NE(&from, _this);
  uint32_t cached_has_bits = 0;
  (void) cached_has_bits;

  _this->_impl_.aspect_ratios_.MergeFrom(from._impl_.aspect_ratios_);
  _this->_impl_.height_stride_.MergeFrom(from._impl_.height_stride_);
  _this->_impl_.width_stride_.MergeFrom(from._impl_.width_stride_);
  _this->_impl_.height_offset_.MergeFrom(from._impl_.height_offset_);
  _this->_impl_.width_offset_.MergeFrom(from._impl_.width_offset_);
  _this->_impl_.scales_.MergeFrom(from._impl_.scales_);
  cached_has_bits = from._impl_._has_bits_[0];
  if (cached_has_bits & 0x0000007fu) {
    if (cached_has_bits & 0x00000001u) {
      _this->_impl_.interpolated_scale_aspect_ratio_ = from._impl_.interpolated_scale_aspect_ratio_;
    }
    if (cached_has_bits & 0x00000002u) {
      _this->_impl_.num_layers_ = from._impl_.num_layers_;
    }
    if (cached_has_bits & 0x00000004u) {
      _this->_impl_.min_scale_ = from._impl_.min_scale_;
    }
    if (cached_has_bits & 0x00000008u) {
      _this->_impl_.max_scale_ = from._impl_.max_scale_;
    }
    if (cached_has_bits & 0x00000010u) {
      _this->_impl_.reduce_boxes_in_lowest_layer_ = from._impl_.reduce_boxes_in_lowest_layer_;
    }
    if (cached_has_bits & 0x00000020u) {
      _this->_impl_.base_anchor_height_ = from._impl_.base_anchor_height_;
    }
    if (cached_has_bits & 0x00000040u) {
      _this->_impl_.base_anchor_width_ = from._impl_.base_anchor_width_;
    }
    _this->_impl_._has_bits_[0] |= cached_has_bits;
  }
  _this->_internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
}

void SsdAnchorGenerator::CopyFrom(const SsdAnchorGenerator& from) {
// @@protoc_insertion_point(class_specific_copy_from_start:object_detection.protos.SsdAnchorGenerator)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

bool SsdAnchorGenerator::IsInitialized() const {
  return true;
}

void SsdAnchorGenerator::InternalSwap(SsdAnchorGenerator* other) {
  using std::swap;
  _internal_metadata_.InternalSwap(&other->_internal_metadata_);
  swap(_impl_._has_bits_[0], other->_impl_._has_bits_[0]);
  _impl_.aspect_ratios_.InternalSwap(&other->_impl_.aspect_ratios_);
  _impl_.height_stride_.InternalSwap(&other->_impl_.height_stride_);
  _impl_.width_stride_.InternalSwap(&other->_impl_.width_stride_);
  _impl_.height_offset_.InternalSwap(&other->_impl_.height_offset_);
  _impl_.width_offset_.InternalSwap(&other->_impl_.width_offset_);
  _impl_.scales_.InternalSwap(&other->_impl_.scales_);
  swap(_impl_.interpolated_scale_aspect_ratio_, other->_impl_.interpolated_scale_aspect_ratio_);
  swap(_impl_.num_layers_, other->_impl_.num_layers_);
  swap(_impl_.min_scale_, other->_impl_.min_scale_);
  swap(_impl_.max_scale_, other->_impl_.max_scale_);
  swap(_impl_.reduce_boxes_in_lowest_layer_, other->_impl_.reduce_boxes_in_lowest_layer_);
  swap(_impl_.base_anchor_height_, other->_impl_.base_anchor_height_);
  swap(_impl_.base_anchor_width_, other->_impl_.base_anchor_width_);
}

::PROTOBUF_NAMESPACE_ID::Metadata SsdAnchorGenerator::GetMetadata() const {
  return ::_pbi::AssignDescriptors(
      &descriptor_table_object_5fdetection_2fprotos_2fssd_5fanchor_5fgenerator_2eproto_getter, &descriptor_table_object_5fdetection_2fprotos_2fssd_5fanchor_5fgenerator_2eproto_once,
      file_level_metadata_object_5fdetection_2fprotos_2fssd_5fanchor_5fgenerator_2eproto[0]);
}

// @@protoc_insertion_point(namespace_scope)
}  // namespace protos
}  // namespace object_detection
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::object_detection::protos::SsdAnchorGenerator*
Arena::CreateMaybeMessage< ::object_detection::protos::SsdAnchorGenerator >(Arena* arena) {
  return Arena::CreateMessageInternal< ::object_detection::protos::SsdAnchorGenerator >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

// @@protoc_insertion_point(global_scope)
#include <google/protobuf/port_undef.inc>
