//
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: tensorflow/core/protobuf/control_flow.proto
//
#pragma warning disable 1591, 0612, 3021
#region Designer generated code
using pb = global::Google.Protobuf;
using pbc = global::Google.Protobuf.Collections;
using pbr = global::Google.Protobuf.Reflection;
using scg = global::System.Collections.Generic;
namespace Tensorflow {
/// Holder for reflection information generated from tensorflow/core/protobuf/control_flow.proto
public static partial class ControlFlowReflection {
#region Descriptor
/// File descriptor for tensorflow/core/protobuf/control_flow.proto
public static pbr::FileDescriptor Descriptor {
get { return descriptor; }
}
private static pbr::FileDescriptor descriptor;
static ControlFlowReflection() {
byte[] descriptorData = global::System.Convert.FromBase64String(
string.Concat(
"Cit0ZW5zb3JmbG93L2NvcmUvcHJvdG9idWYvY29udHJvbF9mbG93LnByb3Rv",
"Egp0ZW5zb3JmbG93IpYBCglWYWx1ZXNEZWYSDgoGdmFsdWVzGAEgAygJEkIK",
"D2V4dGVybmFsX3ZhbHVlcxgCIAMoCzIpLnRlbnNvcmZsb3cuVmFsdWVzRGVm",
"LkV4dGVybmFsVmFsdWVzRW50cnkaNQoTRXh0ZXJuYWxWYWx1ZXNFbnRyeRIL",
"CgNrZXkYASABKAkSDQoFdmFsdWUYAiABKAk6AjgBIoMBChVDb250cm9sRmxv",
"d0NvbnRleHREZWYSLwoJY29uZF9jdHh0GAEgASgLMhoudGVuc29yZmxvdy5D",
"b25kQ29udGV4dERlZkgAEjEKCndoaWxlX2N0eHQYAiABKAsyGy50ZW5zb3Jm",
"bG93LldoaWxlQ29udGV4dERlZkgAQgYKBGN0eHQixAEKDkNvbmRDb250ZXh0",
"RGVmEhQKDGNvbnRleHRfbmFtZRgBIAEoCRIRCglwcmVkX25hbWUYAiABKAkS",
"EgoKcGl2b3RfbmFtZRgDIAEoCRIOCgZicmFuY2gYBCABKAUSKQoKdmFsdWVz",
"X2RlZhgFIAEoCzIVLnRlbnNvcmZsb3cuVmFsdWVzRGVmEjoKD25lc3RlZF9j",
"b250ZXh0cxgGIAMoCzIhLnRlbnNvcmZsb3cuQ29udHJvbEZsb3dDb250ZXh0",
"RGVmIvUCCg9XaGlsZUNvbnRleHREZWYSFAoMY29udGV4dF9uYW1lGAEgASgJ",
"EhsKE3BhcmFsbGVsX2l0ZXJhdGlvbnMYAiABKAUSEQoJYmFja19wcm9wGAMg",
"ASgIEhMKC3N3YXBfbWVtb3J5GAQgASgIEhIKCnBpdm90X25hbWUYBSABKAkS",
"GwoTcGl2b3RfZm9yX3ByZWRfbmFtZRgGIAEoCRIbChNwaXZvdF9mb3JfYm9k",
"eV9uYW1lGAcgASgJEhcKD2xvb3BfZXhpdF9uYW1lcxgIIAMoCRIYChBsb29w",
"X2VudGVyX25hbWVzGAogAygJEikKCnZhbHVlc19kZWYYCSABKAsyFS50ZW5z",
"b3JmbG93LlZhbHVlc0RlZhIfChdtYXhpbXVtX2l0ZXJhdGlvbnNfbmFtZRgL",
"IAEoCRI6Cg9uZXN0ZWRfY29udGV4dHMYDCADKAsyIS50ZW5zb3JmbG93LkNv",
"bnRyb2xGbG93Q29udGV4dERlZkKJAQoYb3JnLnRlbnNvcmZsb3cuZnJhbWV3",
"b3JrQhFDb250cm9sRmxvd1Byb3Rvc1ABWlVnaXRodWIuY29tL3RlbnNvcmZs",
"b3cvdGVuc29yZmxvdy90ZW5zb3JmbG93L2dvL2NvcmUvcHJvdG9idWYvZm9y",
"X2NvcmVfcHJvdG9zX2dvX3Byb3Rv+AEBYgZwcm90bzM="));
descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
new pbr::FileDescriptor[] { },
new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ValuesDef), global::Tensorflow.ValuesDef.Parser, new[]{ "Values", "ExternalValues" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { null, }),
new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.ControlFlowContextDef), global::Tensorflow.ControlFlowContextDef.Parser, new[]{ "CondCtxt", "WhileCtxt" }, new[]{ "Ctxt" }, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CondContextDef), global::Tensorflow.CondContextDef.Parser, new[]{ "ContextName", "PredName", "PivotName", "Branch", "ValuesDef", "NestedContexts" }, null, null, null, null),
new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.WhileContextDef), global::Tensorflow.WhileContextDef.Parser, new[]{ "ContextName", "ParallelIterations", "BackProp", "SwapMemory", "PivotName", "PivotForPredName", "PivotForBodyName", "LoopExitNames", "LoopEnterNames", "ValuesDef", "MaximumIterationsName", "NestedContexts" }, null, null, null, null)
}));
}
#endregion
}
#region Messages
///
/// Protocol buffer representing the values in ControlFlowContext.
///
public sealed partial class ValuesDef : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ValuesDef());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Tensorflow.ControlFlowReflection.Descriptor.MessageTypes[0]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ValuesDef() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ValuesDef(ValuesDef other) : this() {
values_ = other.values_.Clone();
externalValues_ = other.externalValues_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ValuesDef Clone() {
return new ValuesDef(this);
}
/// Field number for the "values" field.
public const int ValuesFieldNumber = 1;
private static readonly pb::FieldCodec _repeated_values_codec
= pb::FieldCodec.ForString(10);
private readonly pbc::RepeatedField values_ = new pbc::RepeatedField();
///
/// Value names that have been seen in this context.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField Values {
get { return values_; }
}
/// Field number for the "external_values" field.
public const int ExternalValuesFieldNumber = 2;
private static readonly pbc::MapField.Codec _map_externalValues_codec
= new pbc::MapField.Codec(pb::FieldCodec.ForString(10, ""), pb::FieldCodec.ForString(18, ""), 18);
private readonly pbc::MapField externalValues_ = new pbc::MapField();
///
/// Value names referenced by but external to this context.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::MapField ExternalValues {
get { return externalValues_; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as ValuesDef);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(ValuesDef other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if(!values_.Equals(other.values_)) return false;
if (!ExternalValues.Equals(other.ExternalValues)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
hash ^= values_.GetHashCode();
hash ^= ExternalValues.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
values_.WriteTo(output, _repeated_values_codec);
externalValues_.WriteTo(output, _map_externalValues_codec);
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
size += values_.CalculateSize(_repeated_values_codec);
size += externalValues_.CalculateSize(_map_externalValues_codec);
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(ValuesDef other) {
if (other == null) {
return;
}
values_.Add(other.values_);
externalValues_.Add(other.externalValues_);
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
values_.AddEntriesFrom(input, _repeated_values_codec);
break;
}
case 18: {
externalValues_.AddEntriesFrom(input, _map_externalValues_codec);
break;
}
}
}
}
}
///
/// Container for any kind of control flow context. Any other control flow
/// contexts that are added below should also be added here.
///
public sealed partial class ControlFlowContextDef : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new ControlFlowContextDef());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Tensorflow.ControlFlowReflection.Descriptor.MessageTypes[1]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ControlFlowContextDef() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ControlFlowContextDef(ControlFlowContextDef other) : this() {
switch (other.CtxtCase) {
case CtxtOneofCase.CondCtxt:
CondCtxt = other.CondCtxt.Clone();
break;
case CtxtOneofCase.WhileCtxt:
WhileCtxt = other.WhileCtxt.Clone();
break;
}
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public ControlFlowContextDef Clone() {
return new ControlFlowContextDef(this);
}
/// Field number for the "cond_ctxt" field.
public const int CondCtxtFieldNumber = 1;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Tensorflow.CondContextDef CondCtxt {
get { return ctxtCase_ == CtxtOneofCase.CondCtxt ? (global::Tensorflow.CondContextDef) ctxt_ : null; }
set {
ctxt_ = value;
ctxtCase_ = value == null ? CtxtOneofCase.None : CtxtOneofCase.CondCtxt;
}
}
/// Field number for the "while_ctxt" field.
public const int WhileCtxtFieldNumber = 2;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Tensorflow.WhileContextDef WhileCtxt {
get { return ctxtCase_ == CtxtOneofCase.WhileCtxt ? (global::Tensorflow.WhileContextDef) ctxt_ : null; }
set {
ctxt_ = value;
ctxtCase_ = value == null ? CtxtOneofCase.None : CtxtOneofCase.WhileCtxt;
}
}
private object ctxt_;
/// Enum of possible cases for the "ctxt" oneof.
public enum CtxtOneofCase {
None = 0,
CondCtxt = 1,
WhileCtxt = 2,
}
private CtxtOneofCase ctxtCase_ = CtxtOneofCase.None;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public CtxtOneofCase CtxtCase {
get { return ctxtCase_; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void ClearCtxt() {
ctxtCase_ = CtxtOneofCase.None;
ctxt_ = null;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as ControlFlowContextDef);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(ControlFlowContextDef other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (!object.Equals(CondCtxt, other.CondCtxt)) return false;
if (!object.Equals(WhileCtxt, other.WhileCtxt)) return false;
if (CtxtCase != other.CtxtCase) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (ctxtCase_ == CtxtOneofCase.CondCtxt) hash ^= CondCtxt.GetHashCode();
if (ctxtCase_ == CtxtOneofCase.WhileCtxt) hash ^= WhileCtxt.GetHashCode();
hash ^= (int) ctxtCase_;
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
if (ctxtCase_ == CtxtOneofCase.CondCtxt) {
output.WriteRawTag(10);
output.WriteMessage(CondCtxt);
}
if (ctxtCase_ == CtxtOneofCase.WhileCtxt) {
output.WriteRawTag(18);
output.WriteMessage(WhileCtxt);
}
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (ctxtCase_ == CtxtOneofCase.CondCtxt) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(CondCtxt);
}
if (ctxtCase_ == CtxtOneofCase.WhileCtxt) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(WhileCtxt);
}
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(ControlFlowContextDef other) {
if (other == null) {
return;
}
switch (other.CtxtCase) {
case CtxtOneofCase.CondCtxt:
if (CondCtxt == null) {
CondCtxt = new global::Tensorflow.CondContextDef();
}
CondCtxt.MergeFrom(other.CondCtxt);
break;
case CtxtOneofCase.WhileCtxt:
if (WhileCtxt == null) {
WhileCtxt = new global::Tensorflow.WhileContextDef();
}
WhileCtxt.MergeFrom(other.WhileCtxt);
break;
}
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
global::Tensorflow.CondContextDef subBuilder = new global::Tensorflow.CondContextDef();
if (ctxtCase_ == CtxtOneofCase.CondCtxt) {
subBuilder.MergeFrom(CondCtxt);
}
input.ReadMessage(subBuilder);
CondCtxt = subBuilder;
break;
}
case 18: {
global::Tensorflow.WhileContextDef subBuilder = new global::Tensorflow.WhileContextDef();
if (ctxtCase_ == CtxtOneofCase.WhileCtxt) {
subBuilder.MergeFrom(WhileCtxt);
}
input.ReadMessage(subBuilder);
WhileCtxt = subBuilder;
break;
}
}
}
}
}
///
/// Protocol buffer representing a CondContext object.
///
public sealed partial class CondContextDef : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new CondContextDef());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Tensorflow.ControlFlowReflection.Descriptor.MessageTypes[2]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public CondContextDef() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public CondContextDef(CondContextDef other) : this() {
contextName_ = other.contextName_;
predName_ = other.predName_;
pivotName_ = other.pivotName_;
branch_ = other.branch_;
valuesDef_ = other.valuesDef_ != null ? other.valuesDef_.Clone() : null;
nestedContexts_ = other.nestedContexts_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public CondContextDef Clone() {
return new CondContextDef(this);
}
/// Field number for the "context_name" field.
public const int ContextNameFieldNumber = 1;
private string contextName_ = "";
///
/// Name of the context.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string ContextName {
get { return contextName_; }
set {
contextName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// Field number for the "pred_name" field.
public const int PredNameFieldNumber = 2;
private string predName_ = "";
///
/// Name of the pred tensor.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string PredName {
get { return predName_; }
set {
predName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// Field number for the "pivot_name" field.
public const int PivotNameFieldNumber = 3;
private string pivotName_ = "";
///
/// Name of the pivot tensor.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string PivotName {
get { return pivotName_; }
set {
pivotName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// Field number for the "branch" field.
public const int BranchFieldNumber = 4;
private int branch_;
///
/// Branch prediction. 0 or 1.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int Branch {
get { return branch_; }
set {
branch_ = value;
}
}
/// Field number for the "values_def" field.
public const int ValuesDefFieldNumber = 5;
private global::Tensorflow.ValuesDef valuesDef_;
///
/// Values and external values in control flow context.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Tensorflow.ValuesDef ValuesDef {
get { return valuesDef_; }
set {
valuesDef_ = value;
}
}
/// Field number for the "nested_contexts" field.
public const int NestedContextsFieldNumber = 6;
private static readonly pb::FieldCodec _repeated_nestedContexts_codec
= pb::FieldCodec.ForMessage(50, global::Tensorflow.ControlFlowContextDef.Parser);
private readonly pbc::RepeatedField nestedContexts_ = new pbc::RepeatedField();
///
/// Contexts contained inside this context (e.g. nested conds).
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField NestedContexts {
get { return nestedContexts_; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as CondContextDef);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(CondContextDef other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (ContextName != other.ContextName) return false;
if (PredName != other.PredName) return false;
if (PivotName != other.PivotName) return false;
if (Branch != other.Branch) return false;
if (!object.Equals(ValuesDef, other.ValuesDef)) return false;
if(!nestedContexts_.Equals(other.nestedContexts_)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (ContextName.Length != 0) hash ^= ContextName.GetHashCode();
if (PredName.Length != 0) hash ^= PredName.GetHashCode();
if (PivotName.Length != 0) hash ^= PivotName.GetHashCode();
if (Branch != 0) hash ^= Branch.GetHashCode();
if (valuesDef_ != null) hash ^= ValuesDef.GetHashCode();
hash ^= nestedContexts_.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
if (ContextName.Length != 0) {
output.WriteRawTag(10);
output.WriteString(ContextName);
}
if (PredName.Length != 0) {
output.WriteRawTag(18);
output.WriteString(PredName);
}
if (PivotName.Length != 0) {
output.WriteRawTag(26);
output.WriteString(PivotName);
}
if (Branch != 0) {
output.WriteRawTag(32);
output.WriteInt32(Branch);
}
if (valuesDef_ != null) {
output.WriteRawTag(42);
output.WriteMessage(ValuesDef);
}
nestedContexts_.WriteTo(output, _repeated_nestedContexts_codec);
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (ContextName.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(ContextName);
}
if (PredName.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(PredName);
}
if (PivotName.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(PivotName);
}
if (Branch != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(Branch);
}
if (valuesDef_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(ValuesDef);
}
size += nestedContexts_.CalculateSize(_repeated_nestedContexts_codec);
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(CondContextDef other) {
if (other == null) {
return;
}
if (other.ContextName.Length != 0) {
ContextName = other.ContextName;
}
if (other.PredName.Length != 0) {
PredName = other.PredName;
}
if (other.PivotName.Length != 0) {
PivotName = other.PivotName;
}
if (other.Branch != 0) {
Branch = other.Branch;
}
if (other.valuesDef_ != null) {
if (valuesDef_ == null) {
ValuesDef = new global::Tensorflow.ValuesDef();
}
ValuesDef.MergeFrom(other.ValuesDef);
}
nestedContexts_.Add(other.nestedContexts_);
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
ContextName = input.ReadString();
break;
}
case 18: {
PredName = input.ReadString();
break;
}
case 26: {
PivotName = input.ReadString();
break;
}
case 32: {
Branch = input.ReadInt32();
break;
}
case 42: {
if (valuesDef_ == null) {
ValuesDef = new global::Tensorflow.ValuesDef();
}
input.ReadMessage(ValuesDef);
break;
}
case 50: {
nestedContexts_.AddEntriesFrom(input, _repeated_nestedContexts_codec);
break;
}
}
}
}
}
///
/// Protocol buffer representing a WhileContext object.
///
public sealed partial class WhileContextDef : pb::IMessage {
private static readonly pb::MessageParser _parser = new pb::MessageParser(() => new WhileContextDef());
private pb::UnknownFieldSet _unknownFields;
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pb::MessageParser Parser { get { return _parser; } }
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public static pbr::MessageDescriptor Descriptor {
get { return global::Tensorflow.ControlFlowReflection.Descriptor.MessageTypes[3]; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
pbr::MessageDescriptor pb::IMessage.Descriptor {
get { return Descriptor; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public WhileContextDef() {
OnConstruction();
}
partial void OnConstruction();
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public WhileContextDef(WhileContextDef other) : this() {
contextName_ = other.contextName_;
parallelIterations_ = other.parallelIterations_;
backProp_ = other.backProp_;
swapMemory_ = other.swapMemory_;
pivotName_ = other.pivotName_;
pivotForPredName_ = other.pivotForPredName_;
pivotForBodyName_ = other.pivotForBodyName_;
loopExitNames_ = other.loopExitNames_.Clone();
loopEnterNames_ = other.loopEnterNames_.Clone();
valuesDef_ = other.valuesDef_ != null ? other.valuesDef_.Clone() : null;
maximumIterationsName_ = other.maximumIterationsName_;
nestedContexts_ = other.nestedContexts_.Clone();
_unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public WhileContextDef Clone() {
return new WhileContextDef(this);
}
/// Field number for the "context_name" field.
public const int ContextNameFieldNumber = 1;
private string contextName_ = "";
///
/// Name of the context.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string ContextName {
get { return contextName_; }
set {
contextName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// Field number for the "parallel_iterations" field.
public const int ParallelIterationsFieldNumber = 2;
private int parallelIterations_;
///
/// The number of iterations allowed to run in parallel.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int ParallelIterations {
get { return parallelIterations_; }
set {
parallelIterations_ = value;
}
}
/// Field number for the "back_prop" field.
public const int BackPropFieldNumber = 3;
private bool backProp_;
///
/// Whether backprop is enabled for this while loop.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool BackProp {
get { return backProp_; }
set {
backProp_ = value;
}
}
/// Field number for the "swap_memory" field.
public const int SwapMemoryFieldNumber = 4;
private bool swapMemory_;
///
/// Whether GPU-CPU memory swap is enabled for this loop.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool SwapMemory {
get { return swapMemory_; }
set {
swapMemory_ = value;
}
}
/// Field number for the "pivot_name" field.
public const int PivotNameFieldNumber = 5;
private string pivotName_ = "";
///
/// Name of the pivot tensor.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string PivotName {
get { return pivotName_; }
set {
pivotName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// Field number for the "pivot_for_pred_name" field.
public const int PivotForPredNameFieldNumber = 6;
private string pivotForPredName_ = "";
///
/// Name of the pivot_for_pred tensor.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string PivotForPredName {
get { return pivotForPredName_; }
set {
pivotForPredName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// Field number for the "pivot_for_body_name" field.
public const int PivotForBodyNameFieldNumber = 7;
private string pivotForBodyName_ = "";
///
/// Name of the pivot_for_body tensor.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string PivotForBodyName {
get { return pivotForBodyName_; }
set {
pivotForBodyName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// Field number for the "loop_exit_names" field.
public const int LoopExitNamesFieldNumber = 8;
private static readonly pb::FieldCodec _repeated_loopExitNames_codec
= pb::FieldCodec.ForString(66);
private readonly pbc::RepeatedField loopExitNames_ = new pbc::RepeatedField();
///
/// List of names for exit tensors.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField LoopExitNames {
get { return loopExitNames_; }
}
/// Field number for the "loop_enter_names" field.
public const int LoopEnterNamesFieldNumber = 10;
private static readonly pb::FieldCodec _repeated_loopEnterNames_codec
= pb::FieldCodec.ForString(82);
private readonly pbc::RepeatedField loopEnterNames_ = new pbc::RepeatedField();
///
/// List of names for enter tensors.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField LoopEnterNames {
get { return loopEnterNames_; }
}
/// Field number for the "values_def" field.
public const int ValuesDefFieldNumber = 9;
private global::Tensorflow.ValuesDef valuesDef_;
///
/// Values and external values in control flow context.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public global::Tensorflow.ValuesDef ValuesDef {
get { return valuesDef_; }
set {
valuesDef_ = value;
}
}
/// Field number for the "maximum_iterations_name" field.
public const int MaximumIterationsNameFieldNumber = 11;
private string maximumIterationsName_ = "";
///
/// Optional name of the maximum_iterations tensor.
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public string MaximumIterationsName {
get { return maximumIterationsName_; }
set {
maximumIterationsName_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
}
}
/// Field number for the "nested_contexts" field.
public const int NestedContextsFieldNumber = 12;
private static readonly pb::FieldCodec _repeated_nestedContexts_codec
= pb::FieldCodec.ForMessage(98, global::Tensorflow.ControlFlowContextDef.Parser);
private readonly pbc::RepeatedField nestedContexts_ = new pbc::RepeatedField();
///
/// Contexts contained inside this context (e.g. nested whiles).
///
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public pbc::RepeatedField NestedContexts {
get { return nestedContexts_; }
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override bool Equals(object other) {
return Equals(other as WhileContextDef);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public bool Equals(WhileContextDef other) {
if (ReferenceEquals(other, null)) {
return false;
}
if (ReferenceEquals(other, this)) {
return true;
}
if (ContextName != other.ContextName) return false;
if (ParallelIterations != other.ParallelIterations) return false;
if (BackProp != other.BackProp) return false;
if (SwapMemory != other.SwapMemory) return false;
if (PivotName != other.PivotName) return false;
if (PivotForPredName != other.PivotForPredName) return false;
if (PivotForBodyName != other.PivotForBodyName) return false;
if(!loopExitNames_.Equals(other.loopExitNames_)) return false;
if(!loopEnterNames_.Equals(other.loopEnterNames_)) return false;
if (!object.Equals(ValuesDef, other.ValuesDef)) return false;
if (MaximumIterationsName != other.MaximumIterationsName) return false;
if(!nestedContexts_.Equals(other.nestedContexts_)) return false;
return Equals(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override int GetHashCode() {
int hash = 1;
if (ContextName.Length != 0) hash ^= ContextName.GetHashCode();
if (ParallelIterations != 0) hash ^= ParallelIterations.GetHashCode();
if (BackProp != false) hash ^= BackProp.GetHashCode();
if (SwapMemory != false) hash ^= SwapMemory.GetHashCode();
if (PivotName.Length != 0) hash ^= PivotName.GetHashCode();
if (PivotForPredName.Length != 0) hash ^= PivotForPredName.GetHashCode();
if (PivotForBodyName.Length != 0) hash ^= PivotForBodyName.GetHashCode();
hash ^= loopExitNames_.GetHashCode();
hash ^= loopEnterNames_.GetHashCode();
if (valuesDef_ != null) hash ^= ValuesDef.GetHashCode();
if (MaximumIterationsName.Length != 0) hash ^= MaximumIterationsName.GetHashCode();
hash ^= nestedContexts_.GetHashCode();
if (_unknownFields != null) {
hash ^= _unknownFields.GetHashCode();
}
return hash;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public override string ToString() {
return pb::JsonFormatter.ToDiagnosticString(this);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void WriteTo(pb::CodedOutputStream output) {
if (ContextName.Length != 0) {
output.WriteRawTag(10);
output.WriteString(ContextName);
}
if (ParallelIterations != 0) {
output.WriteRawTag(16);
output.WriteInt32(ParallelIterations);
}
if (BackProp != false) {
output.WriteRawTag(24);
output.WriteBool(BackProp);
}
if (SwapMemory != false) {
output.WriteRawTag(32);
output.WriteBool(SwapMemory);
}
if (PivotName.Length != 0) {
output.WriteRawTag(42);
output.WriteString(PivotName);
}
if (PivotForPredName.Length != 0) {
output.WriteRawTag(50);
output.WriteString(PivotForPredName);
}
if (PivotForBodyName.Length != 0) {
output.WriteRawTag(58);
output.WriteString(PivotForBodyName);
}
loopExitNames_.WriteTo(output, _repeated_loopExitNames_codec);
if (valuesDef_ != null) {
output.WriteRawTag(74);
output.WriteMessage(ValuesDef);
}
loopEnterNames_.WriteTo(output, _repeated_loopEnterNames_codec);
if (MaximumIterationsName.Length != 0) {
output.WriteRawTag(90);
output.WriteString(MaximumIterationsName);
}
nestedContexts_.WriteTo(output, _repeated_nestedContexts_codec);
if (_unknownFields != null) {
_unknownFields.WriteTo(output);
}
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public int CalculateSize() {
int size = 0;
if (ContextName.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(ContextName);
}
if (ParallelIterations != 0) {
size += 1 + pb::CodedOutputStream.ComputeInt32Size(ParallelIterations);
}
if (BackProp != false) {
size += 1 + 1;
}
if (SwapMemory != false) {
size += 1 + 1;
}
if (PivotName.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(PivotName);
}
if (PivotForPredName.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(PivotForPredName);
}
if (PivotForBodyName.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(PivotForBodyName);
}
size += loopExitNames_.CalculateSize(_repeated_loopExitNames_codec);
size += loopEnterNames_.CalculateSize(_repeated_loopEnterNames_codec);
if (valuesDef_ != null) {
size += 1 + pb::CodedOutputStream.ComputeMessageSize(ValuesDef);
}
if (MaximumIterationsName.Length != 0) {
size += 1 + pb::CodedOutputStream.ComputeStringSize(MaximumIterationsName);
}
size += nestedContexts_.CalculateSize(_repeated_nestedContexts_codec);
if (_unknownFields != null) {
size += _unknownFields.CalculateSize();
}
return size;
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(WhileContextDef other) {
if (other == null) {
return;
}
if (other.ContextName.Length != 0) {
ContextName = other.ContextName;
}
if (other.ParallelIterations != 0) {
ParallelIterations = other.ParallelIterations;
}
if (other.BackProp != false) {
BackProp = other.BackProp;
}
if (other.SwapMemory != false) {
SwapMemory = other.SwapMemory;
}
if (other.PivotName.Length != 0) {
PivotName = other.PivotName;
}
if (other.PivotForPredName.Length != 0) {
PivotForPredName = other.PivotForPredName;
}
if (other.PivotForBodyName.Length != 0) {
PivotForBodyName = other.PivotForBodyName;
}
loopExitNames_.Add(other.loopExitNames_);
loopEnterNames_.Add(other.loopEnterNames_);
if (other.valuesDef_ != null) {
if (valuesDef_ == null) {
ValuesDef = new global::Tensorflow.ValuesDef();
}
ValuesDef.MergeFrom(other.ValuesDef);
}
if (other.MaximumIterationsName.Length != 0) {
MaximumIterationsName = other.MaximumIterationsName;
}
nestedContexts_.Add(other.nestedContexts_);
_unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
}
[global::System.Diagnostics.DebuggerNonUserCodeAttribute]
public void MergeFrom(pb::CodedInputStream input) {
uint tag;
while ((tag = input.ReadTag()) != 0) {
switch(tag) {
default:
_unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
break;
case 10: {
ContextName = input.ReadString();
break;
}
case 16: {
ParallelIterations = input.ReadInt32();
break;
}
case 24: {
BackProp = input.ReadBool();
break;
}
case 32: {
SwapMemory = input.ReadBool();
break;
}
case 42: {
PivotName = input.ReadString();
break;
}
case 50: {
PivotForPredName = input.ReadString();
break;
}
case 58: {
PivotForBodyName = input.ReadString();
break;
}
case 66: {
loopExitNames_.AddEntriesFrom(input, _repeated_loopExitNames_codec);
break;
}
case 74: {
if (valuesDef_ == null) {
ValuesDef = new global::Tensorflow.ValuesDef();
}
input.ReadMessage(ValuesDef);
break;
}
case 82: {
loopEnterNames_.AddEntriesFrom(input, _repeated_loopEnterNames_codec);
break;
}
case 90: {
MaximumIterationsName = input.ReadString();
break;
}
case 98: {
nestedContexts_.AddEntriesFrom(input, _repeated_nestedContexts_codec);
break;
}
}
}
}
}
#endregion
}
#endregion Designer generated code