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.

KernelDef.cs 23 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628
  1. // <auto-generated>
  2. // Generated by the protocol buffer compiler. DO NOT EDIT!
  3. // source: tensorflow/core/framework/kernel_def.proto
  4. // </auto-generated>
  5. #pragma warning disable 1591, 0612, 3021
  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/kernel_def.proto</summary>
  13. public static partial class KernelDefReflection {
  14. #region Descriptor
  15. /// <summary>File descriptor for tensorflow/core/framework/kernel_def.proto</summary>
  16. public static pbr::FileDescriptor Descriptor {
  17. get { return descriptor; }
  18. }
  19. private static pbr::FileDescriptor descriptor;
  20. static KernelDefReflection() {
  21. byte[] descriptorData = global::System.Convert.FromBase64String(
  22. string.Concat(
  23. "Cip0ZW5zb3JmbG93L2NvcmUvZnJhbWV3b3JrL2tlcm5lbF9kZWYucHJvdG8S",
  24. "CnRlbnNvcmZsb3caKnRlbnNvcmZsb3cvY29yZS9mcmFtZXdvcmsvYXR0cl92",
  25. "YWx1ZS5wcm90byLvAQoJS2VybmVsRGVmEgoKAm9wGAEgASgJEhMKC2Rldmlj",
  26. "ZV90eXBlGAIgASgJEjgKCmNvbnN0cmFpbnQYAyADKAsyJC50ZW5zb3JmbG93",
  27. "Lktlcm5lbERlZi5BdHRyQ29uc3RyYWludBIXCg9ob3N0X21lbW9yeV9hcmcY",
  28. "BCADKAkSDQoFbGFiZWwYBSABKAkSEAoIcHJpb3JpdHkYBiABKAUaTQoOQXR0",
  29. "ckNvbnN0cmFpbnQSDAoEbmFtZRgBIAEoCRItCg5hbGxvd2VkX3ZhbHVlcxgC",
  30. "IAEoCzIVLnRlbnNvcmZsb3cuQXR0clZhbHVlIjMKCktlcm5lbExpc3QSJQoG",
  31. "a2VybmVsGAEgAygLMhUudGVuc29yZmxvdy5LZXJuZWxEZWZCbwoYb3JnLnRl",
  32. "bnNvcmZsb3cuZnJhbWV3b3JrQg9LZXJuZWxEZWZQcm90b3NQAVo9Z2l0aHVi",
  33. "LmNvbS90ZW5zb3JmbG93L3RlbnNvcmZsb3cvdGVuc29yZmxvdy9nby9jb3Jl",
  34. "L2ZyYW1ld29ya/gBAWIGcHJvdG8z"));
  35. descriptor = pbr::FileDescriptor.FromGeneratedCode(descriptorData,
  36. new pbr::FileDescriptor[] { global::Tensorflow.AttrValueReflection.Descriptor, },
  37. new pbr::GeneratedClrTypeInfo(null, null, new pbr::GeneratedClrTypeInfo[] {
  38. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.KernelDef), global::Tensorflow.KernelDef.Parser, new[]{ "Op", "DeviceType", "Constraint", "HostMemoryArg", "Label", "Priority" }, null, null, null, new pbr::GeneratedClrTypeInfo[] { new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.KernelDef.Types.AttrConstraint), global::Tensorflow.KernelDef.Types.AttrConstraint.Parser, new[]{ "Name", "AllowedValues" }, null, null, null, null)}),
  39. new pbr::GeneratedClrTypeInfo(typeof(global::Tensorflow.KernelList), global::Tensorflow.KernelList.Parser, new[]{ "Kernel" }, null, null, null, null)
  40. }));
  41. }
  42. #endregion
  43. }
  44. #region Messages
  45. public sealed partial class KernelDef : pb::IMessage<KernelDef> {
  46. private static readonly pb::MessageParser<KernelDef> _parser = new pb::MessageParser<KernelDef>(() => new KernelDef());
  47. private pb::UnknownFieldSet _unknownFields;
  48. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  49. public static pb::MessageParser<KernelDef> Parser { get { return _parser; } }
  50. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  51. public static pbr::MessageDescriptor Descriptor {
  52. get { return global::Tensorflow.KernelDefReflection.Descriptor.MessageTypes[0]; }
  53. }
  54. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  55. pbr::MessageDescriptor pb::IMessage.Descriptor {
  56. get { return Descriptor; }
  57. }
  58. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  59. public KernelDef() {
  60. OnConstruction();
  61. }
  62. partial void OnConstruction();
  63. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  64. public KernelDef(KernelDef other) : this() {
  65. op_ = other.op_;
  66. deviceType_ = other.deviceType_;
  67. constraint_ = other.constraint_.Clone();
  68. hostMemoryArg_ = other.hostMemoryArg_.Clone();
  69. label_ = other.label_;
  70. priority_ = other.priority_;
  71. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  72. }
  73. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  74. public KernelDef Clone() {
  75. return new KernelDef(this);
  76. }
  77. /// <summary>Field number for the "op" field.</summary>
  78. public const int OpFieldNumber = 1;
  79. private string op_ = "";
  80. /// <summary>
  81. /// Must match the name of an Op.
  82. /// </summary>
  83. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  84. public string Op {
  85. get { return op_; }
  86. set {
  87. op_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  88. }
  89. }
  90. /// <summary>Field number for the "device_type" field.</summary>
  91. public const int DeviceTypeFieldNumber = 2;
  92. private string deviceType_ = "";
  93. /// <summary>
  94. /// Type of device this kernel runs on.
  95. /// </summary>
  96. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  97. public string DeviceType {
  98. get { return deviceType_; }
  99. set {
  100. deviceType_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  101. }
  102. }
  103. /// <summary>Field number for the "constraint" field.</summary>
  104. public const int ConstraintFieldNumber = 3;
  105. private static readonly pb::FieldCodec<global::Tensorflow.KernelDef.Types.AttrConstraint> _repeated_constraint_codec
  106. = pb::FieldCodec.ForMessage(26, global::Tensorflow.KernelDef.Types.AttrConstraint.Parser);
  107. private readonly pbc::RepeatedField<global::Tensorflow.KernelDef.Types.AttrConstraint> constraint_ = new pbc::RepeatedField<global::Tensorflow.KernelDef.Types.AttrConstraint>();
  108. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  109. public pbc::RepeatedField<global::Tensorflow.KernelDef.Types.AttrConstraint> Constraint {
  110. get { return constraint_; }
  111. }
  112. /// <summary>Field number for the "host_memory_arg" field.</summary>
  113. public const int HostMemoryArgFieldNumber = 4;
  114. private static readonly pb::FieldCodec<string> _repeated_hostMemoryArg_codec
  115. = pb::FieldCodec.ForString(34);
  116. private readonly pbc::RepeatedField<string> hostMemoryArg_ = new pbc::RepeatedField<string>();
  117. /// <summary>
  118. /// Names of the Op's input_/output_args that reside in host memory
  119. /// instead of device memory.
  120. /// </summary>
  121. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  122. public pbc::RepeatedField<string> HostMemoryArg {
  123. get { return hostMemoryArg_; }
  124. }
  125. /// <summary>Field number for the "label" field.</summary>
  126. public const int LabelFieldNumber = 5;
  127. private string label_ = "";
  128. /// <summary>
  129. /// This allows experimental kernels to be registered for an op that
  130. /// won't be used unless the user specifies a "_kernel" attr with
  131. /// value matching this.
  132. /// </summary>
  133. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  134. public string Label {
  135. get { return label_; }
  136. set {
  137. label_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  138. }
  139. }
  140. /// <summary>Field number for the "priority" field.</summary>
  141. public const int PriorityFieldNumber = 6;
  142. private int priority_;
  143. /// <summary>
  144. /// Prioritization of kernel amongst different devices. By default we assume
  145. /// priority is 0. The higher the priority the better. By default (i.e. if
  146. /// this is not set), we prefer GPU kernels over CPU.
  147. /// </summary>
  148. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  149. public int Priority {
  150. get { return priority_; }
  151. set {
  152. priority_ = value;
  153. }
  154. }
  155. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  156. public override bool Equals(object other) {
  157. return Equals(other as KernelDef);
  158. }
  159. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  160. public bool Equals(KernelDef other) {
  161. if (ReferenceEquals(other, null)) {
  162. return false;
  163. }
  164. if (ReferenceEquals(other, this)) {
  165. return true;
  166. }
  167. if (Op != other.Op) return false;
  168. if (DeviceType != other.DeviceType) return false;
  169. if(!constraint_.Equals(other.constraint_)) return false;
  170. if(!hostMemoryArg_.Equals(other.hostMemoryArg_)) return false;
  171. if (Label != other.Label) return false;
  172. if (Priority != other.Priority) return false;
  173. return Equals(_unknownFields, other._unknownFields);
  174. }
  175. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  176. public override int GetHashCode() {
  177. int hash = 1;
  178. if (Op.Length != 0) hash ^= Op.GetHashCode();
  179. if (DeviceType.Length != 0) hash ^= DeviceType.GetHashCode();
  180. hash ^= constraint_.GetHashCode();
  181. hash ^= hostMemoryArg_.GetHashCode();
  182. if (Label.Length != 0) hash ^= Label.GetHashCode();
  183. if (Priority != 0) hash ^= Priority.GetHashCode();
  184. if (_unknownFields != null) {
  185. hash ^= _unknownFields.GetHashCode();
  186. }
  187. return hash;
  188. }
  189. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  190. public override string ToString() {
  191. return pb::JsonFormatter.ToDiagnosticString(this);
  192. }
  193. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  194. public void WriteTo(pb::CodedOutputStream output) {
  195. if (Op.Length != 0) {
  196. output.WriteRawTag(10);
  197. output.WriteString(Op);
  198. }
  199. if (DeviceType.Length != 0) {
  200. output.WriteRawTag(18);
  201. output.WriteString(DeviceType);
  202. }
  203. constraint_.WriteTo(output, _repeated_constraint_codec);
  204. hostMemoryArg_.WriteTo(output, _repeated_hostMemoryArg_codec);
  205. if (Label.Length != 0) {
  206. output.WriteRawTag(42);
  207. output.WriteString(Label);
  208. }
  209. if (Priority != 0) {
  210. output.WriteRawTag(48);
  211. output.WriteInt32(Priority);
  212. }
  213. if (_unknownFields != null) {
  214. _unknownFields.WriteTo(output);
  215. }
  216. }
  217. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  218. public int CalculateSize() {
  219. int size = 0;
  220. if (Op.Length != 0) {
  221. size += 1 + pb::CodedOutputStream.ComputeStringSize(Op);
  222. }
  223. if (DeviceType.Length != 0) {
  224. size += 1 + pb::CodedOutputStream.ComputeStringSize(DeviceType);
  225. }
  226. size += constraint_.CalculateSize(_repeated_constraint_codec);
  227. size += hostMemoryArg_.CalculateSize(_repeated_hostMemoryArg_codec);
  228. if (Label.Length != 0) {
  229. size += 1 + pb::CodedOutputStream.ComputeStringSize(Label);
  230. }
  231. if (Priority != 0) {
  232. size += 1 + pb::CodedOutputStream.ComputeInt32Size(Priority);
  233. }
  234. if (_unknownFields != null) {
  235. size += _unknownFields.CalculateSize();
  236. }
  237. return size;
  238. }
  239. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  240. public void MergeFrom(KernelDef other) {
  241. if (other == null) {
  242. return;
  243. }
  244. if (other.Op.Length != 0) {
  245. Op = other.Op;
  246. }
  247. if (other.DeviceType.Length != 0) {
  248. DeviceType = other.DeviceType;
  249. }
  250. constraint_.Add(other.constraint_);
  251. hostMemoryArg_.Add(other.hostMemoryArg_);
  252. if (other.Label.Length != 0) {
  253. Label = other.Label;
  254. }
  255. if (other.Priority != 0) {
  256. Priority = other.Priority;
  257. }
  258. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  259. }
  260. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  261. public void MergeFrom(pb::CodedInputStream input) {
  262. uint tag;
  263. while ((tag = input.ReadTag()) != 0) {
  264. switch(tag) {
  265. default:
  266. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  267. break;
  268. case 10: {
  269. Op = input.ReadString();
  270. break;
  271. }
  272. case 18: {
  273. DeviceType = input.ReadString();
  274. break;
  275. }
  276. case 26: {
  277. constraint_.AddEntriesFrom(input, _repeated_constraint_codec);
  278. break;
  279. }
  280. case 34: {
  281. hostMemoryArg_.AddEntriesFrom(input, _repeated_hostMemoryArg_codec);
  282. break;
  283. }
  284. case 42: {
  285. Label = input.ReadString();
  286. break;
  287. }
  288. case 48: {
  289. Priority = input.ReadInt32();
  290. break;
  291. }
  292. }
  293. }
  294. }
  295. #region Nested types
  296. /// <summary>Container for nested types declared in the KernelDef message type.</summary>
  297. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  298. public static partial class Types {
  299. public sealed partial class AttrConstraint : pb::IMessage<AttrConstraint> {
  300. private static readonly pb::MessageParser<AttrConstraint> _parser = new pb::MessageParser<AttrConstraint>(() => new AttrConstraint());
  301. private pb::UnknownFieldSet _unknownFields;
  302. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  303. public static pb::MessageParser<AttrConstraint> Parser { get { return _parser; } }
  304. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  305. public static pbr::MessageDescriptor Descriptor {
  306. get { return global::Tensorflow.KernelDef.Descriptor.NestedTypes[0]; }
  307. }
  308. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  309. pbr::MessageDescriptor pb::IMessage.Descriptor {
  310. get { return Descriptor; }
  311. }
  312. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  313. public AttrConstraint() {
  314. OnConstruction();
  315. }
  316. partial void OnConstruction();
  317. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  318. public AttrConstraint(AttrConstraint other) : this() {
  319. name_ = other.name_;
  320. allowedValues_ = other.allowedValues_ != null ? other.allowedValues_.Clone() : null;
  321. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  322. }
  323. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  324. public AttrConstraint Clone() {
  325. return new AttrConstraint(this);
  326. }
  327. /// <summary>Field number for the "name" field.</summary>
  328. public const int NameFieldNumber = 1;
  329. private string name_ = "";
  330. /// <summary>
  331. /// Name of an attr from the Op.
  332. /// </summary>
  333. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  334. public string Name {
  335. get { return name_; }
  336. set {
  337. name_ = pb::ProtoPreconditions.CheckNotNull(value, "value");
  338. }
  339. }
  340. /// <summary>Field number for the "allowed_values" field.</summary>
  341. public const int AllowedValuesFieldNumber = 2;
  342. private global::Tensorflow.AttrValue allowedValues_;
  343. /// <summary>
  344. /// A list of values that this kernel supports for this attr.
  345. /// Like OpDef.AttrDef.allowed_values, except for kernels instead of Ops.
  346. /// </summary>
  347. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  348. public global::Tensorflow.AttrValue AllowedValues {
  349. get { return allowedValues_; }
  350. set {
  351. allowedValues_ = value;
  352. }
  353. }
  354. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  355. public override bool Equals(object other) {
  356. return Equals(other as AttrConstraint);
  357. }
  358. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  359. public bool Equals(AttrConstraint other) {
  360. if (ReferenceEquals(other, null)) {
  361. return false;
  362. }
  363. if (ReferenceEquals(other, this)) {
  364. return true;
  365. }
  366. if (Name != other.Name) return false;
  367. if (!object.Equals(AllowedValues, other.AllowedValues)) return false;
  368. return Equals(_unknownFields, other._unknownFields);
  369. }
  370. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  371. public override int GetHashCode() {
  372. int hash = 1;
  373. if (Name.Length != 0) hash ^= Name.GetHashCode();
  374. if (allowedValues_ != null) hash ^= AllowedValues.GetHashCode();
  375. if (_unknownFields != null) {
  376. hash ^= _unknownFields.GetHashCode();
  377. }
  378. return hash;
  379. }
  380. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  381. public override string ToString() {
  382. return pb::JsonFormatter.ToDiagnosticString(this);
  383. }
  384. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  385. public void WriteTo(pb::CodedOutputStream output) {
  386. if (Name.Length != 0) {
  387. output.WriteRawTag(10);
  388. output.WriteString(Name);
  389. }
  390. if (allowedValues_ != null) {
  391. output.WriteRawTag(18);
  392. output.WriteMessage(AllowedValues);
  393. }
  394. if (_unknownFields != null) {
  395. _unknownFields.WriteTo(output);
  396. }
  397. }
  398. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  399. public int CalculateSize() {
  400. int size = 0;
  401. if (Name.Length != 0) {
  402. size += 1 + pb::CodedOutputStream.ComputeStringSize(Name);
  403. }
  404. if (allowedValues_ != null) {
  405. size += 1 + pb::CodedOutputStream.ComputeMessageSize(AllowedValues);
  406. }
  407. if (_unknownFields != null) {
  408. size += _unknownFields.CalculateSize();
  409. }
  410. return size;
  411. }
  412. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  413. public void MergeFrom(AttrConstraint other) {
  414. if (other == null) {
  415. return;
  416. }
  417. if (other.Name.Length != 0) {
  418. Name = other.Name;
  419. }
  420. if (other.allowedValues_ != null) {
  421. if (allowedValues_ == null) {
  422. AllowedValues = new global::Tensorflow.AttrValue();
  423. }
  424. AllowedValues.MergeFrom(other.AllowedValues);
  425. }
  426. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  427. }
  428. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  429. public void MergeFrom(pb::CodedInputStream input) {
  430. uint tag;
  431. while ((tag = input.ReadTag()) != 0) {
  432. switch(tag) {
  433. default:
  434. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  435. break;
  436. case 10: {
  437. Name = input.ReadString();
  438. break;
  439. }
  440. case 18: {
  441. if (allowedValues_ == null) {
  442. AllowedValues = new global::Tensorflow.AttrValue();
  443. }
  444. input.ReadMessage(AllowedValues);
  445. break;
  446. }
  447. }
  448. }
  449. }
  450. }
  451. }
  452. #endregion
  453. }
  454. /// <summary>
  455. /// A collection of KernelDefs
  456. /// </summary>
  457. public sealed partial class KernelList : pb::IMessage<KernelList> {
  458. private static readonly pb::MessageParser<KernelList> _parser = new pb::MessageParser<KernelList>(() => new KernelList());
  459. private pb::UnknownFieldSet _unknownFields;
  460. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  461. public static pb::MessageParser<KernelList> Parser { get { return _parser; } }
  462. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  463. public static pbr::MessageDescriptor Descriptor {
  464. get { return global::Tensorflow.KernelDefReflection.Descriptor.MessageTypes[1]; }
  465. }
  466. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  467. pbr::MessageDescriptor pb::IMessage.Descriptor {
  468. get { return Descriptor; }
  469. }
  470. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  471. public KernelList() {
  472. OnConstruction();
  473. }
  474. partial void OnConstruction();
  475. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  476. public KernelList(KernelList other) : this() {
  477. kernel_ = other.kernel_.Clone();
  478. _unknownFields = pb::UnknownFieldSet.Clone(other._unknownFields);
  479. }
  480. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  481. public KernelList Clone() {
  482. return new KernelList(this);
  483. }
  484. /// <summary>Field number for the "kernel" field.</summary>
  485. public const int KernelFieldNumber = 1;
  486. private static readonly pb::FieldCodec<global::Tensorflow.KernelDef> _repeated_kernel_codec
  487. = pb::FieldCodec.ForMessage(10, global::Tensorflow.KernelDef.Parser);
  488. private readonly pbc::RepeatedField<global::Tensorflow.KernelDef> kernel_ = new pbc::RepeatedField<global::Tensorflow.KernelDef>();
  489. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  490. public pbc::RepeatedField<global::Tensorflow.KernelDef> Kernel {
  491. get { return kernel_; }
  492. }
  493. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  494. public override bool Equals(object other) {
  495. return Equals(other as KernelList);
  496. }
  497. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  498. public bool Equals(KernelList other) {
  499. if (ReferenceEquals(other, null)) {
  500. return false;
  501. }
  502. if (ReferenceEquals(other, this)) {
  503. return true;
  504. }
  505. if(!kernel_.Equals(other.kernel_)) return false;
  506. return Equals(_unknownFields, other._unknownFields);
  507. }
  508. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  509. public override int GetHashCode() {
  510. int hash = 1;
  511. hash ^= kernel_.GetHashCode();
  512. if (_unknownFields != null) {
  513. hash ^= _unknownFields.GetHashCode();
  514. }
  515. return hash;
  516. }
  517. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  518. public override string ToString() {
  519. return pb::JsonFormatter.ToDiagnosticString(this);
  520. }
  521. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  522. public void WriteTo(pb::CodedOutputStream output) {
  523. kernel_.WriteTo(output, _repeated_kernel_codec);
  524. if (_unknownFields != null) {
  525. _unknownFields.WriteTo(output);
  526. }
  527. }
  528. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  529. public int CalculateSize() {
  530. int size = 0;
  531. size += kernel_.CalculateSize(_repeated_kernel_codec);
  532. if (_unknownFields != null) {
  533. size += _unknownFields.CalculateSize();
  534. }
  535. return size;
  536. }
  537. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  538. public void MergeFrom(KernelList other) {
  539. if (other == null) {
  540. return;
  541. }
  542. kernel_.Add(other.kernel_);
  543. _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
  544. }
  545. [global::System.Diagnostics.DebuggerNonUserCodeAttribute]
  546. public void MergeFrom(pb::CodedInputStream input) {
  547. uint tag;
  548. while ((tag = input.ReadTag()) != 0) {
  549. switch(tag) {
  550. default:
  551. _unknownFields = pb::UnknownFieldSet.MergeFieldFrom(_unknownFields, input);
  552. break;
  553. case 10: {
  554. kernel_.AddEntriesFrom(input, _repeated_kernel_codec);
  555. break;
  556. }
  557. }
  558. }
  559. }
  560. }
  561. #endregion
  562. }
  563. #endregion Designer generated code