public static void Scale(ref Int5 m, int s, out Int5 result) { result.A = m.A * s; result.B = m.B * s; result.C = m.C * s; result.D = m.D * s; result.E = m.E * s; }
public static void Test() { { //Nested versus flattened tests var s8 = new OuterStruct8(); var s16 = new OuterStruct16(); var s = 0f; OuterStruct8.Test(ref s8, s, out var result8); OuterStruct16.Test(ref s16, s, out var result16); var d = new DummyOuterStruct(); DummyOuterStruct.Test(ref d, 0f, out var dResult); var f = new ScalarFlattenedStruct(); ScalarFlattenedStruct.Test(ref f, s, out var flattenedResult); } { //Field count tests var i4 = new Int4(); var i5 = new Int5(); var l4 = new Long4(); var l5 = new Long5(); var vf4 = new VectorFloat4(); var vf5 = new VectorFloat5(); var s = new Vector <float>(); Int4.Test(ref i4, 0, out var i4result); Int5.Test(ref i5, 0, out var i5result); Long4.Test(ref l4, 0, out var l4result); Long5.Test(ref l5, 0, out var l5result); VectorFloat4.Test(ref vf4, ref s, out var vf4Result); VectorFloat5.Test(ref vf5, ref s, out var vf5Result); } { //Assignment-only tests var s16 = new DummyStruct16(); var s32 = new DummyStruct32(); var s48 = new DummyStruct48(); var s64 = new DummyStruct64(); var s80 = new DummyStruct80(); DoDummies(ref s16, out var result16); DoDummies(ref s32, out var result32); DoDummies(ref s48, out var result48); DoDummies(ref s64, out var result64); DoDummies(ref s80, out var result80); } { TestScalarStruct(); TestStruct(); TestStructManuallyInlined(); TestStructless(); } }
protected Int5 readInt5() { Int5 result = new Int5 { x = readInt(), y = readInt(), z = readInt(), w = readInt(), v = readInt() }; return(result); }
public static void Test(ref Int5 m, int s, out Int5 result) { //rep stos, ecx 6 (24 bytes) Scale(ref m, s, out var temp); Scale(ref temp, s, out result); }
public override int GetHashCode() { int num = 1; if (EventType != 0) { num ^= EventType.GetHashCode(); } if (EventId != 0) { num ^= EventId.GetHashCode(); } if (parentEventId_.HasValue) { num ^= ParentEventId.GetHashCode(); } if (Int1 != 0) { num ^= Int1.GetHashCode(); } if (Int2 != 0) { num ^= Int2.GetHashCode(); } if (Int3 != 0) { num ^= Int3.GetHashCode(); } if (Int4 != 0) { num ^= Int4.GetHashCode(); } if (Int5 != 0) { num ^= Int5.GetHashCode(); } if (Int6 != 0) { num ^= Int6.GetHashCode(); } if (Int7 != 0) { num ^= Int7.GetHashCode(); } if (String1.Length != 0) { num ^= String1.GetHashCode(); } if (Bool1) { num ^= Bool1.GetHashCode(); } if (cellCoord1_ != null) { num ^= CellCoord1.GetHashCode(); } if (cellCoord2_ != null) { num ^= CellCoord2.GetHashCode(); } if (CompanionReserveState1 != 0) { num ^= CompanionReserveState1.GetHashCode(); } if (CompanionReserveState2 != 0) { num ^= CompanionReserveState2.GetHashCode(); } if (DamageReductionType1 != 0) { num ^= DamageReductionType1.GetHashCode(); } if (FightResult1 != 0) { num ^= FightResult1.GetHashCode(); } if (gameStatistics1_ != null) { num ^= GameStatistics1.GetHashCode(); } if (TeamsScoreModificationReason1 != 0) { num ^= TeamsScoreModificationReason1.GetHashCode(); } if (optInt1_.HasValue) { num ^= OptInt1.GetHashCode(); } if (optInt2_.HasValue) { num ^= OptInt2.GetHashCode(); } if (optInt3_.HasValue) { num ^= OptInt3.GetHashCode(); } if (optInt4_.HasValue) { num ^= OptInt4.GetHashCode(); } num ^= ((object)cellCoordList1_).GetHashCode(); num ^= ((object)spellMovementList1_).GetHashCode(); num ^= ((object)castTargetList1_).GetHashCode(); num ^= ((object)intList1_).GetHashCode(); num ^= ((object)intList2_).GetHashCode(); if (_unknownFields != null) { num ^= ((object)_unknownFields).GetHashCode(); } return(num); }