コード例 #1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (cluster_ != null)
            {
                hash ^= Cluster.GetHashCode();
            }
            if (JobName.Length != 0)
            {
                hash ^= JobName.GetHashCode();
            }
            if (TaskIndex != 0)
            {
                hash ^= TaskIndex.GetHashCode();
            }
            if (defaultSessionConfig_ != null)
            {
                hash ^= DefaultSessionConfig.GetHashCode();
            }
            if (Protocol.Length != 0)
            {
                hash ^= Protocol.GetHashCode();
            }
            return(hash);
        }
コード例 #2
0
 public void MergeFrom(ServerDef other)
 {
     if (other == null)
     {
         return;
     }
     if (other.cluster_ != null)
     {
         if (cluster_ == null)
         {
             cluster_ = new global::Tensorflow.ClusterDef();
         }
         Cluster.MergeFrom(other.Cluster);
     }
     if (other.JobName.Length != 0)
     {
         JobName = other.JobName;
     }
     if (other.TaskIndex != 0)
     {
         TaskIndex = other.TaskIndex;
     }
     if (other.defaultSessionConfig_ != null)
     {
         if (defaultSessionConfig_ == null)
         {
             defaultSessionConfig_ = new global::Tensorflow.ConfigProto();
         }
         DefaultSessionConfig.MergeFrom(other.DefaultSessionConfig);
     }
     if (other.Protocol.Length != 0)
     {
         Protocol = other.Protocol;
     }
 }
コード例 #3
0
 public void MergeFrom(ServerDef other)
 {
     if (other == null)
     {
         return;
     }
     if (other.cluster_ != null)
     {
         if (cluster_ == null)
         {
             Cluster = new global::Tensorflow.ClusterDef();
         }
         Cluster.MergeFrom(other.Cluster);
     }
     if (other.JobName.Length != 0)
     {
         JobName = other.JobName;
     }
     if (other.TaskIndex != 0)
     {
         TaskIndex = other.TaskIndex;
     }
     if (other.defaultSessionConfig_ != null)
     {
         if (defaultSessionConfig_ == null)
         {
             DefaultSessionConfig = new global::Tensorflow.ConfigProto();
         }
         DefaultSessionConfig.MergeFrom(other.DefaultSessionConfig);
     }
     if (other.Protocol.Length != 0)
     {
         Protocol = other.Protocol;
     }
     if (other.Port != 0)
     {
         Port = other.Port;
     }
     _unknownFields = pb::UnknownFieldSet.MergeFrom(_unknownFields, other._unknownFields);
 }