public void MergeFrom(RewriterConfig other) { if (other == null) { return; } if (other.LayoutOptimizer != 0) { LayoutOptimizer = other.LayoutOptimizer; } if (other.ConstantFolding != 0) { ConstantFolding = other.ConstantFolding; } if (other.ArithmeticOptimization != 0) { ArithmeticOptimization = other.ArithmeticOptimization; } if (other.DependencyOptimization != 0) { DependencyOptimization = other.DependencyOptimization; } if (other.DisableModelPruning != false) { DisableModelPruning = other.DisableModelPruning; } if (other.MemoryOptimization != 0) { MemoryOptimization = other.MemoryOptimization; } if (other.MemoryOptimizerTargetNodeNamePrefix.Length != 0) { MemoryOptimizerTargetNodeNamePrefix = other.MemoryOptimizerTargetNodeNamePrefix; } if (other.autoParallel_ != null) { if (autoParallel_ == null) { autoParallel_ = new global::Vision.Tensorflow.Proto.AutoParallelOptions(); } AutoParallel.MergeFrom(other.AutoParallel); } optimizers_.Add(other.optimizers_); }
public void MergeFrom(pb::CodedInputStream input) { uint tag; while ((tag = input.ReadTag()) != 0) { switch (tag) { default: input.SkipLastField(); break; case 8: { layoutOptimizer_ = (global::Vision.Tensorflow.Proto.RewriterConfig.Types.Toggle)input.ReadEnum(); break; } case 16: { DisableModelPruning = input.ReadBool(); break; } case 24: { constantFolding_ = (global::Vision.Tensorflow.Proto.RewriterConfig.Types.Toggle)input.ReadEnum(); break; } case 32: { memoryOptimization_ = (global::Vision.Tensorflow.Proto.RewriterConfig.Types.MemOptType)input.ReadEnum(); break; } case 42: { if (autoParallel_ == null) { autoParallel_ = new global::Vision.Tensorflow.Proto.AutoParallelOptions(); } input.ReadMessage(autoParallel_); break; } case 50: { MemoryOptimizerTargetNodeNamePrefix = input.ReadString(); break; } case 56: { arithmeticOptimization_ = (global::Vision.Tensorflow.Proto.RewriterConfig.Types.Toggle)input.ReadEnum(); break; } case 64: { dependencyOptimization_ = (global::Vision.Tensorflow.Proto.RewriterConfig.Types.Toggle)input.ReadEnum(); break; } case 802: { optimizers_.AddEntriesFrom(input, _repeated_optimizers_codec); break; } } } }