public override int GetHashCode() { unchecked { var hashCode = ResultLocation.GetHashCode(); hashCode = (hashCode * 397) ^ Dimension.GetHashCode(); hashCode = (hashCode * 397) ^ Layout.Item1.GetHashCode(); hashCode = (hashCode * 397) ^ Layout.Item2.GetHashCode(); hashCode = (hashCode * 397) ^ BatchSize.GetHashCode(); hashCode = (hashCode * 397) ^ PlanDistanceIn.GetHashCode(); hashCode = (hashCode * 397) ^ PlanDistanceOut.GetHashCode(); hashCode = (hashCode * 397) ^ Size[0].GetHashCode(); hashCode = (hashCode * 397) ^ ScaleForward.GetHashCode(); hashCode = (hashCode * 397) ^ ScaleBackward.GetHashCode(); if (Size.GetLength(0) > 1) { hashCode = (hashCode * 397) ^ Size[1].GetHashCode(); } if (Size.GetLength(0) > 2) { hashCode = (hashCode * 397) ^ Size[2].GetHashCode(); } return(hashCode); } }
public bool Equals(CLFFTSettings other) { if (ReferenceEquals(null, other)) { return(false); } if (ReferenceEquals(this, other)) { return(true); } return(ResultLocation.Equals(other.ResultLocation) && Dimension.Equals(other.Dimension) && Layout.Equals(other.Layout) && Size.SequenceEqual(other.Size) && StrideIn.SequenceEqual(other.StrideIn) && StrideOut.SequenceEqual(other.StrideOut) && BatchSize.Equals(other.BatchSize) && PlanDistanceIn.Equals(other.PlanDistanceIn) && PlanDistanceOut.Equals(other.PlanDistanceOut) && ScaleForward.Equals(other.ScaleForward) && ScaleBackward.Equals(other.ScaleBackward)); }