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

#include "caffe2/proto/prof_dag.pb.h"

#include <algorithm>

#include <google/protobuf/stubs/common.h>
#include <google/protobuf/stubs/port.h>
#include <google/protobuf/io/coded_stream.h>
#include <google/protobuf/wire_format_lite_inl.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>
// This is a temporary google only hack
#ifdef GOOGLE_PROTOBUF_ENFORCE_UNIQUENESS
#include "third_party/protobuf/version.h"
#endif
// @@protoc_insertion_point(includes)

namespace protobuf_caffe2_2fproto_2fprof_5fdag_2eproto {
extern PROTOBUF_INTERNAL_EXPORT_protobuf_caffe2_2fproto_2fprof_5fdag_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_OpProfile;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_caffe2_2fproto_2fprof_5fdag_2eproto ::google::protobuf::internal::SCCInfo<0> scc_info_TwoNumberStatsProto;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_caffe2_2fproto_2fprof_5fdag_2eproto ::google::protobuf::internal::SCCInfo<1> scc_info_BlobProfile;
extern PROTOBUF_INTERNAL_EXPORT_protobuf_caffe2_2fproto_2fprof_5fdag_2eproto ::google::protobuf::internal::SCCInfo<2> scc_info_ProfDAGProto;
}  // namespace protobuf_caffe2_2fproto_2fprof_5fdag_2eproto
namespace caffe2 {
class TwoNumberStatsProtoDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<TwoNumberStatsProto>
      _instance;
} _TwoNumberStatsProto_default_instance_;
class BlobProfileDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<BlobProfile>
      _instance;
} _BlobProfile_default_instance_;
class ProfDAGProtoDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<ProfDAGProto>
      _instance;
} _ProfDAGProto_default_instance_;
class ProfDAGProtosDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<ProfDAGProtos>
      _instance;
} _ProfDAGProtos_default_instance_;
class OpProfileDefaultTypeInternal {
 public:
  ::google::protobuf::internal::ExplicitlyConstructed<OpProfile>
      _instance;
} _OpProfile_default_instance_;
}  // namespace caffe2
namespace protobuf_caffe2_2fproto_2fprof_5fdag_2eproto {
static void InitDefaultsTwoNumberStatsProto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::caffe2::_TwoNumberStatsProto_default_instance_;
    new (ptr) ::caffe2::TwoNumberStatsProto();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::caffe2::TwoNumberStatsProto::InitAsDefaultInstance();
}

CAFFE2_API ::google::protobuf::internal::SCCInfo<0> scc_info_TwoNumberStatsProto =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsTwoNumberStatsProto}, {}};

static void InitDefaultsBlobProfile() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::caffe2::_BlobProfile_default_instance_;
    new (ptr) ::caffe2::BlobProfile();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::caffe2::BlobProfile::InitAsDefaultInstance();
}

CAFFE2_API ::google::protobuf::internal::SCCInfo<1> scc_info_BlobProfile =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 1, InitDefaultsBlobProfile}, {
      &protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::scc_info_TwoNumberStatsProto.base,}};

static void InitDefaultsProfDAGProto() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::caffe2::_ProfDAGProto_default_instance_;
    new (ptr) ::caffe2::ProfDAGProto();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::caffe2::ProfDAGProto::InitAsDefaultInstance();
}

CAFFE2_API ::google::protobuf::internal::SCCInfo<2> scc_info_ProfDAGProto =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsProfDAGProto}, {
      &protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::scc_info_TwoNumberStatsProto.base,
      &protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::scc_info_BlobProfile.base,}};

static void InitDefaultsProfDAGProtos() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::caffe2::_ProfDAGProtos_default_instance_;
    new (ptr) ::caffe2::ProfDAGProtos();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::caffe2::ProfDAGProtos::InitAsDefaultInstance();
}

CAFFE2_API ::google::protobuf::internal::SCCInfo<2> scc_info_ProfDAGProtos =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 2, InitDefaultsProfDAGProtos}, {
      &protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::scc_info_ProfDAGProto.base,
      &protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::scc_info_OpProfile.base,}};

static void InitDefaultsOpProfile() {
  GOOGLE_PROTOBUF_VERIFY_VERSION;

  {
    void* ptr = &::caffe2::_OpProfile_default_instance_;
    new (ptr) ::caffe2::OpProfile();
    ::google::protobuf::internal::OnShutdownDestroyMessage(ptr);
  }
  ::caffe2::OpProfile::InitAsDefaultInstance();
}

CAFFE2_API ::google::protobuf::internal::SCCInfo<0> scc_info_OpProfile =
    {{ATOMIC_VAR_INIT(::google::protobuf::internal::SCCInfoBase::kUninitialized), 0, InitDefaultsOpProfile}, {}};

void InitDefaults() {
  ::google::protobuf::internal::InitSCC(&scc_info_TwoNumberStatsProto.base);
  ::google::protobuf::internal::InitSCC(&scc_info_BlobProfile.base);
  ::google::protobuf::internal::InitSCC(&scc_info_ProfDAGProto.base);
  ::google::protobuf::internal::InitSCC(&scc_info_ProfDAGProtos.base);
  ::google::protobuf::internal::InitSCC(&scc_info_OpProfile.base);
}

::google::protobuf::Metadata file_level_metadata[5];

const ::google::protobuf::uint32 TableStruct::offsets[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::TwoNumberStatsProto, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::TwoNumberStatsProto, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::TwoNumberStatsProto, mean_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::TwoNumberStatsProto, stddev_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::TwoNumberStatsProto, count_),
  0,
  1,
  2,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::BlobProfile, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::BlobProfile, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::BlobProfile, name_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::BlobProfile, bytes_used_),
  0,
  1,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::ProfDAGProto, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::ProfDAGProto, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::ProfDAGProto, name_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::ProfDAGProto, mean_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::ProfDAGProto, stddev_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::ProfDAGProto, execution_time_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::ProfDAGProto, output_profile_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::ProfDAGProto, extra_info_),
  0,
  2,
  3,
  1,
  ~0u,
  ~0u,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::ProfDAGProtos, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::ProfDAGProtos, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::ProfDAGProtos, stats_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::ProfDAGProtos, net_name_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::ProfDAGProtos, ops_stats_),
  ~0u,
  0,
  ~0u,
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::OpProfile, _has_bits_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::OpProfile, _internal_metadata_),
  ~0u,  // no _extensions_
  ~0u,  // no _oneof_case_
  ~0u,  // no _weak_field_map_
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::OpProfile, idx_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::OpProfile, net_name_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::OpProfile, type_),
  GOOGLE_PROTOBUF_GENERATED_MESSAGE_FIELD_OFFSET(::caffe2::OpProfile, exec_time_secs_),
  0,
  1,
  2,
  3,
};
static const ::google::protobuf::internal::MigrationSchema schemas[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
  { 0, 8, sizeof(::caffe2::TwoNumberStatsProto)},
  { 11, 18, sizeof(::caffe2::BlobProfile)},
  { 20, 31, sizeof(::caffe2::ProfDAGProto)},
  { 37, 45, sizeof(::caffe2::ProfDAGProtos)},
  { 48, 57, sizeof(::caffe2::OpProfile)},
};

static ::google::protobuf::Message const * const file_default_instances[] = {
  reinterpret_cast<const ::google::protobuf::Message*>(&::caffe2::_TwoNumberStatsProto_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::caffe2::_BlobProfile_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::caffe2::_ProfDAGProto_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::caffe2::_ProfDAGProtos_default_instance_),
  reinterpret_cast<const ::google::protobuf::Message*>(&::caffe2::_OpProfile_default_instance_),
};

void protobuf_AssignDescriptors() {
  AddDescriptors();
  AssignDescriptors(
      "caffe2/proto/prof_dag.proto", schemas, file_default_instances, TableStruct::offsets,
      file_level_metadata, NULL, NULL);
}

void protobuf_AssignDescriptorsOnce() {
  static ::google::protobuf::internal::once_flag once;
  ::google::protobuf::internal::call_once(once, protobuf_AssignDescriptors);
}

void protobuf_RegisterTypes(const ::std::string&) GOOGLE_PROTOBUF_ATTRIBUTE_COLD;
void protobuf_RegisterTypes(const ::std::string&) {
  protobuf_AssignDescriptorsOnce();
  ::google::protobuf::internal::RegisterAllTypes(file_level_metadata, 5);
}

void AddDescriptorsImpl() {
  InitDefaults();
  static const char descriptor[] GOOGLE_PROTOBUF_ATTRIBUTE_SECTION_VARIABLE(protodesc_cold) = {
      "\n\033caffe2/proto/prof_dag.proto\022\006caffe2\"B\n"
      "\023TwoNumberStatsProto\022\014\n\004mean\030\001 \001(\002\022\016\n\006st"
      "ddev\030\002 \001(\002\022\r\n\005count\030\003 \001(\003\"L\n\013BlobProfile"
      "\022\014\n\004name\030\001 \001(\t\022/\n\nbytes_used\030\003 \001(\0132\033.caf"
      "fe2.TwoNumberStatsProto\"\260\001\n\014ProfDAGProto"
      "\022\014\n\004name\030\001 \002(\t\022\014\n\004mean\030\002 \002(\002\022\016\n\006stddev\030\003"
      " \002(\002\0223\n\016execution_time\030\004 \001(\0132\033.caffe2.Tw"
      "oNumberStatsProto\022+\n\016output_profile\030\005 \003("
      "\0132\023.caffe2.BlobProfile\022\022\n\nextra_info\030\007 \003"
      "(\t\"l\n\rProfDAGProtos\022#\n\005stats\030\001 \003(\0132\024.caf"
      "fe2.ProfDAGProto\022\020\n\010net_name\030\002 \001(\t\022$\n\top"
      "s_stats\030\003 \003(\0132\021.caffe2.OpProfile\"P\n\tOpPr"
      "ofile\022\013\n\003idx\030\001 \001(\t\022\020\n\010net_name\030\002 \001(\t\022\014\n\004"
      "type\030\003 \001(\t\022\026\n\016exec_time_secs\030\004 \001(\002"
  };
  ::google::protobuf::DescriptorPool::InternalAddGeneratedFile(
      descriptor, 554);
  ::google::protobuf::MessageFactory::InternalRegisterGeneratedFile(
    "caffe2/proto/prof_dag.proto", &protobuf_RegisterTypes);
}

void AddDescriptors() {
  static ::google::protobuf::internal::once_flag once;
  ::google::protobuf::internal::call_once(once, AddDescriptorsImpl);
}
// Force AddDescriptors() to be called at dynamic initialization time.
struct StaticDescriptorInitializer {
  StaticDescriptorInitializer() {
    AddDescriptors();
  }
} static_descriptor_initializer;
}  // namespace protobuf_caffe2_2fproto_2fprof_5fdag_2eproto
namespace caffe2 {

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

void TwoNumberStatsProto::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int TwoNumberStatsProto::kMeanFieldNumber;
const int TwoNumberStatsProto::kStddevFieldNumber;
const int TwoNumberStatsProto::kCountFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

TwoNumberStatsProto::TwoNumberStatsProto()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::scc_info_TwoNumberStatsProto.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe2.TwoNumberStatsProto)
}
TwoNumberStatsProto::TwoNumberStatsProto(const TwoNumberStatsProto& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::memcpy(&mean_, &from.mean_,
    static_cast<size_t>(reinterpret_cast<char*>(&count_) -
    reinterpret_cast<char*>(&mean_)) + sizeof(count_));
  // @@protoc_insertion_point(copy_constructor:caffe2.TwoNumberStatsProto)
}

void TwoNumberStatsProto::SharedCtor() {
  ::memset(&mean_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&count_) -
      reinterpret_cast<char*>(&mean_)) + sizeof(count_));
}

TwoNumberStatsProto::~TwoNumberStatsProto() {
  // @@protoc_insertion_point(destructor:caffe2.TwoNumberStatsProto)
  SharedDtor();
}

void TwoNumberStatsProto::SharedDtor() {
}

void TwoNumberStatsProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* TwoNumberStatsProto::descriptor() {
  ::protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const TwoNumberStatsProto& TwoNumberStatsProto::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::scc_info_TwoNumberStatsProto.base);
  return *internal_default_instance();
}


void TwoNumberStatsProto::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe2.TwoNumberStatsProto)
  ::google::protobuf::uint32 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 & 7u) {
    ::memset(&mean_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&count_) -
        reinterpret_cast<char*>(&mean_)) + sizeof(count_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool TwoNumberStatsProto::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe2.TwoNumberStatsProto)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional float mean = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(13u /* 13 & 0xFF */)) {
          set_has_mean();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &mean_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional float stddev = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(21u /* 21 & 0xFF */)) {
          set_has_stddev();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &stddev_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional int64 count = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(24u /* 24 & 0xFF */)) {
          set_has_count();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   ::google::protobuf::int64, ::google::protobuf::internal::WireFormatLite::TYPE_INT64>(
                 input, &count_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe2.TwoNumberStatsProto)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe2.TwoNumberStatsProto)
  return false;
#undef DO_
}

void TwoNumberStatsProto::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe2.TwoNumberStatsProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional float mean = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(1, this->mean(), output);
  }

  // optional float stddev = 2;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->stddev(), output);
  }

  // optional int64 count = 3;
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormatLite::WriteInt64(3, this->count(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe2.TwoNumberStatsProto)
}

::google::protobuf::uint8* TwoNumberStatsProto::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe2.TwoNumberStatsProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional float mean = 1;
  if (cached_has_bits & 0x00000001u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(1, this->mean(), target);
  }

  // optional float stddev = 2;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->stddev(), target);
  }

  // optional int64 count = 3;
  if (cached_has_bits & 0x00000004u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteInt64ToArray(3, this->count(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:caffe2.TwoNumberStatsProto)
  return target;
}

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

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if (_has_bits_[0 / 32] & 7u) {
    // optional float mean = 1;
    if (has_mean()) {
      total_size += 1 + 4;
    }

    // optional float stddev = 2;
    if (has_stddev()) {
      total_size += 1 + 4;
    }

    // optional int64 count = 3;
    if (has_count()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::Int64Size(
          this->count());
    }

  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void TwoNumberStatsProto::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe2.TwoNumberStatsProto)
  GOOGLE_DCHECK_NE(&from, this);
  const TwoNumberStatsProto* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const TwoNumberStatsProto>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe2.TwoNumberStatsProto)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe2.TwoNumberStatsProto)
    MergeFrom(*source);
  }
}

void TwoNumberStatsProto::MergeFrom(const TwoNumberStatsProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe2.TwoNumberStatsProto)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 7u) {
    if (cached_has_bits & 0x00000001u) {
      mean_ = from.mean_;
    }
    if (cached_has_bits & 0x00000002u) {
      stddev_ = from.stddev_;
    }
    if (cached_has_bits & 0x00000004u) {
      count_ = from.count_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void TwoNumberStatsProto::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe2.TwoNumberStatsProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

void TwoNumberStatsProto::Swap(TwoNumberStatsProto* other) {
  if (other == this) return;
  InternalSwap(other);
}
void TwoNumberStatsProto::InternalSwap(TwoNumberStatsProto* other) {
  using std::swap;
  swap(mean_, other->mean_);
  swap(stddev_, other->stddev_);
  swap(count_, other->count_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::google::protobuf::Metadata TwoNumberStatsProto::GetMetadata() const {
  protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::file_level_metadata[kIndexInFileMessages];
}


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

void BlobProfile::InitAsDefaultInstance() {
  ::caffe2::_BlobProfile_default_instance_._instance.get_mutable()->bytes_used_ = const_cast< ::caffe2::TwoNumberStatsProto*>(
      ::caffe2::TwoNumberStatsProto::internal_default_instance());
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int BlobProfile::kNameFieldNumber;
const int BlobProfile::kBytesUsedFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

BlobProfile::BlobProfile()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::scc_info_BlobProfile.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe2.BlobProfile)
}
BlobProfile::BlobProfile(const BlobProfile& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_name()) {
    name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  }
  if (from.has_bytes_used()) {
    bytes_used_ = new ::caffe2::TwoNumberStatsProto(*from.bytes_used_);
  } else {
    bytes_used_ = NULL;
  }
  // @@protoc_insertion_point(copy_constructor:caffe2.BlobProfile)
}

void BlobProfile::SharedCtor() {
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  bytes_used_ = NULL;
}

BlobProfile::~BlobProfile() {
  // @@protoc_insertion_point(destructor:caffe2.BlobProfile)
  SharedDtor();
}

void BlobProfile::SharedDtor() {
  name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete bytes_used_;
}

void BlobProfile::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* BlobProfile::descriptor() {
  ::protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const BlobProfile& BlobProfile::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::scc_info_BlobProfile.base);
  return *internal_default_instance();
}


void BlobProfile::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe2.BlobProfile)
  ::google::protobuf::uint32 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 & 3u) {
    if (cached_has_bits & 0x00000001u) {
      name_.ClearNonDefaultToEmptyNoArena();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(bytes_used_ != NULL);
      bytes_used_->Clear();
    }
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool BlobProfile::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe2.BlobProfile)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string name = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->name().data(), static_cast<int>(this->name().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe2.BlobProfile.name");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .caffe2.TwoNumberStatsProto bytes_used = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_bytes_used()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe2.BlobProfile)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe2.BlobProfile)
  return false;
#undef DO_
}

void BlobProfile::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe2.BlobProfile)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional string name = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->name().data(), static_cast<int>(this->name().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe2.BlobProfile.name");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->name(), output);
  }

  // optional .caffe2.TwoNumberStatsProto bytes_used = 3;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3, this->_internal_bytes_used(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe2.BlobProfile)
}

::google::protobuf::uint8* BlobProfile::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe2.BlobProfile)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional string name = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->name().data(), static_cast<int>(this->name().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe2.BlobProfile.name");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->name(), target);
  }

  // optional .caffe2.TwoNumberStatsProto bytes_used = 3;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        3, this->_internal_bytes_used(), deterministic, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:caffe2.BlobProfile)
  return target;
}

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

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if (_has_bits_[0 / 32] & 3u) {
    // optional string name = 1;
    if (has_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->name());
    }

    // optional .caffe2.TwoNumberStatsProto bytes_used = 3;
    if (has_bytes_used()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          *bytes_used_);
    }

  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void BlobProfile::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe2.BlobProfile)
  GOOGLE_DCHECK_NE(&from, this);
  const BlobProfile* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const BlobProfile>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe2.BlobProfile)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe2.BlobProfile)
    MergeFrom(*source);
  }
}

void BlobProfile::MergeFrom(const BlobProfile& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe2.BlobProfile)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      set_has_name();
      name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
    }
    if (cached_has_bits & 0x00000002u) {
      mutable_bytes_used()->::caffe2::TwoNumberStatsProto::MergeFrom(from.bytes_used());
    }
  }
}

void BlobProfile::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe2.BlobProfile)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

void BlobProfile::Swap(BlobProfile* other) {
  if (other == this) return;
  InternalSwap(other);
}
void BlobProfile::InternalSwap(BlobProfile* other) {
  using std::swap;
  name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(bytes_used_, other->bytes_used_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::google::protobuf::Metadata BlobProfile::GetMetadata() const {
  protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::file_level_metadata[kIndexInFileMessages];
}


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

void ProfDAGProto::InitAsDefaultInstance() {
  ::caffe2::_ProfDAGProto_default_instance_._instance.get_mutable()->execution_time_ = const_cast< ::caffe2::TwoNumberStatsProto*>(
      ::caffe2::TwoNumberStatsProto::internal_default_instance());
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ProfDAGProto::kNameFieldNumber;
const int ProfDAGProto::kMeanFieldNumber;
const int ProfDAGProto::kStddevFieldNumber;
const int ProfDAGProto::kExecutionTimeFieldNumber;
const int ProfDAGProto::kOutputProfileFieldNumber;
const int ProfDAGProto::kExtraInfoFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ProfDAGProto::ProfDAGProto()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::scc_info_ProfDAGProto.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe2.ProfDAGProto)
}
ProfDAGProto::ProfDAGProto(const ProfDAGProto& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      output_profile_(from.output_profile_),
      extra_info_(from.extra_info_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_name()) {
    name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
  }
  if (from.has_execution_time()) {
    execution_time_ = new ::caffe2::TwoNumberStatsProto(*from.execution_time_);
  } else {
    execution_time_ = NULL;
  }
  ::memcpy(&mean_, &from.mean_,
    static_cast<size_t>(reinterpret_cast<char*>(&stddev_) -
    reinterpret_cast<char*>(&mean_)) + sizeof(stddev_));
  // @@protoc_insertion_point(copy_constructor:caffe2.ProfDAGProto)
}

void ProfDAGProto::SharedCtor() {
  name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  ::memset(&execution_time_, 0, static_cast<size_t>(
      reinterpret_cast<char*>(&stddev_) -
      reinterpret_cast<char*>(&execution_time_)) + sizeof(stddev_));
}

ProfDAGProto::~ProfDAGProto() {
  // @@protoc_insertion_point(destructor:caffe2.ProfDAGProto)
  SharedDtor();
}

void ProfDAGProto::SharedDtor() {
  name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (this != internal_default_instance()) delete execution_time_;
}

void ProfDAGProto::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* ProfDAGProto::descriptor() {
  ::protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const ProfDAGProto& ProfDAGProto::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::scc_info_ProfDAGProto.base);
  return *internal_default_instance();
}


void ProfDAGProto::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe2.ProfDAGProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  output_profile_.Clear();
  extra_info_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 3u) {
    if (cached_has_bits & 0x00000001u) {
      name_.ClearNonDefaultToEmptyNoArena();
    }
    if (cached_has_bits & 0x00000002u) {
      GOOGLE_DCHECK(execution_time_ != NULL);
      execution_time_->Clear();
    }
  }
  if (cached_has_bits & 12u) {
    ::memset(&mean_, 0, static_cast<size_t>(
        reinterpret_cast<char*>(&stddev_) -
        reinterpret_cast<char*>(&mean_)) + sizeof(stddev_));
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool ProfDAGProto::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe2.ProfDAGProto)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // required string name = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->name().data(), static_cast<int>(this->name().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe2.ProfDAGProto.name");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // required float mean = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(21u /* 21 & 0xFF */)) {
          set_has_mean();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &mean_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // required float stddev = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(29u /* 29 & 0xFF */)) {
          set_has_stddev();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &stddev_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional .caffe2.TwoNumberStatsProto execution_time = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(34u /* 34 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
               input, mutable_execution_time()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .caffe2.BlobProfile output_profile = 5;
      case 5: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(42u /* 42 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_output_profile()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated string extra_info = 7;
      case 7: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(58u /* 58 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->add_extra_info()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->extra_info(this->extra_info_size() - 1).data(),
            static_cast<int>(this->extra_info(this->extra_info_size() - 1).length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe2.ProfDAGProto.extra_info");
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe2.ProfDAGProto)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe2.ProfDAGProto)
  return false;
#undef DO_
}

void ProfDAGProto::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe2.ProfDAGProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // required string name = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->name().data(), static_cast<int>(this->name().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe2.ProfDAGProto.name");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->name(), output);
  }

  // required float mean = 2;
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(2, this->mean(), output);
  }

  // required float stddev = 3;
  if (cached_has_bits & 0x00000008u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(3, this->stddev(), output);
  }

  // optional .caffe2.TwoNumberStatsProto execution_time = 4;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      4, this->_internal_execution_time(), output);
  }

  // repeated .caffe2.BlobProfile output_profile = 5;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->output_profile_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      5,
      this->output_profile(static_cast<int>(i)),
      output);
  }

  // repeated string extra_info = 7;
  for (int i = 0, n = this->extra_info_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->extra_info(i).data(), static_cast<int>(this->extra_info(i).length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe2.ProfDAGProto.extra_info");
    ::google::protobuf::internal::WireFormatLite::WriteString(
      7, this->extra_info(i), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe2.ProfDAGProto)
}

::google::protobuf::uint8* ProfDAGProto::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe2.ProfDAGProto)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // required string name = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->name().data(), static_cast<int>(this->name().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe2.ProfDAGProto.name");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->name(), target);
  }

  // required float mean = 2;
  if (cached_has_bits & 0x00000004u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(2, this->mean(), target);
  }

  // required float stddev = 3;
  if (cached_has_bits & 0x00000008u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(3, this->stddev(), target);
  }

  // optional .caffe2.TwoNumberStatsProto execution_time = 4;
  if (cached_has_bits & 0x00000002u) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        4, this->_internal_execution_time(), deterministic, target);
  }

  // repeated .caffe2.BlobProfile output_profile = 5;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->output_profile_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        5, this->output_profile(static_cast<int>(i)), deterministic, target);
  }

  // repeated string extra_info = 7;
  for (int i = 0, n = this->extra_info_size(); i < n; i++) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->extra_info(i).data(), static_cast<int>(this->extra_info(i).length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe2.ProfDAGProto.extra_info");
    target = ::google::protobuf::internal::WireFormatLite::
      WriteStringToArray(7, this->extra_info(i), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:caffe2.ProfDAGProto)
  return target;
}

size_t ProfDAGProto::RequiredFieldsByteSizeFallback() const {
// @@protoc_insertion_point(required_fields_byte_size_fallback_start:caffe2.ProfDAGProto)
  size_t total_size = 0;

  if (has_name()) {
    // required string name = 1;
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->name());
  }

  if (has_mean()) {
    // required float mean = 2;
    total_size += 1 + 4;
  }

  if (has_stddev()) {
    // required float stddev = 3;
    total_size += 1 + 4;
  }

  return total_size;
}
size_t ProfDAGProto::ByteSizeLong() const {
// @@protoc_insertion_point(message_byte_size_start:caffe2.ProfDAGProto)
  size_t total_size = 0;

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if (((_has_bits_[0] & 0x0000000d) ^ 0x0000000d) == 0) {  // All required fields are present.
    // required string name = 1;
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->name());

    // required float mean = 2;
    total_size += 1 + 4;

    // required float stddev = 3;
    total_size += 1 + 4;

  } else {
    total_size += RequiredFieldsByteSizeFallback();
  }
  // repeated .caffe2.BlobProfile output_profile = 5;
  {
    unsigned int count = static_cast<unsigned int>(this->output_profile_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->output_profile(static_cast<int>(i)));
    }
  }

  // repeated string extra_info = 7;
  total_size += 1 *
      ::google::protobuf::internal::FromIntSize(this->extra_info_size());
  for (int i = 0, n = this->extra_info_size(); i < n; i++) {
    total_size += ::google::protobuf::internal::WireFormatLite::StringSize(
      this->extra_info(i));
  }

  // optional .caffe2.TwoNumberStatsProto execution_time = 4;
  if (has_execution_time()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::MessageSize(
        *execution_time_);
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void ProfDAGProto::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe2.ProfDAGProto)
  GOOGLE_DCHECK_NE(&from, this);
  const ProfDAGProto* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const ProfDAGProto>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe2.ProfDAGProto)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe2.ProfDAGProto)
    MergeFrom(*source);
  }
}

void ProfDAGProto::MergeFrom(const ProfDAGProto& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe2.ProfDAGProto)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  output_profile_.MergeFrom(from.output_profile_);
  extra_info_.MergeFrom(from.extra_info_);
  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 15u) {
    if (cached_has_bits & 0x00000001u) {
      set_has_name();
      name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.name_);
    }
    if (cached_has_bits & 0x00000002u) {
      mutable_execution_time()->::caffe2::TwoNumberStatsProto::MergeFrom(from.execution_time());
    }
    if (cached_has_bits & 0x00000004u) {
      mean_ = from.mean_;
    }
    if (cached_has_bits & 0x00000008u) {
      stddev_ = from.stddev_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void ProfDAGProto::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe2.ProfDAGProto)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool ProfDAGProto::IsInitialized() const {
  if ((_has_bits_[0] & 0x0000000d) != 0x0000000d) return false;
  return true;
}

void ProfDAGProto::Swap(ProfDAGProto* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ProfDAGProto::InternalSwap(ProfDAGProto* other) {
  using std::swap;
  CastToBase(&output_profile_)->InternalSwap(CastToBase(&other->output_profile_));
  extra_info_.InternalSwap(CastToBase(&other->extra_info_));
  name_.Swap(&other->name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(execution_time_, other->execution_time_);
  swap(mean_, other->mean_);
  swap(stddev_, other->stddev_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::google::protobuf::Metadata ProfDAGProto::GetMetadata() const {
  protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::file_level_metadata[kIndexInFileMessages];
}


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

void ProfDAGProtos::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int ProfDAGProtos::kStatsFieldNumber;
const int ProfDAGProtos::kNetNameFieldNumber;
const int ProfDAGProtos::kOpsStatsFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

ProfDAGProtos::ProfDAGProtos()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::scc_info_ProfDAGProtos.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe2.ProfDAGProtos)
}
ProfDAGProtos::ProfDAGProtos(const ProfDAGProtos& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_),
      stats_(from.stats_),
      ops_stats_(from.ops_stats_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  net_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_net_name()) {
    net_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.net_name_);
  }
  // @@protoc_insertion_point(copy_constructor:caffe2.ProfDAGProtos)
}

void ProfDAGProtos::SharedCtor() {
  net_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

ProfDAGProtos::~ProfDAGProtos() {
  // @@protoc_insertion_point(destructor:caffe2.ProfDAGProtos)
  SharedDtor();
}

void ProfDAGProtos::SharedDtor() {
  net_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void ProfDAGProtos::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* ProfDAGProtos::descriptor() {
  ::protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const ProfDAGProtos& ProfDAGProtos::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::scc_info_ProfDAGProtos.base);
  return *internal_default_instance();
}


void ProfDAGProtos::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe2.ProfDAGProtos)
  ::google::protobuf::uint32 cached_has_bits = 0;
  // Prevent compiler warnings about cached_has_bits being unused
  (void) cached_has_bits;

  stats_.Clear();
  ops_stats_.Clear();
  cached_has_bits = _has_bits_[0];
  if (cached_has_bits & 0x00000001u) {
    net_name_.ClearNonDefaultToEmptyNoArena();
  }
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool ProfDAGProtos::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe2.ProfDAGProtos)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // repeated .caffe2.ProfDAGProto stats = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_stats()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string net_name = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_net_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->net_name().data(), static_cast<int>(this->net_name().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe2.ProfDAGProtos.net_name");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // repeated .caffe2.OpProfile ops_stats = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadMessage(
                input, add_ops_stats()));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe2.ProfDAGProtos)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe2.ProfDAGProtos)
  return false;
#undef DO_
}

void ProfDAGProtos::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe2.ProfDAGProtos)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .caffe2.ProfDAGProto stats = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->stats_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      1,
      this->stats(static_cast<int>(i)),
      output);
  }

  cached_has_bits = _has_bits_[0];
  // optional string net_name = 2;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->net_name().data(), static_cast<int>(this->net_name().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe2.ProfDAGProtos.net_name");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->net_name(), output);
  }

  // repeated .caffe2.OpProfile ops_stats = 3;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->ops_stats_size()); i < n; i++) {
    ::google::protobuf::internal::WireFormatLite::WriteMessageMaybeToArray(
      3,
      this->ops_stats(static_cast<int>(i)),
      output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe2.ProfDAGProtos)
}

::google::protobuf::uint8* ProfDAGProtos::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe2.ProfDAGProtos)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  // repeated .caffe2.ProfDAGProto stats = 1;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->stats_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        1, this->stats(static_cast<int>(i)), deterministic, target);
  }

  cached_has_bits = _has_bits_[0];
  // optional string net_name = 2;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->net_name().data(), static_cast<int>(this->net_name().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe2.ProfDAGProtos.net_name");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->net_name(), target);
  }

  // repeated .caffe2.OpProfile ops_stats = 3;
  for (unsigned int i = 0,
      n = static_cast<unsigned int>(this->ops_stats_size()); i < n; i++) {
    target = ::google::protobuf::internal::WireFormatLite::
      InternalWriteMessageToArray(
        3, this->ops_stats(static_cast<int>(i)), deterministic, target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:caffe2.ProfDAGProtos)
  return target;
}

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

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  // repeated .caffe2.ProfDAGProto stats = 1;
  {
    unsigned int count = static_cast<unsigned int>(this->stats_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->stats(static_cast<int>(i)));
    }
  }

  // repeated .caffe2.OpProfile ops_stats = 3;
  {
    unsigned int count = static_cast<unsigned int>(this->ops_stats_size());
    total_size += 1UL * count;
    for (unsigned int i = 0; i < count; i++) {
      total_size +=
        ::google::protobuf::internal::WireFormatLite::MessageSize(
          this->ops_stats(static_cast<int>(i)));
    }
  }

  // optional string net_name = 2;
  if (has_net_name()) {
    total_size += 1 +
      ::google::protobuf::internal::WireFormatLite::StringSize(
        this->net_name());
  }

  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void ProfDAGProtos::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe2.ProfDAGProtos)
  GOOGLE_DCHECK_NE(&from, this);
  const ProfDAGProtos* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const ProfDAGProtos>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe2.ProfDAGProtos)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe2.ProfDAGProtos)
    MergeFrom(*source);
  }
}

void ProfDAGProtos::MergeFrom(const ProfDAGProtos& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe2.ProfDAGProtos)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  stats_.MergeFrom(from.stats_);
  ops_stats_.MergeFrom(from.ops_stats_);
  if (from.has_net_name()) {
    set_has_net_name();
    net_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.net_name_);
  }
}

void ProfDAGProtos::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe2.ProfDAGProtos)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

bool ProfDAGProtos::IsInitialized() const {
  if (!::google::protobuf::internal::AllAreInitialized(this->stats())) return false;
  return true;
}

void ProfDAGProtos::Swap(ProfDAGProtos* other) {
  if (other == this) return;
  InternalSwap(other);
}
void ProfDAGProtos::InternalSwap(ProfDAGProtos* other) {
  using std::swap;
  CastToBase(&stats_)->InternalSwap(CastToBase(&other->stats_));
  CastToBase(&ops_stats_)->InternalSwap(CastToBase(&other->ops_stats_));
  net_name_.Swap(&other->net_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::google::protobuf::Metadata ProfDAGProtos::GetMetadata() const {
  protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::file_level_metadata[kIndexInFileMessages];
}


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

void OpProfile::InitAsDefaultInstance() {
}
#if !defined(_MSC_VER) || _MSC_VER >= 1900
const int OpProfile::kIdxFieldNumber;
const int OpProfile::kNetNameFieldNumber;
const int OpProfile::kTypeFieldNumber;
const int OpProfile::kExecTimeSecsFieldNumber;
#endif  // !defined(_MSC_VER) || _MSC_VER >= 1900

OpProfile::OpProfile()
  : ::google::protobuf::Message(), _internal_metadata_(NULL) {
  ::google::protobuf::internal::InitSCC(
      &protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::scc_info_OpProfile.base);
  SharedCtor();
  // @@protoc_insertion_point(constructor:caffe2.OpProfile)
}
OpProfile::OpProfile(const OpProfile& from)
  : ::google::protobuf::Message(),
      _internal_metadata_(NULL),
      _has_bits_(from._has_bits_) {
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  idx_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_idx()) {
    idx_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.idx_);
  }
  net_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_net_name()) {
    net_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.net_name_);
  }
  type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  if (from.has_type()) {
    type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_);
  }
  exec_time_secs_ = from.exec_time_secs_;
  // @@protoc_insertion_point(copy_constructor:caffe2.OpProfile)
}

void OpProfile::SharedCtor() {
  idx_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  net_name_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  type_.UnsafeSetDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  exec_time_secs_ = 0;
}

OpProfile::~OpProfile() {
  // @@protoc_insertion_point(destructor:caffe2.OpProfile)
  SharedDtor();
}

void OpProfile::SharedDtor() {
  idx_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  net_name_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
  type_.DestroyNoArena(&::google::protobuf::internal::GetEmptyStringAlreadyInited());
}

void OpProfile::SetCachedSize(int size) const {
  _cached_size_.Set(size);
}
const ::google::protobuf::Descriptor* OpProfile::descriptor() {
  ::protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::file_level_metadata[kIndexInFileMessages].descriptor;
}

const OpProfile& OpProfile::default_instance() {
  ::google::protobuf::internal::InitSCC(&protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::scc_info_OpProfile.base);
  return *internal_default_instance();
}


void OpProfile::Clear() {
// @@protoc_insertion_point(message_clear_start:caffe2.OpProfile)
  ::google::protobuf::uint32 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 & 7u) {
    if (cached_has_bits & 0x00000001u) {
      idx_.ClearNonDefaultToEmptyNoArena();
    }
    if (cached_has_bits & 0x00000002u) {
      net_name_.ClearNonDefaultToEmptyNoArena();
    }
    if (cached_has_bits & 0x00000004u) {
      type_.ClearNonDefaultToEmptyNoArena();
    }
  }
  exec_time_secs_ = 0;
  _has_bits_.Clear();
  _internal_metadata_.Clear();
}

bool OpProfile::MergePartialFromCodedStream(
    ::google::protobuf::io::CodedInputStream* input) {
#define DO_(EXPRESSION) if (!GOOGLE_PREDICT_TRUE(EXPRESSION)) goto failure
  ::google::protobuf::uint32 tag;
  // @@protoc_insertion_point(parse_start:caffe2.OpProfile)
  for (;;) {
    ::std::pair<::google::protobuf::uint32, bool> p = input->ReadTagWithCutoffNoLastTag(127u);
    tag = p.first;
    if (!p.second) goto handle_unusual;
    switch (::google::protobuf::internal::WireFormatLite::GetTagFieldNumber(tag)) {
      // optional string idx = 1;
      case 1: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(10u /* 10 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_idx()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->idx().data(), static_cast<int>(this->idx().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe2.OpProfile.idx");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string net_name = 2;
      case 2: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(18u /* 18 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_net_name()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->net_name().data(), static_cast<int>(this->net_name().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe2.OpProfile.net_name");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional string type = 3;
      case 3: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(26u /* 26 & 0xFF */)) {
          DO_(::google::protobuf::internal::WireFormatLite::ReadString(
                input, this->mutable_type()));
          ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
            this->type().data(), static_cast<int>(this->type().length()),
            ::google::protobuf::internal::WireFormat::PARSE,
            "caffe2.OpProfile.type");
        } else {
          goto handle_unusual;
        }
        break;
      }

      // optional float exec_time_secs = 4;
      case 4: {
        if (static_cast< ::google::protobuf::uint8>(tag) ==
            static_cast< ::google::protobuf::uint8>(37u /* 37 & 0xFF */)) {
          set_has_exec_time_secs();
          DO_((::google::protobuf::internal::WireFormatLite::ReadPrimitive<
                   float, ::google::protobuf::internal::WireFormatLite::TYPE_FLOAT>(
                 input, &exec_time_secs_)));
        } else {
          goto handle_unusual;
        }
        break;
      }

      default: {
      handle_unusual:
        if (tag == 0) {
          goto success;
        }
        DO_(::google::protobuf::internal::WireFormat::SkipField(
              input, tag, _internal_metadata_.mutable_unknown_fields()));
        break;
      }
    }
  }
success:
  // @@protoc_insertion_point(parse_success:caffe2.OpProfile)
  return true;
failure:
  // @@protoc_insertion_point(parse_failure:caffe2.OpProfile)
  return false;
#undef DO_
}

void OpProfile::SerializeWithCachedSizes(
    ::google::protobuf::io::CodedOutputStream* output) const {
  // @@protoc_insertion_point(serialize_start:caffe2.OpProfile)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional string idx = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->idx().data(), static_cast<int>(this->idx().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe2.OpProfile.idx");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      1, this->idx(), output);
  }

  // optional string net_name = 2;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->net_name().data(), static_cast<int>(this->net_name().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe2.OpProfile.net_name");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      2, this->net_name(), output);
  }

  // optional string type = 3;
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->type().data(), static_cast<int>(this->type().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe2.OpProfile.type");
    ::google::protobuf::internal::WireFormatLite::WriteStringMaybeAliased(
      3, this->type(), output);
  }

  // optional float exec_time_secs = 4;
  if (cached_has_bits & 0x00000008u) {
    ::google::protobuf::internal::WireFormatLite::WriteFloat(4, this->exec_time_secs(), output);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    ::google::protobuf::internal::WireFormat::SerializeUnknownFields(
        _internal_metadata_.unknown_fields(), output);
  }
  // @@protoc_insertion_point(serialize_end:caffe2.OpProfile)
}

::google::protobuf::uint8* OpProfile::InternalSerializeWithCachedSizesToArray(
    bool deterministic, ::google::protobuf::uint8* target) const {
  (void)deterministic; // Unused
  // @@protoc_insertion_point(serialize_to_array_start:caffe2.OpProfile)
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = _has_bits_[0];
  // optional string idx = 1;
  if (cached_has_bits & 0x00000001u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->idx().data(), static_cast<int>(this->idx().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe2.OpProfile.idx");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        1, this->idx(), target);
  }

  // optional string net_name = 2;
  if (cached_has_bits & 0x00000002u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->net_name().data(), static_cast<int>(this->net_name().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe2.OpProfile.net_name");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        2, this->net_name(), target);
  }

  // optional string type = 3;
  if (cached_has_bits & 0x00000004u) {
    ::google::protobuf::internal::WireFormat::VerifyUTF8StringNamedField(
      this->type().data(), static_cast<int>(this->type().length()),
      ::google::protobuf::internal::WireFormat::SERIALIZE,
      "caffe2.OpProfile.type");
    target =
      ::google::protobuf::internal::WireFormatLite::WriteStringToArray(
        3, this->type(), target);
  }

  // optional float exec_time_secs = 4;
  if (cached_has_bits & 0x00000008u) {
    target = ::google::protobuf::internal::WireFormatLite::WriteFloatToArray(4, this->exec_time_secs(), target);
  }

  if (_internal_metadata_.have_unknown_fields()) {
    target = ::google::protobuf::internal::WireFormat::SerializeUnknownFieldsToArray(
        _internal_metadata_.unknown_fields(), target);
  }
  // @@protoc_insertion_point(serialize_to_array_end:caffe2.OpProfile)
  return target;
}

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

  if (_internal_metadata_.have_unknown_fields()) {
    total_size +=
      ::google::protobuf::internal::WireFormat::ComputeUnknownFieldsSize(
        _internal_metadata_.unknown_fields());
  }
  if (_has_bits_[0 / 32] & 15u) {
    // optional string idx = 1;
    if (has_idx()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->idx());
    }

    // optional string net_name = 2;
    if (has_net_name()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->net_name());
    }

    // optional string type = 3;
    if (has_type()) {
      total_size += 1 +
        ::google::protobuf::internal::WireFormatLite::StringSize(
          this->type());
    }

    // optional float exec_time_secs = 4;
    if (has_exec_time_secs()) {
      total_size += 1 + 4;
    }

  }
  int cached_size = ::google::protobuf::internal::ToCachedSize(total_size);
  SetCachedSize(cached_size);
  return total_size;
}

void OpProfile::MergeFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_merge_from_start:caffe2.OpProfile)
  GOOGLE_DCHECK_NE(&from, this);
  const OpProfile* source =
      ::google::protobuf::internal::DynamicCastToGenerated<const OpProfile>(
          &from);
  if (source == NULL) {
  // @@protoc_insertion_point(generalized_merge_from_cast_fail:caffe2.OpProfile)
    ::google::protobuf::internal::ReflectionOps::Merge(from, this);
  } else {
  // @@protoc_insertion_point(generalized_merge_from_cast_success:caffe2.OpProfile)
    MergeFrom(*source);
  }
}

void OpProfile::MergeFrom(const OpProfile& from) {
// @@protoc_insertion_point(class_specific_merge_from_start:caffe2.OpProfile)
  GOOGLE_DCHECK_NE(&from, this);
  _internal_metadata_.MergeFrom(from._internal_metadata_);
  ::google::protobuf::uint32 cached_has_bits = 0;
  (void) cached_has_bits;

  cached_has_bits = from._has_bits_[0];
  if (cached_has_bits & 15u) {
    if (cached_has_bits & 0x00000001u) {
      set_has_idx();
      idx_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.idx_);
    }
    if (cached_has_bits & 0x00000002u) {
      set_has_net_name();
      net_name_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.net_name_);
    }
    if (cached_has_bits & 0x00000004u) {
      set_has_type();
      type_.AssignWithDefault(&::google::protobuf::internal::GetEmptyStringAlreadyInited(), from.type_);
    }
    if (cached_has_bits & 0x00000008u) {
      exec_time_secs_ = from.exec_time_secs_;
    }
    _has_bits_[0] |= cached_has_bits;
  }
}

void OpProfile::CopyFrom(const ::google::protobuf::Message& from) {
// @@protoc_insertion_point(generalized_copy_from_start:caffe2.OpProfile)
  if (&from == this) return;
  Clear();
  MergeFrom(from);
}

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

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

void OpProfile::Swap(OpProfile* other) {
  if (other == this) return;
  InternalSwap(other);
}
void OpProfile::InternalSwap(OpProfile* other) {
  using std::swap;
  idx_.Swap(&other->idx_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  net_name_.Swap(&other->net_name_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  type_.Swap(&other->type_, &::google::protobuf::internal::GetEmptyStringAlreadyInited(),
    GetArenaNoVirtual());
  swap(exec_time_secs_, other->exec_time_secs_);
  swap(_has_bits_[0], other->_has_bits_[0]);
  _internal_metadata_.Swap(&other->_internal_metadata_);
}

::google::protobuf::Metadata OpProfile::GetMetadata() const {
  protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::protobuf_AssignDescriptorsOnce();
  return ::protobuf_caffe2_2fproto_2fprof_5fdag_2eproto::file_level_metadata[kIndexInFileMessages];
}


// @@protoc_insertion_point(namespace_scope)
}  // namespace caffe2
namespace google {
namespace protobuf {
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::caffe2::TwoNumberStatsProto* Arena::CreateMaybeMessage< ::caffe2::TwoNumberStatsProto >(Arena* arena) {
  return Arena::CreateInternal< ::caffe2::TwoNumberStatsProto >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::caffe2::BlobProfile* Arena::CreateMaybeMessage< ::caffe2::BlobProfile >(Arena* arena) {
  return Arena::CreateInternal< ::caffe2::BlobProfile >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::caffe2::ProfDAGProto* Arena::CreateMaybeMessage< ::caffe2::ProfDAGProto >(Arena* arena) {
  return Arena::CreateInternal< ::caffe2::ProfDAGProto >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::caffe2::ProfDAGProtos* Arena::CreateMaybeMessage< ::caffe2::ProfDAGProtos >(Arena* arena) {
  return Arena::CreateInternal< ::caffe2::ProfDAGProtos >(arena);
}
template<> GOOGLE_PROTOBUF_ATTRIBUTE_NOINLINE ::caffe2::OpProfile* Arena::CreateMaybeMessage< ::caffe2::OpProfile >(Arena* arena) {
  return Arena::CreateInternal< ::caffe2::OpProfile >(arena);
}
}  // namespace protobuf
}  // namespace google

// @@protoc_insertion_point(global_scope)
