#![allow(unknown_lints)]
#![allow(clippy::all)]
#![allow(unused_attributes)]
#![cfg_attr(rustfmt, rustfmt::skip)]
#![allow(box_pointers)]
#![allow(dead_code)]
#![allow(missing_docs)]
#![allow(non_camel_case_types)]
#![allow(non_snake_case)]
#![allow(non_upper_case_globals)]
#![allow(trivial_casts)]
#![allow(unused_results)]
#![allow(unused_mut)]
const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0;
#[derive(PartialEq,Clone,Default,Debug)]
pub struct TensorShapeProto {
pub dim: ::std::vec::Vec<tensor_shape_proto::Dim>,
pub unknown_rank: bool,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a TensorShapeProto {
fn default() -> &'a TensorShapeProto {
<TensorShapeProto as ::protobuf::Message>::default_instance()
}
}
impl TensorShapeProto {
pub fn new() -> TensorShapeProto {
::std::default::Default::default()
}
fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(2);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_vec_simpler_accessor::<_, _>(
"dim",
|m: &TensorShapeProto| { &m.dim },
|m: &mut TensorShapeProto| { &mut m.dim },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"unknown_rank",
|m: &TensorShapeProto| { &m.unknown_rank },
|m: &mut TensorShapeProto| { &mut m.unknown_rank },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<TensorShapeProto>(
"TensorShapeProto",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for TensorShapeProto {
const NAME: &'static str = "TensorShapeProto";
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
18 => {
self.dim.push(is.read_message()?);
},
24 => {
self.unknown_rank = is.read_bool()?;
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
for value in &self.dim {
let len = value.compute_size();
my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len;
};
if self.unknown_rank != false {
my_size += 1 + 1;
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
for v in &self.dim {
::protobuf::rt::write_message_field_with_cached_size(2, v, os)?;
};
if self.unknown_rank != false {
os.write_bool(3, self.unknown_rank)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> TensorShapeProto {
TensorShapeProto::new()
}
fn clear(&mut self) {
self.dim.clear();
self.unknown_rank = false;
self.special_fields.clear();
}
fn default_instance() -> &'static TensorShapeProto {
static instance: TensorShapeProto = TensorShapeProto {
dim: ::std::vec::Vec::new(),
unknown_rank: false,
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for TensorShapeProto {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| file_descriptor().message_by_package_relative_name("TensorShapeProto").unwrap()).clone()
}
}
impl ::std::fmt::Display for TensorShapeProto {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for TensorShapeProto {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
pub mod tensor_shape_proto {
#[derive(PartialEq,Clone,Default,Debug)]
pub struct Dim {
pub size: i64,
pub name: ::std::string::String,
pub special_fields: ::protobuf::SpecialFields,
}
impl<'a> ::std::default::Default for &'a Dim {
fn default() -> &'a Dim {
<Dim as ::protobuf::Message>::default_instance()
}
}
impl Dim {
pub fn new() -> Dim {
::std::default::Default::default()
}
pub(in super) fn generated_message_descriptor_data() -> ::protobuf::reflect::GeneratedMessageDescriptorData {
let mut fields = ::std::vec::Vec::with_capacity(2);
let mut oneofs = ::std::vec::Vec::with_capacity(0);
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"size",
|m: &Dim| { &m.size },
|m: &mut Dim| { &mut m.size },
));
fields.push(::protobuf::reflect::rt::v2::make_simpler_field_accessor::<_, _>(
"name",
|m: &Dim| { &m.name },
|m: &mut Dim| { &mut m.name },
));
::protobuf::reflect::GeneratedMessageDescriptorData::new_2::<Dim>(
"TensorShapeProto.Dim",
fields,
oneofs,
)
}
}
impl ::protobuf::Message for Dim {
const NAME: &'static str = "Dim";
fn is_initialized(&self) -> bool {
true
}
fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> {
while let Some(tag) = is.read_raw_tag_or_eof()? {
match tag {
8 => {
self.size = is.read_int64()?;
},
18 => {
self.name = is.read_string()?;
},
tag => {
::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?;
},
};
}
::std::result::Result::Ok(())
}
#[allow(unused_variables)]
fn compute_size(&self) -> u64 {
let mut my_size = 0;
if self.size != 0 {
my_size += ::protobuf::rt::int64_size(1, self.size);
}
if !self.name.is_empty() {
my_size += ::protobuf::rt::string_size(2, &self.name);
}
my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields());
self.special_fields.cached_size().set(my_size as u32);
my_size
}
fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> {
if self.size != 0 {
os.write_int64(1, self.size)?;
}
if !self.name.is_empty() {
os.write_string(2, &self.name)?;
}
os.write_unknown_fields(self.special_fields.unknown_fields())?;
::std::result::Result::Ok(())
}
fn special_fields(&self) -> &::protobuf::SpecialFields {
&self.special_fields
}
fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields {
&mut self.special_fields
}
fn new() -> Dim {
Dim::new()
}
fn clear(&mut self) {
self.size = 0;
self.name.clear();
self.special_fields.clear();
}
fn default_instance() -> &'static Dim {
static instance: Dim = Dim {
size: 0,
name: ::std::string::String::new(),
special_fields: ::protobuf::SpecialFields::new(),
};
&instance
}
}
impl ::protobuf::MessageFull for Dim {
fn descriptor() -> ::protobuf::reflect::MessageDescriptor {
static descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::MessageDescriptor> = ::protobuf::rt::Lazy::new();
descriptor.get(|| super::file_descriptor().message_by_package_relative_name("TensorShapeProto.Dim").unwrap()).clone()
}
}
impl ::std::fmt::Display for Dim {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
::protobuf::text_format::fmt(self, f)
}
}
impl ::protobuf::reflect::ProtobufValue for Dim {
type RuntimeType = ::protobuf::reflect::rt::RuntimeTypeMessage<Self>;
}
}
static file_descriptor_proto_data: &'static [u8] = b"\
\n,tensorflow/core/framework/tensor_shape.proto\x12\ntensorflow\"\x98\
\x01\n\x10TensorShapeProto\x122\n\x03dim\x18\x02\x20\x03(\x0b2\x20.tenso\
rflow.TensorShapeProto.DimR\x03dim\x12!\n\x0cunknown_rank\x18\x03\x20\
\x01(\x08R\x0bunknownRank\x1a-\n\x03Dim\x12\x12\n\x04size\x18\x01\x20\
\x01(\x03R\x04size\x12\x12\n\x04name\x18\x02\x20\x01(\tR\x04nameB\x87\
\x01\n\x18org.tensorflow.frameworkB\x11TensorShapeProtosP\x01ZSgithub.co\
m/tensorflow/tensorflow/tensorflow/go/core/framework/tensor_shape_go_pro\
to\xf8\x01\x01b\x06proto3\
";
fn file_descriptor_proto() -> &'static ::protobuf::descriptor::FileDescriptorProto {
static file_descriptor_proto_lazy: ::protobuf::rt::Lazy<::protobuf::descriptor::FileDescriptorProto> = ::protobuf::rt::Lazy::new();
file_descriptor_proto_lazy.get(|| {
::protobuf::Message::parse_from_bytes(file_descriptor_proto_data).unwrap()
})
}
pub fn file_descriptor() -> &'static ::protobuf::reflect::FileDescriptor {
static generated_file_descriptor_lazy: ::protobuf::rt::Lazy<::protobuf::reflect::GeneratedFileDescriptor> = ::protobuf::rt::Lazy::new();
static file_descriptor: ::protobuf::rt::Lazy<::protobuf::reflect::FileDescriptor> = ::protobuf::rt::Lazy::new();
file_descriptor.get(|| {
let generated_file_descriptor = generated_file_descriptor_lazy.get(|| {
let mut deps = ::std::vec::Vec::with_capacity(0);
let mut messages = ::std::vec::Vec::with_capacity(2);
messages.push(TensorShapeProto::generated_message_descriptor_data());
messages.push(tensor_shape_proto::Dim::generated_message_descriptor_data());
let mut enums = ::std::vec::Vec::with_capacity(0);
::protobuf::reflect::GeneratedFileDescriptor::new_generated(
file_descriptor_proto(),
deps,
messages,
enums,
)
});
::protobuf::reflect::FileDescriptor::new_generated_2(generated_file_descriptor)
})
}