// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: sc_manager.proto

#include "sc_manager.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>
extern PROTOBUF_INTERNAL_EXPORT_eigen_5fmatrix_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_Matrix4d_eigen_5fmatrix_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_eigen_5fmatrix_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_MatrixXd_eigen_5fmatrix_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_sc_5fmanager_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_FloatMatrix_sc_5fmanager_2eproto;
extern PROTOBUF_INTERNAL_EXPORT_sc_5fmanager_2eproto ::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_ScanContextDescriptor_sc_5fmanager_2eproto;
namespace scancontext {
class FloatMatrixDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<FloatMatrix> _instance;
} _FloatMatrix_default_instance_;
class ScanContextDescriptorDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<ScanContextDescriptor> _instance;
} _ScanContextDescriptor_default_instance_;
class SCManagerStateDefaultTypeInternal {
 public:
  ::PROTOBUF_NAMESPACE_ID::internal::ExplicitlyConstructed<SCManagerState> _instance;
} _SCManagerState_default_instance_;
}  // namespace scancontext
static void InitDefaultsscc_info_FloatMatrix_sc_5fmanager_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::scancontext::_FloatMatrix_default_instance_;
    new (ptr) ::scancontext::FloatMatrix();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::scancontext::FloatMatrix::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<0> scc_info_FloatMatrix_sc_5fmanager_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 0, 0, InitDefaultsscc_info_FloatMatrix_sc_5fmanager_2eproto}, {}};

static void InitDefaultsscc_info_SCManagerState_sc_5fmanager_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::scancontext::_SCManagerState_default_instance_;
    new (ptr) ::scancontext::SCManagerState();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::scancontext::SCManagerState::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<1> scc_info_SCManagerState_sc_5fmanager_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 1, 0, InitDefaultsscc_info_SCManagerState_sc_5fmanager_2eproto}, {
      &scc_info_ScanContextDescriptor_sc_5fmanager_2eproto.base,}};

static void InitDefaultsscc_info_ScanContextDescriptor_sc_5fmanager_2eproto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::scancontext::_ScanContextDescriptor_default_instance_;
    new (ptr) ::scancontext::ScanContextDescriptor();
    ::PROTOBUF_NAMESPACE_ID::internal::OnShutdownDestroyMessage(ptr);
  }
  ::scancontext::ScanContextDescriptor::InitAsDefaultInstance();
}

::PROTOBUF_NAMESPACE_ID::internal::SCCInfo<3> scc_info_ScanContextDescriptor_sc_5fmanager_2eproto =
    {{ATOMIC_VAR_INIT(::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase::kUninitialized), 3, 0, InitDefaultsscc_info_ScanContextDescriptor_sc_5fmanager_2eproto}, {
      &scc_info_MatrixXd_eigen_5fmatrix_2eproto.base,
      &scc_info_FloatMatrix_sc_5fmanager_2eproto.base,
      &scc_info_Matrix4d_eigen_5fmatrix_2eproto.base,}};

static ::PROTOBUF_NAMESPACE_ID::Metadata file_level_metadata_sc_5fmanager_2eproto[3];
static constexpr ::PROTOBUF_NAMESPACE_ID::EnumDescriptor const** file_level_enum_descriptors_sc_5fmanager_2eproto = nullptr;
static constexpr ::PROTOBUF_NAMESPACE_ID::ServiceDescriptor const** file_level_service_descriptors_sc_5fmanager_2eproto = nullptr;

const ::PROTOBUF_NAMESPACE_ID::uint32 TableStruct_sc_5fmanager_2eproto::offsets[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::scancontext::FloatMatrix, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::scancontext::FloatMatrix, rows_),
  PROTOBUF_FIELD_OFFSET(::scancontext::FloatMatrix, cols_),
  PROTOBUF_FIELD_OFFSET(::scancontext::FloatMatrix, data_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::scancontext::ScanContextDescriptor, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::scancontext::ScanContextDescriptor, sc_descriptor_),
  PROTOBUF_FIELD_OFFSET(::scancontext::ScanContextDescriptor, ringkey_),
  PROTOBUF_FIELD_OFFSET(::scancontext::ScanContextDescriptor, sectorkey_),
  PROTOBUF_FIELD_OFFSET(::scancontext::ScanContextDescriptor, timestamp_),
  PROTOBUF_FIELD_OFFSET(::scancontext::ScanContextDescriptor, polarcontext_invkeys_mat_),
  PROTOBUF_FIELD_OFFSET(::scancontext::ScanContextDescriptor, pose_),
  PROTOBUF_FIELD_OFFSET(::scancontext::ScanContextDescriptor, frame_id_),
  ~0u,  // no _has_bits_
  PROTOBUF_FIELD_OFFSET(::scancontext::SCManagerState, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  PROTOBUF_FIELD_OFFSET(::scancontext::SCManagerState, lidar_height_),
  PROTOBUF_FIELD_OFFSET(::scancontext::SCManagerState, pc_num_ring_),
  PROTOBUF_FIELD_OFFSET(::scancontext::SCManagerState, pc_num_sector_),
  PROTOBUF_FIELD_OFFSET(::scancontext::SCManagerState, pc_max_radius_),
  PROTOBUF_FIELD_OFFSET(::scancontext::SCManagerState, sc_dist_thres_),
  PROTOBUF_FIELD_OFFSET(::scancontext::SCManagerState, descriptors_),
  PROTOBUF_FIELD_OFFSET(::scancontext::SCManagerState, is_tree_batch_made_),
};
static const ::PROTOBUF_NAMESPACE_ID::internal::MigrationSchema schemas[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) = {
  { 0, -1, sizeof(::scancontext::FloatMatrix)},
  { 8, -1, sizeof(::scancontext::ScanContextDescriptor)},
  { 20, -1, sizeof(::scancontext::SCManagerState)},
};

static ::PROTOBUF_NAMESPACE_ID::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::scancontext::_FloatMatrix_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::scancontext::_ScanContextDescriptor_default_instance_),
  reinterpret_cast<const ::PROTOBUF_NAMESPACE_ID::Message*>(&::scancontext::_SCManagerState_default_instance_),
};

const char descriptor_table_protodef_sc_5fmanager_2eproto[] PROTOBUF_SECTION_VARIABLE(protodesc_cold) =
  "\n\020sc_manager.proto\022\013scancontext\032\022eigen_m"
  "atrix.proto\"7\n\013FloatMatrix\022\014\n\004rows\030\001 \001(\005"
  "\022\014\n\004cols\030\002 \001(\005\022\014\n\004data\030\003 \003(\002\"\205\002\n\025ScanCon"
  "textDescriptor\022&\n\rsc_descriptor\030\001 \001(\0132\017."
  "eigen.MatrixXd\022 \n\007ringkey\030\002 \001(\0132\017.eigen."
  "MatrixXd\022\"\n\tsectorkey\030\003 \001(\0132\017.eigen.Matr"
  "ixXd\022\021\n\ttimestamp\030\004 \001(\001\022:\n\030polarcontext_"
  "invkeys_mat\030\005 \001(\0132\030.scancontext.FloatMat"
  "rix\022\035\n\004pose\030\006 \001(\0132\017.eigen.Matrix4d\022\020\n\010fr"
  "ame_id\030\007 \001(\004\"\325\001\n\016SCManagerState\022\024\n\014lidar"
  "_height\030\001 \001(\001\022\023\n\013pc_num_ring\030\002 \001(\005\022\025\n\rpc"
  "_num_sector\030\003 \001(\005\022\025\n\rpc_max_radius\030\004 \001(\001"
  "\022\025\n\rsc_dist_thres\030\005 \001(\001\0227\n\013descriptors\030\006"
  " \003(\0132\".scancontext.ScanContextDescriptor"
  "\022\032\n\022is_tree_batch_made\030\007 \001(\010b\006proto3"
  ;
static const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable*const descriptor_table_sc_5fmanager_2eproto_deps[1] = {
  &::descriptor_table_eigen_5fmatrix_2eproto,
};
static ::PROTOBUF_NAMESPACE_ID::internal::SCCInfoBase*const descriptor_table_sc_5fmanager_2eproto_sccs[3] = {
  &scc_info_FloatMatrix_sc_5fmanager_2eproto.base,
  &scc_info_SCManagerState_sc_5fmanager_2eproto.base,
  &scc_info_ScanContextDescriptor_sc_5fmanager_2eproto.base,
};
static ::PROTOBUF_NAMESPACE_ID::internal::once_flag descriptor_table_sc_5fmanager_2eproto_once;
const ::PROTOBUF_NAMESPACE_ID::internal::DescriptorTable descriptor_table_sc_5fmanager_2eproto = {
  false, false, descriptor_table_protodef_sc_5fmanager_2eproto, "sc_manager.proto", 596,
  &descriptor_table_sc_5fmanager_2eproto_once, descriptor_table_sc_5fmanager_2eproto_sccs, descriptor_table_sc_5fmanager_2eproto_deps, 3, 1,
  schemas, file_default_instances, TableStruct_sc_5fmanager_2eproto::offsets,
  file_level_metadata_sc_5fmanager_2eproto, 3, file_level_enum_descriptors_sc_5fmanager_2eproto, file_level_service_descriptors_sc_5fmanager_2eproto,
};

// Force running AddDescriptors() at dynamic initialization time.
static bool dynamic_init_dummy_sc_5fmanager_2eproto = (static_cast<void>(::PROTOBUF_NAMESPACE_ID::internal::AddDescriptors(&descriptor_table_sc_5fmanager_2eproto)), true);
namespace scancontext {

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

void FloatMatrix::InitAsDefaultInstance() {
}
class FloatMatrix::_Internal {
 public:
};

FloatMatrix::FloatMatrix(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena),
  data_(arena) {
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:scancontext.FloatMatrix)
}
FloatMatrix::FloatMatrix(const FloatMatrix& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      data_(from.data_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&rows_, &from.rows_,
    static_cast<size_t>(reinterpret_cast<char*>(&cols_) -
    reinterpret_cast<char*>(&rows_)) + sizeof(cols_));
  // @@protoc_insertion_point(copy_constructor:scancontext.FloatMatrix)
}

void FloatMatrix::SharedCtor() {
  ::memset(&rows_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&cols_) -
      reinterpret_cast<char*>(&rows_)) + sizeof(cols_));
}

FloatMatrix::~FloatMatrix() {
  // @@protoc_insertion_point(destructor:scancontext.FloatMatrix)
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

void FloatMatrix::SharedDtor() {
  GOOGLE_DCHECK(GetArena() == nullptr);
}

void FloatMatrix::ArenaDtor(void* object) {
  FloatMatrix* _this = reinterpret_cast< FloatMatrix* >(object);
  (void)_this;
}
void FloatMatrix::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void FloatMatrix::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const FloatMatrix& FloatMatrix::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_FloatMatrix_sc_5fmanager_2eproto.base);
  return *internal_default_instance();
}


void FloatMatrix::Clear() {
// @@protoc_insertion_point(message_clear_start:scancontext.FloatMatrix)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  data_.Clear();
  ::memset(&rows_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&cols_) -
      reinterpret_cast<char*>(&rows_)) + sizeof(cols_));
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* FloatMatrix::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena;
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // int32 rows = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 8)) {
          rows_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // int32 cols = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
          cols_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // repeated float data = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
          ptr = ::PROTOBUF_NAMESPACE_ID::internal::PackedFloatParser(_internal_mutable_data(), ptr, ctx);
          CHK_(ptr);
        } else if (static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 29) {
          _internal_add_data(::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<float>(ptr));
          ptr += sizeof(float);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag,
            _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
            ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* FloatMatrix::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:scancontext.FloatMatrix)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // int32 rows = 1;
  if (this->rows() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(1, this->_internal_rows(), target);
  }

  // int32 cols = 2;
  if (this->cols() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_cols(), target);
  }

  // repeated float data = 3;
  if (this->_internal_data_size() > 0) {
    target = stream->WriteFixedPacked(3, _internal_data(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:scancontext.FloatMatrix)
  return target;
}

size_t FloatMatrix::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:scancontext.FloatMatrix)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated float data = 3;
  {
    unsigned int count = static_cast<unsigned int>(this->_internal_data_size());
    size_t data_size = 4UL * count;
    if (data_size > 0) {
      total_size += 1 +
        ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
            static_cast<::PROTOBUF_NAMESPACE_ID::int32>(data_size));
    }
    int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(data_size);
    _data_cached_byte_size_.store(cached_size,
                                    std::memory_order_relaxed);
    total_size += data_size;
  }

  // int32 rows = 1;
  if (this->rows() != 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
        this->_internal_rows());
  }

  // int32 cols = 2;
  if (this->cols() != 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
        this->_internal_cols());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void FloatMatrix::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:scancontext.FloatMatrix)
  GOOGLE_DCHECK_NE(&from, this);
  const FloatMatrix* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<FloatMatrix>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:scancontext.FloatMatrix)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:scancontext.FloatMatrix)
    MergeFrom(*source);
  }
}

void FloatMatrix::MergeFrom(const FloatMatrix& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:scancontext.FloatMatrix)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  data_.MergeFrom(from.data_);
  if (from.rows() != 0) {
    _internal_set_rows(from._internal_rows());
  }
  if (from.cols() != 0) {
    _internal_set_cols(from._internal_cols());
  }
}

void FloatMatrix::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:scancontext.FloatMatrix)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

void FloatMatrix::InternalSwap(FloatMatrix* other) {
  using std::swap;
  _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
  data_.InternalSwap(&other->data_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(FloatMatrix, cols_)
      + sizeof(FloatMatrix::cols_)
      - PROTOBUF_FIELD_OFFSET(FloatMatrix, rows_)>(
          reinterpret_cast<char*>(&rows_),
          reinterpret_cast<char*>(&other->rows_));
}

::PROTOBUF_NAMESPACE_ID::Metadata FloatMatrix::GetMetadata() const {
  return GetMetadataStatic();
}


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

void ScanContextDescriptor::InitAsDefaultInstance() {
  ::scancontext::_ScanContextDescriptor_default_instance_._instance.get_mutable()->sc_descriptor_ = const_cast< ::eigen::MatrixXd*>(
      ::eigen::MatrixXd::internal_default_instance());
  ::scancontext::_ScanContextDescriptor_default_instance_._instance.get_mutable()->ringkey_ = const_cast< ::eigen::MatrixXd*>(
      ::eigen::MatrixXd::internal_default_instance());
  ::scancontext::_ScanContextDescriptor_default_instance_._instance.get_mutable()->sectorkey_ = const_cast< ::eigen::MatrixXd*>(
      ::eigen::MatrixXd::internal_default_instance());
  ::scancontext::_ScanContextDescriptor_default_instance_._instance.get_mutable()->polarcontext_invkeys_mat_ = const_cast< ::scancontext::FloatMatrix*>(
      ::scancontext::FloatMatrix::internal_default_instance());
  ::scancontext::_ScanContextDescriptor_default_instance_._instance.get_mutable()->pose_ = const_cast< ::eigen::Matrix4d*>(
      ::eigen::Matrix4d::internal_default_instance());
}
class ScanContextDescriptor::_Internal {
 public:
  static const ::eigen::MatrixXd& sc_descriptor(const ScanContextDescriptor* msg);
  static const ::eigen::MatrixXd& ringkey(const ScanContextDescriptor* msg);
  static const ::eigen::MatrixXd& sectorkey(const ScanContextDescriptor* msg);
  static const ::scancontext::FloatMatrix& polarcontext_invkeys_mat(const ScanContextDescriptor* msg);
  static const ::eigen::Matrix4d& pose(const ScanContextDescriptor* msg);
};

const ::eigen::MatrixXd&
ScanContextDescriptor::_Internal::sc_descriptor(const ScanContextDescriptor* msg) {
  return *msg->sc_descriptor_;
}
const ::eigen::MatrixXd&
ScanContextDescriptor::_Internal::ringkey(const ScanContextDescriptor* msg) {
  return *msg->ringkey_;
}
const ::eigen::MatrixXd&
ScanContextDescriptor::_Internal::sectorkey(const ScanContextDescriptor* msg) {
  return *msg->sectorkey_;
}
const ::scancontext::FloatMatrix&
ScanContextDescriptor::_Internal::polarcontext_invkeys_mat(const ScanContextDescriptor* msg) {
  return *msg->polarcontext_invkeys_mat_;
}
const ::eigen::Matrix4d&
ScanContextDescriptor::_Internal::pose(const ScanContextDescriptor* msg) {
  return *msg->pose_;
}
void ScanContextDescriptor::clear_sc_descriptor() {
  if (GetArena() == nullptr && sc_descriptor_ != nullptr) {
    delete sc_descriptor_;
  }
  sc_descriptor_ = nullptr;
}
void ScanContextDescriptor::clear_ringkey() {
  if (GetArena() == nullptr && ringkey_ != nullptr) {
    delete ringkey_;
  }
  ringkey_ = nullptr;
}
void ScanContextDescriptor::clear_sectorkey() {
  if (GetArena() == nullptr && sectorkey_ != nullptr) {
    delete sectorkey_;
  }
  sectorkey_ = nullptr;
}
void ScanContextDescriptor::clear_pose() {
  if (GetArena() == nullptr && pose_ != nullptr) {
    delete pose_;
  }
  pose_ = nullptr;
}
ScanContextDescriptor::ScanContextDescriptor(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena) {
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:scancontext.ScanContextDescriptor)
}
ScanContextDescriptor::ScanContextDescriptor(const ScanContextDescriptor& from)
  : ::PROTOBUF_NAMESPACE_ID::Message() {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  if (from._internal_has_sc_descriptor()) {
    sc_descriptor_ = new ::eigen::MatrixXd(*from.sc_descriptor_);
  } else {
    sc_descriptor_ = nullptr;
  }
  if (from._internal_has_ringkey()) {
    ringkey_ = new ::eigen::MatrixXd(*from.ringkey_);
  } else {
    ringkey_ = nullptr;
  }
  if (from._internal_has_sectorkey()) {
    sectorkey_ = new ::eigen::MatrixXd(*from.sectorkey_);
  } else {
    sectorkey_ = nullptr;
  }
  if (from._internal_has_polarcontext_invkeys_mat()) {
    polarcontext_invkeys_mat_ = new ::scancontext::FloatMatrix(*from.polarcontext_invkeys_mat_);
  } else {
    polarcontext_invkeys_mat_ = nullptr;
  }
  if (from._internal_has_pose()) {
    pose_ = new ::eigen::Matrix4d(*from.pose_);
  } else {
    pose_ = nullptr;
  }
  ::memcpy(&timestamp_, &from.timestamp_,
    static_cast<size_t>(reinterpret_cast<char*>(&frame_id_) -
    reinterpret_cast<char*>(&timestamp_)) + sizeof(frame_id_));
  // @@protoc_insertion_point(copy_constructor:scancontext.ScanContextDescriptor)
}

void ScanContextDescriptor::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_ScanContextDescriptor_sc_5fmanager_2eproto.base);
  ::memset(&sc_descriptor_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&frame_id_) -
      reinterpret_cast<char*>(&sc_descriptor_)) + sizeof(frame_id_));
}

ScanContextDescriptor::~ScanContextDescriptor() {
  // @@protoc_insertion_point(destructor:scancontext.ScanContextDescriptor)
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

void ScanContextDescriptor::SharedDtor() {
  GOOGLE_DCHECK(GetArena() == nullptr);
  if (this != internal_default_instance()) delete sc_descriptor_;
  if (this != internal_default_instance()) delete ringkey_;
  if (this != internal_default_instance()) delete sectorkey_;
  if (this != internal_default_instance()) delete polarcontext_invkeys_mat_;
  if (this != internal_default_instance()) delete pose_;
}

void ScanContextDescriptor::ArenaDtor(void* object) {
  ScanContextDescriptor* _this = reinterpret_cast< ScanContextDescriptor* >(object);
  (void)_this;
}
void ScanContextDescriptor::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void ScanContextDescriptor::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ScanContextDescriptor& ScanContextDescriptor::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_ScanContextDescriptor_sc_5fmanager_2eproto.base);
  return *internal_default_instance();
}


void ScanContextDescriptor::Clear() {
// @@protoc_insertion_point(message_clear_start:scancontext.ScanContextDescriptor)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  if (GetArena() == nullptr && sc_descriptor_ != nullptr) {
    delete sc_descriptor_;
  }
  sc_descriptor_ = nullptr;
  if (GetArena() == nullptr && ringkey_ != nullptr) {
    delete ringkey_;
  }
  ringkey_ = nullptr;
  if (GetArena() == nullptr && sectorkey_ != nullptr) {
    delete sectorkey_;
  }
  sectorkey_ = nullptr;
  if (GetArena() == nullptr && polarcontext_invkeys_mat_ != nullptr) {
    delete polarcontext_invkeys_mat_;
  }
  polarcontext_invkeys_mat_ = nullptr;
  if (GetArena() == nullptr && pose_ != nullptr) {
    delete pose_;
  }
  pose_ = nullptr;
  ::memset(&timestamp_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&frame_id_) -
      reinterpret_cast<char*>(&timestamp_)) + sizeof(frame_id_));
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* ScanContextDescriptor::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena;
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // .eigen.MatrixXd sc_descriptor = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 10)) {
          ptr = ctx->ParseMessage(_internal_mutable_sc_descriptor(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .eigen.MatrixXd ringkey = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 18)) {
          ptr = ctx->ParseMessage(_internal_mutable_ringkey(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .eigen.MatrixXd sectorkey = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 26)) {
          ptr = ctx->ParseMessage(_internal_mutable_sectorkey(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // double timestamp = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 33)) {
          timestamp_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else goto handle_unusual;
        continue;
      // .scancontext.FloatMatrix polarcontext_invkeys_mat = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 42)) {
          ptr = ctx->ParseMessage(_internal_mutable_polarcontext_invkeys_mat(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // .eigen.Matrix4d pose = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
          ptr = ctx->ParseMessage(_internal_mutable_pose(), ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // uint64 frame_id = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) {
          frame_id_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag,
            _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
            ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* ScanContextDescriptor::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:scancontext.ScanContextDescriptor)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // .eigen.MatrixXd sc_descriptor = 1;
  if (this->has_sc_descriptor()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        1, _Internal::sc_descriptor(this), target, stream);
  }

  // .eigen.MatrixXd ringkey = 2;
  if (this->has_ringkey()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        2, _Internal::ringkey(this), target, stream);
  }

  // .eigen.MatrixXd sectorkey = 3;
  if (this->has_sectorkey()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        3, _Internal::sectorkey(this), target, stream);
  }

  // double timestamp = 4;
  if (!(this->timestamp() <= 0 && this->timestamp() >= 0)) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(4, this->_internal_timestamp(), target);
  }

  // .scancontext.FloatMatrix polarcontext_invkeys_mat = 5;
  if (this->has_polarcontext_invkeys_mat()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        5, _Internal::polarcontext_invkeys_mat(this), target, stream);
  }

  // .eigen.Matrix4d pose = 6;
  if (this->has_pose()) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(
        6, _Internal::pose(this), target, stream);
  }

  // uint64 frame_id = 7;
  if (this->frame_id() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteUInt64ToArray(7, this->_internal_frame_id(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:scancontext.ScanContextDescriptor)
  return target;
}

size_t ScanContextDescriptor::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:scancontext.ScanContextDescriptor)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // .eigen.MatrixXd sc_descriptor = 1;
  if (this->has_sc_descriptor()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *sc_descriptor_);
  }

  // .eigen.MatrixXd ringkey = 2;
  if (this->has_ringkey()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *ringkey_);
  }

  // .eigen.MatrixXd sectorkey = 3;
  if (this->has_sectorkey()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *sectorkey_);
  }

  // .scancontext.FloatMatrix polarcontext_invkeys_mat = 5;
  if (this->has_polarcontext_invkeys_mat()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *polarcontext_invkeys_mat_);
  }

  // .eigen.Matrix4d pose = 6;
  if (this->has_pose()) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(
        *pose_);
  }

  // double timestamp = 4;
  if (!(this->timestamp() <= 0 && this->timestamp() >= 0)) {
    total_size += 1 + 8;
  }

  // uint64 frame_id = 7;
  if (this->frame_id() != 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::UInt64Size(
        this->_internal_frame_id());
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void ScanContextDescriptor::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:scancontext.ScanContextDescriptor)
  GOOGLE_DCHECK_NE(&from, this);
  const ScanContextDescriptor* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<ScanContextDescriptor>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:scancontext.ScanContextDescriptor)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:scancontext.ScanContextDescriptor)
    MergeFrom(*source);
  }
}

void ScanContextDescriptor::MergeFrom(const ScanContextDescriptor& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:scancontext.ScanContextDescriptor)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  if (from.has_sc_descriptor()) {
    _internal_mutable_sc_descriptor()->::eigen::MatrixXd::MergeFrom(from._internal_sc_descriptor());
  }
  if (from.has_ringkey()) {
    _internal_mutable_ringkey()->::eigen::MatrixXd::MergeFrom(from._internal_ringkey());
  }
  if (from.has_sectorkey()) {
    _internal_mutable_sectorkey()->::eigen::MatrixXd::MergeFrom(from._internal_sectorkey());
  }
  if (from.has_polarcontext_invkeys_mat()) {
    _internal_mutable_polarcontext_invkeys_mat()->::scancontext::FloatMatrix::MergeFrom(from._internal_polarcontext_invkeys_mat());
  }
  if (from.has_pose()) {
    _internal_mutable_pose()->::eigen::Matrix4d::MergeFrom(from._internal_pose());
  }
  if (!(from.timestamp() <= 0 && from.timestamp() >= 0)) {
    _internal_set_timestamp(from._internal_timestamp());
  }
  if (from.frame_id() != 0) {
    _internal_set_frame_id(from._internal_frame_id());
  }
}

void ScanContextDescriptor::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:scancontext.ScanContextDescriptor)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

void ScanContextDescriptor::InternalSwap(ScanContextDescriptor* other) {
  using std::swap;
  _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(ScanContextDescriptor, frame_id_)
      + sizeof(ScanContextDescriptor::frame_id_)
      - PROTOBUF_FIELD_OFFSET(ScanContextDescriptor, sc_descriptor_)>(
          reinterpret_cast<char*>(&sc_descriptor_),
          reinterpret_cast<char*>(&other->sc_descriptor_));
}

::PROTOBUF_NAMESPACE_ID::Metadata ScanContextDescriptor::GetMetadata() const {
  return GetMetadataStatic();
}


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

void SCManagerState::InitAsDefaultInstance() {
}
class SCManagerState::_Internal {
 public:
};

SCManagerState::SCManagerState(::PROTOBUF_NAMESPACE_ID::Arena* arena)
  : ::PROTOBUF_NAMESPACE_ID::Message(arena),
  descriptors_(arena) {
  SharedCtor();
  RegisterArenaDtor(arena);
  // @@protoc_insertion_point(arena_constructor:scancontext.SCManagerState)
}
SCManagerState::SCManagerState(const SCManagerState& from)
  : ::PROTOBUF_NAMESPACE_ID::Message(),
      descriptors_(from.descriptors_) {
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::memcpy(&lidar_height_, &from.lidar_height_,
    static_cast<size_t>(reinterpret_cast<char*>(&is_tree_batch_made_) -
    reinterpret_cast<char*>(&lidar_height_)) + sizeof(is_tree_batch_made_));
  // @@protoc_insertion_point(copy_constructor:scancontext.SCManagerState)
}

void SCManagerState::SharedCtor() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&scc_info_SCManagerState_sc_5fmanager_2eproto.base);
  ::memset(&lidar_height_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&is_tree_batch_made_) -
      reinterpret_cast<char*>(&lidar_height_)) + sizeof(is_tree_batch_made_));
}

SCManagerState::~SCManagerState() {
  // @@protoc_insertion_point(destructor:scancontext.SCManagerState)
  SharedDtor();
  _internal_metadata_.Delete<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

void SCManagerState::SharedDtor() {
  GOOGLE_DCHECK(GetArena() == nullptr);
}

void SCManagerState::ArenaDtor(void* object) {
  SCManagerState* _this = reinterpret_cast< SCManagerState* >(object);
  (void)_this;
}
void SCManagerState::RegisterArenaDtor(::PROTOBUF_NAMESPACE_ID::Arena*) {
}
void SCManagerState::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const SCManagerState& SCManagerState::default_instance() {
  ::PROTOBUF_NAMESPACE_ID::internal::InitSCC(&::scc_info_SCManagerState_sc_5fmanager_2eproto.base);
  return *internal_default_instance();
}


void SCManagerState::Clear() {
// @@protoc_insertion_point(message_clear_start:scancontext.SCManagerState)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  descriptors_.Clear();
  ::memset(&lidar_height_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&is_tree_batch_made_) -
      reinterpret_cast<char*>(&lidar_height_)) + sizeof(is_tree_batch_made_));
  _internal_metadata_.Clear<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>();
}

const char* SCManagerState::_InternalParse(const char* ptr, ::PROTOBUF_NAMESPACE_ID::internal::ParseContext* ctx) {
#define CHK_(x) if (PROTOBUF_PREDICT_FALSE(!(x))) goto failure
  ::PROTOBUF_NAMESPACE_ID::Arena* arena = GetArena(); (void)arena;
  while (!ctx->Done(&ptr)) {
    ::PROTOBUF_NAMESPACE_ID::uint32 tag;
    ptr = ::PROTOBUF_NAMESPACE_ID::internal::ReadTag(ptr, &tag);
    CHK_(ptr);
    switch (tag >> 3) {
      // double lidar_height = 1;
      case 1:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 9)) {
          lidar_height_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else goto handle_unusual;
        continue;
      // int32 pc_num_ring = 2;
      case 2:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 16)) {
          pc_num_ring_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // int32 pc_num_sector = 3;
      case 3:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 24)) {
          pc_num_sector_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      // double pc_max_radius = 4;
      case 4:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 33)) {
          pc_max_radius_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else goto handle_unusual;
        continue;
      // double sc_dist_thres = 5;
      case 5:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 41)) {
          sc_dist_thres_ = ::PROTOBUF_NAMESPACE_ID::internal::UnalignedLoad<double>(ptr);
          ptr += sizeof(double);
        } else goto handle_unusual;
        continue;
      // repeated .scancontext.ScanContextDescriptor descriptors = 6;
      case 6:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 50)) {
          ptr -= 1;
          do {
            ptr += 1;
            ptr = ctx->ParseMessage(_internal_add_descriptors(), ptr);
            CHK_(ptr);
            if (!ctx->DataAvailable(ptr)) break;
          } while (::PROTOBUF_NAMESPACE_ID::internal::ExpectTag<50>(ptr));
        } else goto handle_unusual;
        continue;
      // bool is_tree_batch_made = 7;
      case 7:
        if (PROTOBUF_PREDICT_TRUE(static_cast<::PROTOBUF_NAMESPACE_ID::uint8>(tag) == 56)) {
          is_tree_batch_made_ = ::PROTOBUF_NAMESPACE_ID::internal::ReadVarint64(&ptr);
          CHK_(ptr);
        } else goto handle_unusual;
        continue;
      default: {
      handle_unusual:
        if ((tag & 7) == 4 || tag == 0) {
          ctx->SetLastTag(tag);
          goto success;
        }
        ptr = UnknownFieldParse(tag,
            _internal_metadata_.mutable_unknown_fields<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(),
            ptr, ctx);
        CHK_(ptr != nullptr);
        continue;
      }
    }  // switch
  }  // while
success:
  return ptr;
failure:
  ptr = nullptr;
  goto success;
#undef CHK_
}

::PROTOBUF_NAMESPACE_ID::uint8* SCManagerState::_InternalSerialize(
    ::PROTOBUF_NAMESPACE_ID::uint8* target, ::PROTOBUF_NAMESPACE_ID::io::EpsCopyOutputStream* stream) const {
  // @@protoc_insertion_point(serialize_to_array_start:scancontext.SCManagerState)
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // double lidar_height = 1;
  if (!(this->lidar_height() <= 0 && this->lidar_height() >= 0)) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(1, this->_internal_lidar_height(), target);
  }

  // int32 pc_num_ring = 2;
  if (this->pc_num_ring() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(2, this->_internal_pc_num_ring(), target);
  }

  // int32 pc_num_sector = 3;
  if (this->pc_num_sector() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteInt32ToArray(3, this->_internal_pc_num_sector(), target);
  }

  // double pc_max_radius = 4;
  if (!(this->pc_max_radius() <= 0 && this->pc_max_radius() >= 0)) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(4, this->_internal_pc_max_radius(), target);
  }

  // double sc_dist_thres = 5;
  if (!(this->sc_dist_thres() <= 0 && this->sc_dist_thres() >= 0)) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteDoubleToArray(5, this->_internal_sc_dist_thres(), target);
  }

  // repeated .scancontext.ScanContextDescriptor descriptors = 6;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->_internal_descriptors_size()); i < n; i++) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::
      InternalWriteMessage(6, this->_internal_descriptors(i), target, stream);
  }

  // bool is_tree_batch_made = 7;
  if (this->is_tree_batch_made() != 0) {
    target = stream->EnsureSpace(target);
    target = ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::WriteBoolToArray(7, this->_internal_is_tree_batch_made(), target);
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    target = ::PROTOBUF_NAMESPACE_ID::internal::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:scancontext.SCManagerState)
  return target;
}

size_t SCManagerState::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:scancontext.SCManagerState)
  size_t total_size = 0;

  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  // repeated .scancontext.ScanContextDescriptor descriptors = 6;
  total_size += 1UL * this->_internal_descriptors_size();
  for (const auto& msg : this->descriptors_) {
    total_size +=
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::MessageSize(msg);
  }

  // double lidar_height = 1;
  if (!(this->lidar_height() <= 0 && this->lidar_height() >= 0)) {
    total_size += 1 + 8;
  }

  // int32 pc_num_ring = 2;
  if (this->pc_num_ring() != 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
        this->_internal_pc_num_ring());
  }

  // int32 pc_num_sector = 3;
  if (this->pc_num_sector() != 0) {
    total_size += 1 +
      ::PROTOBUF_NAMESPACE_ID::internal::WireFormatLite::Int32Size(
        this->_internal_pc_num_sector());
  }

  // double pc_max_radius = 4;
  if (!(this->pc_max_radius() <= 0 && this->pc_max_radius() >= 0)) {
    total_size += 1 + 8;
  }

  // double sc_dist_thres = 5;
  if (!(this->sc_dist_thres() <= 0 && this->sc_dist_thres() >= 0)) {
    total_size += 1 + 8;
  }

  // bool is_tree_batch_made = 7;
  if (this->is_tree_batch_made() != 0) {
    total_size += 1 + 1;
  }

  if (PROTOBUF_PREDICT_FALSE(_internal_metadata_.have_unknown_fields())) {
    return ::PROTOBUF_NAMESPACE_ID::internal::ComputeUnknownFieldsSize(
        _internal_metadata_, total_size, &_cached_size_);
  }
  int cached_size = ::PROTOBUF_NAMESPACE_ID::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void SCManagerState::MergeFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:scancontext.SCManagerState)
  GOOGLE_DCHECK_NE(&from, this);
  const SCManagerState* source =
      ::PROTOBUF_NAMESPACE_ID::DynamicCastToGenerated<SCManagerState>(
          &from);
  if (source == nullptr) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:scancontext.SCManagerState)
    ::PROTOBUF_NAMESPACE_ID::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:scancontext.SCManagerState)
    MergeFrom(*source);
  }
}

void SCManagerState::MergeFrom(const SCManagerState& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:scancontext.SCManagerState)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(from._internal_metadata_);
  ::PROTOBUF_NAMESPACE_ID::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  descriptors_.MergeFrom(from.descriptors_);
  if (!(from.lidar_height() <= 0 && from.lidar_height() >= 0)) {
    _internal_set_lidar_height(from._internal_lidar_height());
  }
  if (from.pc_num_ring() != 0) {
    _internal_set_pc_num_ring(from._internal_pc_num_ring());
  }
  if (from.pc_num_sector() != 0) {
    _internal_set_pc_num_sector(from._internal_pc_num_sector());
  }
  if (!(from.pc_max_radius() <= 0 && from.pc_max_radius() >= 0)) {
    _internal_set_pc_max_radius(from._internal_pc_max_radius());
  }
  if (!(from.sc_dist_thres() <= 0 && from.sc_dist_thres() >= 0)) {
    _internal_set_sc_dist_thres(from._internal_sc_dist_thres());
  }
  if (from.is_tree_batch_made() != 0) {
    _internal_set_is_tree_batch_made(from._internal_is_tree_batch_made());
  }
}

void SCManagerState::CopyFrom(const ::PROTOBUF_NAMESPACE_ID::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:scancontext.SCManagerState)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

void SCManagerState::InternalSwap(SCManagerState* other) {
  using std::swap;
  _internal_metadata_.Swap<::PROTOBUF_NAMESPACE_ID::UnknownFieldSet>(&other->_internal_metadata_);
  descriptors_.InternalSwap(&other->descriptors_);
  ::PROTOBUF_NAMESPACE_ID::internal::memswap<
      PROTOBUF_FIELD_OFFSET(SCManagerState, is_tree_batch_made_)
      + sizeof(SCManagerState::is_tree_batch_made_)
      - PROTOBUF_FIELD_OFFSET(SCManagerState, lidar_height_)>(
          reinterpret_cast<char*>(&lidar_height_),
          reinterpret_cast<char*>(&other->lidar_height_));
}

::PROTOBUF_NAMESPACE_ID::Metadata SCManagerState::GetMetadata() const {
  return GetMetadataStatic();
}


// @@protoc_insertion_point(namespace_scope)
}  // namespace scancontext
PROTOBUF_NAMESPACE_OPEN
template<> PROTOBUF_NOINLINE ::scancontext::FloatMatrix* Arena::CreateMaybeMessage< ::scancontext::FloatMatrix >(Arena* arena) {
  return Arena::CreateMessageInternal< ::scancontext::FloatMatrix >(arena);
}
template<> PROTOBUF_NOINLINE ::scancontext::ScanContextDescriptor* Arena::CreateMaybeMessage< ::scancontext::ScanContextDescriptor >(Arena* arena) {
  return Arena::CreateMessageInternal< ::scancontext::ScanContextDescriptor >(arena);
}
template<> PROTOBUF_NOINLINE ::scancontext::SCManagerState* Arena::CreateMaybeMessage< ::scancontext::SCManagerState >(Arena* arena) {
  return Arena::CreateMessageInternal< ::scancontext::SCManagerState >(arena);
}
PROTOBUF_NAMESPACE_CLOSE

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