You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

CostGraph.cs 74 kB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825
  1. // <auto-generated>
  2. // Generated by the protocol buffer compiler. DO NOT EDIT!
  3. // source: tensorflow/core/framework/cost_graph.proto
  4. // </auto-generated>
  5. #pragma warning disable 1591, 0612, 3021, 8981
  6. #region Designer generated code
  7. using pb = global::Google.Protobuf;
  8. using pbc = global::Google.Protobuf.Collections;
  9. using pbr = global::Google.Protobuf.Reflection;
  10. using scg = global::System.Collections.Generic;
  11. namespace Tensorflow {
  12. /// <summary>Holder for reflection information generated from tensorflow/core/framework/cost_graph.proto</summary>
  13. public static partial class CostGraphReflection {
  14. #region Descriptor
  15. /// <summary>File descriptor for tensorflow/core/framework/cost_graph.proto</summary>
  16. public static pbr::FileDescriptor Descriptor {
  17. get { return descriptor; }
  18. }
  19. private static pbr::FileDescriptor descriptor;
  20. static CostGraphReflection() {
  21. byte[] descriptorData = global::System.Convert.FromBase64String(
  22. string.Concat(
  23. "Cip0ZW5zb3JmbG93L2NvcmUvZnJhbWV3b3JrL2Nvc3RfZ3JhcGgucHJvdG8S",
  24. "CnRlbnNvcmZsb3caLHRlbnNvcmZsb3cvY29yZS9mcmFtZXdvcmsvdGVuc29y",
  25. "X3NoYXBlLnByb3RvGiV0ZW5zb3JmbG93L2NvcmUvZnJhbWV3b3JrL3R5cGVz",
  26. "LnByb3RvIsoGCgxDb3N0R3JhcGhEZWYSKwoEbm9kZRgBIAMoCzIdLnRlbnNv",
  27. "cmZsb3cuQ29zdEdyYXBoRGVmLk5vZGUSNQoEY29zdBgCIAMoCzInLnRlbnNv",
  28. "cmZsb3cuQ29zdEdyYXBoRGVmLkFnZ3JlZ2F0ZWRDb3N0GqIFCgROb2RlEgwK",
  29. "BG5hbWUYASABKAkSDgoGZGV2aWNlGAIgASgJEgoKAmlkGAMgASgFEjsKCmlu",
  30. "cHV0X2luZm8YBCADKAsyJy50ZW5zb3JmbG93LkNvc3RHcmFwaERlZi5Ob2Rl",
  31. "LklucHV0SW5mbxI9CgtvdXRwdXRfaW5mbxgFIAMoCzIoLnRlbnNvcmZsb3cu",
  32. "Q29zdEdyYXBoRGVmLk5vZGUuT3V0cHV0SW5mbxIdChV0ZW1wb3JhcnlfbWVt",
  33. "b3J5X3NpemUYBiABKAMSHgoWcGVyc2lzdGVudF9tZW1vcnlfc2l6ZRgMIAEo",
  34. "AxIhChVob3N0X3RlbXBfbWVtb3J5X3NpemUYCiABKANCAhgBEiMKF2Rldmlj",
  35. "ZV90ZW1wX21lbW9yeV9zaXplGAsgASgDQgIYARIpCh1kZXZpY2VfcGVyc2lz",
  36. "dGVudF9tZW1vcnlfc2l6ZRgQIAEoA0ICGAESFAoMY29tcHV0ZV9jb3N0GAkg",
  37. "ASgDEhQKDGNvbXB1dGVfdGltZRgOIAEoAxITCgttZW1vcnlfdGltZRgPIAEo",
  38. "AxIQCghpc19maW5hbBgHIAEoCBIVCg1jb250cm9sX2lucHV0GAggAygFEhIK",
  39. "CmluYWNjdXJhdGUYESABKAgaOwoJSW5wdXRJbmZvEhYKDnByZWNlZGluZ19u",
  40. "b2RlGAEgASgFEhYKDnByZWNlZGluZ19wb3J0GAIgASgFGoYBCgpPdXRwdXRJ",
  41. "bmZvEgwKBHNpemUYASABKAMSGAoQYWxpYXNfaW5wdXRfcG9ydBgCIAEoAxIr",
  42. "CgVzaGFwZRgDIAEoCzIcLnRlbnNvcmZsb3cuVGVuc29yU2hhcGVQcm90bxIj",
  43. "CgVkdHlwZRgEIAEoDjIULnRlbnNvcmZsb3cuRGF0YVR5cGUaMQoOQWdncmVn",
  44. "YXRlZENvc3QSDAoEY29zdBgBIAEoAhIRCglkaW1lbnNpb24YAiABKAlCgwEK",
  45. "GG9yZy50ZW5zb3JmbG93LmZyYW1ld29ya0IPQ29zdEdyYXBoUHJvdG9zUAFa",
  46. "UWdpdGh1Yi5jb20vdGVuc29yZmxvdy90ZW5zb3JmbG93L3RlbnNvcmZsb3cv",
  47. "Z28vY29yZS9mcmFtZXdvcmsvY29zdF9ncmFwaF9nb19wcm90b/gBAWIGcHJv",
  48. "dG8z"));
  49. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  50. new pbr::FileDescriptor[] { global::Tensorflow.TensorShapeReflection.Descriptor, global::Tensorflow.TypesReflection.Descriptor, },
  51. new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
  52. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CostGraphDef), global::Tensorflow.CostGraphDef.Parser, new[]{ "Node", "Cost" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CostGraphDef.Types.Node), global::Tensorflow.CostGraphDef.Types.Node.Parser, new[]{ "Name", "Device", "Id", "InputInfo", "OutputInfo", "TemporaryMemorySize", "PersistentMemorySize", "HostTempMemorySize", "DeviceTempMemorySize", "DevicePersistentMemorySize", "ComputeCost", "ComputeTime", "MemoryTime", "IsFinal", "ControlInput", "Inaccurate" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CostGraphDef.Types.Node.Types.InputInfo), global::Tensorflow.CostGraphDef.Types.Node.Types.InputInfo.Parser, new[]{ "PrecedingNode", "PrecedingPort" }, null, null, null, null),
  53. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CostGraphDef.Types.Node.Types.OutputInfo), global::Tensorflow.CostGraphDef.Types.Node.Types.OutputInfo.Parser, new[]{ "Size", "AliasInputPort", "Shape", "Dtype" }, null, null, null, null)}),
  54. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.CostGraphDef.Types.AggregatedCost), global::Tensorflow.CostGraphDef.Types.AggregatedCost.Parser, new[]{ "Cost", "Dimension" }, null, null, null, null)})
  55. }));
  56. }
  57. #endregion
  58. }
  59. #region Messages
  60. public sealed partial class CostGraphDef : pb::IMessage<CostGraphDef>
  61. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  62. , pb::IBufferMessage
  63. #endif
  64. {
  65. private static readonly pb::MessageParser<CostGraphDef> _parser = new pb::MessageParser<CostGraphDef>(() => new CostGraphDef());
  66. private pb::UnknownFieldSet _unknownFields;
  67. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  68. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  69. public static pb::MessageParser<CostGraphDef> Parser { get { return _parser; } }
  70. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  71. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  72. public static pbr::MessageDescriptor Descriptor {
  73. get { return global::Tensorflow.CostGraphReflection.Descriptor.MessageTypes[0]; }
  74. }
  75. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  76. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  77. pbr::MessageDescriptor pb::IMessage.Descriptor {
  78. get { return Descriptor; }
  79. }
  80. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  81. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  82. public CostGraphDef() {
  83. OnConstruction();
  84. }
  85. partial void OnConstruction();
  86. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  87. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  88. public CostGraphDef(CostGraphDef other) : this() {
  89. node_ = other.node_.Clone();
  90. cost_ = other.cost_.Clone();
  91. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  92. }
  93. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  94. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  95. public CostGraphDef Clone() {
  96. return new CostGraphDef(this);
  97. }
  98. /// <summary>Field number for the "node" field.</summary>
  99. public const int NodeFieldNumber = 1;
  100. private static readonly pb::FieldCodec<global::Tensorflow.CostGraphDef.Types.Node> _repeated_node_codec
  101. = pb::FieldCodec.ForMessage(10, global::Tensorflow.CostGraphDef.Types.Node.Parser);
  102. private readonly pbc::RepeatedField<global::Tensorflow.CostGraphDef.Types.Node> node_ = new pbc::RepeatedField<global::Tensorflow.CostGraphDef.Types.Node>();
  103. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  104. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  105. public pbc::RepeatedField<global::Tensorflow.CostGraphDef.Types.Node> Node {
  106. get { return node_; }
  107. }
  108. /// <summary>Field number for the "cost" field.</summary>
  109. public const int CostFieldNumber = 2;
  110. private static readonly pb::FieldCodec<global::Tensorflow.CostGraphDef.Types.AggregatedCost> _repeated_cost_codec
  111. = pb::FieldCodec.ForMessage(18, global::Tensorflow.CostGraphDef.Types.AggregatedCost.Parser);
  112. private readonly pbc::RepeatedField<global::Tensorflow.CostGraphDef.Types.AggregatedCost> cost_ = new pbc::RepeatedField<global::Tensorflow.CostGraphDef.Types.AggregatedCost>();
  113. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  114. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  115. public pbc::RepeatedField<global::Tensorflow.CostGraphDef.Types.AggregatedCost> Cost {
  116. get { return cost_; }
  117. }
  118. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  119. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  120. public override bool Equals(object other) {
  121. return Equals(other as CostGraphDef);
  122. }
  123. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  124. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  125. public bool Equals(CostGraphDef other) {
  126. if (ReferenceEquals(other, null)) {
  127. return false;
  128. }
  129. if (ReferenceEquals(other, this)) {
  130. return true;
  131. }
  132. if(!node_.Equals(other.node_)) return false;
  133. if(!cost_.Equals(other.cost_)) return false;
  134. return Equals(_unknownFields, other._unknownFields);
  135. }
  136. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  137. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  138. public override int GetHashCode() {
  139. int hash = 1;
  140. hash ^= node_.GetHashCode();
  141. hash ^= cost_.GetHashCode();
  142. if (_unknownFields != null) {
  143. hash ^= _unknownFields.GetHashCode();
  144. }
  145. return hash;
  146. }
  147. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  148. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  149. public override string ToString() {
  150. return pb::JsonFormatter.ToDiagnosticString(this);
  151. }
  152. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  153. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  154. public void WriteTo(pb::CodedOutputStream output) {
  155. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  156. output.WriteRawMessage(this);
  157. #else
  158. node_.WriteTo(output, _repeated_node_codec);
  159. cost_.WriteTo(output, _repeated_cost_codec);
  160. if (_unknownFields != null) {
  161. _unknownFields.WriteTo(output);
  162. }
  163. #endif
  164. }
  165. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  166. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  167. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  168. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  169. node_.WriteTo(ref output, _repeated_node_codec);
  170. cost_.WriteTo(ref output, _repeated_cost_codec);
  171. if (_unknownFields != null) {
  172. _unknownFields.WriteTo(ref output);
  173. }
  174. }
  175. #endif
  176. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  177. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  178. public int CalculateSize() {
  179. int size = 0;
  180. size += node_.CalculateSize(_repeated_node_codec);
  181. size += cost_.CalculateSize(_repeated_cost_codec);
  182. if (_unknownFields != null) {
  183. size += _unknownFields.CalculateSize();
  184. }
  185. return size;
  186. }
  187. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  188. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  189. public void MergeFrom(CostGraphDef other) {
  190. if (other == null) {
  191. return;
  192. }
  193. node_.Add(other.node_);
  194. cost_.Add(other.cost_);
  195. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  196. }
  197. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  198. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  199. public void MergeFrom(pb::CodedInputStream input) {
  200. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  201. input.ReadRawMessage(this);
  202. #else
  203. uint tag;
  204. while ((tag = input.ReadTag()) != 0) {
  205. switch(tag) {
  206. default:
  207. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  208. break;
  209. case 10: {
  210. node_.AddEntriesFrom(input, _repeated_node_codec);
  211. break;
  212. }
  213. case 18: {
  214. cost_.AddEntriesFrom(input, _repeated_cost_codec);
  215. break;
  216. }
  217. }
  218. }
  219. #endif
  220. }
  221. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  222. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  223. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  224. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  225. uint tag;
  226. while ((tag = input.ReadTag()) != 0) {
  227. switch(tag) {
  228. default:
  229. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  230. break;
  231. case 10: {
  232. node_.AddEntriesFrom(ref input, _repeated_node_codec);
  233. break;
  234. }
  235. case 18: {
  236. cost_.AddEntriesFrom(ref input, _repeated_cost_codec);
  237. break;
  238. }
  239. }
  240. }
  241. }
  242. #endif
  243. #region Nested types
  244. /// <summary>Container for nested types declared in the CostGraphDef message type.</summary>
  245. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  246. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  247. public static partial class Types {
  248. public sealed partial class Node : pb::IMessage<Node>
  249. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  250. , pb::IBufferMessage
  251. #endif
  252. {
  253. private static readonly pb::MessageParser<Node> _parser = new pb::MessageParser<Node>(() => new Node());
  254. private pb::UnknownFieldSet _unknownFields;
  255. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  256. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  257. public static pb::MessageParser<Node> Parser { get { return _parser; } }
  258. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  259. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  260. public static pbr::MessageDescriptor Descriptor {
  261. get { return global::Tensorflow.CostGraphDef.Descriptor.NestedTypes[0]; }
  262. }
  263. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  264. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  265. pbr::MessageDescriptor pb::IMessage.Descriptor {
  266. get { return Descriptor; }
  267. }
  268. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  269. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  270. public Node() {
  271. OnConstruction();
  272. }
  273. partial void OnConstruction();
  274. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  275. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  276. public Node(Node other) : this() {
  277. name_ = other.name_;
  278. device_ = other.device_;
  279. id_ = other.id_;
  280. inputInfo_ = other.inputInfo_.Clone();
  281. outputInfo_ = other.outputInfo_.Clone();
  282. temporaryMemorySize_ = other.temporaryMemorySize_;
  283. persistentMemorySize_ = other.persistentMemorySize_;
  284. hostTempMemorySize_ = other.hostTempMemorySize_;
  285. deviceTempMemorySize_ = other.deviceTempMemorySize_;
  286. devicePersistentMemorySize_ = other.devicePersistentMemorySize_;
  287. computeCost_ = other.computeCost_;
  288. computeTime_ = other.computeTime_;
  289. memoryTime_ = other.memoryTime_;
  290. isFinal_ = other.isFinal_;
  291. controlInput_ = other.controlInput_.Clone();
  292. inaccurate_ = other.inaccurate_;
  293. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  294. }
  295. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  296. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  297. public Node Clone() {
  298. return new Node(this);
  299. }
  300. /// <summary>Field number for the "name" field.</summary>
  301. public const int NameFieldNumber = 1;
  302. private string name_ = "";
  303. /// <summary>
  304. /// The name of the node. Names are globally unique.
  305. /// </summary>
  306. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  307. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  308. public string Name {
  309. get { return name_; }
  310. set {
  311. name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  312. }
  313. }
  314. /// <summary>Field number for the "device" field.</summary>
  315. public const int DeviceFieldNumber = 2;
  316. private string device_ = "";
  317. /// <summary>
  318. /// The device of the node. Can be empty if the node is mapped to the
  319. /// default partition or partitioning hasn't been run yet.
  320. /// </summary>
  321. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  322. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  323. public string Device {
  324. get { return device_; }
  325. set {
  326. device_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  327. }
  328. }
  329. /// <summary>Field number for the "id" field.</summary>
  330. public const int IdFieldNumber = 3;
  331. private int id_;
  332. /// <summary>
  333. /// The id of the node. Node ids are only unique inside a partition.
  334. /// </summary>
  335. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  336. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  337. public int Id {
  338. get { return id_; }
  339. set {
  340. id_ = value;
  341. }
  342. }
  343. /// <summary>Field number for the "input_info" field.</summary>
  344. public const int InputInfoFieldNumber = 4;
  345. private static readonly pb::FieldCodec<global::Tensorflow.CostGraphDef.Types.Node.Types.InputInfo> _repeated_inputInfo_codec
  346. = pb::FieldCodec.ForMessage(34, global::Tensorflow.CostGraphDef.Types.Node.Types.InputInfo.Parser);
  347. private readonly pbc::RepeatedField<global::Tensorflow.CostGraphDef.Types.Node.Types.InputInfo> inputInfo_ = new pbc::RepeatedField<global::Tensorflow.CostGraphDef.Types.Node.Types.InputInfo>();
  348. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  349. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  350. public pbc::RepeatedField<global::Tensorflow.CostGraphDef.Types.Node.Types.InputInfo> InputInfo {
  351. get { return inputInfo_; }
  352. }
  353. /// <summary>Field number for the "output_info" field.</summary>
  354. public const int OutputInfoFieldNumber = 5;
  355. private static readonly pb::FieldCodec<global::Tensorflow.CostGraphDef.Types.Node.Types.OutputInfo> _repeated_outputInfo_codec
  356. = pb::FieldCodec.ForMessage(42, global::Tensorflow.CostGraphDef.Types.Node.Types.OutputInfo.Parser);
  357. private readonly pbc::RepeatedField<global::Tensorflow.CostGraphDef.Types.Node.Types.OutputInfo> outputInfo_ = new pbc::RepeatedField<global::Tensorflow.CostGraphDef.Types.Node.Types.OutputInfo>();
  358. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  359. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  360. public pbc::RepeatedField<global::Tensorflow.CostGraphDef.Types.Node.Types.OutputInfo> OutputInfo {
  361. get { return outputInfo_; }
  362. }
  363. /// <summary>Field number for the "temporary_memory_size" field.</summary>
  364. public const int TemporaryMemorySizeFieldNumber = 6;
  365. private long temporaryMemorySize_;
  366. /// <summary>
  367. /// Temporary memory used by this node.
  368. /// </summary>
  369. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  370. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  371. public long TemporaryMemorySize {
  372. get { return temporaryMemorySize_; }
  373. set {
  374. temporaryMemorySize_ = value;
  375. }
  376. }
  377. /// <summary>Field number for the "persistent_memory_size" field.</summary>
  378. public const int PersistentMemorySizeFieldNumber = 12;
  379. private long persistentMemorySize_;
  380. /// <summary>
  381. /// Persistent memory used by this node.
  382. /// </summary>
  383. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  384. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  385. public long PersistentMemorySize {
  386. get { return persistentMemorySize_; }
  387. set {
  388. persistentMemorySize_ = value;
  389. }
  390. }
  391. /// <summary>Field number for the "host_temp_memory_size" field.</summary>
  392. public const int HostTempMemorySizeFieldNumber = 10;
  393. private long hostTempMemorySize_;
  394. [global::System.ObsoleteAttribute]
  395. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  396. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  397. public long HostTempMemorySize {
  398. get { return hostTempMemorySize_; }
  399. set {
  400. hostTempMemorySize_ = value;
  401. }
  402. }
  403. /// <summary>Field number for the "device_temp_memory_size" field.</summary>
  404. public const int DeviceTempMemorySizeFieldNumber = 11;
  405. private long deviceTempMemorySize_;
  406. [global::System.ObsoleteAttribute]
  407. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  408. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  409. public long DeviceTempMemorySize {
  410. get { return deviceTempMemorySize_; }
  411. set {
  412. deviceTempMemorySize_ = value;
  413. }
  414. }
  415. /// <summary>Field number for the "device_persistent_memory_size" field.</summary>
  416. public const int DevicePersistentMemorySizeFieldNumber = 16;
  417. private long devicePersistentMemorySize_;
  418. [global::System.ObsoleteAttribute]
  419. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  420. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  421. public long DevicePersistentMemorySize {
  422. get { return devicePersistentMemorySize_; }
  423. set {
  424. devicePersistentMemorySize_ = value;
  425. }
  426. }
  427. /// <summary>Field number for the "compute_cost" field.</summary>
  428. public const int ComputeCostFieldNumber = 9;
  429. private long computeCost_;
  430. /// <summary>
  431. /// Estimate of the computational cost of this node, in microseconds.
  432. /// </summary>
  433. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  434. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  435. public long ComputeCost {
  436. get { return computeCost_; }
  437. set {
  438. computeCost_ = value;
  439. }
  440. }
  441. /// <summary>Field number for the "compute_time" field.</summary>
  442. public const int ComputeTimeFieldNumber = 14;
  443. private long computeTime_;
  444. /// <summary>
  445. /// Analytical estimate of the computational cost of this node, in
  446. /// microseconds.
  447. /// </summary>
  448. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  449. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  450. public long ComputeTime {
  451. get { return computeTime_; }
  452. set {
  453. computeTime_ = value;
  454. }
  455. }
  456. /// <summary>Field number for the "memory_time" field.</summary>
  457. public const int MemoryTimeFieldNumber = 15;
  458. private long memoryTime_;
  459. /// <summary>
  460. /// Analytical estimate of the memory access cost of this node, in
  461. /// microseconds.
  462. /// </summary>
  463. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  464. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  465. public long MemoryTime {
  466. get { return memoryTime_; }
  467. set {
  468. memoryTime_ = value;
  469. }
  470. }
  471. /// <summary>Field number for the "is_final" field.</summary>
  472. public const int IsFinalFieldNumber = 7;
  473. private bool isFinal_;
  474. /// <summary>
  475. /// If true, the output is permanent: it can't be discarded, because this
  476. /// node is part of the "final output". Nodes may depend on final nodes.
  477. /// </summary>
  478. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  479. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  480. public bool IsFinal {
  481. get { return isFinal_; }
  482. set {
  483. isFinal_ = value;
  484. }
  485. }
  486. /// <summary>Field number for the "control_input" field.</summary>
  487. public const int ControlInputFieldNumber = 8;
  488. private static readonly pb::FieldCodec<int> _repeated_controlInput_codec
  489. = pb::FieldCodec.ForInt32(66);
  490. private readonly pbc::RepeatedField<int> controlInput_ = new pbc::RepeatedField<int>();
  491. /// <summary>
  492. /// Ids of the control inputs for this node.
  493. /// </summary>
  494. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  495. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  496. public pbc::RepeatedField<int> ControlInput {
  497. get { return controlInput_; }
  498. }
  499. /// <summary>Field number for the "inaccurate" field.</summary>
  500. public const int InaccurateFieldNumber = 17;
  501. private bool inaccurate_;
  502. /// <summary>
  503. /// Are the costs inaccurate?
  504. /// </summary>
  505. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  506. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  507. public bool Inaccurate {
  508. get { return inaccurate_; }
  509. set {
  510. inaccurate_ = value;
  511. }
  512. }
  513. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  514. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  515. public override bool Equals(object other) {
  516. return Equals(other as Node);
  517. }
  518. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  519. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  520. public bool Equals(Node other) {
  521. if (ReferenceEquals(other, null)) {
  522. return false;
  523. }
  524. if (ReferenceEquals(other, this)) {
  525. return true;
  526. }
  527. if (Name != other.Name) return false;
  528. if (Device != other.Device) return false;
  529. if (Id != other.Id) return false;
  530. if(!inputInfo_.Equals(other.inputInfo_)) return false;
  531. if(!outputInfo_.Equals(other.outputInfo_)) return false;
  532. if (TemporaryMemorySize != other.TemporaryMemorySize) return false;
  533. if (PersistentMemorySize != other.PersistentMemorySize) return false;
  534. if (HostTempMemorySize != other.HostTempMemorySize) return false;
  535. if (DeviceTempMemorySize != other.DeviceTempMemorySize) return false;
  536. if (DevicePersistentMemorySize != other.DevicePersistentMemorySize) return false;
  537. if (ComputeCost != other.ComputeCost) return false;
  538. if (ComputeTime != other.ComputeTime) return false;
  539. if (MemoryTime != other.MemoryTime) return false;
  540. if (IsFinal != other.IsFinal) return false;
  541. if(!controlInput_.Equals(other.controlInput_)) return false;
  542. if (Inaccurate != other.Inaccurate) return false;
  543. return Equals(_unknownFields, other._unknownFields);
  544. }
  545. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  546. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  547. public override int GetHashCode() {
  548. int hash = 1;
  549. if (Name.Length != 0) hash ^= Name.GetHashCode();
  550. if (Device.Length != 0) hash ^= Device.GetHashCode();
  551. if (Id != 0) hash ^= Id.GetHashCode();
  552. hash ^= inputInfo_.GetHashCode();
  553. hash ^= outputInfo_.GetHashCode();
  554. if (TemporaryMemorySize != 0L) hash ^= TemporaryMemorySize.GetHashCode();
  555. if (PersistentMemorySize != 0L) hash ^= PersistentMemorySize.GetHashCode();
  556. if (HostTempMemorySize != 0L) hash ^= HostTempMemorySize.GetHashCode();
  557. if (DeviceTempMemorySize != 0L) hash ^= DeviceTempMemorySize.GetHashCode();
  558. if (DevicePersistentMemorySize != 0L) hash ^= DevicePersistentMemorySize.GetHashCode();
  559. if (ComputeCost != 0L) hash ^= ComputeCost.GetHashCode();
  560. if (ComputeTime != 0L) hash ^= ComputeTime.GetHashCode();
  561. if (MemoryTime != 0L) hash ^= MemoryTime.GetHashCode();
  562. if (IsFinal != false) hash ^= IsFinal.GetHashCode();
  563. hash ^= controlInput_.GetHashCode();
  564. if (Inaccurate != false) hash ^= Inaccurate.GetHashCode();
  565. if (_unknownFields != null) {
  566. hash ^= _unknownFields.GetHashCode();
  567. }
  568. return hash;
  569. }
  570. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  571. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  572. public override string ToString() {
  573. return pb::JsonFormatter.ToDiagnosticString(this);
  574. }
  575. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  576. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  577. public void WriteTo(pb::CodedOutputStream output) {
  578. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  579. output.WriteRawMessage(this);
  580. #else
  581. if (Name.Length != 0) {
  582. output.WriteRawTag(10);
  583. output.WriteString(Name);
  584. }
  585. if (Device.Length != 0) {
  586. output.WriteRawTag(18);
  587. output.WriteString(Device);
  588. }
  589. if (Id != 0) {
  590. output.WriteRawTag(24);
  591. output.WriteInt32(Id);
  592. }
  593. inputInfo_.WriteTo(output, _repeated_inputInfo_codec);
  594. outputInfo_.WriteTo(output, _repeated_outputInfo_codec);
  595. if (TemporaryMemorySize != 0L) {
  596. output.WriteRawTag(48);
  597. output.WriteInt64(TemporaryMemorySize);
  598. }
  599. if (IsFinal != false) {
  600. output.WriteRawTag(56);
  601. output.WriteBool(IsFinal);
  602. }
  603. controlInput_.WriteTo(output, _repeated_controlInput_codec);
  604. if (ComputeCost != 0L) {
  605. output.WriteRawTag(72);
  606. output.WriteInt64(ComputeCost);
  607. }
  608. if (HostTempMemorySize != 0L) {
  609. output.WriteRawTag(80);
  610. output.WriteInt64(HostTempMemorySize);
  611. }
  612. if (DeviceTempMemorySize != 0L) {
  613. output.WriteRawTag(88);
  614. output.WriteInt64(DeviceTempMemorySize);
  615. }
  616. if (PersistentMemorySize != 0L) {
  617. output.WriteRawTag(96);
  618. output.WriteInt64(PersistentMemorySize);
  619. }
  620. if (ComputeTime != 0L) {
  621. output.WriteRawTag(112);
  622. output.WriteInt64(ComputeTime);
  623. }
  624. if (MemoryTime != 0L) {
  625. output.WriteRawTag(120);
  626. output.WriteInt64(MemoryTime);
  627. }
  628. if (DevicePersistentMemorySize != 0L) {
  629. output.WriteRawTag(128, 1);
  630. output.WriteInt64(DevicePersistentMemorySize);
  631. }
  632. if (Inaccurate != false) {
  633. output.WriteRawTag(136, 1);
  634. output.WriteBool(Inaccurate);
  635. }
  636. if (_unknownFields != null) {
  637. _unknownFields.WriteTo(output);
  638. }
  639. #endif
  640. }
  641. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  642. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  643. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  644. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  645. if (Name.Length != 0) {
  646. output.WriteRawTag(10);
  647. output.WriteString(Name);
  648. }
  649. if (Device.Length != 0) {
  650. output.WriteRawTag(18);
  651. output.WriteString(Device);
  652. }
  653. if (Id != 0) {
  654. output.WriteRawTag(24);
  655. output.WriteInt32(Id);
  656. }
  657. inputInfo_.WriteTo(ref output, _repeated_inputInfo_codec);
  658. outputInfo_.WriteTo(ref output, _repeated_outputInfo_codec);
  659. if (TemporaryMemorySize != 0L) {
  660. output.WriteRawTag(48);
  661. output.WriteInt64(TemporaryMemorySize);
  662. }
  663. if (IsFinal != false) {
  664. output.WriteRawTag(56);
  665. output.WriteBool(IsFinal);
  666. }
  667. controlInput_.WriteTo(ref output, _repeated_controlInput_codec);
  668. if (ComputeCost != 0L) {
  669. output.WriteRawTag(72);
  670. output.WriteInt64(ComputeCost);
  671. }
  672. if (HostTempMemorySize != 0L) {
  673. output.WriteRawTag(80);
  674. output.WriteInt64(HostTempMemorySize);
  675. }
  676. if (DeviceTempMemorySize != 0L) {
  677. output.WriteRawTag(88);
  678. output.WriteInt64(DeviceTempMemorySize);
  679. }
  680. if (PersistentMemorySize != 0L) {
  681. output.WriteRawTag(96);
  682. output.WriteInt64(PersistentMemorySize);
  683. }
  684. if (ComputeTime != 0L) {
  685. output.WriteRawTag(112);
  686. output.WriteInt64(ComputeTime);
  687. }
  688. if (MemoryTime != 0L) {
  689. output.WriteRawTag(120);
  690. output.WriteInt64(MemoryTime);
  691. }
  692. if (DevicePersistentMemorySize != 0L) {
  693. output.WriteRawTag(128, 1);
  694. output.WriteInt64(DevicePersistentMemorySize);
  695. }
  696. if (Inaccurate != false) {
  697. output.WriteRawTag(136, 1);
  698. output.WriteBool(Inaccurate);
  699. }
  700. if (_unknownFields != null) {
  701. _unknownFields.WriteTo(ref output);
  702. }
  703. }
  704. #endif
  705. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  706. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  707. public int CalculateSize() {
  708. int size = 0;
  709. if (Name.Length != 0) {
  710. size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
  711. }
  712. if (Device.Length != 0) {
  713. size += 1 + pb::CodedOutputStream.ComputeStringSize(Device);
  714. }
  715. if (Id != 0) {
  716. size += 1 + pb::CodedOutputStream.ComputeInt32Size(Id);
  717. }
  718. size += inputInfo_.CalculateSize(_repeated_inputInfo_codec);
  719. size += outputInfo_.CalculateSize(_repeated_outputInfo_codec);
  720. if (TemporaryMemorySize != 0L) {
  721. size += 1 + pb::CodedOutputStream.ComputeInt64Size(TemporaryMemorySize);
  722. }
  723. if (PersistentMemorySize != 0L) {
  724. size += 1 + pb::CodedOutputStream.ComputeInt64Size(PersistentMemorySize);
  725. }
  726. if (HostTempMemorySize != 0L) {
  727. size += 1 + pb::CodedOutputStream.ComputeInt64Size(HostTempMemorySize);
  728. }
  729. if (DeviceTempMemorySize != 0L) {
  730. size += 1 + pb::CodedOutputStream.ComputeInt64Size(DeviceTempMemorySize);
  731. }
  732. if (DevicePersistentMemorySize != 0L) {
  733. size += 2 + pb::CodedOutputStream.ComputeInt64Size(DevicePersistentMemorySize);
  734. }
  735. if (ComputeCost != 0L) {
  736. size += 1 + pb::CodedOutputStream.ComputeInt64Size(ComputeCost);
  737. }
  738. if (ComputeTime != 0L) {
  739. size += 1 + pb::CodedOutputStream.ComputeInt64Size(ComputeTime);
  740. }
  741. if (MemoryTime != 0L) {
  742. size += 1 + pb::CodedOutputStream.ComputeInt64Size(MemoryTime);
  743. }
  744. if (IsFinal != false) {
  745. size += 1 + 1;
  746. }
  747. size += controlInput_.CalculateSize(_repeated_controlInput_codec);
  748. if (Inaccurate != false) {
  749. size += 2 + 1;
  750. }
  751. if (_unknownFields != null) {
  752. size += _unknownFields.CalculateSize();
  753. }
  754. return size;
  755. }
  756. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  757. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  758. public void MergeFrom(Node other) {
  759. if (other == null) {
  760. return;
  761. }
  762. if (other.Name.Length != 0) {
  763. Name = other.Name;
  764. }
  765. if (other.Device.Length != 0) {
  766. Device = other.Device;
  767. }
  768. if (other.Id != 0) {
  769. Id = other.Id;
  770. }
  771. inputInfo_.Add(other.inputInfo_);
  772. outputInfo_.Add(other.outputInfo_);
  773. if (other.TemporaryMemorySize != 0L) {
  774. TemporaryMemorySize = other.TemporaryMemorySize;
  775. }
  776. if (other.PersistentMemorySize != 0L) {
  777. PersistentMemorySize = other.PersistentMemorySize;
  778. }
  779. if (other.HostTempMemorySize != 0L) {
  780. HostTempMemorySize = other.HostTempMemorySize;
  781. }
  782. if (other.DeviceTempMemorySize != 0L) {
  783. DeviceTempMemorySize = other.DeviceTempMemorySize;
  784. }
  785. if (other.DevicePersistentMemorySize != 0L) {
  786. DevicePersistentMemorySize = other.DevicePersistentMemorySize;
  787. }
  788. if (other.ComputeCost != 0L) {
  789. ComputeCost = other.ComputeCost;
  790. }
  791. if (other.ComputeTime != 0L) {
  792. ComputeTime = other.ComputeTime;
  793. }
  794. if (other.MemoryTime != 0L) {
  795. MemoryTime = other.MemoryTime;
  796. }
  797. if (other.IsFinal != false) {
  798. IsFinal = other.IsFinal;
  799. }
  800. controlInput_.Add(other.controlInput_);
  801. if (other.Inaccurate != false) {
  802. Inaccurate = other.Inaccurate;
  803. }
  804. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  805. }
  806. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  807. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  808. public void MergeFrom(pb::CodedInputStream input) {
  809. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  810. input.ReadRawMessage(this);
  811. #else
  812. uint tag;
  813. while ((tag = input.ReadTag()) != 0) {
  814. switch(tag) {
  815. default:
  816. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  817. break;
  818. case 10: {
  819. Name = input.ReadString();
  820. break;
  821. }
  822. case 18: {
  823. Device = input.ReadString();
  824. break;
  825. }
  826. case 24: {
  827. Id = input.ReadInt32();
  828. break;
  829. }
  830. case 34: {
  831. inputInfo_.AddEntriesFrom(input, _repeated_inputInfo_codec);
  832. break;
  833. }
  834. case 42: {
  835. outputInfo_.AddEntriesFrom(input, _repeated_outputInfo_codec);
  836. break;
  837. }
  838. case 48: {
  839. TemporaryMemorySize = input.ReadInt64();
  840. break;
  841. }
  842. case 56: {
  843. IsFinal = input.ReadBool();
  844. break;
  845. }
  846. case 66:
  847. case 64: {
  848. controlInput_.AddEntriesFrom(input, _repeated_controlInput_codec);
  849. break;
  850. }
  851. case 72: {
  852. ComputeCost = input.ReadInt64();
  853. break;
  854. }
  855. case 80: {
  856. HostTempMemorySize = input.ReadInt64();
  857. break;
  858. }
  859. case 88: {
  860. DeviceTempMemorySize = input.ReadInt64();
  861. break;
  862. }
  863. case 96: {
  864. PersistentMemorySize = input.ReadInt64();
  865. break;
  866. }
  867. case 112: {
  868. ComputeTime = input.ReadInt64();
  869. break;
  870. }
  871. case 120: {
  872. MemoryTime = input.ReadInt64();
  873. break;
  874. }
  875. case 128: {
  876. DevicePersistentMemorySize = input.ReadInt64();
  877. break;
  878. }
  879. case 136: {
  880. Inaccurate = input.ReadBool();
  881. break;
  882. }
  883. }
  884. }
  885. #endif
  886. }
  887. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  888. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  889. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  890. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  891. uint tag;
  892. while ((tag = input.ReadTag()) != 0) {
  893. switch(tag) {
  894. default:
  895. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  896. break;
  897. case 10: {
  898. Name = input.ReadString();
  899. break;
  900. }
  901. case 18: {
  902. Device = input.ReadString();
  903. break;
  904. }
  905. case 24: {
  906. Id = input.ReadInt32();
  907. break;
  908. }
  909. case 34: {
  910. inputInfo_.AddEntriesFrom(ref input, _repeated_inputInfo_codec);
  911. break;
  912. }
  913. case 42: {
  914. outputInfo_.AddEntriesFrom(ref input, _repeated_outputInfo_codec);
  915. break;
  916. }
  917. case 48: {
  918. TemporaryMemorySize = input.ReadInt64();
  919. break;
  920. }
  921. case 56: {
  922. IsFinal = input.ReadBool();
  923. break;
  924. }
  925. case 66:
  926. case 64: {
  927. controlInput_.AddEntriesFrom(ref input, _repeated_controlInput_codec);
  928. break;
  929. }
  930. case 72: {
  931. ComputeCost = input.ReadInt64();
  932. break;
  933. }
  934. case 80: {
  935. HostTempMemorySize = input.ReadInt64();
  936. break;
  937. }
  938. case 88: {
  939. DeviceTempMemorySize = input.ReadInt64();
  940. break;
  941. }
  942. case 96: {
  943. PersistentMemorySize = input.ReadInt64();
  944. break;
  945. }
  946. case 112: {
  947. ComputeTime = input.ReadInt64();
  948. break;
  949. }
  950. case 120: {
  951. MemoryTime = input.ReadInt64();
  952. break;
  953. }
  954. case 128: {
  955. DevicePersistentMemorySize = input.ReadInt64();
  956. break;
  957. }
  958. case 136: {
  959. Inaccurate = input.ReadBool();
  960. break;
  961. }
  962. }
  963. }
  964. }
  965. #endif
  966. #region Nested types
  967. /// <summary>Container for nested types declared in the Node message type.</summary>
  968. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  969. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  970. public static partial class Types {
  971. /// <summary>
  972. /// Inputs of this node. They must be executed before this node can be
  973. /// executed. An input is a particular output of another node, specified
  974. /// by the node id and the output index.
  975. /// </summary>
  976. public sealed partial class InputInfo : pb::IMessage<InputInfo>
  977. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  978. , pb::IBufferMessage
  979. #endif
  980. {
  981. private static readonly pb::MessageParser<InputInfo> _parser = new pb::MessageParser<InputInfo>(() => new InputInfo());
  982. private pb::UnknownFieldSet _unknownFields;
  983. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  984. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  985. public static pb::MessageParser<InputInfo> Parser { get { return _parser; } }
  986. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  987. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  988. public static pbr::MessageDescriptor Descriptor {
  989. get { return global::Tensorflow.CostGraphDef.Types.Node.Descriptor.NestedTypes[0]; }
  990. }
  991. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  992. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  993. pbr::MessageDescriptor pb::IMessage.Descriptor {
  994. get { return Descriptor; }
  995. }
  996. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  997. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  998. public InputInfo() {
  999. OnConstruction();
  1000. }
  1001. partial void OnConstruction();
  1002. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1003. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1004. public InputInfo(InputInfo other) : this() {
  1005. precedingNode_ = other.precedingNode_;
  1006. precedingPort_ = other.precedingPort_;
  1007. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1008. }
  1009. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1010. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1011. public InputInfo Clone() {
  1012. return new InputInfo(this);
  1013. }
  1014. /// <summary>Field number for the "preceding_node" field.</summary>
  1015. public const int PrecedingNodeFieldNumber = 1;
  1016. private int precedingNode_;
  1017. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1018. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1019. public int PrecedingNode {
  1020. get { return precedingNode_; }
  1021. set {
  1022. precedingNode_ = value;
  1023. }
  1024. }
  1025. /// <summary>Field number for the "preceding_port" field.</summary>
  1026. public const int PrecedingPortFieldNumber = 2;
  1027. private int precedingPort_;
  1028. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1029. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1030. public int PrecedingPort {
  1031. get { return precedingPort_; }
  1032. set {
  1033. precedingPort_ = value;
  1034. }
  1035. }
  1036. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1037. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1038. public override bool Equals(object other) {
  1039. return Equals(other as InputInfo);
  1040. }
  1041. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1042. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1043. public bool Equals(InputInfo other) {
  1044. if (ReferenceEquals(other, null)) {
  1045. return false;
  1046. }
  1047. if (ReferenceEquals(other, this)) {
  1048. return true;
  1049. }
  1050. if (PrecedingNode != other.PrecedingNode) return false;
  1051. if (PrecedingPort != other.PrecedingPort) return false;
  1052. return Equals(_unknownFields, other._unknownFields);
  1053. }
  1054. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1055. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1056. public override int GetHashCode() {
  1057. int hash = 1;
  1058. if (PrecedingNode != 0) hash ^= PrecedingNode.GetHashCode();
  1059. if (PrecedingPort != 0) hash ^= PrecedingPort.GetHashCode();
  1060. if (_unknownFields != null) {
  1061. hash ^= _unknownFields.GetHashCode();
  1062. }
  1063. return hash;
  1064. }
  1065. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1066. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1067. public override string ToString() {
  1068. return pb::JsonFormatter.ToDiagnosticString(this);
  1069. }
  1070. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1071. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1072. public void WriteTo(pb::CodedOutputStream output) {
  1073. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1074. output.WriteRawMessage(this);
  1075. #else
  1076. if (PrecedingNode != 0) {
  1077. output.WriteRawTag(8);
  1078. output.WriteInt32(PrecedingNode);
  1079. }
  1080. if (PrecedingPort != 0) {
  1081. output.WriteRawTag(16);
  1082. output.WriteInt32(PrecedingPort);
  1083. }
  1084. if (_unknownFields != null) {
  1085. _unknownFields.WriteTo(output);
  1086. }
  1087. #endif
  1088. }
  1089. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1090. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1091. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1092. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  1093. if (PrecedingNode != 0) {
  1094. output.WriteRawTag(8);
  1095. output.WriteInt32(PrecedingNode);
  1096. }
  1097. if (PrecedingPort != 0) {
  1098. output.WriteRawTag(16);
  1099. output.WriteInt32(PrecedingPort);
  1100. }
  1101. if (_unknownFields != null) {
  1102. _unknownFields.WriteTo(ref output);
  1103. }
  1104. }
  1105. #endif
  1106. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1107. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1108. public int CalculateSize() {
  1109. int size = 0;
  1110. if (PrecedingNode != 0) {
  1111. size += 1 + pb::CodedOutputStream.ComputeInt32Size(PrecedingNode);
  1112. }
  1113. if (PrecedingPort != 0) {
  1114. size += 1 + pb::CodedOutputStream.ComputeInt32Size(PrecedingPort);
  1115. }
  1116. if (_unknownFields != null) {
  1117. size += _unknownFields.CalculateSize();
  1118. }
  1119. return size;
  1120. }
  1121. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1122. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1123. public void MergeFrom(InputInfo other) {
  1124. if (other == null) {
  1125. return;
  1126. }
  1127. if (other.PrecedingNode != 0) {
  1128. PrecedingNode = other.PrecedingNode;
  1129. }
  1130. if (other.PrecedingPort != 0) {
  1131. PrecedingPort = other.PrecedingPort;
  1132. }
  1133. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1134. }
  1135. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1136. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1137. public void MergeFrom(pb::CodedInputStream input) {
  1138. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1139. input.ReadRawMessage(this);
  1140. #else
  1141. uint tag;
  1142. while ((tag = input.ReadTag()) != 0) {
  1143. switch(tag) {
  1144. default:
  1145. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1146. break;
  1147. case 8: {
  1148. PrecedingNode = input.ReadInt32();
  1149. break;
  1150. }
  1151. case 16: {
  1152. PrecedingPort = input.ReadInt32();
  1153. break;
  1154. }
  1155. }
  1156. }
  1157. #endif
  1158. }
  1159. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1160. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1161. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1162. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  1163. uint tag;
  1164. while ((tag = input.ReadTag()) != 0) {
  1165. switch(tag) {
  1166. default:
  1167. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  1168. break;
  1169. case 8: {
  1170. PrecedingNode = input.ReadInt32();
  1171. break;
  1172. }
  1173. case 16: {
  1174. PrecedingPort = input.ReadInt32();
  1175. break;
  1176. }
  1177. }
  1178. }
  1179. }
  1180. #endif
  1181. }
  1182. /// <summary>
  1183. /// Outputs of this node.
  1184. /// </summary>
  1185. public sealed partial class OutputInfo : pb::IMessage<OutputInfo>
  1186. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1187. , pb::IBufferMessage
  1188. #endif
  1189. {
  1190. private static readonly pb::MessageParser<OutputInfo> _parser = new pb::MessageParser<OutputInfo>(() => new OutputInfo());
  1191. private pb::UnknownFieldSet _unknownFields;
  1192. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1193. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1194. public static pb::MessageParser<OutputInfo> Parser { get { return _parser; } }
  1195. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1196. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1197. public static pbr::MessageDescriptor Descriptor {
  1198. get { return global::Tensorflow.CostGraphDef.Types.Node.Descriptor.NestedTypes[1]; }
  1199. }
  1200. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1201. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1202. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1203. get { return Descriptor; }
  1204. }
  1205. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1206. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1207. public OutputInfo() {
  1208. OnConstruction();
  1209. }
  1210. partial void OnConstruction();
  1211. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1212. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1213. public OutputInfo(OutputInfo other) : this() {
  1214. size_ = other.size_;
  1215. aliasInputPort_ = other.aliasInputPort_;
  1216. shape_ = other.shape_ != null ? other.shape_.Clone() : null;
  1217. dtype_ = other.dtype_;
  1218. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1219. }
  1220. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1221. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1222. public OutputInfo Clone() {
  1223. return new OutputInfo(this);
  1224. }
  1225. /// <summary>Field number for the "size" field.</summary>
  1226. public const int SizeFieldNumber = 1;
  1227. private long size_;
  1228. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1229. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1230. public long Size {
  1231. get { return size_; }
  1232. set {
  1233. size_ = value;
  1234. }
  1235. }
  1236. /// <summary>Field number for the "alias_input_port" field.</summary>
  1237. public const int AliasInputPortFieldNumber = 2;
  1238. private long aliasInputPort_;
  1239. /// <summary>
  1240. /// If >= 0, the output is an alias of an input. Note that an alias input
  1241. /// may itself be an alias. The algorithm will therefore need to follow
  1242. /// those pointers.
  1243. /// </summary>
  1244. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1245. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1246. public long AliasInputPort {
  1247. get { return aliasInputPort_; }
  1248. set {
  1249. aliasInputPort_ = value;
  1250. }
  1251. }
  1252. /// <summary>Field number for the "shape" field.</summary>
  1253. public const int ShapeFieldNumber = 3;
  1254. private global::Tensorflow.TensorShapeProto shape_;
  1255. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1256. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1257. public global::Tensorflow.TensorShapeProto Shape {
  1258. get { return shape_; }
  1259. set {
  1260. shape_ = value;
  1261. }
  1262. }
  1263. /// <summary>Field number for the "dtype" field.</summary>
  1264. public const int DtypeFieldNumber = 4;
  1265. private global::Tensorflow.DataType dtype_ = global::Tensorflow.DataType.DtInvalid;
  1266. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1267. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1268. public global::Tensorflow.DataType Dtype {
  1269. get { return dtype_; }
  1270. set {
  1271. dtype_ = value;
  1272. }
  1273. }
  1274. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1275. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1276. public override bool Equals(object other) {
  1277. return Equals(other as OutputInfo);
  1278. }
  1279. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1280. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1281. public bool Equals(OutputInfo other) {
  1282. if (ReferenceEquals(other, null)) {
  1283. return false;
  1284. }
  1285. if (ReferenceEquals(other, this)) {
  1286. return true;
  1287. }
  1288. if (Size != other.Size) return false;
  1289. if (AliasInputPort != other.AliasInputPort) return false;
  1290. if (!object.Equals(Shape, other.Shape)) return false;
  1291. if (Dtype != other.Dtype) return false;
  1292. return Equals(_unknownFields, other._unknownFields);
  1293. }
  1294. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1295. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1296. public override int GetHashCode() {
  1297. int hash = 1;
  1298. if (Size != 0L) hash ^= Size.GetHashCode();
  1299. if (AliasInputPort != 0L) hash ^= AliasInputPort.GetHashCode();
  1300. if (shape_ != null) hash ^= Shape.GetHashCode();
  1301. if (Dtype != global::Tensorflow.DataType.DtInvalid) hash ^= Dtype.GetHashCode();
  1302. if (_unknownFields != null) {
  1303. hash ^= _unknownFields.GetHashCode();
  1304. }
  1305. return hash;
  1306. }
  1307. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1308. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1309. public override string ToString() {
  1310. return pb::JsonFormatter.ToDiagnosticString(this);
  1311. }
  1312. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1313. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1314. public void WriteTo(pb::CodedOutputStream output) {
  1315. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1316. output.WriteRawMessage(this);
  1317. #else
  1318. if (Size != 0L) {
  1319. output.WriteRawTag(8);
  1320. output.WriteInt64(Size);
  1321. }
  1322. if (AliasInputPort != 0L) {
  1323. output.WriteRawTag(16);
  1324. output.WriteInt64(AliasInputPort);
  1325. }
  1326. if (shape_ != null) {
  1327. output.WriteRawTag(26);
  1328. output.WriteMessage(Shape);
  1329. }
  1330. if (Dtype != global::Tensorflow.DataType.DtInvalid) {
  1331. output.WriteRawTag(32);
  1332. output.WriteEnum((int) Dtype);
  1333. }
  1334. if (_unknownFields != null) {
  1335. _unknownFields.WriteTo(output);
  1336. }
  1337. #endif
  1338. }
  1339. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1340. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1341. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1342. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  1343. if (Size != 0L) {
  1344. output.WriteRawTag(8);
  1345. output.WriteInt64(Size);
  1346. }
  1347. if (AliasInputPort != 0L) {
  1348. output.WriteRawTag(16);
  1349. output.WriteInt64(AliasInputPort);
  1350. }
  1351. if (shape_ != null) {
  1352. output.WriteRawTag(26);
  1353. output.WriteMessage(Shape);
  1354. }
  1355. if (Dtype != global::Tensorflow.DataType.DtInvalid) {
  1356. output.WriteRawTag(32);
  1357. output.WriteEnum((int) Dtype);
  1358. }
  1359. if (_unknownFields != null) {
  1360. _unknownFields.WriteTo(ref output);
  1361. }
  1362. }
  1363. #endif
  1364. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1365. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1366. public int CalculateSize() {
  1367. int size = 0;
  1368. if (Size != 0L) {
  1369. size += 1 + pb::CodedOutputStream.ComputeInt64Size(Size);
  1370. }
  1371. if (AliasInputPort != 0L) {
  1372. size += 1 + pb::CodedOutputStream.ComputeInt64Size(AliasInputPort);
  1373. }
  1374. if (shape_ != null) {
  1375. size += 1 + pb::CodedOutputStream.ComputeMessageSize(Shape);
  1376. }
  1377. if (Dtype != global::Tensorflow.DataType.DtInvalid) {
  1378. size += 1 + pb::CodedOutputStream.ComputeEnumSize((int) Dtype);
  1379. }
  1380. if (_unknownFields != null) {
  1381. size += _unknownFields.CalculateSize();
  1382. }
  1383. return size;
  1384. }
  1385. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1386. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1387. public void MergeFrom(OutputInfo other) {
  1388. if (other == null) {
  1389. return;
  1390. }
  1391. if (other.Size != 0L) {
  1392. Size = other.Size;
  1393. }
  1394. if (other.AliasInputPort != 0L) {
  1395. AliasInputPort = other.AliasInputPort;
  1396. }
  1397. if (other.shape_ != null) {
  1398. if (shape_ == null) {
  1399. Shape = new global::Tensorflow.TensorShapeProto();
  1400. }
  1401. Shape.MergeFrom(other.Shape);
  1402. }
  1403. if (other.Dtype != global::Tensorflow.DataType.DtInvalid) {
  1404. Dtype = other.Dtype;
  1405. }
  1406. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1407. }
  1408. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1409. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1410. public void MergeFrom(pb::CodedInputStream input) {
  1411. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1412. input.ReadRawMessage(this);
  1413. #else
  1414. uint tag;
  1415. while ((tag = input.ReadTag()) != 0) {
  1416. switch(tag) {
  1417. default:
  1418. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1419. break;
  1420. case 8: {
  1421. Size = input.ReadInt64();
  1422. break;
  1423. }
  1424. case 16: {
  1425. AliasInputPort = input.ReadInt64();
  1426. break;
  1427. }
  1428. case 26: {
  1429. if (shape_ == null) {
  1430. Shape = new global::Tensorflow.TensorShapeProto();
  1431. }
  1432. input.ReadMessage(Shape);
  1433. break;
  1434. }
  1435. case 32: {
  1436. Dtype = (global::Tensorflow.DataType) input.ReadEnum();
  1437. break;
  1438. }
  1439. }
  1440. }
  1441. #endif
  1442. }
  1443. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1444. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1445. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1446. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  1447. uint tag;
  1448. while ((tag = input.ReadTag()) != 0) {
  1449. switch(tag) {
  1450. default:
  1451. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  1452. break;
  1453. case 8: {
  1454. Size = input.ReadInt64();
  1455. break;
  1456. }
  1457. case 16: {
  1458. AliasInputPort = input.ReadInt64();
  1459. break;
  1460. }
  1461. case 26: {
  1462. if (shape_ == null) {
  1463. Shape = new global::Tensorflow.TensorShapeProto();
  1464. }
  1465. input.ReadMessage(Shape);
  1466. break;
  1467. }
  1468. case 32: {
  1469. Dtype = (global::Tensorflow.DataType) input.ReadEnum();
  1470. break;
  1471. }
  1472. }
  1473. }
  1474. }
  1475. #endif
  1476. }
  1477. }
  1478. #endregion
  1479. }
  1480. /// <summary>
  1481. /// Total cost of this graph, typically used for balancing decisions.
  1482. /// </summary>
  1483. public sealed partial class AggregatedCost : pb::IMessage<AggregatedCost>
  1484. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1485. , pb::IBufferMessage
  1486. #endif
  1487. {
  1488. private static readonly pb::MessageParser<AggregatedCost> _parser = new pb::MessageParser<AggregatedCost>(() => new AggregatedCost());
  1489. private pb::UnknownFieldSet _unknownFields;
  1490. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1491. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1492. public static pb::MessageParser<AggregatedCost> Parser { get { return _parser; } }
  1493. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1494. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1495. public static pbr::MessageDescriptor Descriptor {
  1496. get { return global::Tensorflow.CostGraphDef.Descriptor.NestedTypes[1]; }
  1497. }
  1498. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1499. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1500. pbr::MessageDescriptor pb::IMessage.Descriptor {
  1501. get { return Descriptor; }
  1502. }
  1503. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1504. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1505. public AggregatedCost() {
  1506. OnConstruction();
  1507. }
  1508. partial void OnConstruction();
  1509. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1510. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1511. public AggregatedCost(AggregatedCost other) : this() {
  1512. cost_ = other.cost_;
  1513. dimension_ = other.dimension_;
  1514. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  1515. }
  1516. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1517. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1518. public AggregatedCost Clone() {
  1519. return new AggregatedCost(this);
  1520. }
  1521. /// <summary>Field number for the "cost" field.</summary>
  1522. public const int CostFieldNumber = 1;
  1523. private float cost_;
  1524. /// <summary>
  1525. /// Aggregated cost value.
  1526. /// </summary>
  1527. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1528. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1529. public float Cost {
  1530. get { return cost_; }
  1531. set {
  1532. cost_ = value;
  1533. }
  1534. }
  1535. /// <summary>Field number for the "dimension" field.</summary>
  1536. public const int DimensionFieldNumber = 2;
  1537. private string dimension_ = "";
  1538. /// <summary>
  1539. /// Aggregated cost dimension (e.g. 'memory', 'compute', 'network').
  1540. /// </summary>
  1541. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1542. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1543. public string Dimension {
  1544. get { return dimension_; }
  1545. set {
  1546. dimension_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  1547. }
  1548. }
  1549. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1550. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1551. public override bool Equals(object other) {
  1552. return Equals(other as AggregatedCost);
  1553. }
  1554. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1555. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1556. public bool Equals(AggregatedCost other) {
  1557. if (ReferenceEquals(other, null)) {
  1558. return false;
  1559. }
  1560. if (ReferenceEquals(other, this)) {
  1561. return true;
  1562. }
  1563. if (!pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.Equals(Cost, other.Cost)) return false;
  1564. if (Dimension != other.Dimension) return false;
  1565. return Equals(_unknownFields, other._unknownFields);
  1566. }
  1567. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1568. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1569. public override int GetHashCode() {
  1570. int hash = 1;
  1571. if (Cost != 0F) hash ^= pbc::ProtobufEqualityComparers.BitwiseSingleEqualityComparer.GetHashCode(Cost);
  1572. if (Dimension.Length != 0) hash ^= Dimension.GetHashCode();
  1573. if (_unknownFields != null) {
  1574. hash ^= _unknownFields.GetHashCode();
  1575. }
  1576. return hash;
  1577. }
  1578. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1579. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1580. public override string ToString() {
  1581. return pb::JsonFormatter.ToDiagnosticString(this);
  1582. }
  1583. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1584. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1585. public void WriteTo(pb::CodedOutputStream output) {
  1586. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1587. output.WriteRawMessage(this);
  1588. #else
  1589. if (Cost != 0F) {
  1590. output.WriteRawTag(13);
  1591. output.WriteFloat(Cost);
  1592. }
  1593. if (Dimension.Length != 0) {
  1594. output.WriteRawTag(18);
  1595. output.WriteString(Dimension);
  1596. }
  1597. if (_unknownFields != null) {
  1598. _unknownFields.WriteTo(output);
  1599. }
  1600. #endif
  1601. }
  1602. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1603. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1604. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1605. void pb::IBufferMessage.InternalWriteTo(ref pb::WriteContext output) {
  1606. if (Cost != 0F) {
  1607. output.WriteRawTag(13);
  1608. output.WriteFloat(Cost);
  1609. }
  1610. if (Dimension.Length != 0) {
  1611. output.WriteRawTag(18);
  1612. output.WriteString(Dimension);
  1613. }
  1614. if (_unknownFields != null) {
  1615. _unknownFields.WriteTo(ref output);
  1616. }
  1617. }
  1618. #endif
  1619. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1620. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1621. public int CalculateSize() {
  1622. int size = 0;
  1623. if (Cost != 0F) {
  1624. size += 1 + 4;
  1625. }
  1626. if (Dimension.Length != 0) {
  1627. size += 1 + pb::CodedOutputStream.ComputeStringSize(Dimension);
  1628. }
  1629. if (_unknownFields != null) {
  1630. size += _unknownFields.CalculateSize();
  1631. }
  1632. return size;
  1633. }
  1634. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1635. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1636. public void MergeFrom(AggregatedCost other) {
  1637. if (other == null) {
  1638. return;
  1639. }
  1640. if (other.Cost != 0F) {
  1641. Cost = other.Cost;
  1642. }
  1643. if (other.Dimension.Length != 0) {
  1644. Dimension = other.Dimension;
  1645. }
  1646. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  1647. }
  1648. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1649. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1650. public void MergeFrom(pb::CodedInputStream input) {
  1651. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1652. input.ReadRawMessage(this);
  1653. #else
  1654. uint tag;
  1655. while ((tag = input.ReadTag()) != 0) {
  1656. switch(tag) {
  1657. default:
  1658. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  1659. break;
  1660. case 13: {
  1661. Cost = input.ReadFloat();
  1662. break;
  1663. }
  1664. case 18: {
  1665. Dimension = input.ReadString();
  1666. break;
  1667. }
  1668. }
  1669. }
  1670. #endif
  1671. }
  1672. #if !GOOGLE_PROTOBUF_REFSTRUCT_COMPATIBILITY_MODE
  1673. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  1674. [global::System.CodeDom.Compiler.GeneratedCode("protoc", null)]
  1675. void pb::IBufferMessage.InternalMergeFrom(ref pb::ParseContext input) {
  1676. uint tag;
  1677. while ((tag = input.ReadTag()) != 0) {
  1678. switch(tag) {
  1679. default:
  1680. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, ref input);
  1681. break;
  1682. case 13: {
  1683. Cost = input.ReadFloat();
  1684. break;
  1685. }
  1686. case 18: {
  1687. Dimension = input.ReadString();
  1688. break;
  1689. }
  1690. }
  1691. }
  1692. }
  1693. #endif
  1694. }
  1695. }
  1696. #endregion
  1697. }
  1698. #endregion
  1699. }
  1700. #endregion Designer generated code