You've already forked linux-packaging-mono
Imported Upstream version 4.4.2.4
Former-commit-id: 92904c9c5915c37244316e42ba99e7b934ed7ee2
This commit is contained in:
parent
589d484eee
commit
0b4a830db1
36
mcs/class/System.Numerics.Vectors/Assembly/TypeForwarders.cs
Normal file
36
mcs/class/System.Numerics.Vectors/Assembly/TypeForwarders.cs
Normal file
@ -0,0 +1,36 @@
|
||||
//
|
||||
// TypeForwarders.cs
|
||||
//
|
||||
// Authors:
|
||||
// Marek Safar <marek.safar@gmail.com>
|
||||
//
|
||||
// Copyright (C) 2011 Xamarin Inc (http://www.xamarin.com)
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
// of this software and associated documentation files (the "Software"), to deal
|
||||
// in the Software without restriction, including without limitation the rights
|
||||
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
// copies of the Software, and to permit persons to whom the Software is
|
||||
// furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in
|
||||
// all copies or substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
// THE SOFTWARE.
|
||||
|
||||
using System.Numerics;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly: TypeForwardedTo(typeof(Matrix3x2))]
|
||||
[assembly: TypeForwardedTo(typeof(Matrix4x4))]
|
||||
[assembly: TypeForwardedTo(typeof(Plane))]
|
||||
[assembly: TypeForwardedTo(typeof(Quaternion))]
|
||||
[assembly: TypeForwardedTo(typeof(Vector2))]
|
||||
[assembly: TypeForwardedTo(typeof(Vector3))]
|
||||
[assembly: TypeForwardedTo(typeof(Vector4))]
|
@ -3,8 +3,8 @@ SUBDIRS =
|
||||
include ../../build/rules.make
|
||||
|
||||
LIBRARY = System.Numerics.Vectors.dll
|
||||
LIB_REFS = System
|
||||
LIB_MCS_FLAGS =
|
||||
LIB_REFS = System System.Numerics
|
||||
LIB_MCS_FLAGS = -unsafe
|
||||
|
||||
EXTRA_DISTFILES =
|
||||
|
||||
|
17
mcs/class/System.Numerics.Vectors/SR.cs
Normal file
17
mcs/class/System.Numerics.Vectors/SR.cs
Normal file
@ -0,0 +1,17 @@
|
||||
// generated from Strings.resx in corefx
|
||||
|
||||
partial class SR
|
||||
{
|
||||
public const string Arg_ArgumentOutOfRangeException="Index was out of bounds:";
|
||||
public const string Arg_ElementsInSourceIsGreaterThanDestination="Number of elements in source vector is greater than the destination array";
|
||||
public const string Arg_MultiDimArrayNotSupported="Only one-dimensional arrays are supported";
|
||||
public const string Arg_NullArgumentNullRef="The method was called with a null array argument.";
|
||||
public const string Arg_RegisterLengthOfRangeException="length must be less than";
|
||||
public const string Arg_TypeNotSupported="Specified type is not supported";
|
||||
public const string Reflection_MethodNotSupported="Vector<T>.Count cannot be called via reflection when intrinsics are enabled.";
|
||||
|
||||
public static string Format (string message, object data)
|
||||
{
|
||||
return string.Format (message, data);
|
||||
}
|
||||
}
|
@ -1,3 +1,11 @@
|
||||
../../build/common/Consts.cs
|
||||
../../build/common/SR.cs
|
||||
Assembly/AssemblyInfo.cs
|
||||
Assembly/TypeForwarders.cs
|
||||
SR.cs
|
||||
System.Numerics/ConstantHelper.cs
|
||||
System.Numerics/HashCodeHelper.cs
|
||||
System.Numerics/JitIntrinsicAttribute.cs
|
||||
System.Numerics/Register.cs
|
||||
System.Numerics/Vector_Operations.cs
|
||||
System.Numerics/Vector.cs
|
||||
|
@ -0,0 +1,142 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
namespace System.Numerics
|
||||
{
|
||||
internal class ConstantHelper
|
||||
{
|
||||
[MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
|
||||
public static Byte GetByteWithAllBitsSet()
|
||||
{
|
||||
Byte value = 0;
|
||||
unsafe
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
*((Byte*)&value) = (Byte)0xff;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
[MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
|
||||
public static SByte GetSByteWithAllBitsSet()
|
||||
{
|
||||
SByte value = 0;
|
||||
unsafe
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
*((SByte*)&value) = (SByte)0xff;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
[MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
|
||||
public static UInt16 GetUInt16WithAllBitsSet()
|
||||
{
|
||||
UInt16 value = 0;
|
||||
unsafe
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
*((UInt16*)&value) = (UInt16)0xffff;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
[MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
|
||||
public static Int16 GetInt16WithAllBitsSet()
|
||||
{
|
||||
Int16 value = 0;
|
||||
unsafe
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
*((Int16*)&value) = (Int16)0xffff;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
[MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
|
||||
public static UInt32 GetUInt32WithAllBitsSet()
|
||||
{
|
||||
UInt32 value = 0;
|
||||
unsafe
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
*((UInt32*)&value) = (UInt32)0xffffffff;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
[MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
|
||||
public static Int32 GetInt32WithAllBitsSet()
|
||||
{
|
||||
Int32 value = 0;
|
||||
unsafe
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
*((Int32*)&value) = (Int32)0xffffffff;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
[MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
|
||||
public static UInt64 GetUInt64WithAllBitsSet()
|
||||
{
|
||||
UInt64 value = 0;
|
||||
unsafe
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
*((UInt64*)&value) = (UInt64)0xffffffffffffffff;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
[MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
|
||||
public static Int64 GetInt64WithAllBitsSet()
|
||||
{
|
||||
Int64 value = 0;
|
||||
unsafe
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
*((Int64*)&value) = (Int64)0xffffffffffffffff;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
[MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
|
||||
public static Single GetSingleWithAllBitsSet()
|
||||
{
|
||||
Single value = 0;
|
||||
unsafe
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
*((Int32*)&value) = (Int32)0xffffffff;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
[MethodImplAttribute(MethodImplOptions.AggressiveInlining)]
|
||||
public static Double GetDoubleWithAllBitsSet()
|
||||
{
|
||||
Double value = 0;
|
||||
unsafe
|
||||
{
|
||||
unchecked
|
||||
{
|
||||
*((Int64*)&value) = (Int64)0xffffffffffffffff;
|
||||
}
|
||||
}
|
||||
return value;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace System.Numerics
|
||||
{
|
||||
internal static class HashCodeHelper
|
||||
{
|
||||
/// <summary>
|
||||
/// Combines two hash codes, useful for combining hash codes of individual vector elements
|
||||
/// </summary>
|
||||
internal static int CombineHashCodes(int h1, int h2)
|
||||
{
|
||||
return (((h1 << 5) + h1) ^ h2);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
namespace System.Numerics
|
||||
{
|
||||
/// <summary>
|
||||
/// An attribute that can be attached to JIT Intrinsic methods/properties
|
||||
/// </summary>
|
||||
[AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Property)]
|
||||
internal class JitIntrinsicAttribute : Attribute
|
||||
{
|
||||
}
|
||||
}
|
172
mcs/class/System.Numerics.Vectors/System.Numerics/Register.cs
Normal file
172
mcs/class/System.Numerics.Vectors/System.Numerics/Register.cs
Normal file
@ -0,0 +1,172 @@
|
||||
// Licensed to the .NET Foundation under one or more agreements.
|
||||
// The .NET Foundation licenses this file to you under the MIT license.
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using System.Runtime.InteropServices;
|
||||
|
||||
namespace System.Numerics
|
||||
{
|
||||
/// <summary>
|
||||
/// A structure describing the layout of an SSE2-sized register.
|
||||
/// Contains overlapping fields representing the set of valid numeric types.
|
||||
/// Allows the generic Vector'T struct to contain an explicit field layout.
|
||||
/// </summary>
|
||||
[StructLayout(LayoutKind.Explicit)]
|
||||
internal struct Register
|
||||
{
|
||||
#region Internal Storage Fields
|
||||
// Internal System.Byte Fields
|
||||
[FieldOffset(0)]
|
||||
internal Byte byte_0;
|
||||
[FieldOffset(1)]
|
||||
internal Byte byte_1;
|
||||
[FieldOffset(2)]
|
||||
internal Byte byte_2;
|
||||
[FieldOffset(3)]
|
||||
internal Byte byte_3;
|
||||
[FieldOffset(4)]
|
||||
internal Byte byte_4;
|
||||
[FieldOffset(5)]
|
||||
internal Byte byte_5;
|
||||
[FieldOffset(6)]
|
||||
internal Byte byte_6;
|
||||
[FieldOffset(7)]
|
||||
internal Byte byte_7;
|
||||
[FieldOffset(8)]
|
||||
internal Byte byte_8;
|
||||
[FieldOffset(9)]
|
||||
internal Byte byte_9;
|
||||
[FieldOffset(10)]
|
||||
internal Byte byte_10;
|
||||
[FieldOffset(11)]
|
||||
internal Byte byte_11;
|
||||
[FieldOffset(12)]
|
||||
internal Byte byte_12;
|
||||
[FieldOffset(13)]
|
||||
internal Byte byte_13;
|
||||
[FieldOffset(14)]
|
||||
internal Byte byte_14;
|
||||
[FieldOffset(15)]
|
||||
internal Byte byte_15;
|
||||
|
||||
// Internal System.SByte Fields
|
||||
[FieldOffset(0)]
|
||||
internal SByte sbyte_0;
|
||||
[FieldOffset(1)]
|
||||
internal SByte sbyte_1;
|
||||
[FieldOffset(2)]
|
||||
internal SByte sbyte_2;
|
||||
[FieldOffset(3)]
|
||||
internal SByte sbyte_3;
|
||||
[FieldOffset(4)]
|
||||
internal SByte sbyte_4;
|
||||
[FieldOffset(5)]
|
||||
internal SByte sbyte_5;
|
||||
[FieldOffset(6)]
|
||||
internal SByte sbyte_6;
|
||||
[FieldOffset(7)]
|
||||
internal SByte sbyte_7;
|
||||
[FieldOffset(8)]
|
||||
internal SByte sbyte_8;
|
||||
[FieldOffset(9)]
|
||||
internal SByte sbyte_9;
|
||||
[FieldOffset(10)]
|
||||
internal SByte sbyte_10;
|
||||
[FieldOffset(11)]
|
||||
internal SByte sbyte_11;
|
||||
[FieldOffset(12)]
|
||||
internal SByte sbyte_12;
|
||||
[FieldOffset(13)]
|
||||
internal SByte sbyte_13;
|
||||
[FieldOffset(14)]
|
||||
internal SByte sbyte_14;
|
||||
[FieldOffset(15)]
|
||||
internal SByte sbyte_15;
|
||||
|
||||
// Internal System.UInt16 Fields
|
||||
[FieldOffset(0)]
|
||||
internal UInt16 uint16_0;
|
||||
[FieldOffset(2)]
|
||||
internal UInt16 uint16_1;
|
||||
[FieldOffset(4)]
|
||||
internal UInt16 uint16_2;
|
||||
[FieldOffset(6)]
|
||||
internal UInt16 uint16_3;
|
||||
[FieldOffset(8)]
|
||||
internal UInt16 uint16_4;
|
||||
[FieldOffset(10)]
|
||||
internal UInt16 uint16_5;
|
||||
[FieldOffset(12)]
|
||||
internal UInt16 uint16_6;
|
||||
[FieldOffset(14)]
|
||||
internal UInt16 uint16_7;
|
||||
|
||||
// Internal System.Int16 Fields
|
||||
[FieldOffset(0)]
|
||||
internal Int16 int16_0;
|
||||
[FieldOffset(2)]
|
||||
internal Int16 int16_1;
|
||||
[FieldOffset(4)]
|
||||
internal Int16 int16_2;
|
||||
[FieldOffset(6)]
|
||||
internal Int16 int16_3;
|
||||
[FieldOffset(8)]
|
||||
internal Int16 int16_4;
|
||||
[FieldOffset(10)]
|
||||
internal Int16 int16_5;
|
||||
[FieldOffset(12)]
|
||||
internal Int16 int16_6;
|
||||
[FieldOffset(14)]
|
||||
internal Int16 int16_7;
|
||||
|
||||
// Internal System.UInt32 Fields
|
||||
[FieldOffset(0)]
|
||||
internal UInt32 uint32_0;
|
||||
[FieldOffset(4)]
|
||||
internal UInt32 uint32_1;
|
||||
[FieldOffset(8)]
|
||||
internal UInt32 uint32_2;
|
||||
[FieldOffset(12)]
|
||||
internal UInt32 uint32_3;
|
||||
|
||||
// Internal System.Int32 Fields
|
||||
[FieldOffset(0)]
|
||||
internal Int32 int32_0;
|
||||
[FieldOffset(4)]
|
||||
internal Int32 int32_1;
|
||||
[FieldOffset(8)]
|
||||
internal Int32 int32_2;
|
||||
[FieldOffset(12)]
|
||||
internal Int32 int32_3;
|
||||
|
||||
// Internal System.UInt64 Fields
|
||||
[FieldOffset(0)]
|
||||
internal UInt64 uint64_0;
|
||||
[FieldOffset(8)]
|
||||
internal UInt64 uint64_1;
|
||||
|
||||
// Internal System.Int64 Fields
|
||||
[FieldOffset(0)]
|
||||
internal Int64 int64_0;
|
||||
[FieldOffset(8)]
|
||||
internal Int64 int64_1;
|
||||
|
||||
// Internal System.Single Fields
|
||||
[FieldOffset(0)]
|
||||
internal Single single_0;
|
||||
[FieldOffset(4)]
|
||||
internal Single single_1;
|
||||
[FieldOffset(8)]
|
||||
internal Single single_2;
|
||||
[FieldOffset(12)]
|
||||
internal Single single_3;
|
||||
|
||||
// Internal System.Double Fields
|
||||
[FieldOffset(0)]
|
||||
internal Double double_0;
|
||||
[FieldOffset(8)]
|
||||
internal Double double_1;
|
||||
|
||||
#endregion Internal Storage Fields
|
||||
}
|
||||
}
|
@ -0,0 +1 @@
|
||||
13785ed5cfe49a9b83029b75bd5fbe239a875333
|
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,7 @@
|
||||
SR.cs
|
||||
System.Numerics/ConstantHelper.cs
|
||||
System.Numerics/HashCodeHelper.cs
|
||||
System.Numerics/JitIntrinsicAttribute.cs
|
||||
System.Numerics/Register.cs
|
||||
System.Numerics/Vector_Operations.cs
|
||||
System.Numerics/Vector.cs
|
@ -0,0 +1 @@
|
||||
#include System.Numerics.Vectors.dll.sources
|
Reference in New Issue
Block a user