diff --git a/src/System.Numerics.Vectors/src/System/Numerics/ConstantHelper.cs b/src/System.Numerics.Vectors/src/System/Numerics/ConstantHelper.cs index 1ecb5531654b..826d0d3d4cbe 100644 --- a/src/System.Numerics.Vectors/src/System/Numerics/ConstantHelper.cs +++ b/src/System.Numerics.Vectors/src/System/Numerics/ConstantHelper.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under MIT. See LICENSE in the project root for license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. // This file is auto-generated, do not make permanent modifications. using System.Runtime.CompilerServices; diff --git a/src/System.Numerics.Vectors/src/System/Numerics/GenerationConfig.ttinclude b/src/System.Numerics.Vectors/src/System/Numerics/GenerationConfig.ttinclude index f5af3b75763a..ac4f272aecb0 100644 --- a/src/System.Numerics.Vectors/src/System/Numerics/GenerationConfig.ttinclude +++ b/src/System.Numerics.Vectors/src/System/Numerics/GenerationConfig.ttinclude @@ -49,8 +49,8 @@ public void GenerateCopyrightHeader() { -#>// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under MIT. See LICENSE in the project root for license information. +#>// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. // This file is auto-generated, do not make permanent modifications. <#+ } diff --git a/src/System.Numerics.Vectors/src/System/Numerics/Plane.cs b/src/System.Numerics.Vectors/src/System/Numerics/Plane.cs index 598e784f038e..f8ff6a057362 100644 --- a/src/System.Numerics.Vectors/src/System/Numerics/Plane.cs +++ b/src/System.Numerics.Vectors/src/System/Numerics/Plane.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. - using System; using System.Globalization; using System.Runtime.CompilerServices; diff --git a/src/System.Numerics.Vectors/src/System/Numerics/Quaternion.cs b/src/System.Numerics.Vectors/src/System/Numerics/Quaternion.cs index 92f402de6f16..166392594880 100644 --- a/src/System.Numerics.Vectors/src/System/Numerics/Quaternion.cs +++ b/src/System.Numerics.Vectors/src/System/Numerics/Quaternion.cs @@ -1,7 +1,6 @@ // Copyright (c) Microsoft. All rights reserved. // Licensed under the MIT license. See LICENSE file in the project root for full license information. - using System; using System.Globalization; diff --git a/src/System.Numerics.Vectors/src/System/Numerics/Register.cs b/src/System.Numerics.Vectors/src/System/Numerics/Register.cs index 187d004eed7e..24f5736905d4 100644 --- a/src/System.Numerics.Vectors/src/System/Numerics/Register.cs +++ b/src/System.Numerics.Vectors/src/System/Numerics/Register.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under MIT. See LICENSE in the project root for license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. // This file is auto-generated, do not make permanent modifications. using System.Runtime.InteropServices; diff --git a/src/System.Numerics.Vectors/src/System/Numerics/Vector.cs b/src/System.Numerics.Vectors/src/System/Numerics/Vector.cs index 8be844d0efaf..588e0187ca13 100644 --- a/src/System.Numerics.Vectors/src/System/Numerics/Vector.cs +++ b/src/System.Numerics.Vectors/src/System/Numerics/Vector.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under MIT. See LICENSE in the project root for license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. // This file is auto-generated, do not make permanent modifications. using System; diff --git a/src/System.Numerics.Vectors/src/System/Numerics/VectorHelper.cs b/src/System.Numerics.Vectors/src/System/Numerics/VectorHelper.cs deleted file mode 100644 index 6fe36dc9ecd7..000000000000 --- a/src/System.Numerics.Vectors/src/System/Numerics/VectorHelper.cs +++ /dev/null @@ -1,161 +0,0 @@ -// ----------------------------------------------------------------------- -// Copyright (c) Microsoft Corporation. All rights reserved. -// ----------------------------------------------------------------------- -namespace System.Numerics { - using System.Globalization; - using System.Runtime.CompilerServices; - using System.Text; - /// - /// This class contains some helper methods for generic and fixed type vectors. - /// The intent of this class is to allow for code sharing and in cases where it is not trivial to keep - /// similar implementations of the same method localized (for generic and fixed type vectors). - /// - internal static class VectorHelper { - - public static string FixedVectorToString(string format, IFormatProvider formatProvider, params Single[] components) { - StringBuilder ret = new StringBuilder(); - string separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator + " "; - ret.Append("<"); - for (int i = 0; i < components.Length; i++) { - ret.Append(components[i].ToString(format, formatProvider)); - if (i != components.Length - 1) - ret.Append(separator); - } - ret.Append(">"); - return ret.ToString(); - } - - public static string GenericVectorToString(string format, IFormatProvider formatProvider, Vector values) where T : struct { - StringBuilder ret = new StringBuilder(); - string separator = NumberFormatInfo.GetInstance(formatProvider).NumberGroupSeparator + " "; - ret.Append("<"); - for (int i = 0; i < Vector.Length; i++) { - ret.Append(((IFormattable)values[i]).ToString(format, formatProvider)); - if (i != Vector.Length - 1) - ret.Append(separator); - } - ret.Append(">"); - return ret.ToString(); - } - - public static int FixedVectorHashCode(params Single[] components) { - int hash = 0; - for (int i = 0; i < components.Length; i++) { - hash = CombineHashCodes(hash, components[i].GetHashCode()); - } - return hash; - } - - public static int GenericVectorHashCode(Vector values) where T : struct { - int hash = 0; - for (int i = 0; i < Vector.Length; i++) { - hash = CombineHashCodes(hash, values[i].GetHashCode()); - } - return hash; - } - - private static int CombineHashCodes(int h1, int h2) { - return (((h1 << 5) + h1) ^ h2); - } - - [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] - public static Byte GetByteWithAllBitsSet() - { - Byte f = 0; - unsafe - { - unchecked - { - *((byte*)&f) = 0xff; - } - } - return f; - } - - [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] - public static SByte GetSByteWithAllBitsSet() - { - SByte f = 0; - unsafe - { - unchecked - { - *((byte*)&f) = 0xff; - } - } - return f; - } - - [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] - public static UInt16 GetUInt16WithAllBitsSet() - { - UInt16 f = 0; - unsafe - { - unchecked - { - *((UInt16*)&f) = (UInt16)0xffff; - } - } - return f; - } - - [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] - public static Int16 GetInt16WithAllBitsSet() - { - Int16 f = 0; - unsafe - { - unchecked - { - *((UInt16*)&f) = (UInt16)0xffff; - } - } - return f; - } - - [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] - public static Single GetSingleWithAllBitsSet() { - Single f = 0.0f; - unsafe { - unchecked { - *((int*)&f) = (int)0xffffffff; - } - } - return f; - } - - [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] - public static Int32 GetInt32WithAllBitsSet() { - Int32 f = 0; - unsafe { - unchecked { - *((int*)&f) = (int)0xffffffff; - } - } - return f; - } - - [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] - public static Int64 GetInt64WithAllBitsSet() { - Int64 f = 0L; - unsafe { - unchecked { - *((Int64*)&f) = (Int64)(0xffffffffffffffff); - } - } - return f; - } - - [MethodImplAttribute(MethodImplOptions.AggressiveInlining)] - public static Double GetDoubleWithAllBitsSet() { - Double f = 0.0; - unsafe { - unchecked { - *((Int64*)&f) = (Int64)(0xffffffffffffffff); - } - } - return f; - } - } -} diff --git a/src/System.Numerics.Vectors/tests/GenericVectorTests.cs b/src/System.Numerics.Vectors/tests/GenericVectorTests.cs index 821fea6e38cc..71cb9fcac0b1 100644 --- a/src/System.Numerics.Vectors/tests/GenericVectorTests.cs +++ b/src/System.Numerics.Vectors/tests/GenericVectorTests.cs @@ -1,5 +1,5 @@ -// Copyright (c) Microsoft Corporation. All rights reserved. -// Licensed under MIT. See LICENSE in the project root for license information. +// Copyright (c) Microsoft. All rights reserved. +// Licensed under the MIT license. See LICENSE file in the project root for full license information. // This file is auto-generated, do not make permanent modifications. using System;