Exemplo n.º 1
0
        public override int GetHashCode()
        {
            int hash = 1;

            if (Type.Length != 0)
            {
                hash ^= Type.GetHashCode();
            }
            if (Vendor.Length != 0)
            {
                hash ^= Vendor.GetHashCode();
            }
            if (Model.Length != 0)
            {
                hash ^= Model.GetHashCode();
            }
            if (Frequency != 0L)
            {
                hash ^= Frequency.GetHashCode();
            }
            if (NumCores != 0L)
            {
                hash ^= NumCores.GetHashCode();
            }
            hash ^= Environment.GetHashCode();
            if (NumRegisters != 0L)
            {
                hash ^= NumRegisters.GetHashCode();
            }
            if (L1CacheSize != 0L)
            {
                hash ^= L1CacheSize.GetHashCode();
            }
            if (L2CacheSize != 0L)
            {
                hash ^= L2CacheSize.GetHashCode();
            }
            if (L3CacheSize != 0L)
            {
                hash ^= L3CacheSize.GetHashCode();
            }
            if (SharedMemorySizePerMultiprocessor != 0L)
            {
                hash ^= SharedMemorySizePerMultiprocessor.GetHashCode();
            }
            if (MemorySize != 0L)
            {
                hash ^= MemorySize.GetHashCode();
            }
            if (Bandwidth != 0L)
            {
                hash ^= Bandwidth.GetHashCode();
            }
            if (_unknownFields != null)
            {
                hash ^= _unknownFields.GetHashCode();
            }
            return(hash);
        }
Exemplo n.º 2
0
    public override int GetHashCode()
    {
        int hash = 1;

        if (StateSize != 0)
        {
            hash ^= StateSize.GetHashCode();
        }
        if (ActionSize != 0)
        {
            hash ^= ActionSize.GetHashCode();
        }
        if (ObservationSize != 0)
        {
            hash ^= ObservationSize.GetHashCode();
        }
        if (MemorySize != 0)
        {
            hash ^= MemorySize.GetHashCode();
        }
        if (CameraResolutionsH != 0)
        {
            hash ^= CameraResolutionsH.GetHashCode();
        }
        if (CameraResolutionsW != 0)
        {
            hash ^= CameraResolutionsW.GetHashCode();
        }
        hash ^= actionDescriptions_.GetHashCode();
        hash ^= stateSpaceDescriptions_.GetHashCode();
        if (ActionSpaceType != 0)
        {
            hash ^= ActionSpaceType.GetHashCode();
        }
        if (StateSpaceType != 0)
        {
            hash ^= StateSpaceType.GetHashCode();
        }
        if (BrainName.Length != 0)
        {
            hash ^= BrainName.GetHashCode();
        }
        if (_unknownFields != null)
        {
            hash ^= _unknownFields.GetHashCode();
        }
        return(hash);
    }