Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'netcore/System.Private.CoreLib/shared/System/Runtime')
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/AmbiguousImplementationException.cs36
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AccessedThroughPropertyAttribute.cs17
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs66
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncIteratorStateMachineAttribute.cs18
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs21
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs158
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncStateMachineAttribute.cs15
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncTaskCache.cs66
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncTaskMethodBuilder.cs144
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs607
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs175
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilderT.cs513
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncVoidMethodBuilder.cs163
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CallerArgumentExpressionAttribute.cs17
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CallerFilePathAttribute.cs14
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CallerLineNumberAttribute.cs14
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CallerMemberNameAttribute.cs14
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CompilationRelaxations.cs15
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CompilationRelaxationsAttribute.cs22
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CompilerGeneratedAttribute.cs12
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CompilerGlobalScopeAttribute.cs14
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ConditionalWeakTable.cs806
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ConfiguredAsyncDisposable.cs27
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ConfiguredCancelableAsyncEnumerable.cs78
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ConfiguredValueTaskAwaitable.cs225
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ContractHelper.cs156
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CustomConstantAttribute.cs12
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/DateTimeConstantAttribute.cs21
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/DecimalConstantAttribute.cs39
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/DefaultDependencyAttribute.cs17
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/DependencyAttribute.cs19
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/DisablePrivateReflectionAttribute.cs12
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/DiscardableAttribute.cs13
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ExtensionAttribute.cs12
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/FixedAddressValueTypeAttribute.cs12
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/FixedBufferAttribute.cs30
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/FormattableStringFactory.cs58
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IAsyncStateMachine.cs27
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IAsyncStateMachineBox.cs24
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ICastable.cs61
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/INotifyCompletion.cs36
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ITuple.cs22
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IndexerNameAttribute.cs14
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/InternalsVisibleToAttribute.cs18
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IntrinsicAttribute.cs14
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IsByRefLikeAttribute.cs21
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IsConst.cs10
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IsReadOnlyAttribute.cs21
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IsVolatile.cs11
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IteratorStateMachineAttribute.cs15
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/LoadHint.cs13
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/MethodCodeType.cs16
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/MethodImplAttribute.cs29
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/MethodImplOptions.cs22
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/PreserveDependencyAttribute.cs62
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ReferenceAssemblyAttribute.cs32
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/RuntimeCompatibilityAttribute.cs30
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/RuntimeFeature.cs42
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/RuntimeHelpers.cs109
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/RuntimeWrappedException.cs41
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/SpecialNameAttribute.cs12
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/StateMachineAttribute.cs17
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/StringFreezingAttribute.cs14
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/StrongBox.cs54
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/SuppressIldasmAttribute.cs12
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/TaskAwaiter.cs556
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/TupleElementNamesAttribute.cs57
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/TypeForwardedFromAttribute.cs20
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/TypeForwardedToAttribute.cs17
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/UnsafeValueTypeAttribute.cs11
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ValueTaskAwaiter.cs198
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/YieldAwaitable.cs195
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/Cer.cs13
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/Consistency.cs14
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/CriticalFinalizerObject.cs30
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/ReliabilityContractAttribute.cs33
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/ExceptionServices/ExceptionDispatchInfo.cs83
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/ExceptionServices/ExceptionNotification.cs18
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/ExceptionServices/HandleProcessCorruptedStateExceptionsAttribute.cs16
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/GCSettings.cs69
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/AllowReversePInvokeCallsAttribute.cs16
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ArrayWithOffset.cs74
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/BStrWrapper.cs22
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/BestFitMappingAttribute.cs19
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/COMException.cs74
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CallingConvention.cs16
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CharSet.cs21
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ClassInterfaceAttribute.cs21
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ClassInterfaceType.cs13
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CoClassAttribute.cs17
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CollectionsMarshal.cs21
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComDefaultInterfaceAttribute.cs17
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComEventInterfaceAttribute.cs19
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComEventsHelpers.NoCom.cs21
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComImportAttribute.cs11
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComInterfaceType.cs14
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComMemberType.cs13
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComSourceInterfacesAttribute.cs37
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IBindCtx.cs33
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IConnectionPoint.cs18
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IConnectionPointContainer.cs15
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IEnumConnectionPoints.cs19
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IEnumConnections.cs27
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IEnumMoniker.cs19
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IEnumString.cs19
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IEnumVARIANT.cs23
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IMoniker.cs49
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IPersistFile.cs23
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IRunningObjectTable.cs23
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IStream.cs43
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeComp.cs36
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeInfo.cs303
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeInfo2.cs51
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeLib.cs54
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs31
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComVisibleAttribute.cs17
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CriticalHandle.cs211
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CurrencyWrapper.cs25
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CustomQueryInterfaceMode.cs12
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CustomQueryInterfaceResult.cs14
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DefaultCharSetAttribute.cs17
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DefaultDllImportSearchPathsAttribute.cs17
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DefaultParameterValueAttribute.cs23
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DispIdAttribute.cs17
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DispatchWrapper.cs26
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DllImportAttribute.cs26
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DllImportSearchPath.cs18
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ErrorWrapper.cs29
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ExternalException.cs81
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/FieldOffsetAttribute.cs17
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/GCHandle.cs195
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/GCHandleType.cs18
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/GuidAttribute.cs17
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/HandleRef.cs29
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ICustomAdapter.cs13
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ICustomFactory.cs11
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ICustomMarshaler.cs20
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ICustomQueryInterface.cs12
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/InAttribute.cs14
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/InterfaceTypeAttribute.cs21
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/InvalidComObjectException.cs41
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/InvalidOleVariantTypeException.cs40
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/LCIDConversionAttribute.cs17
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/LayoutKind.cs14
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/Marshal.NoCom.cs204
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/Marshal.Unix.cs66
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/Marshal.Windows.cs131
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/Marshal.cs978
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/MarshalAsAttribute.cs39
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/MarshalDirectiveException.cs44
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/MemoryMarshal.cs535
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/NativeCallableAttribute.cs29
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/NativeLibrary.cs248
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/OptionalAttribute.cs14
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/OutAttribute.cs14
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/PreserveSigAttribute.cs14
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ProgIdAttribute.cs17
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/SEHException.cs47
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/SafeArrayRankMismatchException.cs39
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/SafeArrayTypeMismatchException.cs39
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/SafeBuffer.cs393
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/SafeHandle.cs253
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/StructLayoutAttribute.cs26
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/SuppressGCTransitionAttribute.cs65
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/TypeIdentifierAttribute.cs20
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/UnknownWrapper.cs17
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/UnmanagedFunctionPointerAttribute.cs27
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/UnmanagedType.cs48
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/VarEnum.cs54
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/VariantWrapper.cs17
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/WindowsRuntime/EventRegistrationToken.cs34
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/AdvSimd.PlatformNotSupported.cs2172
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/AdvSimd.cs2174
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Aes.PlatformNotSupported.cs48
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Aes.cs48
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/ArmBase.PlatformNotSupported.cs81
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/ArmBase.cs82
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Crc32.PlatformNotSupported.cs82
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Crc32.cs82
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Sha1.PlatformNotSupported.cs62
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Sha1.cs62
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Sha256.PlatformNotSupported.cs48
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Sha256.cs48
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector128.cs1859
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector128DebugView_1.cs118
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector128_1.cs192
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector256.cs1962
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector256DebugView_1.cs118
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector256_1.cs193
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector64.cs694
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector64DebugView_1.cs118
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector64_1.cs146
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Aes.PlatformNotSupported.cs59
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Aes.cs56
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Avx.PlatformNotSupported.cs1227
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Avx.cs1226
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Avx2.PlatformNotSupported.cs2191
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Avx2.cs2669
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Bmi1.PlatformNotSupported.cs119
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Bmi1.cs119
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Bmi2.PlatformNotSupported.cs97
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Bmi2.cs97
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Enums.cs169
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Fma.PlatformNotSupported.cs191
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Fma.cs190
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Lzcnt.PlatformNotSupported.cs40
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Lzcnt.cs41
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Pclmulqdq.PlatformNotSupported.cs32
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Pclmulqdq.cs31
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Popcnt.PlatformNotSupported.cs40
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Popcnt.cs39
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse.PlatformNotSupported.cs574
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse.cs573
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse2.PlatformNotSupported.cs1680
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse2.cs1684
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse3.PlatformNotSupported.cs92
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse3.cs90
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse41.PlatformNotSupported.cs713
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse41.cs713
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse42.PlatformNotSupported.cs57
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse42.cs57
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Ssse3.PlatformNotSupported.cs165
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Ssse3.cs165
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Loader/AssemblyLoadContext.cs801
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Loader/LibraryNameVariation.Unix.cs68
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Loader/LibraryNameVariation.Windows.cs27
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Loader/LibraryNameVariation.cs18
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/MemoryFailPoint.Unix.cs40
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/MemoryFailPoint.Windows.cs102
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/MemoryFailPoint.cs404
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Remoting/ObjectHandle.cs21
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/DeserializationToken.cs33
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/DeserializationTracker.cs14
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/IDeserializationCallback.cs11
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/IFormatterConverter.cs28
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/IObjectReference.cs11
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/ISafeSerializationData.cs207
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/ISerializable.cs11
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/OnDeserializedAttribute.cs11
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/OnDeserializingAttribute.cs11
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/OnSerializedAttribute.cs11
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/OnSerializingAttribute.cs11
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/OptionalFieldAttribute.cs25
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/SafeSerializationEventArgs.cs18
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/SerializationException.cs38
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/SerializationInfo.cs642
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/SerializationInfoEnumerator.cs127
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/StreamingContext.cs52
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Versioning/NonVersionableAttribute.cs33
-rw-r--r--netcore/System.Private.CoreLib/shared/System/Runtime/Versioning/TargetFrameworkAttribute.cs41
250 files changed, 0 insertions, 39844 deletions
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/AmbiguousImplementationException.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/AmbiguousImplementationException.cs
deleted file mode 100644
index 90f3d44f63d..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/AmbiguousImplementationException.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-// 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.Serialization;
-
-namespace System.Runtime
-{
- [Serializable]
- [System.Runtime.CompilerServices.TypeForwardedFrom("System.Runtime, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")]
- public sealed class AmbiguousImplementationException : Exception
- {
- public AmbiguousImplementationException()
- : base(SR.AmbiguousImplementationException_NullMessage)
- {
- HResult = HResults.COR_E_AMBIGUOUSIMPLEMENTATION;
- }
-
- public AmbiguousImplementationException(string? message)
- : base(message)
- {
- HResult = HResults.COR_E_AMBIGUOUSIMPLEMENTATION;
- }
-
- public AmbiguousImplementationException(string? message, Exception? innerException)
- : base(message, innerException)
- {
- HResult = HResults.COR_E_AMBIGUOUSIMPLEMENTATION;
- }
-
- private AmbiguousImplementationException(SerializationInfo info, StreamingContext context)
- : base(info, context)
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AccessedThroughPropertyAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AccessedThroughPropertyAttribute.cs
deleted file mode 100644
index 25efcafa3fd..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AccessedThroughPropertyAttribute.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Field)]
- public sealed class AccessedThroughPropertyAttribute : Attribute
- {
- public AccessedThroughPropertyAttribute(string propertyName)
- {
- PropertyName = propertyName;
- }
-
- public string PropertyName { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs
deleted file mode 100644
index 4c4e2ebc05a..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncIteratorMethodBuilder.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-// 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;
-using System.Threading;
-
-namespace System.Runtime.CompilerServices
-{
- /// <summary>Represents a builder for asynchronous iterators.</summary>
- [StructLayout(LayoutKind.Auto)]
- public struct AsyncIteratorMethodBuilder
- {
- // AsyncIteratorMethodBuilder is used by the language compiler as part of generating
- // async iterators. For now, the implementation just wraps AsyncTaskMethodBuilder, as
- // most of the logic is shared. However, in the future this could be changed and
- // optimized. For example, we do need to allocate an object (once) to flow state like
- // ExecutionContext, which AsyncTaskMethodBuilder handles, but it handles it by
- // allocating a Task-derived object. We could optimize this further by removing
- // the Task from the hierarchy, but in doing so we'd also lose a variety of optimizations
- // related to it, so we'd need to replicate all of those optimizations (e.g. storing
- // that box object directly into a Task's continuation field).
-
- private AsyncTaskMethodBuilder _methodBuilder; // mutable struct; do not make it readonly
-
- /// <summary>Creates an instance of the <see cref="AsyncIteratorMethodBuilder"/> struct.</summary>
- /// <returns>The initialized instance.</returns>
- public static AsyncIteratorMethodBuilder Create() =>
- // _methodBuilder should be initialized to AsyncTaskMethodBuilder.Create(), but on coreclr
- // that Create() is a nop, so we can just return the default here.
- default;
-
- /// <summary>Invokes <see cref="IAsyncStateMachine.MoveNext"/> on the state machine while guarding the <see cref="ExecutionContext"/>.</summary>
- /// <typeparam name="TStateMachine">The type of the state machine.</typeparam>
- /// <param name="stateMachine">The state machine instance, passed by reference.</param>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void MoveNext<TStateMachine>(ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine =>
- AsyncMethodBuilderCore.Start(ref stateMachine);
-
- /// <summary>Schedules the state machine to proceed to the next action when the specified awaiter completes.</summary>
- /// <typeparam name="TAwaiter">The type of the awaiter.</typeparam>
- /// <typeparam name="TStateMachine">The type of the state machine.</typeparam>
- /// <param name="awaiter">The awaiter.</param>
- /// <param name="stateMachine">The state machine.</param>
- public void AwaitOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine)
- where TAwaiter : INotifyCompletion
- where TStateMachine : IAsyncStateMachine =>
- _methodBuilder.AwaitOnCompleted(ref awaiter, ref stateMachine);
-
- /// <summary>Schedules the state machine to proceed to the next action when the specified awaiter completes.</summary>
- /// <typeparam name="TAwaiter">The type of the awaiter.</typeparam>
- /// <typeparam name="TStateMachine">The type of the state machine.</typeparam>
- /// <param name="awaiter">The awaiter.</param>
- /// <param name="stateMachine">The state machine.</param>
- public void AwaitUnsafeOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine)
- where TAwaiter : ICriticalNotifyCompletion
- where TStateMachine : IAsyncStateMachine =>
- _methodBuilder.AwaitUnsafeOnCompleted(ref awaiter, ref stateMachine);
-
- /// <summary>Marks iteration as being completed, whether successfully or otherwise.</summary>
- public void Complete() => _methodBuilder.SetResult();
-
- /// <summary>Gets an object that may be used to uniquely identify this builder to the debugger.</summary>
- internal object ObjectIdForDebugger => _methodBuilder.ObjectIdForDebugger;
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncIteratorStateMachineAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncIteratorStateMachineAttribute.cs
deleted file mode 100644
index 489195569de..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncIteratorStateMachineAttribute.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- /// <summary>Indicates whether a method is an asynchronous iterator.</summary>
- [AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)]
- public sealed class AsyncIteratorStateMachineAttribute : StateMachineAttribute
- {
- /// <summary>Initializes a new instance of the <see cref="AsyncIteratorStateMachineAttribute"/> class.</summary>
- /// <param name="stateMachineType">The type object for the underlying state machine type that's used to implement a state machine method.</param>
- public AsyncIteratorStateMachineAttribute(Type stateMachineType)
- : base(stateMachineType)
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs
deleted file mode 100644
index 688a3a01ba7..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilderAttribute.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- /// <summary>
- /// Indicates the type of the async method builder that should be used by a language compiler to
- /// build the attributed type when used as the return type of an async method.
- /// </summary>
- [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Interface | AttributeTargets.Delegate | AttributeTargets.Enum, Inherited = false, AllowMultiple = false)]
- public sealed class AsyncMethodBuilderAttribute : Attribute
- {
- /// <summary>Initializes the <see cref="AsyncMethodBuilderAttribute"/>.</summary>
- /// <param name="builderType">The <see cref="Type"/> of the associated builder.</param>
- public AsyncMethodBuilderAttribute(Type builderType) => BuilderType = builderType;
-
- /// <summary>Gets the <see cref="Type"/> of the associated builder.</summary>
- public Type BuilderType { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs
deleted file mode 100644
index f8aad2f0178..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncMethodBuilderCore.cs
+++ /dev/null
@@ -1,158 +0,0 @@
-// 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.Diagnostics;
-using System.Diagnostics.Tracing;
-using System.Reflection;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Text;
-
-namespace System.Runtime.CompilerServices
-{
- /// <summary>Shared helpers for manipulating state related to async state machines.</summary>
- internal static class AsyncMethodBuilderCore // debugger depends on this exact name
- {
- /// <summary>Initiates the builder's execution with the associated state machine.</summary>
- /// <typeparam name="TStateMachine">Specifies the type of the state machine.</typeparam>
- /// <param name="stateMachine">The state machine instance, passed by reference.</param>
- [DebuggerStepThrough]
- public static void Start<TStateMachine>(ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine
- {
- if (stateMachine == null) // TStateMachines are generally non-nullable value types, so this check will be elided
- {
- ThrowHelper.ThrowArgumentNullException(ExceptionArgument.stateMachine);
- }
-
- // enregistrer variables with 0 post-fix so they can be used in registers without EH forcing them to stack
- // Capture references to Thread Contexts
- Thread currentThread0 = Thread.CurrentThread;
- Thread currentThread = currentThread0;
- ExecutionContext? previousExecutionCtx0 = currentThread0._executionContext;
-
- // Store current ExecutionContext and SynchronizationContext as "previousXxx".
- // This allows us to restore them and undo any Context changes made in stateMachine.MoveNext
- // so that they won't "leak" out of the first await.
- ExecutionContext? previousExecutionCtx = previousExecutionCtx0;
- SynchronizationContext? previousSyncCtx = currentThread0._synchronizationContext;
-
- try
- {
- stateMachine.MoveNext();
- }
- finally
- {
- // Re-enregistrer variables post EH with 1 post-fix so they can be used in registers rather than from stack
- SynchronizationContext? previousSyncCtx1 = previousSyncCtx;
- Thread currentThread1 = currentThread;
- // The common case is that these have not changed, so avoid the cost of a write barrier if not needed.
- if (previousSyncCtx1 != currentThread1._synchronizationContext)
- {
- // Restore changed SynchronizationContext back to previous
- currentThread1._synchronizationContext = previousSyncCtx1;
- }
-
- ExecutionContext? previousExecutionCtx1 = previousExecutionCtx;
- ExecutionContext? currentExecutionCtx1 = currentThread1._executionContext;
- if (previousExecutionCtx1 != currentExecutionCtx1)
- {
- ExecutionContext.RestoreChangedContextToThread(currentThread1, previousExecutionCtx1, currentExecutionCtx1);
- }
- }
- }
-
- public static void SetStateMachine(IAsyncStateMachine stateMachine, Task? task)
- {
- if (stateMachine == null)
- {
- ThrowHelper.ThrowArgumentNullException(ExceptionArgument.stateMachine);
- }
-
- if (task != null)
- {
- ThrowHelper.ThrowInvalidOperationException(ExceptionResource.AsyncMethodBuilder_InstanceNotInitialized);
- }
-
- // SetStateMachine was originally needed in order to store the boxed state machine reference into
- // the boxed copy. Now that a normal box is no longer used, SetStateMachine is also legacy. We need not
- // do anything here, and thus assert to ensure we're not calling this from our own implementations.
- Debug.Fail("SetStateMachine should not be used.");
- }
-
-#if !CORERT
- /// <summary>Gets whether we should be tracking async method completions for eventing.</summary>
- internal static bool TrackAsyncMethodCompletion
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get => TplEventSource.Log.IsEnabled(EventLevel.Warning, TplEventSource.Keywords.AsyncMethod);
- }
-#endif
-
- /// <summary>Gets a description of the state of the state machine object, suitable for debug purposes.</summary>
- /// <param name="stateMachine">The state machine object.</param>
- /// <returns>A description of the state machine.</returns>
- internal static string GetAsyncStateMachineDescription(IAsyncStateMachine stateMachine)
- {
- Debug.Assert(stateMachine != null);
-
- Type stateMachineType = stateMachine.GetType();
- FieldInfo[] fields = stateMachineType.GetFields(BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic);
-
- var sb = new StringBuilder();
- sb.AppendLine(stateMachineType.FullName);
- foreach (FieldInfo fi in fields)
- {
- sb.Append(" ").Append(fi.Name).Append(": ").Append(fi.GetValue(stateMachine)).AppendLine();
- }
- return sb.ToString();
- }
-
- internal static Action CreateContinuationWrapper(Action continuation, Action<Action, Task> invokeAction, Task innerTask) =>
- new ContinuationWrapper(continuation, invokeAction, innerTask).Invoke;
-
- /// <summary>This helper routine is targeted by the debugger. Its purpose is to remove any delegate wrappers introduced by
- /// the framework that the debugger doesn't want to see.</summary>
- internal static Action TryGetStateMachineForDebugger(Action action) // debugger depends on this exact name/signature
- {
- object? target = action.Target;
- return
- target is IAsyncStateMachineBox sm ? sm.GetStateMachineObject().MoveNext :
- target is ContinuationWrapper cw ? TryGetStateMachineForDebugger(cw._continuation) :
- action;
- }
-
- internal static Task? TryGetContinuationTask(Action continuation) =>
- (continuation.Target is ContinuationWrapper wrapper) ?
- wrapper._innerTask : // A wrapped continuation, created by an awaiter
- continuation.Target as Task; // The continuation targets a task directly, such as with AsyncStateMachineBox
-
- /// <summary>
- /// Logically we pass just an Action (delegate) to a task for its action to 'ContinueWith' when it completes.
- /// However debuggers and profilers need more information about what that action is. (In particular what
- /// the action after that is and after that. To solve this problem we create a 'ContinuationWrapper
- /// which when invoked just does the original action (the invoke action), but also remembers other information
- /// (like the action after that (which is also a ContinuationWrapper and thus form a linked list).
- /// We also store that task if the action is associate with at task.
- /// </summary>
- private sealed class ContinuationWrapper // SOS DumpAsync command depends on this name
- {
- private readonly Action<Action, Task> _invokeAction; // This wrapper is an action that wraps another action, this is that Action.
- internal readonly Action _continuation; // This is continuation which will happen after m_invokeAction (and is probably a ContinuationWrapper). SOS DumpAsync command depends on this name.
- internal readonly Task _innerTask; // If the continuation is logically going to invoke a task, this is that task (may be null)
-
- internal ContinuationWrapper(Action continuation, Action<Action, Task> invokeAction, Task innerTask)
- {
- Debug.Assert(continuation != null, "Expected non-null continuation");
- Debug.Assert(invokeAction != null, "Expected non-null invokeAction");
- Debug.Assert(innerTask != null, "Expected non-null innerTask");
-
- _invokeAction = invokeAction;
- _continuation = continuation;
- _innerTask = innerTask;
- }
-
- internal void Invoke() => _invokeAction(_continuation, _innerTask);
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncStateMachineAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncStateMachineAttribute.cs
deleted file mode 100644
index 66c9175ee75..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncStateMachineAttribute.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)]
- public sealed class AsyncStateMachineAttribute : StateMachineAttribute
- {
- public AsyncStateMachineAttribute(Type stateMachineType)
- : base(stateMachineType)
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncTaskCache.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncTaskCache.cs
deleted file mode 100644
index 3f164a02c43..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncTaskCache.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-// 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.Diagnostics;
-using System.Threading.Tasks;
-using System.Diagnostics.CodeAnalysis;
-
-namespace System.Runtime.CompilerServices
-{
- /// <summary>Provides a cache of closed generic tasks for async methods.</summary>
- internal static class AsyncTaskCache
- {
- /// <summary>A cached Task{Boolean}.Result == true.</summary>
- internal static readonly Task<bool> s_trueTask = CreateCacheableTask(result: true);
- /// <summary>A cached Task{Boolean}.Result == false.</summary>
- internal static readonly Task<bool> s_falseTask = CreateCacheableTask(result: false);
- /// <summary>The cache of Task{Int32}.</summary>
- internal static readonly Task<int>[] s_int32Tasks = CreateInt32Tasks();
- /// <summary>The minimum value, inclusive, for which we want a cached task.</summary>
- internal const int InclusiveInt32Min = -1;
- /// <summary>The maximum value, exclusive, for which we want a cached task.</summary>
- internal const int ExclusiveInt32Max = 9;
-
- /// <summary>true if we should use reusable boxes for async completions of ValueTask methods; false if we should use tasks.</summary>
- /// <remarks>
- /// We rely on tiered compilation turning this into a const and doing dead code elimination to make checks on this efficient.
- /// It's also required for safety that this value never changes once observed, as Unsafe.As casts are employed based on its value.
- /// </remarks>
- internal static readonly bool s_valueTaskPoolingEnabled = GetPoolAsyncValueTasksSwitch();
- /// <summary>Maximum number of boxes that are allowed to be cached per state machine type.</summary>
- internal static readonly int s_valueTaskPoolingCacheSize = GetPoolAsyncValueTasksLimitValue();
-
- private static bool GetPoolAsyncValueTasksSwitch()
- {
- string? value = Environment.GetEnvironmentVariable("DOTNET_SYSTEM_THREADING_POOLASYNCVALUETASKS");
- return value != null && (bool.IsTrueStringIgnoreCase(value) || value.Equals("1"));
- }
-
- private static int GetPoolAsyncValueTasksLimitValue() =>
- int.TryParse(Environment.GetEnvironmentVariable("DOTNET_SYSTEM_THREADING_POOLASYNCVALUETASKSLIMIT"), out int result) && result > 0 ?
- result :
- Environment.ProcessorCount * 4; // arbitrary default value
-
- /// <summary>Creates a non-disposable task.</summary>
- /// <typeparam name="TResult">Specifies the result type.</typeparam>
- /// <param name="result">The result for the task.</param>
- /// <returns>The cacheable task.</returns>
- internal static Task<TResult> CreateCacheableTask<TResult>([AllowNull] TResult result) =>
- new Task<TResult>(false, result, (TaskCreationOptions)InternalTaskOptions.DoNotDispose, default);
-
- /// <summary>Creates an array of cached tasks for the values in the range [INCLUSIVE_MIN,EXCLUSIVE_MAX).</summary>
- private static Task<int>[] CreateInt32Tasks()
- {
- Debug.Assert(ExclusiveInt32Max >= InclusiveInt32Min, "Expected max to be at least min");
-
- var tasks = new Task<int>[ExclusiveInt32Max - InclusiveInt32Min];
- for (int i = 0; i < tasks.Length; i++)
- {
- tasks[i] = CreateCacheableTask(i + InclusiveInt32Min);
- }
-
- return tasks;
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncTaskMethodBuilder.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncTaskMethodBuilder.cs
deleted file mode 100644
index a3e7e5fe068..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncTaskMethodBuilder.cs
+++ /dev/null
@@ -1,144 +0,0 @@
-// 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.Diagnostics;
-using System.Threading.Tasks;
-
-namespace System.Runtime.CompilerServices
-{
- /// <summary>
- /// Provides a builder for asynchronous methods that return <see cref="System.Threading.Tasks.Task"/>.
- /// This type is intended for compiler use only.
- /// </summary>
- /// <remarks>
- /// AsyncTaskMethodBuilder is a value type, and thus it is copied by value.
- /// Prior to being copied, one of its Task, SetResult, or SetException members must be accessed,
- /// or else the copies may end up building distinct Task instances.
- /// </remarks>
- public struct AsyncTaskMethodBuilder
- {
- /// <summary>The lazily-initialized built task.</summary>
- private Task<VoidTaskResult>? m_task; // Debugger depends on the exact name of this field.
-
- /// <summary>Initializes a new <see cref="AsyncTaskMethodBuilder"/>.</summary>
- /// <returns>The initialized <see cref="AsyncTaskMethodBuilder"/>.</returns>
- public static AsyncTaskMethodBuilder Create() => default;
-
- /// <summary>Initiates the builder's execution with the associated state machine.</summary>
- /// <typeparam name="TStateMachine">Specifies the type of the state machine.</typeparam>
- /// <param name="stateMachine">The state machine instance, passed by reference.</param>
- [DebuggerStepThrough]
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void Start<TStateMachine>(ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine =>
- AsyncMethodBuilderCore.Start(ref stateMachine);
-
- /// <summary>Associates the builder with the state machine it represents.</summary>
- /// <param name="stateMachine">The heap-allocated state machine object.</param>
- /// <exception cref="System.ArgumentNullException">The <paramref name="stateMachine"/> argument was null (Nothing in Visual Basic).</exception>
- /// <exception cref="System.InvalidOperationException">The builder is incorrectly initialized.</exception>
- public void SetStateMachine(IAsyncStateMachine stateMachine) =>
- AsyncMethodBuilderCore.SetStateMachine(stateMachine, task: null);
-
- /// <summary>
- /// Schedules the specified state machine to be pushed forward when the specified awaiter completes.
- /// </summary>
- /// <typeparam name="TAwaiter">Specifies the type of the awaiter.</typeparam>
- /// <typeparam name="TStateMachine">Specifies the type of the state machine.</typeparam>
- /// <param name="awaiter">The awaiter.</param>
- /// <param name="stateMachine">The state machine.</param>
- public void AwaitOnCompleted<TAwaiter, TStateMachine>(
- ref TAwaiter awaiter, ref TStateMachine stateMachine)
- where TAwaiter : INotifyCompletion
- where TStateMachine : IAsyncStateMachine =>
- AsyncTaskMethodBuilder<VoidTaskResult>.AwaitOnCompleted(ref awaiter, ref stateMachine, ref m_task);
-
- /// <summary>
- /// Schedules the specified state machine to be pushed forward when the specified awaiter completes.
- /// </summary>
- /// <typeparam name="TAwaiter">Specifies the type of the awaiter.</typeparam>
- /// <typeparam name="TStateMachine">Specifies the type of the state machine.</typeparam>
- /// <param name="awaiter">The awaiter.</param>
- /// <param name="stateMachine">The state machine.</param>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void AwaitUnsafeOnCompleted<TAwaiter, TStateMachine>(
- ref TAwaiter awaiter, ref TStateMachine stateMachine)
- where TAwaiter : ICriticalNotifyCompletion
- where TStateMachine : IAsyncStateMachine =>
- AsyncTaskMethodBuilder<VoidTaskResult>.AwaitUnsafeOnCompleted(ref awaiter, ref stateMachine, ref m_task);
-
- /// <summary>Gets the <see cref="System.Threading.Tasks.Task"/> for this builder.</summary>
- /// <returns>The <see cref="System.Threading.Tasks.Task"/> representing the builder's asynchronous operation.</returns>
- /// <exception cref="System.InvalidOperationException">The builder is not initialized.</exception>
- public Task Task
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get => m_task ?? InitializeTaskAsPromise();
- }
-
- /// <summary>
- /// Initializes the task, which must not yet be initialized. Used only when the Task is being forced into
- /// existence when no state machine is needed, e.g. when the builder is being synchronously completed with
- /// an exception, when the builder is being used out of the context of an async method, etc.
- /// </summary>
- [MethodImpl(MethodImplOptions.NoInlining)]
- private Task<VoidTaskResult> InitializeTaskAsPromise()
- {
- Debug.Assert(m_task == null);
- return m_task = new Task<VoidTaskResult>();
- }
-
- /// <summary>
- /// Completes the <see cref="System.Threading.Tasks.Task"/> in the
- /// <see cref="System.Threading.Tasks.TaskStatus">RanToCompletion</see> state.
- /// </summary>
- /// <exception cref="System.InvalidOperationException">The builder is not initialized.</exception>
- /// <exception cref="System.InvalidOperationException">The task has already completed.</exception>
- public void SetResult()
- {
- // Get the currently stored task, which will be non-null if get_Task has already been accessed.
- // If there isn't one, store the supplied completed task.
- if (m_task is null)
- {
- m_task = Task.s_cachedCompleted;
- }
- else
- {
- // Otherwise, complete the task that's there.
- AsyncTaskMethodBuilder<VoidTaskResult>.SetExistingTaskResult(m_task, default!);
- }
- }
-
- /// <summary>
- /// Completes the <see cref="System.Threading.Tasks.Task"/> in the
- /// <see cref="System.Threading.Tasks.TaskStatus">Faulted</see> state with the specified exception.
- /// </summary>
- /// <param name="exception">The <see cref="System.Exception"/> to use to fault the task.</param>
- /// <exception cref="System.ArgumentNullException">The <paramref name="exception"/> argument is null (Nothing in Visual Basic).</exception>
- /// <exception cref="System.InvalidOperationException">The builder is not initialized.</exception>
- /// <exception cref="System.InvalidOperationException">The task has already completed.</exception>
- public void SetException(Exception exception) =>
- AsyncTaskMethodBuilder<VoidTaskResult>.SetException(exception, ref m_task);
-
- /// <summary>
- /// Called by the debugger to request notification when the first wait operation
- /// (await, Wait, Result, etc.) on this builder's task completes.
- /// </summary>
- /// <param name="enabled">
- /// true to enable notification; false to disable a previously set notification.
- /// </param>
- internal void SetNotificationForWaitCompletion(bool enabled) =>
- AsyncTaskMethodBuilder<VoidTaskResult>.SetNotificationForWaitCompletion(enabled, ref m_task);
-
- /// <summary>
- /// Gets an object that may be used to uniquely identify this builder to the debugger.
- /// </summary>
- /// <remarks>
- /// This property lazily instantiates the ID in a non-thread-safe manner.
- /// It must only be used by the debugger and tracing purposes, and only in a single-threaded manner
- /// when no other threads are in the middle of accessing this property or this.Task.
- /// </remarks>
- internal object ObjectIdForDebugger =>
- m_task ??= AsyncTaskMethodBuilder<VoidTaskResult>.CreateWeaklyTypedStateMachineBox();
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs
deleted file mode 100644
index 043a133ab13..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncTaskMethodBuilderT.cs
+++ /dev/null
@@ -1,607 +0,0 @@
-// 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.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Threading;
-using System.Threading.Tasks;
-using Internal.Runtime.CompilerServices;
-
-namespace System.Runtime.CompilerServices
-{
- /// <summary>
- /// Provides a builder for asynchronous methods that return <see cref="System.Threading.Tasks.Task{TResult}"/>.
- /// This type is intended for compiler use only.
- /// </summary>
- /// <remarks>
- /// AsyncTaskMethodBuilder{TResult} is a value type, and thus it is copied by value.
- /// Prior to being copied, one of its Task, SetResult, or SetException members must be accessed,
- /// or else the copies may end up building distinct Task instances.
- /// </remarks>
- public struct AsyncTaskMethodBuilder<TResult>
- {
- /// <summary>A cached task for default(TResult).</summary>
- internal static readonly Task<TResult> s_defaultResultTask = AsyncTaskCache.CreateCacheableTask<TResult>(default);
-
- /// <summary>The lazily-initialized built task.</summary>
- private Task<TResult>? m_task; // Debugger depends on the exact name of this field.
-
- /// <summary>Initializes a new <see cref="AsyncTaskMethodBuilder"/>.</summary>
- /// <returns>The initialized <see cref="AsyncTaskMethodBuilder"/>.</returns>
- public static AsyncTaskMethodBuilder<TResult> Create() => default;
-
- /// <summary>Initiates the builder's execution with the associated state machine.</summary>
- /// <typeparam name="TStateMachine">Specifies the type of the state machine.</typeparam>
- /// <param name="stateMachine">The state machine instance, passed by reference.</param>
- [DebuggerStepThrough]
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void Start<TStateMachine>(ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine =>
- AsyncMethodBuilderCore.Start(ref stateMachine);
-
- /// <summary>Associates the builder with the state machine it represents.</summary>
- /// <param name="stateMachine">The heap-allocated state machine object.</param>
- /// <exception cref="System.ArgumentNullException">The <paramref name="stateMachine"/> argument was null (Nothing in Visual Basic).</exception>
- /// <exception cref="System.InvalidOperationException">The builder is incorrectly initialized.</exception>
- public void SetStateMachine(IAsyncStateMachine stateMachine) =>
- AsyncMethodBuilderCore.SetStateMachine(stateMachine, m_task);
-
- /// <summary>
- /// Schedules the specified state machine to be pushed forward when the specified awaiter completes.
- /// </summary>
- /// <typeparam name="TAwaiter">Specifies the type of the awaiter.</typeparam>
- /// <typeparam name="TStateMachine">Specifies the type of the state machine.</typeparam>
- /// <param name="awaiter">The awaiter.</param>
- /// <param name="stateMachine">The state machine.</param>
- public void AwaitOnCompleted<TAwaiter, TStateMachine>(
- ref TAwaiter awaiter, ref TStateMachine stateMachine)
- where TAwaiter : INotifyCompletion
- where TStateMachine : IAsyncStateMachine =>
- AwaitOnCompleted(ref awaiter, ref stateMachine, ref m_task);
-
- internal static void AwaitOnCompleted<TAwaiter, TStateMachine>(
- ref TAwaiter awaiter, ref TStateMachine stateMachine, [NotNull] ref Task<TResult>? taskField)
- where TAwaiter : INotifyCompletion
- where TStateMachine : IAsyncStateMachine
- {
- try
- {
- awaiter.OnCompleted(GetStateMachineBox(ref stateMachine, ref taskField).MoveNextAction);
- }
- catch (Exception e)
- {
- System.Threading.Tasks.Task.ThrowAsync(e, targetContext: null);
- }
- }
-
- /// <summary>
- /// Schedules the specified state machine to be pushed forward when the specified awaiter completes.
- /// </summary>
- /// <typeparam name="TAwaiter">Specifies the type of the awaiter.</typeparam>
- /// <typeparam name="TStateMachine">Specifies the type of the state machine.</typeparam>
- /// <param name="awaiter">The awaiter.</param>
- /// <param name="stateMachine">The state machine.</param>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void AwaitUnsafeOnCompleted<TAwaiter, TStateMachine>(
- ref TAwaiter awaiter, ref TStateMachine stateMachine)
- where TAwaiter : ICriticalNotifyCompletion
- where TStateMachine : IAsyncStateMachine =>
- AwaitUnsafeOnCompleted(ref awaiter, ref stateMachine, ref m_task);
-
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- internal static void AwaitUnsafeOnCompleted<TAwaiter, TStateMachine>(
- ref TAwaiter awaiter, ref TStateMachine stateMachine, [NotNull] ref Task<TResult>? taskField)
- where TAwaiter : ICriticalNotifyCompletion
- where TStateMachine : IAsyncStateMachine
- {
- IAsyncStateMachineBox box = GetStateMachineBox(ref stateMachine, ref taskField);
- AwaitUnsafeOnCompleted(ref awaiter, box);
- }
-
- [MethodImpl(MethodImplOptions.AggressiveOptimization)] // workaround boxing allocations in Tier0: https://github.com/dotnet/coreclr/issues/14474
- internal static void AwaitUnsafeOnCompleted<TAwaiter>(
- ref TAwaiter awaiter, IAsyncStateMachineBox box)
- where TAwaiter : ICriticalNotifyCompletion
- {
- // The null tests here ensure that the jit can optimize away the interface
- // tests when TAwaiter is a ref type.
-
- if ((null != (object)default(TAwaiter)!) && (awaiter is ITaskAwaiter)) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757)
- {
- ref TaskAwaiter ta = ref Unsafe.As<TAwaiter, TaskAwaiter>(ref awaiter); // relies on TaskAwaiter/TaskAwaiter<T> having the same layout
- TaskAwaiter.UnsafeOnCompletedInternal(ta.m_task, box, continueOnCapturedContext: true);
- }
- else if ((null != (object)default(TAwaiter)!) && (awaiter is IConfiguredTaskAwaiter)) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757)
- {
- ref ConfiguredTaskAwaitable.ConfiguredTaskAwaiter ta = ref Unsafe.As<TAwaiter, ConfiguredTaskAwaitable.ConfiguredTaskAwaiter>(ref awaiter);
- TaskAwaiter.UnsafeOnCompletedInternal(ta.m_task, box, ta.m_continueOnCapturedContext);
- }
- else if ((null != (object)default(TAwaiter)!) && (awaiter is IStateMachineBoxAwareAwaiter)) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757)
- {
- try
- {
- ((IStateMachineBoxAwareAwaiter)awaiter).AwaitUnsafeOnCompleted(box);
- }
- catch (Exception e)
- {
- // Whereas with Task the code that hooks up and invokes the continuation is all local to corelib,
- // with ValueTaskAwaiter we may be calling out to an arbitrary implementation of IValueTaskSource
- // wrapped in the ValueTask, and as such we protect against errant exceptions that may emerge.
- // We don't want such exceptions propagating back into the async method, which can't handle
- // exceptions well at that location in the state machine, especially if the exception may occur
- // after the ValueTaskAwaiter already successfully hooked up the callback, in which case it's possible
- // two different flows of execution could end up happening in the same async method call.
- System.Threading.Tasks.Task.ThrowAsync(e, targetContext: null);
- }
- }
- else
- {
- // The awaiter isn't specially known. Fall back to doing a normal await.
- try
- {
- awaiter.UnsafeOnCompleted(box.MoveNextAction);
- }
- catch (Exception e)
- {
- System.Threading.Tasks.Task.ThrowAsync(e, targetContext: null);
- }
- }
- }
-
- /// <summary>Gets the "boxed" state machine object.</summary>
- /// <typeparam name="TStateMachine">Specifies the type of the async state machine.</typeparam>
- /// <param name="stateMachine">The state machine.</param>
- /// <returns>The "boxed" state machine.</returns>
- private static IAsyncStateMachineBox GetStateMachineBox<TStateMachine>(
- ref TStateMachine stateMachine,
- [NotNull] ref Task<TResult>? taskField)
- where TStateMachine : IAsyncStateMachine
- {
- ExecutionContext? currentContext = ExecutionContext.Capture();
-
- // Check first for the most common case: not the first yield in an async method.
- // In this case, the first yield will have already "boxed" the state machine in
- // a strongly-typed manner into an AsyncStateMachineBox. It will already contain
- // the state machine as well as a MoveNextDelegate and a context. The only thing
- // we might need to do is update the context if that's changed since it was stored.
- if (taskField is AsyncStateMachineBox<TStateMachine> stronglyTypedBox)
- {
- if (stronglyTypedBox.Context != currentContext)
- {
- stronglyTypedBox.Context = currentContext;
- }
- return stronglyTypedBox;
- }
-
- // The least common case: we have a weakly-typed boxed. This results if the debugger
- // or some other use of reflection accesses a property like ObjectIdForDebugger or a
- // method like SetNotificationForWaitCompletion prior to the first await happening. In
- // such situations, we need to get an object to represent the builder, but we don't yet
- // know the type of the state machine, and thus can't use TStateMachine. Instead, we
- // use the IAsyncStateMachine interface, which all TStateMachines implement. This will
- // result in a boxing allocation when storing the TStateMachine if it's a struct, but
- // this only happens in active debugging scenarios where such performance impact doesn't
- // matter.
- if (taskField is AsyncStateMachineBox<IAsyncStateMachine> weaklyTypedBox)
- {
- // If this is the first await, we won't yet have a state machine, so store it.
- if (weaklyTypedBox.StateMachine == null)
- {
- Debugger.NotifyOfCrossThreadDependency(); // same explanation as with usage below
- weaklyTypedBox.StateMachine = stateMachine;
- }
-
- // Update the context. This only happens with a debugger, so no need to spend
- // extra IL checking for equality before doing the assignment.
- weaklyTypedBox.Context = currentContext;
- return weaklyTypedBox;
- }
-
- // Alert a listening debugger that we can't make forward progress unless it slips threads.
- // If we don't do this, and a method that uses "await foo;" is invoked through funceval,
- // we could end up hooking up a callback to push forward the async method's state machine,
- // the debugger would then abort the funceval after it takes too long, and then continuing
- // execution could result in another callback being hooked up. At that point we have
- // multiple callbacks registered to push the state machine, which could result in bad behavior.
- Debugger.NotifyOfCrossThreadDependency();
-
- // At this point, taskField should really be null, in which case we want to create the box.
- // However, in a variety of debugger-related (erroneous) situations, it might be non-null,
- // e.g. if the Task property is examined in a Watch window, forcing it to be lazily-intialized
- // as a Task<TResult> rather than as an AsyncStateMachineBox. The worst that happens in such
- // cases is we lose the ability to properly step in the debugger, as the debugger uses that
- // object's identity to track this specific builder/state machine. As such, we proceed to
- // overwrite whatever's there anyway, even if it's non-null.
-#if CORERT
- // DebugFinalizableAsyncStateMachineBox looks like a small type, but it actually is not because
- // it will have a copy of all the slots from its parent. It will add another hundred(s) bytes
- // per each async method in CoreRT / ProjectN binaries without adding much value. Avoid
- // generating this extra code until a better solution is implemented.
- var box = new AsyncStateMachineBox<TStateMachine>();
-#else
- AsyncStateMachineBox<TStateMachine> box = AsyncMethodBuilderCore.TrackAsyncMethodCompletion ?
- CreateDebugFinalizableAsyncStateMachineBox<TStateMachine>() :
- new AsyncStateMachineBox<TStateMachine>();
-#endif
- taskField = box; // important: this must be done before storing stateMachine into box.StateMachine!
- box.StateMachine = stateMachine;
- box.Context = currentContext;
-
- // Log the creation of the state machine box object / task for this async method.
- if (AsyncCausalityTracer.LoggingOn)
- {
- AsyncCausalityTracer.TraceOperationCreation(box, "Async: " + stateMachine.GetType().Name);
- }
-
- // And if async debugging is enabled, track the task.
- if (System.Threading.Tasks.Task.s_asyncDebuggingEnabled)
- {
- System.Threading.Tasks.Task.AddToActiveTasks(box);
- }
-
- return box;
- }
-
-#if !CORERT
- // Avoid forcing the JIT to build DebugFinalizableAsyncStateMachineBox<TStateMachine> unless it's actually needed.
- [MethodImpl(MethodImplOptions.NoInlining)]
- private static AsyncStateMachineBox<TStateMachine> CreateDebugFinalizableAsyncStateMachineBox<TStateMachine>()
- where TStateMachine : IAsyncStateMachine =>
- new DebugFinalizableAsyncStateMachineBox<TStateMachine>();
-
- /// <summary>
- /// Provides an async state machine box with a finalizer that will fire an EventSource
- /// event about the state machine if it's being finalized without having been completed.
- /// </summary>
- /// <typeparam name="TStateMachine">Specifies the type of the state machine.</typeparam>
- private sealed class DebugFinalizableAsyncStateMachineBox<TStateMachine> : // SOS DumpAsync command depends on this name
- AsyncStateMachineBox<TStateMachine>
- where TStateMachine : IAsyncStateMachine
- {
- ~DebugFinalizableAsyncStateMachineBox()
- {
- // If the state machine is being finalized, something went wrong during its processing,
- // e.g. it awaited something that got collected without itself having been completed.
- // Fire an event with details about the state machine to help with debugging.
- if (!IsCompleted) // double-check it's not completed, just to help minimize false positives
- {
- TplEventSource.Log.IncompleteAsyncMethod(this);
- }
- }
- }
-#endif
-
- /// <summary>A strongly-typed box for Task-based async state machines.</summary>
- /// <typeparam name="TStateMachine">Specifies the type of the state machine.</typeparam>
- private class AsyncStateMachineBox<TStateMachine> : // SOS DumpAsync command depends on this name
- Task<TResult>, IAsyncStateMachineBox
- where TStateMachine : IAsyncStateMachine
- {
- /// <summary>Delegate used to invoke on an ExecutionContext when passed an instance of this box type.</summary>
- private static readonly ContextCallback s_callback = ExecutionContextCallback;
-
- // Used to initialize s_callback above. We don't use a lambda for this on purpose: a lambda would
- // introduce a new generic type behind the scenes that comes with a hefty size penalty in AOT builds.
- private static void ExecutionContextCallback(object? s)
- {
- Debug.Assert(s is AsyncStateMachineBox<TStateMachine>);
- // Only used privately to pass directly to EC.Run
- Unsafe.As<AsyncStateMachineBox<TStateMachine>>(s).StateMachine!.MoveNext();
- }
-
- /// <summary>A delegate to the <see cref="MoveNext()"/> method.</summary>
- private Action? _moveNextAction;
- /// <summary>The state machine itself.</summary>
- [AllowNull, MaybeNull]
- public TStateMachine StateMachine = default; // mutable struct; do not make this readonly. SOS DumpAsync command depends on this name.
- /// <summary>Captured ExecutionContext with which to invoke <see cref="MoveNextAction"/>; may be null.</summary>
- public ExecutionContext? Context;
-
- /// <summary>A delegate to the <see cref="MoveNext()"/> method.</summary>
- public Action MoveNextAction => _moveNextAction ??= new Action(MoveNext);
-
- internal sealed override void ExecuteFromThreadPool(Thread threadPoolThread) => MoveNext(threadPoolThread);
-
- /// <summary>Calls MoveNext on <see cref="StateMachine"/></summary>
- public void MoveNext() => MoveNext(threadPoolThread: null);
-
- private void MoveNext(Thread? threadPoolThread)
- {
- Debug.Assert(!IsCompleted);
-
- bool loggingOn = AsyncCausalityTracer.LoggingOn;
- if (loggingOn)
- {
- AsyncCausalityTracer.TraceSynchronousWorkStart(this, CausalitySynchronousWork.Execution);
- }
-
- ExecutionContext? context = Context;
- if (context == null)
- {
- Debug.Assert(StateMachine != null);
- StateMachine.MoveNext();
- }
- else
- {
- if (threadPoolThread is null)
- {
- ExecutionContext.RunInternal(context, s_callback, this);
- }
- else
- {
- ExecutionContext.RunFromThreadPoolDispatchLoop(threadPoolThread, context, s_callback, this);
- }
- }
-
- if (IsCompleted)
- {
- // If async debugging is enabled, remove the task from tracking.
- if (System.Threading.Tasks.Task.s_asyncDebuggingEnabled)
- {
- System.Threading.Tasks.Task.RemoveFromActiveTasks(this);
- }
-
- // Clear out state now that the async method has completed.
- // This avoids keeping arbitrary state referenced by lifted locals
- // if this Task / state machine box is held onto.
- StateMachine = default;
- Context = default;
-
-#if !CORERT
- // In case this is a state machine box with a finalizer, suppress its finalization
- // as it's now complete. We only need the finalizer to run if the box is collected
- // without having been completed.
- if (AsyncMethodBuilderCore.TrackAsyncMethodCompletion)
- {
- GC.SuppressFinalize(this);
- }
-#endif
- }
-
- if (loggingOn)
- {
- AsyncCausalityTracer.TraceSynchronousWorkCompletion(CausalitySynchronousWork.Execution);
- }
- }
-
- /// <summary>Gets the state machine as a boxed object. This should only be used for debugging purposes.</summary>
- IAsyncStateMachine IAsyncStateMachineBox.GetStateMachineObject() => StateMachine!; // likely boxes, only use for debugging
- }
-
- /// <summary>Gets the <see cref="System.Threading.Tasks.Task{TResult}"/> for this builder.</summary>
- /// <returns>The <see cref="System.Threading.Tasks.Task{TResult}"/> representing the builder's asynchronous operation.</returns>
- public Task<TResult> Task
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get => m_task ?? InitializeTaskAsPromise();
- }
-
- /// <summary>
- /// Initializes the task, which must not yet be initialized. Used only when the Task is being forced into
- /// existence when no state machine is needed, e.g. when the builder is being synchronously completed with
- /// an exception, when the builder is being used out of the context of an async method, etc.
- /// </summary>
- [MethodImpl(MethodImplOptions.NoInlining)]
- private Task<TResult> InitializeTaskAsPromise()
- {
- Debug.Assert(m_task == null);
- return m_task = new Task<TResult>();
- }
-
- internal static Task<TResult> CreateWeaklyTypedStateMachineBox()
- {
-#if CORERT
- // DebugFinalizableAsyncStateMachineBox looks like a small type, but it actually is not because
- // it will have a copy of all the slots from its parent. It will add another hundred(s) bytes
- // per each async method in CoreRT / ProjectN binaries without adding much value. Avoid
- // generating this extra code until a better solution is implemented.
- return new AsyncStateMachineBox<IAsyncStateMachine>();
-#else
- return AsyncMethodBuilderCore.TrackAsyncMethodCompletion ?
- CreateDebugFinalizableAsyncStateMachineBox<IAsyncStateMachine>() :
- new AsyncStateMachineBox<IAsyncStateMachine>();
-#endif
- }
-
- /// <summary>
- /// Completes the <see cref="System.Threading.Tasks.Task{TResult}"/> in the
- /// <see cref="System.Threading.Tasks.TaskStatus">RanToCompletion</see> state with the specified result.
- /// </summary>
- /// <param name="result">The result to use to complete the task.</param>
- /// <exception cref="System.InvalidOperationException">The task has already completed.</exception>
- public void SetResult(TResult result)
- {
- // Get the currently stored task, which will be non-null if get_Task has already been accessed.
- // If there isn't one, get a task and store it.
- if (m_task is null)
- {
- m_task = GetTaskForResult(result);
- Debug.Assert(m_task != null, $"{nameof(GetTaskForResult)} should never return null");
- }
- else
- {
- // Slow path: complete the existing task.
- SetExistingTaskResult(m_task, result);
- }
- }
-
- /// <summary>Completes the already initialized task with the specified result.</summary>
- /// <param name="result">The result to use to complete the task.</param>
- internal static void SetExistingTaskResult(Task<TResult> taskField, [AllowNull] TResult result)
- {
- Debug.Assert(taskField != null, "Expected non-null task");
-
- if (AsyncCausalityTracer.LoggingOn)
- {
- AsyncCausalityTracer.TraceOperationCompletion(taskField, AsyncCausalityStatus.Completed);
- }
-
- if (!taskField.TrySetResult(result))
- {
- ThrowHelper.ThrowInvalidOperationException(ExceptionResource.TaskT_TransitionToFinal_AlreadyCompleted);
- }
- }
-
- /// <summary>
- /// Completes the <see cref="System.Threading.Tasks.Task{TResult}"/> in the
- /// <see cref="System.Threading.Tasks.TaskStatus">Faulted</see> state with the specified exception.
- /// </summary>
- /// <param name="exception">The <see cref="System.Exception"/> to use to fault the task.</param>
- /// <exception cref="System.ArgumentNullException">The <paramref name="exception"/> argument is null (Nothing in Visual Basic).</exception>
- /// <exception cref="System.InvalidOperationException">The task has already completed.</exception>
- public void SetException(Exception exception) => SetException(exception, ref m_task);
-
- internal static void SetException(Exception exception, ref Task<TResult>? taskField)
- {
- if (exception == null)
- {
- ThrowHelper.ThrowArgumentNullException(ExceptionArgument.exception);
- }
-
- // Get the task, forcing initialization if it hasn't already been initialized.
- Task<TResult> task = (taskField ??= new Task<TResult>());
-
- // If the exception represents cancellation, cancel the task. Otherwise, fault the task.
- bool successfullySet = exception is OperationCanceledException oce ?
- task.TrySetCanceled(oce.CancellationToken, oce) :
- task.TrySetException(exception);
-
- // Unlike with TaskCompletionSource, we do not need to spin here until _taskAndStateMachine is completed,
- // since AsyncTaskMethodBuilder.SetException should not be immediately followed by any code
- // that depends on the task having completely completed. Moreover, with correct usage,
- // SetResult or SetException should only be called once, so the Try* methods should always
- // return true, so no spinning would be necessary anyway (the spinning in TCS is only relevant
- // if another thread completes the task first).
- if (!successfullySet)
- {
- ThrowHelper.ThrowInvalidOperationException(ExceptionResource.TaskT_TransitionToFinal_AlreadyCompleted);
- }
- }
-
- /// <summary>
- /// Called by the debugger to request notification when the first wait operation
- /// (await, Wait, Result, etc.) on this builder's task completes.
- /// </summary>
- /// <param name="enabled">
- /// true to enable notification; false to disable a previously set notification.
- /// </param>
- /// <remarks>
- /// This should only be invoked from within an asynchronous method,
- /// and only by the debugger.
- /// </remarks>
- internal void SetNotificationForWaitCompletion(bool enabled) =>
- SetNotificationForWaitCompletion(enabled, ref m_task);
-
- internal static void SetNotificationForWaitCompletion(bool enabled, [NotNull] ref Task<TResult>? taskField)
- {
- // Get the task (forcing initialization if not already initialized), and set debug notification
- (taskField ??= CreateWeaklyTypedStateMachineBox()).SetNotificationForWaitCompletion(enabled);
-
- // NOTE: It's important that the debugger use builder.SetNotificationForWaitCompletion
- // rather than builder.Task.SetNotificationForWaitCompletion. Even though the latter will
- // lazily-initialize the task as well, it'll initialize it to a Task<T> (which is important
- // to minimize size for cases where an ATMB is used directly by user code to avoid the
- // allocation overhead of a TaskCompletionSource). If that's done prior to the first await,
- // the GetMoveNextDelegate code, which needs an AsyncStateMachineBox, will end up creating
- // a new box and overwriting the previously created task. That'll change the object identity
- // of the task being used for wait completion notification, and no notification will
- // ever arrive, breaking step-out behavior when stepping out before the first yielding await.
- }
-
- /// <summary>
- /// Gets an object that may be used to uniquely identify this builder to the debugger.
- /// </summary>
- /// <remarks>
- /// This property lazily instantiates the ID in a non-thread-safe manner.
- /// It must only be used by the debugger and tracing purposes, and only in a single-threaded manner
- /// when no other threads are in the middle of accessing this or other members that lazily initialize the task.
- /// </remarks>
- internal object ObjectIdForDebugger => m_task ??= CreateWeaklyTypedStateMachineBox();
-
- /// <summary>
- /// Gets a task for the specified result. This will either
- /// be a cached or new task, never null.
- /// </summary>
- /// <param name="result">The result for which we need a task.</param>
- /// <returns>The completed task containing the result.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)] // method looks long, but for a given TResult it results in a relatively small amount of asm
- internal static Task<TResult> GetTaskForResult(TResult result)
- {
- // The goal of this function is to be give back a cached task if possible,
- // or to otherwise give back a new task. To give back a cached task,
- // we need to be able to evaluate the incoming result value, and we need
- // to avoid as much overhead as possible when doing so, as this function
- // is invoked as part of the return path from every async method.
- // Most tasks won't be cached, and thus we need the checks for those that are
- // to be as close to free as possible. This requires some trickiness given the
- // lack of generic specialization in .NET.
- //
- // Be very careful when modifying this code. It has been tuned
- // to comply with patterns recognized by both 32-bit and 64-bit JITs.
- // If changes are made here, be sure to look at the generated assembly, as
- // small tweaks can have big consequences for what does and doesn't get optimized away.
- //
- // Note that this code only ever accesses a static field when it knows it'll
- // find a cached value, since static fields (even if readonly and integral types)
- // require special access helpers in this NGEN'd and domain-neutral.
-
- if (null != (object)default(TResult)!) // help the JIT avoid the value type branches for ref types // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757)
- {
- // Special case simple value types:
- // - Boolean
- // - Byte, SByte
- // - Char
- // - Int32, UInt32
- // - Int64, UInt64
- // - Int16, UInt16
- // - IntPtr, UIntPtr
- // As of .NET 4.5, the (Type)(object)result pattern used below
- // is recognized and optimized by both 32-bit and 64-bit JITs.
-
- // For Boolean, we cache all possible values.
- if (typeof(TResult) == typeof(bool)) // only the relevant branches are kept for each value-type generic instantiation
- {
- bool value = (bool)(object)result!;
- Task<bool> task = value ? AsyncTaskCache.s_trueTask : AsyncTaskCache.s_falseTask;
- return Unsafe.As<Task<TResult>>(task); // UnsafeCast avoids type check we know will succeed
- }
- // For Int32, we cache a range of common values, e.g. [-1,9).
- else if (typeof(TResult) == typeof(int))
- {
- // Compare to constants to avoid static field access if outside of cached range.
- // We compare to the upper bound first, as we're more likely to cache miss on the upper side than on the
- // lower side, due to positive values being more common than negative as return values.
- int value = (int)(object)result!;
- if (value < AsyncTaskCache.ExclusiveInt32Max &&
- value >= AsyncTaskCache.InclusiveInt32Min)
- {
- Task<int> task = AsyncTaskCache.s_int32Tasks[value - AsyncTaskCache.InclusiveInt32Min];
- return Unsafe.As<Task<TResult>>(task); // UnsafeCast avoids a type check we know will succeed
- }
- }
- // For other known value types, we only special-case 0 / default(TResult).
- else if (
- (typeof(TResult) == typeof(uint) && default == (uint)(object)result!) ||
- (typeof(TResult) == typeof(byte) && default(byte) == (byte)(object)result!) ||
- (typeof(TResult) == typeof(sbyte) && default(sbyte) == (sbyte)(object)result!) ||
- (typeof(TResult) == typeof(char) && default(char) == (char)(object)result!) ||
- (typeof(TResult) == typeof(long) && default == (long)(object)result!) ||
- (typeof(TResult) == typeof(ulong) && default == (ulong)(object)result!) ||
- (typeof(TResult) == typeof(short) && default(short) == (short)(object)result!) ||
- (typeof(TResult) == typeof(ushort) && default(ushort) == (ushort)(object)result!) ||
- (typeof(TResult) == typeof(IntPtr) && default == (IntPtr)(object)result!) ||
- (typeof(TResult) == typeof(UIntPtr) && default == (UIntPtr)(object)result!))
- {
- return s_defaultResultTask;
- }
- }
- else if (result == null) // optimized away for value types
- {
- return s_defaultResultTask;
- }
-
- // No cached task is available. Manufacture a new one for this result.
- return new Task<TResult>(result);
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs
deleted file mode 100644
index bb5bd28393c..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilder.cs
+++ /dev/null
@@ -1,175 +0,0 @@
-// 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;
-using System.Threading.Tasks;
-using Internal.Runtime.CompilerServices;
-
-using StateMachineBox = System.Runtime.CompilerServices.AsyncValueTaskMethodBuilder<System.Threading.Tasks.VoidTaskResult>.StateMachineBox;
-
-namespace System.Runtime.CompilerServices
-{
- /// <summary>Represents a builder for asynchronous methods that return a <see cref="ValueTask"/>.</summary>
- [StructLayout(LayoutKind.Auto)]
- public struct AsyncValueTaskMethodBuilder
- {
- /// <summary>Sentinel object used to indicate that the builder completed synchronously and successfully.</summary>
- private static readonly object s_syncSuccessSentinel = AsyncValueTaskMethodBuilder<VoidTaskResult>.s_syncSuccessSentinel;
-
- /// <summary>The wrapped state machine box or task, based on the value of <see cref="AsyncTaskCache.s_valueTaskPoolingEnabled"/>.</summary>
- /// <remarks>
- /// If the operation completed synchronously and successfully, this will be <see cref="s_syncSuccessSentinel"/>.
- /// </remarks>
- private object? m_task; // Debugger depends on the exact name of this field.
-
- /// <summary>Creates an instance of the <see cref="AsyncValueTaskMethodBuilder"/> struct.</summary>
- /// <returns>The initialized instance.</returns>
- public static AsyncValueTaskMethodBuilder Create() => default;
-
- /// <summary>Begins running the builder with the associated state machine.</summary>
- /// <typeparam name="TStateMachine">The type of the state machine.</typeparam>
- /// <param name="stateMachine">The state machine instance, passed by reference.</param>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void Start<TStateMachine>(ref TStateMachine stateMachine)
- where TStateMachine : IAsyncStateMachine =>
- AsyncMethodBuilderCore.Start(ref stateMachine);
-
- /// <summary>Associates the builder with the specified state machine.</summary>
- /// <param name="stateMachine">The state machine instance to associate with the builder.</param>
- public void SetStateMachine(IAsyncStateMachine stateMachine) =>
- AsyncMethodBuilderCore.SetStateMachine(stateMachine, task: null);
-
- /// <summary>Marks the task as successfully completed.</summary>
- public void SetResult()
- {
- if (m_task is null)
- {
- m_task = s_syncSuccessSentinel;
- }
- else if (AsyncTaskCache.s_valueTaskPoolingEnabled)
- {
- Unsafe.As<StateMachineBox>(m_task).SetResult(default);
- }
- else
- {
- AsyncTaskMethodBuilder<VoidTaskResult>.SetExistingTaskResult(Unsafe.As<Task<VoidTaskResult>>(m_task), default);
- }
- }
-
- /// <summary>Marks the task as failed and binds the specified exception to the task.</summary>
- /// <param name="exception">The exception to bind to the task.</param>
- public void SetException(Exception exception)
- {
- if (AsyncTaskCache.s_valueTaskPoolingEnabled)
- {
- AsyncValueTaskMethodBuilder<VoidTaskResult>.SetException(exception, ref Unsafe.As<object?, StateMachineBox?>(ref m_task));
- }
- else
- {
- AsyncTaskMethodBuilder<VoidTaskResult>.SetException(exception, ref Unsafe.As<object?, Task<VoidTaskResult>?>(ref m_task));
- }
- }
-
- /// <summary>Gets the task for this builder.</summary>
- public ValueTask Task
- {
- get
- {
- if (m_task == s_syncSuccessSentinel)
- {
- return default;
- }
-
- // With normal access paterns, m_task should always be non-null here: the async method should have
- // either completed synchronously, in which case SetResult would have set m_task to a non-null object,
- // or it should be completing asynchronously, in which case AwaitUnsafeOnCompleted would have similarly
- // initialized m_task to a state machine object. However, if the type is used manually (not via
- // compiler-generated code) and accesses Task directly, we force it to be initialized. Things will then
- // "work" but in a degraded mode, as we don't know the TStateMachine type here, and thus we use a box around
- // the interface instead.
-
- if (AsyncTaskCache.s_valueTaskPoolingEnabled)
- {
- var box = Unsafe.As<StateMachineBox?>(m_task);
- if (box is null)
- {
- m_task = box = AsyncValueTaskMethodBuilder<VoidTaskResult>.CreateWeaklyTypedStateMachineBox();
- }
- return new ValueTask(box, box.Version);
- }
- else
- {
- var task = Unsafe.As<Task<VoidTaskResult>?>(m_task);
- if (task is null)
- {
- m_task = task = new Task<VoidTaskResult>(); // base task used rather than box to minimize size when used as manual promise
- }
- return new ValueTask(task);
- }
- }
- }
-
- /// <summary>Schedules the state machine to proceed to the next action when the specified awaiter completes.</summary>
- /// <typeparam name="TAwaiter">The type of the awaiter.</typeparam>
- /// <typeparam name="TStateMachine">The type of the state machine.</typeparam>
- /// <param name="awaiter">The awaiter.</param>
- /// <param name="stateMachine">The state machine.</param>
- public void AwaitOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine)
- where TAwaiter : INotifyCompletion
- where TStateMachine : IAsyncStateMachine
- {
- if (AsyncTaskCache.s_valueTaskPoolingEnabled)
- {
- AsyncValueTaskMethodBuilder<VoidTaskResult>.AwaitOnCompleted(ref awaiter, ref stateMachine, ref Unsafe.As<object?, StateMachineBox?>(ref m_task));
- }
- else
- {
- AsyncTaskMethodBuilder<VoidTaskResult>.AwaitOnCompleted(ref awaiter, ref stateMachine, ref Unsafe.As<object?, Task<VoidTaskResult>?>(ref m_task));
- }
- }
-
- /// <summary>Schedules the state machine to proceed to the next action when the specified awaiter completes.</summary>
- /// <typeparam name="TAwaiter">The type of the awaiter.</typeparam>
- /// <typeparam name="TStateMachine">The type of the state machine.</typeparam>
- /// <param name="awaiter">The awaiter.</param>
- /// <param name="stateMachine">The state machine.</param>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void AwaitUnsafeOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine)
- where TAwaiter : ICriticalNotifyCompletion
- where TStateMachine : IAsyncStateMachine
- {
- if (AsyncTaskCache.s_valueTaskPoolingEnabled)
- {
- AsyncValueTaskMethodBuilder<VoidTaskResult>.AwaitUnsafeOnCompleted(ref awaiter, ref stateMachine, ref Unsafe.As<object?, StateMachineBox?>(ref m_task));
- }
- else
- {
- AsyncTaskMethodBuilder<VoidTaskResult>.AwaitUnsafeOnCompleted(ref awaiter, ref stateMachine, ref Unsafe.As<object?, Task<VoidTaskResult>?>(ref m_task));
- }
- }
-
- /// <summary>
- /// Gets an object that may be used to uniquely identify this builder to the debugger.
- /// </summary>
- /// <remarks>
- /// This property lazily instantiates the ID in a non-thread-safe manner.
- /// It must only be used by the debugger and tracing purposes, and only in a single-threaded manner
- /// when no other threads are in the middle of accessing this or other members that lazily initialize the box.
- /// </remarks>
- internal object ObjectIdForDebugger
- {
- get
- {
- if (m_task is null)
- {
- m_task = AsyncTaskCache.s_valueTaskPoolingEnabled ? (object)
- AsyncValueTaskMethodBuilder<VoidTaskResult>.CreateWeaklyTypedStateMachineBox() :
- AsyncTaskMethodBuilder<VoidTaskResult>.CreateWeaklyTypedStateMachineBox();
- }
-
- return m_task;
- }
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilderT.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilderT.cs
deleted file mode 100644
index d2bd7ec111a..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncValueTaskMethodBuilderT.cs
+++ /dev/null
@@ -1,513 +0,0 @@
-// 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.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Runtime.InteropServices;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Threading.Tasks.Sources;
-using Internal.Runtime.CompilerServices;
-
-namespace System.Runtime.CompilerServices
-{
- /// <summary>Represents a builder for asynchronous methods that returns a <see cref="ValueTask{TResult}"/>.</summary>
- /// <typeparam name="TResult">The type of the result.</typeparam>
- [StructLayout(LayoutKind.Auto)]
- public struct AsyncValueTaskMethodBuilder<TResult>
- {
- /// <summary>Sentinel object used to indicate that the builder completed synchronously and successfully.</summary>
- /// <remarks>
- /// To avoid memory safety issues even in the face of invalid race conditions, we ensure that the type of this object
- /// is valid for the mode in which we're operating. As such, it's cached on the generic builder per TResult
- /// rather than having one sentinel instance for all types.
- /// </remarks>
- internal static readonly object s_syncSuccessSentinel = AsyncTaskCache.s_valueTaskPoolingEnabled ? (object)
- new SyncSuccessSentinelStateMachineBox() :
- new Task<TResult>(default(TResult)!);
-
- /// <summary>The wrapped state machine or task. If the operation completed synchronously and successfully, this will be a sentinel object compared by reference identity.</summary>
- private object? m_task; // Debugger depends on the exact name of this field.
- /// <summary>The result for this builder if it's completed synchronously, in which case <see cref="m_task"/> will be <see cref="s_syncSuccessSentinel"/>.</summary>
- private TResult _result;
-
- /// <summary>Creates an instance of the <see cref="AsyncValueTaskMethodBuilder{TResult}"/> struct.</summary>
- /// <returns>The initialized instance.</returns>
- public static AsyncValueTaskMethodBuilder<TResult> Create() => default;
-
- /// <summary>Begins running the builder with the associated state machine.</summary>
- /// <typeparam name="TStateMachine">The type of the state machine.</typeparam>
- /// <param name="stateMachine">The state machine instance, passed by reference.</param>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void Start<TStateMachine>(ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine =>
- AsyncMethodBuilderCore.Start(ref stateMachine);
-
- /// <summary>Associates the builder with the specified state machine.</summary>
- /// <param name="stateMachine">The state machine instance to associate with the builder.</param>
- public void SetStateMachine(IAsyncStateMachine stateMachine) =>
- AsyncMethodBuilderCore.SetStateMachine(stateMachine, task: null);
-
- /// <summary>Marks the value task as successfully completed.</summary>
- /// <param name="result">The result to use to complete the value task.</param>
- public void SetResult(TResult result)
- {
- if (m_task is null)
- {
- _result = result;
- m_task = s_syncSuccessSentinel;
- }
- else if (AsyncTaskCache.s_valueTaskPoolingEnabled)
- {
- Unsafe.As<StateMachineBox>(m_task).SetResult(result);
- }
- else
- {
- AsyncTaskMethodBuilder<TResult>.SetExistingTaskResult(Unsafe.As<Task<TResult>>(m_task), result);
- }
- }
-
- /// <summary>Marks the value task as failed and binds the specified exception to the value task.</summary>
- /// <param name="exception">The exception to bind to the value task.</param>
- public void SetException(Exception exception)
- {
- if (AsyncTaskCache.s_valueTaskPoolingEnabled)
- {
- SetException(exception, ref Unsafe.As<object?, StateMachineBox?>(ref m_task));
- }
- else
- {
- AsyncTaskMethodBuilder<TResult>.SetException(exception, ref Unsafe.As<object?, Task<TResult>?>(ref m_task));
- }
- }
-
- internal static void SetException(Exception exception, [NotNull] ref StateMachineBox? boxFieldRef)
- {
- if (exception is null)
- {
- ThrowHelper.ThrowArgumentNullException(ExceptionArgument.exception);
- }
-
- (boxFieldRef ??= CreateWeaklyTypedStateMachineBox()).SetException(exception);
- }
-
- /// <summary>Gets the value task for this builder.</summary>
- public ValueTask<TResult> Task
- {
- get
- {
- if (m_task == s_syncSuccessSentinel)
- {
- return new ValueTask<TResult>(_result);
- }
-
- // With normal access paterns, m_task should always be non-null here: the async method should have
- // either completed synchronously, in which case SetResult would have set m_task to a non-null object,
- // or it should be completing asynchronously, in which case AwaitUnsafeOnCompleted would have similarly
- // initialized m_task to a state machine object. However, if the type is used manually (not via
- // compiler-generated code) and accesses Task directly, we force it to be initialized. Things will then
- // "work" but in a degraded mode, as we don't know the TStateMachine type here, and thus we use a box around
- // the interface instead.
-
- if (AsyncTaskCache.s_valueTaskPoolingEnabled)
- {
- var box = Unsafe.As<StateMachineBox?>(m_task);
- if (box is null)
- {
- m_task = box = CreateWeaklyTypedStateMachineBox();
- }
- return new ValueTask<TResult>(box, box.Version);
- }
- else
- {
- var task = Unsafe.As<Task<TResult>?>(m_task);
- if (task is null)
- {
- m_task = task = new Task<TResult>(); // base task used rather than box to minimize size when used as manual promise
- }
- return new ValueTask<TResult>(task);
- }
- }
- }
-
- /// <summary>Schedules the state machine to proceed to the next action when the specified awaiter completes.</summary>
- /// <typeparam name="TAwaiter">The type of the awaiter.</typeparam>
- /// <typeparam name="TStateMachine">The type of the state machine.</typeparam>
- /// <param name="awaiter">the awaiter</param>
- /// <param name="stateMachine">The state machine.</param>
- public void AwaitOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine)
- where TAwaiter : INotifyCompletion
- where TStateMachine : IAsyncStateMachine
- {
- if (AsyncTaskCache.s_valueTaskPoolingEnabled)
- {
- AwaitOnCompleted(ref awaiter, ref stateMachine, ref Unsafe.As<object?, StateMachineBox?>(ref m_task));
- }
- else
- {
- AsyncTaskMethodBuilder<TResult>.AwaitOnCompleted(ref awaiter, ref stateMachine, ref Unsafe.As<object?, Task<TResult>?>(ref m_task));
- }
- }
-
- internal static void AwaitOnCompleted<TAwaiter, TStateMachine>(
- ref TAwaiter awaiter, ref TStateMachine stateMachine, [NotNull] ref StateMachineBox? box)
- where TAwaiter : INotifyCompletion
- where TStateMachine : IAsyncStateMachine
- {
- try
- {
- awaiter.OnCompleted(GetStateMachineBox(ref stateMachine, ref box).MoveNextAction);
- }
- catch (Exception e)
- {
- System.Threading.Tasks.Task.ThrowAsync(e, targetContext: null);
- }
- }
-
- /// <summary>Schedules the state machine to proceed to the next action when the specified awaiter completes.</summary>
- /// <typeparam name="TAwaiter">The type of the awaiter.</typeparam>
- /// <typeparam name="TStateMachine">The type of the state machine.</typeparam>
- /// <param name="awaiter">the awaiter</param>
- /// <param name="stateMachine">The state machine.</param>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void AwaitUnsafeOnCompleted<TAwaiter, TStateMachine>(ref TAwaiter awaiter, ref TStateMachine stateMachine)
- where TAwaiter : ICriticalNotifyCompletion
- where TStateMachine : IAsyncStateMachine
- {
- if (AsyncTaskCache.s_valueTaskPoolingEnabled)
- {
- AwaitUnsafeOnCompleted(ref awaiter, ref stateMachine, ref Unsafe.As<object?, StateMachineBox?>(ref m_task));
- }
- else
- {
- AsyncTaskMethodBuilder<TResult>.AwaitUnsafeOnCompleted(ref awaiter, ref stateMachine, ref Unsafe.As<object?, Task<TResult>?>(ref m_task));
- }
- }
-
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- internal static void AwaitUnsafeOnCompleted<TAwaiter, TStateMachine>(
- ref TAwaiter awaiter, ref TStateMachine stateMachine, [NotNull] ref StateMachineBox? boxRef)
- where TAwaiter : ICriticalNotifyCompletion
- where TStateMachine : IAsyncStateMachine
- {
- IAsyncStateMachineBox box = GetStateMachineBox(ref stateMachine, ref boxRef);
- AsyncTaskMethodBuilder<VoidTaskResult>.AwaitUnsafeOnCompleted(ref awaiter, box);
- }
-
- /// <summary>Gets the "boxed" state machine object.</summary>
- /// <typeparam name="TStateMachine">Specifies the type of the async state machine.</typeparam>
- /// <param name="stateMachine">The state machine.</param>
- /// <param name="boxFieldRef">A reference to the field containing the initialized state machine box.</param>
- /// <returns>The "boxed" state machine.</returns>
- private static IAsyncStateMachineBox GetStateMachineBox<TStateMachine>(
- ref TStateMachine stateMachine,
- [NotNull] ref StateMachineBox? boxFieldRef)
- where TStateMachine : IAsyncStateMachine
- {
- ExecutionContext? currentContext = ExecutionContext.Capture();
-
- // Check first for the most common case: not the first yield in an async method.
- // In this case, the first yield will have already "boxed" the state machine in
- // a strongly-typed manner into an AsyncStateMachineBox. It will already contain
- // the state machine as well as a MoveNextDelegate and a context. The only thing
- // we might need to do is update the context if that's changed since it was stored.
- if (boxFieldRef is StateMachineBox<TStateMachine> stronglyTypedBox)
- {
- if (stronglyTypedBox.Context != currentContext)
- {
- stronglyTypedBox.Context = currentContext;
- }
-
- return stronglyTypedBox;
- }
-
- // The least common case: we have a weakly-typed boxed. This results if the debugger
- // or some other use of reflection accesses a property like ObjectIdForDebugger. In
- // such situations, we need to get an object to represent the builder, but we don't yet
- // know the type of the state machine, and thus can't use TStateMachine. Instead, we
- // use the IAsyncStateMachine interface, which all TStateMachines implement. This will
- // result in a boxing allocation when storing the TStateMachine if it's a struct, but
- // this only happens in active debugging scenarios where such performance impact doesn't
- // matter.
- if (boxFieldRef is StateMachineBox<IAsyncStateMachine> weaklyTypedBox)
- {
- // If this is the first await, we won't yet have a state machine, so store it.
- if (weaklyTypedBox.StateMachine is null)
- {
- Debugger.NotifyOfCrossThreadDependency(); // same explanation as with usage below
- weaklyTypedBox.StateMachine = stateMachine;
- }
-
- // Update the context. This only happens with a debugger, so no need to spend
- // extra IL checking for equality before doing the assignment.
- weaklyTypedBox.Context = currentContext;
- return weaklyTypedBox;
- }
-
- // Alert a listening debugger that we can't make forward progress unless it slips threads.
- // If we don't do this, and a method that uses "await foo;" is invoked through funceval,
- // we could end up hooking up a callback to push forward the async method's state machine,
- // the debugger would then abort the funceval after it takes too long, and then continuing
- // execution could result in another callback being hooked up. At that point we have
- // multiple callbacks registered to push the state machine, which could result in bad behavior.
- Debugger.NotifyOfCrossThreadDependency();
-
- // At this point, m_task should really be null, in which case we want to create the box.
- // However, in a variety of debugger-related (erroneous) situations, it might be non-null,
- // e.g. if the Task property is examined in a Watch window, forcing it to be lazily-intialized
- // as a Task<TResult> rather than as an ValueTaskStateMachineBox. The worst that happens in such
- // cases is we lose the ability to properly step in the debugger, as the debugger uses that
- // object's identity to track this specific builder/state machine. As such, we proceed to
- // overwrite whatever's there anyway, even if it's non-null.
- var box = StateMachineBox<TStateMachine>.GetOrCreateBox();
- boxFieldRef = box; // important: this must be done before storing stateMachine into box.StateMachine!
- box.StateMachine = stateMachine;
- box.Context = currentContext;
-
- return box;
- }
-
- /// <summary>
- /// Creates a box object for use when a non-standard access pattern is employed, e.g. when Task
- /// is evaluated in the debugger prior to the async method yielding for the first time.
- /// </summary>
- internal static StateMachineBox CreateWeaklyTypedStateMachineBox() => new StateMachineBox<IAsyncStateMachine>();
-
- /// <summary>
- /// Gets an object that may be used to uniquely identify this builder to the debugger.
- /// </summary>
- /// <remarks>
- /// This property lazily instantiates the ID in a non-thread-safe manner.
- /// It must only be used by the debugger and tracing purposes, and only in a single-threaded manner
- /// when no other threads are in the middle of accessing this or other members that lazily initialize the box.
- /// </remarks>
- internal object ObjectIdForDebugger
- {
- get
- {
- if (m_task is null)
- {
- m_task = AsyncTaskCache.s_valueTaskPoolingEnabled ? (object)
- CreateWeaklyTypedStateMachineBox() :
- AsyncTaskMethodBuilder<TResult>.CreateWeaklyTypedStateMachineBox();
- }
-
- return m_task;
- }
- }
-
- /// <summary>The base type for all value task box reusable box objects, regardless of state machine type.</summary>
- internal abstract class StateMachineBox :
- IValueTaskSource<TResult>, IValueTaskSource
- {
- /// <summary>A delegate to the MoveNext method.</summary>
- protected Action? _moveNextAction;
- /// <summary>Captured ExecutionContext with which to invoke MoveNext.</summary>
- public ExecutionContext? Context;
- /// <summary>Implementation for IValueTaskSource interfaces.</summary>
- protected ManualResetValueTaskSourceCore<TResult> _valueTaskSource;
-
- /// <summary>Completes the box with a result.</summary>
- /// <param name="result">The result.</param>
- public void SetResult(TResult result) =>
- _valueTaskSource.SetResult(result);
-
- /// <summary>Completes the box with an error.</summary>
- /// <param name="error">The exception.</param>
- public void SetException(Exception error) =>
- _valueTaskSource.SetException(error);
-
- /// <summary>Gets the status of the box.</summary>
- public ValueTaskSourceStatus GetStatus(short token) => _valueTaskSource.GetStatus(token);
-
- /// <summary>Schedules the continuation action for this box.</summary>
- public void OnCompleted(Action<object?> continuation, object? state, short token, ValueTaskSourceOnCompletedFlags flags) =>
- _valueTaskSource.OnCompleted(continuation, state, token, flags);
-
- /// <summary>Gets the current version number of the box.</summary>
- public short Version => _valueTaskSource.Version;
-
- /// <summary>Implemented by derived type.</summary>
- TResult IValueTaskSource<TResult>.GetResult(short token) => throw NotImplemented.ByDesign;
-
- /// <summary>Implemented by derived type.</summary>
- void IValueTaskSource.GetResult(short token) => throw NotImplemented.ByDesign;
- }
-
- private sealed class SyncSuccessSentinelStateMachineBox : StateMachineBox
- {
- public SyncSuccessSentinelStateMachineBox() => SetResult(default!);
- }
-
- /// <summary>Provides a strongly-typed box object based on the specific state machine type in use.</summary>
- private sealed class StateMachineBox<TStateMachine> :
- StateMachineBox,
- IValueTaskSource<TResult>, IValueTaskSource, IAsyncStateMachineBox, IThreadPoolWorkItem
- where TStateMachine : IAsyncStateMachine
- {
- /// <summary>Delegate used to invoke on an ExecutionContext when passed an instance of this box type.</summary>
- private static readonly ContextCallback s_callback = ExecutionContextCallback;
- /// <summary>Lock used to protected the shared cache of boxes.</summary>
- /// <remarks>The code that uses this assumes a runtime without thread aborts.</remarks>
- private static int s_cacheLock;
- /// <summary>Singly-linked list cache of boxes.</summary>
- private static StateMachineBox<TStateMachine>? s_cache;
- /// <summary>The number of items stored in <see cref="s_cache"/>.</summary>
- private static int s_cacheSize;
-
- // TODO:
- // AsyncTaskMethodBuilder logs about the state machine box lifecycle; AsyncValueTaskMethodBuilder currently
- // does not when it employs these pooled boxes. That logging is based on Task IDs, which we lack here.
- // We could use the box's Version, but that is very likely to conflict with the IDs of other tasks in the system.
- // For now, we don't log, but should we choose to we'll probably want to store an int ID on the state machine box,
- // and initialize it an ID from Task's generator.
-
- /// <summary>If this box is stored in the cache, the next box in the cache.</summary>
- private StateMachineBox<TStateMachine>? _next;
- /// <summary>The state machine itself.</summary>
- [AllowNull, MaybeNull]
- public TStateMachine StateMachine = default;
-
- /// <summary>Gets a box object to use for an operation. This may be a reused, pooled object, or it may be new.</summary>
- [MethodImpl(MethodImplOptions.AggressiveInlining)] // only one caller
- internal static StateMachineBox<TStateMachine> GetOrCreateBox()
- {
- // Try to acquire the lock to access the cache. If there's any contention, don't use the cache.
- if (Interlocked.CompareExchange(ref s_cacheLock, 1, 0) == 0)
- {
- // If there are any instances cached, take one from the cache stack and use it.
- StateMachineBox<TStateMachine>? box = s_cache;
- if (!(box is null))
- {
- s_cache = box._next;
- box._next = null;
- s_cacheSize--;
- Debug.Assert(s_cacheSize >= 0, "Expected the cache size to be non-negative.");
-
- // Release the lock and return the box.
- Volatile.Write(ref s_cacheLock, 0);
- return box;
- }
-
- // No objects were cached. We'll just create a new instance.
- Debug.Assert(s_cacheSize == 0, "Expected cache size to be 0.");
-
- // Release the lock.
- Volatile.Write(ref s_cacheLock, 0);
- }
-
- // Couldn't quickly get a cached instance, so create a new instance.
- return new StateMachineBox<TStateMachine>();
- }
-
- private void ReturnOrDropBox()
- {
- Debug.Assert(_next is null, "Expected box to not be part of cached list.");
-
- // Clear out the state machine and associated context to avoid keeping arbitrary state referenced by
- // lifted locals. We want to do this regardless of whether we end up caching the box or not, in case
- // the caller keeps the box alive for an arbitrary period of time.
- StateMachine = default;
- Context = default;
-
- // Reset the MRVTSC. We can either do this here, in which case we may be paying the (small) overhead
- // to reset the box even if we're going to drop it, or we could do it while holding the lock, in which
- // case we'll only reset it if necessary but causing the lock to be held for longer, thereby causing
- // more contention. For now at least, we do it outside of the lock. (This must not be done after
- // the lock is released, since at that point the instance could already be in use elsewhere.)
- // We also want to increment the version number even if we're going to drop it, to maximize the chances
- // that incorrectly double-awaiting a ValueTask will produce an error.
- _valueTaskSource.Reset();
-
- // If reusing the object would result in potentially wrapping around its version number, just throw it away.
- // This provides a modicum of additional safety when ValueTasks are misused (helping to avoid the case where
- // a ValueTask is illegally re-awaited and happens to do so at exactly 2^16 uses later on this exact same instance),
- // at the expense of potentially incurring an additional allocation every 65K uses.
- if ((ushort)_valueTaskSource.Version == ushort.MaxValue)
- {
- return;
- }
-
- // Try to acquire the cache lock. If there's any contention, or if the cache is full, we just throw away the object.
- if (Interlocked.CompareExchange(ref s_cacheLock, 1, 0) == 0)
- {
- if (s_cacheSize < AsyncTaskCache.s_valueTaskPoolingCacheSize)
- {
- // Push the box onto the cache stack for subsequent reuse.
- _next = s_cache;
- s_cache = this;
- s_cacheSize++;
- Debug.Assert(s_cacheSize > 0 && s_cacheSize <= AsyncTaskCache.s_valueTaskPoolingCacheSize, "Expected cache size to be within bounds.");
- }
-
- // Release the lock.
- Volatile.Write(ref s_cacheLock, 0);
- }
- }
-
- /// <summary>
- /// Used to initialize s_callback above. We don't use a lambda for this on purpose: a lambda would
- /// introduce a new generic type behind the scenes that comes with a hefty size penalty in AOT builds.
- /// </summary>
- private static void ExecutionContextCallback(object? s)
- {
- // Only used privately to pass directly to EC.Run
- Debug.Assert(s is StateMachineBox<TStateMachine>);
- Unsafe.As<StateMachineBox<TStateMachine>>(s).StateMachine!.MoveNext();
- }
-
- /// <summary>A delegate to the <see cref="MoveNext()"/> method.</summary>
- public Action MoveNextAction => _moveNextAction ??= new Action(MoveNext);
-
- /// <summary>Invoked to run MoveNext when this instance is executed from the thread pool.</summary>
- void IThreadPoolWorkItem.Execute() => MoveNext();
-
- /// <summary>Calls MoveNext on <see cref="StateMachine"/></summary>
- public void MoveNext()
- {
- ExecutionContext? context = Context;
-
- if (context is null)
- {
- Debug.Assert(!(StateMachine is null));
- StateMachine.MoveNext();
- }
- else
- {
- ExecutionContext.RunInternal(context, s_callback, this);
- }
- }
-
- /// <summary>Get the result of the operation.</summary>
- TResult IValueTaskSource<TResult>.GetResult(short token)
- {
- try
- {
- return _valueTaskSource.GetResult(token);
- }
- finally
- {
- // Reuse this instance if possible, otherwise clear and drop it.
- ReturnOrDropBox();
- }
- }
-
- /// <summary>Get the result of the operation.</summary>
- void IValueTaskSource.GetResult(short token)
- {
- try
- {
- _valueTaskSource.GetResult(token);
- }
- finally
- {
- // Reuse this instance if possible, otherwise clear and drop it.
- ReturnOrDropBox();
- }
- }
-
- /// <summary>Gets the state machine as a boxed object. This should only be used for debugging purposes.</summary>
- IAsyncStateMachine IAsyncStateMachineBox.GetStateMachineObject() => StateMachine!; // likely boxes, only use for debugging
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncVoidMethodBuilder.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncVoidMethodBuilder.cs
deleted file mode 100644
index 3a0a0a2c630..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/AsyncVoidMethodBuilder.cs
+++ /dev/null
@@ -1,163 +0,0 @@
-// 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.Diagnostics;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace System.Runtime.CompilerServices
-{
- /// <summary>
- /// Provides a builder for asynchronous methods that return void.
- /// This type is intended for compiler use only.
- /// </summary>
- public struct AsyncVoidMethodBuilder
- {
- /// <summary>The synchronization context associated with this operation.</summary>
- private SynchronizationContext? _synchronizationContext;
- /// <summary>The builder this void builder wraps.</summary>
- private AsyncTaskMethodBuilder _builder; // mutable struct: must not be readonly
-
- /// <summary>Initializes a new <see cref="AsyncVoidMethodBuilder"/>.</summary>
- /// <returns>The initialized <see cref="AsyncVoidMethodBuilder"/>.</returns>
- public static AsyncVoidMethodBuilder Create()
- {
- SynchronizationContext? sc = SynchronizationContext.Current;
- sc?.OperationStarted();
-
- // _builder should be initialized to AsyncTaskMethodBuilder.Create(), but on coreclr
- // that Create() is a nop, so we can just return the default here.
- return new AsyncVoidMethodBuilder() { _synchronizationContext = sc };
- }
-
- /// <summary>Initiates the builder's execution with the associated state machine.</summary>
- /// <typeparam name="TStateMachine">Specifies the type of the state machine.</typeparam>
- /// <param name="stateMachine">The state machine instance, passed by reference.</param>
- /// <exception cref="System.ArgumentNullException">The <paramref name="stateMachine"/> argument was null (Nothing in Visual Basic).</exception>
- [DebuggerStepThrough]
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void Start<TStateMachine>(ref TStateMachine stateMachine) where TStateMachine : IAsyncStateMachine =>
- AsyncMethodBuilderCore.Start(ref stateMachine);
-
- /// <summary>Associates the builder with the state machine it represents.</summary>
- /// <param name="stateMachine">The heap-allocated state machine object.</param>
- /// <exception cref="System.ArgumentNullException">The <paramref name="stateMachine"/> argument was null (Nothing in Visual Basic).</exception>
- /// <exception cref="System.InvalidOperationException">The builder is incorrectly initialized.</exception>
- public void SetStateMachine(IAsyncStateMachine stateMachine) =>
- _builder.SetStateMachine(stateMachine);
-
- /// <summary>
- /// Schedules the specified state machine to be pushed forward when the specified awaiter completes.
- /// </summary>
- /// <typeparam name="TAwaiter">Specifies the type of the awaiter.</typeparam>
- /// <typeparam name="TStateMachine">Specifies the type of the state machine.</typeparam>
- /// <param name="awaiter">The awaiter.</param>
- /// <param name="stateMachine">The state machine.</param>
- public void AwaitOnCompleted<TAwaiter, TStateMachine>(
- ref TAwaiter awaiter, ref TStateMachine stateMachine)
- where TAwaiter : INotifyCompletion
- where TStateMachine : IAsyncStateMachine =>
- _builder.AwaitOnCompleted(ref awaiter, ref stateMachine);
-
- /// <summary>
- /// Schedules the specified state machine to be pushed forward when the specified awaiter completes.
- /// </summary>
- /// <typeparam name="TAwaiter">Specifies the type of the awaiter.</typeparam>
- /// <typeparam name="TStateMachine">Specifies the type of the state machine.</typeparam>
- /// <param name="awaiter">The awaiter.</param>
- /// <param name="stateMachine">The state machine.</param>
- public void AwaitUnsafeOnCompleted<TAwaiter, TStateMachine>(
- ref TAwaiter awaiter, ref TStateMachine stateMachine)
- where TAwaiter : ICriticalNotifyCompletion
- where TStateMachine : IAsyncStateMachine =>
- _builder.AwaitUnsafeOnCompleted(ref awaiter, ref stateMachine);
-
- /// <summary>Completes the method builder successfully.</summary>
- public void SetResult()
- {
- if (AsyncCausalityTracer.LoggingOn)
- {
- AsyncCausalityTracer.TraceOperationCompletion(this.Task, AsyncCausalityStatus.Completed);
- }
-
- // Mark the builder as completed. As this is a void-returning method, this mostly
- // doesn't matter, but it can affect things like debug events related to finalization.
- _builder.SetResult();
-
- if (_synchronizationContext != null)
- {
- NotifySynchronizationContextOfCompletion();
- }
- }
-
- /// <summary>Faults the method builder with an exception.</summary>
- /// <param name="exception">The exception that is the cause of this fault.</param>
- /// <exception cref="System.ArgumentNullException">The <paramref name="exception"/> argument is null (Nothing in Visual Basic).</exception>
- /// <exception cref="System.InvalidOperationException">The builder is not initialized.</exception>
- public void SetException(Exception exception)
- {
- if (exception == null)
- {
- ThrowHelper.ThrowArgumentNullException(ExceptionArgument.exception);
- }
-
- if (AsyncCausalityTracer.LoggingOn)
- {
- AsyncCausalityTracer.TraceOperationCompletion(this.Task, AsyncCausalityStatus.Error);
- }
-
- if (_synchronizationContext != null)
- {
- // If we captured a synchronization context, Post the throwing of the exception to it
- // and decrement its outstanding operation count.
- try
- {
- System.Threading.Tasks.Task.ThrowAsync(exception, targetContext: _synchronizationContext);
- }
- finally
- {
- NotifySynchronizationContextOfCompletion();
- }
- }
- else
- {
- // Otherwise, queue the exception to be thrown on the ThreadPool. This will
- // result in a crash unless legacy exception behavior is enabled by a config
- // file or a CLR host.
- System.Threading.Tasks.Task.ThrowAsync(exception, targetContext: null);
- }
-
- // The exception was propagated already; we don't need or want to fault the builder, just mark it as completed.
- _builder.SetResult();
- }
-
- /// <summary>Notifies the current synchronization context that the operation completed.</summary>
- private void NotifySynchronizationContextOfCompletion()
- {
- Debug.Assert(_synchronizationContext != null, "Must only be used with a non-null context.");
- try
- {
- _synchronizationContext.OperationCompleted();
- }
- catch (Exception exc)
- {
- // If the interaction with the SynchronizationContext goes awry,
- // fall back to propagating on the ThreadPool.
- Task.ThrowAsync(exc, targetContext: null);
- }
- }
-
- /// <summary>Lazily instantiate the Task in a non-thread-safe manner.</summary>
- private Task Task => _builder.Task;
-
- /// <summary>
- /// Gets an object that may be used to uniquely identify this builder to the debugger.
- /// </summary>
- /// <remarks>
- /// This property lazily instantiates the ID in a non-thread-safe manner.
- /// It must only be used by the debugger and AsyncCausalityTracer in a single-threaded manner.
- /// </remarks>
- internal object ObjectIdForDebugger => _builder.ObjectIdForDebugger;
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CallerArgumentExpressionAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CallerArgumentExpressionAttribute.cs
deleted file mode 100644
index 6e1c4c56cd0..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CallerArgumentExpressionAttribute.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false, Inherited = false)]
- public sealed class CallerArgumentExpressionAttribute : Attribute
- {
- public CallerArgumentExpressionAttribute(string parameterName)
- {
- ParameterName = parameterName;
- }
-
- public string ParameterName { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CallerFilePathAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CallerFilePathAttribute.cs
deleted file mode 100644
index 5858634b427..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CallerFilePathAttribute.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
- public sealed class CallerFilePathAttribute : Attribute
- {
- public CallerFilePathAttribute()
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CallerLineNumberAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CallerLineNumberAttribute.cs
deleted file mode 100644
index 5bd2fcb91b9..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CallerLineNumberAttribute.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
- public sealed class CallerLineNumberAttribute : Attribute
- {
- public CallerLineNumberAttribute()
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CallerMemberNameAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CallerMemberNameAttribute.cs
deleted file mode 100644
index 8b046335b5a..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CallerMemberNameAttribute.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
- public sealed class CallerMemberNameAttribute : Attribute
- {
- public CallerMemberNameAttribute()
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CompilationRelaxations.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CompilationRelaxations.cs
deleted file mode 100644
index 2d1763327ac..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CompilationRelaxations.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- /// IMPORTANT: Keep this in sync with corhdr.h
- [Flags]
- public enum CompilationRelaxations : int
- {
- NoStringInterning = 0x0008 // Start in 0x0008, we had other non public flags in this enum before,
- // so we'll start here just in case somebody used them. This flag is only
- // valid when set for Assemblies.
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CompilationRelaxationsAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CompilationRelaxationsAttribute.cs
deleted file mode 100644
index d6da23fdf2a..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CompilationRelaxationsAttribute.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module | AttributeTargets.Class | AttributeTargets.Method)]
- public class CompilationRelaxationsAttribute : Attribute
- {
- public CompilationRelaxationsAttribute(int relaxations)
- {
- CompilationRelaxations = relaxations;
- }
-
- public CompilationRelaxationsAttribute(CompilationRelaxations relaxations)
- {
- CompilationRelaxations = (int)relaxations;
- }
-
- public int CompilationRelaxations { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CompilerGeneratedAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CompilerGeneratedAttribute.cs
deleted file mode 100644
index 1c05abd1fec..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CompilerGeneratedAttribute.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.All, Inherited = true)]
- public sealed class CompilerGeneratedAttribute : Attribute
- {
- public CompilerGeneratedAttribute() { }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CompilerGlobalScopeAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CompilerGlobalScopeAttribute.cs
deleted file mode 100644
index 542181ce91f..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CompilerGlobalScopeAttribute.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- // Attribute used to communicate to the VS7 debugger that a class should be treated as if it has global scope.
-
- [AttributeUsage(AttributeTargets.Class)]
- public class CompilerGlobalScopeAttribute : Attribute
- {
- public CompilerGlobalScopeAttribute() { }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ConditionalWeakTable.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ConditionalWeakTable.cs
deleted file mode 100644
index ae749f45b8d..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ConditionalWeakTable.cs
+++ /dev/null
@@ -1,806 +0,0 @@
-// 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.Collections;
-using System.Collections.Generic;
-using System.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-using System.Threading;
-using Internal.Runtime.CompilerServices;
-
-namespace System.Runtime.CompilerServices
-{
- public sealed class ConditionalWeakTable<TKey, TValue> : IEnumerable<KeyValuePair<TKey, TValue>>
- where TKey : class
- where TValue : class?
- {
- // Lifetimes of keys and values:
- // Inserting a key and value into the dictonary will not
- // prevent the key from dying, even if the key is strongly reachable
- // from the value. Once the key dies, the dictionary automatically removes
- // the key/value entry.
- //
- // Thread safety guarantees:
- // ConditionalWeakTable is fully thread-safe and requires no
- // additional locking to be done by callers.
- //
- // OOM guarantees:
- // Will not corrupt unmanaged handle table on OOM. No guarantees
- // about managed weak table consistency. Native handles reclamation
- // may be delayed until appdomain shutdown.
-
- private const int InitialCapacity = 8; // Initial length of the table. Must be a power of two.
- private readonly object _lock; // This lock protects all mutation of data in the table. Readers do not take this lock.
- private volatile Container _container; // The actual storage for the table; swapped out as the table grows.
- private int _activeEnumeratorRefCount; // The number of outstanding enumerators on the table
-
- public ConditionalWeakTable()
- {
- _lock = new object();
- _container = new Container(this);
- }
-
- /// <summary>Gets the value of the specified key.</summary>
- /// <param name="key">key of the value to find. Cannot be null.</param>
- /// <param name="value">
- /// If the key is found, contains the value associated with the key upon method return.
- /// If the key is not found, contains default(TValue).
- /// </param>
- /// <returns>Returns "true" if key was found, "false" otherwise.</returns>
- /// <remarks>
- /// The key may get garbaged collected during the TryGetValue operation. If so, TryGetValue
- /// may at its discretion, return "false" and set "value" to the default (as if the key was not present.)
- /// </remarks>
- public bool TryGetValue(TKey key, [MaybeNullWhen(false)] out TValue value)
- {
- if (key is null)
- {
- ThrowHelper.ThrowArgumentNullException(ExceptionArgument.key);
- }
-
- return _container.TryGetValueWorker(key, out value);
- }
-
- /// <summary>Adds a key to the table.</summary>
- /// <param name="key">key to add. May not be null.</param>
- /// <param name="value">value to associate with key.</param>
- /// <remarks>
- /// If the key is already entered into the dictionary, this method throws an exception.
- /// The key may get garbage collected during the Add() operation. If so, Add()
- /// has the right to consider any prior entries successfully removed and add a new entry without
- /// throwing an exception.
- /// </remarks>
- public void Add(TKey key, TValue value)
- {
- if (key is null)
- {
- ThrowHelper.ThrowArgumentNullException(ExceptionArgument.key);
- }
-
- lock (_lock)
- {
- int entryIndex = _container.FindEntry(key, out _);
- if (entryIndex != -1)
- {
- ThrowHelper.ThrowArgumentException(ExceptionResource.Argument_AddingDuplicate);
- }
-
- CreateEntry(key, value);
- }
- }
-
- /// <summary>Adds the key and value if the key doesn't exist, or updates the existing key's value if it does exist.</summary>
- /// <param name="key">key to add or update. May not be null.</param>
- /// <param name="value">value to associate with key.</param>
- public void AddOrUpdate(TKey key, TValue value)
- {
- if (key is null)
- {
- ThrowHelper.ThrowArgumentNullException(ExceptionArgument.key);
- }
-
- lock (_lock)
- {
- int entryIndex = _container.FindEntry(key, out _);
-
- // if we found a key we should just update, if no we should create a new entry.
- if (entryIndex != -1)
- {
- _container.UpdateValue(entryIndex, value);
- }
- else
- {
- CreateEntry(key, value);
- }
- }
- }
-
- /// <summary>Removes a key and its value from the table.</summary>
- /// <param name="key">key to remove. May not be null.</param>
- /// <returns>true if the key is found and removed. Returns false if the key was not in the dictionary.</returns>
- /// <remarks>
- /// The key may get garbage collected during the Remove() operation. If so,
- /// Remove() will not fail or throw, however, the return value can be either true or false
- /// depending on who wins the race.
- /// </remarks>
- public bool Remove(TKey key)
- {
- if (key is null)
- {
- ThrowHelper.ThrowArgumentNullException(ExceptionArgument.key);
- }
-
- lock (_lock)
- {
- return _container.Remove(key);
- }
- }
-
- /// <summary>Clear all the key/value pairs</summary>
- public void Clear()
- {
- lock (_lock)
- {
- // To clear, we would prefer to simply drop the existing container
- // and replace it with an empty one, as that's overall more efficient.
- // However, if there are any active enumerators, we don't want to do
- // that as it will end up removing all of the existing entries and
- // allowing new items to be added at the same indices when the container
- // is filled and replaced, and one of the guarantees we try to make with
- // enumeration is that new items added after enumeration starts won't be
- // included in the enumeration. As such, if there are active enumerators,
- // we simply use the container's removal functionality to remove all of the
- // keys; then when the table is resized, if there are still active enumerators,
- // these empty slots will be maintained.
- if (_activeEnumeratorRefCount > 0)
- {
- _container.RemoveAllKeys();
- }
- else
- {
- _container = new Container(this);
- }
- }
- }
-
- /// <summary>
- /// Atomically searches for a specified key in the table and returns the corresponding value.
- /// If the key does not exist in the table, the method invokes a callback method to create a
- /// value that is bound to the specified key.
- /// </summary>
- /// <param name="key">key of the value to find. Cannot be null.</param>
- /// <param name="createValueCallback">callback that creates value for key. Cannot be null.</param>
- /// <returns></returns>
- /// <remarks>
- /// If multiple threads try to initialize the same key, the table may invoke createValueCallback
- /// multiple times with the same key. Exactly one of these calls will succeed and the returned
- /// value of that call will be the one added to the table and returned by all the racing GetValue() calls.
- /// This rule permits the table to invoke createValueCallback outside the internal table lock
- /// to prevent deadlocks.
- /// </remarks>
- public TValue GetValue(TKey key, CreateValueCallback createValueCallback)
- {
- // key is validated by TryGetValue
-
- if (createValueCallback is null)
- {
- throw new ArgumentNullException(nameof(createValueCallback));
- }
-
- return TryGetValue(key, out TValue existingValue) ?
- existingValue :
- GetValueLocked(key, createValueCallback);
- }
-
- private TValue GetValueLocked(TKey key, CreateValueCallback createValueCallback)
- {
- // If we got here, the key was not in the table. Invoke the callback (outside the lock)
- // to generate the new value for the key.
- TValue newValue = createValueCallback(key);
-
- lock (_lock)
- {
- // Now that we've taken the lock, must recheck in case we lost a race to add the key.
- if (_container.TryGetValueWorker(key, out TValue existingValue))
- {
- return existingValue;
- }
- else
- {
- // Verified in-lock that we won the race to add the key. Add it now.
- CreateEntry(key, newValue);
- return newValue;
- }
- }
- }
-
- /// <summary>
- /// Helper method to call GetValue without passing a creation delegate. Uses Activator.CreateInstance
- /// to create new instances as needed. If TValue does not have a default constructor, this will throw.
- /// </summary>
- /// <param name="key">key of the value to find. Cannot be null.</param>
- public TValue GetOrCreateValue(TKey key) => GetValue(key, _ => Activator.CreateInstance<TValue>());
-
- public delegate TValue CreateValueCallback(TKey key);
-
- /// <summary>Gets an enumerator for the table.</summary>
- /// <remarks>
- /// The returned enumerator will not extend the lifetime of
- /// any object pairs in the table, other than the one that's Current. It will not return entries
- /// that have already been collected, nor will it return entries added after the enumerator was
- /// retrieved. It may not return all entries that were present when the enumerat was retrieved,
- /// however, such as not returning entries that were collected or removed after the enumerator
- /// was retrieved but before they were enumerated.
- /// </remarks>
- IEnumerator<KeyValuePair<TKey, TValue>> IEnumerable<KeyValuePair<TKey, TValue>>.GetEnumerator()
- {
- lock (_lock)
- {
- Container c = _container;
- return c is null || c.FirstFreeEntry == 0 ?
- ((IEnumerable<KeyValuePair<TKey, TValue>>)Array.Empty<KeyValuePair<TKey, TValue>>()).GetEnumerator() :
- new Enumerator(this);
- }
- }
-
- IEnumerator IEnumerable.GetEnumerator() => ((IEnumerable<KeyValuePair<TKey, TValue>>)this).GetEnumerator();
-
- /// <summary>Provides an enumerator for the table.</summary>
- private sealed class Enumerator : IEnumerator<KeyValuePair<TKey, TValue>>
- {
- // The enumerator would ideally hold a reference to the Container and the end index within that
- // container. However, the safety of the CWT depends on the only reference to the Container being
- // from the CWT itself; the Container then employs a two-phase finalization scheme, where the first
- // phase nulls out that parent CWT's reference, guaranteeing that the second time it's finalized there
- // can be no other existing references to it in use that would allow for concurrent usage of the
- // native handles with finalization. We would break that if we allowed this Enumerator to hold a
- // reference to the Container. Instead, the Enumerator holds a reference to the CWT rather than to
- // the Container, and it maintains the CWT._activeEnumeratorRefCount field to track whether there
- // are outstanding enumerators that have yet to be disposed/finalized. If there aren't any, the CWT
- // behaves as it normally does. If there are, certain operations are affected, in particular resizes.
- // Normally when the CWT is resized, it enumerates the contents of the table looking for indices that
- // contain entries which have been collected or removed, and it frees those up, effectively moving
- // down all subsequent entries in the container (not in the existing container, but in a replacement).
- // This, however, would cause the enumerator's understanding of indices to break. So, as long as
- // there is any outstanding enumerator, no compaction is performed.
-
- private ConditionalWeakTable<TKey, TValue>? _table; // parent table, set to null when disposed
- private readonly int _maxIndexInclusive; // last index in the container that should be enumerated
- private int _currentIndex; // the current index into the container
- private KeyValuePair<TKey, TValue> _current; // the current entry set by MoveNext and returned from Current
-
- public Enumerator(ConditionalWeakTable<TKey, TValue> table)
- {
- Debug.Assert(table != null, "Must provide a valid table");
- Debug.Assert(Monitor.IsEntered(table._lock), "Must hold the _lock lock to construct the enumerator");
- Debug.Assert(table._container != null, "Should not be used on a finalized table");
- Debug.Assert(table._container.FirstFreeEntry > 0, "Should have returned an empty enumerator instead");
-
- // Store a reference to the parent table and increase its active enumerator count.
- _table = table;
- Debug.Assert(table._activeEnumeratorRefCount >= 0, "Should never have a negative ref count before incrementing");
- table._activeEnumeratorRefCount++;
-
- // Store the max index to be enumerated.
- _maxIndexInclusive = table._container.FirstFreeEntry - 1;
- _currentIndex = -1;
- }
-
- ~Enumerator()
- {
- Dispose();
- }
-
- public void Dispose()
- {
- // Use an interlocked operation to ensure that only one thread can get access to
- // the _table for disposal and thus only decrement the ref count once.
- ConditionalWeakTable<TKey, TValue>? table = Interlocked.Exchange(ref _table, null);
- if (table != null)
- {
- // Ensure we don't keep the last current alive unnecessarily
- _current = default;
-
- // Decrement the ref count that was incremented when constructed
- lock (table._lock)
- {
- table._activeEnumeratorRefCount--;
- Debug.Assert(table._activeEnumeratorRefCount >= 0, "Should never have a negative ref count after decrementing");
- }
-
- // Finalization is purely to decrement the ref count. We can suppress it now.
- GC.SuppressFinalize(this);
- }
- }
-
- public bool MoveNext()
- {
- // Start by getting the current table. If it's already been disposed, it will be null.
- ConditionalWeakTable<TKey, TValue>? table = _table;
- if (table != null)
- {
- // Once have the table, we need to lock to synchronize with other operations on
- // the table, like adding.
- lock (table._lock)
- {
- // From the table, we have to get the current container. This could have changed
- // since we grabbed the enumerator, but the index-to-pair mapping should not have
- // due to there being at least one active enumerator. If the table (or rather its
- // container at the time) has already been finalized, this will be null.
- Container c = table._container;
- if (c != null)
- {
- // We have the container. Find the next entry to return, if there is one.
- // We need to loop as we may try to get an entry that's already been removed
- // or collected, in which case we try again.
- while (_currentIndex < _maxIndexInclusive)
- {
- _currentIndex++;
- if (c.TryGetEntry(_currentIndex, out TKey? key, out TValue value))
- {
- _current = new KeyValuePair<TKey, TValue>(key, value);
- return true;
- }
- }
- }
- }
- }
-
- // Nothing more to enumerate.
- return false;
- }
-
- public KeyValuePair<TKey, TValue> Current
- {
- get
- {
- if (_currentIndex < 0)
- {
- ThrowHelper.ThrowInvalidOperationException_InvalidOperation_EnumOpCantHappen();
- }
- return _current;
- }
- }
-
- object? IEnumerator.Current => Current;
-
- public void Reset() { }
- }
-
- /// <summary>Worker for adding a new key/value pair. Will resize the container if it is full.</summary>
- /// <param name="key"></param>
- /// <param name="value"></param>
- private void CreateEntry(TKey key, TValue value)
- {
- Debug.Assert(Monitor.IsEntered(_lock));
- Debug.Assert(key != null); // key already validated as non-null and not already in table.
-
- Container c = _container;
- if (!c.HasCapacity)
- {
- _container = c = c.Resize();
- }
- c.CreateEntryNoResize(key, value);
- }
-
- private static bool IsPowerOfTwo(int value) => (value > 0) && ((value & (value - 1)) == 0);
-
- //--------------------------------------------------------------------------------------------
- // Entry can be in one of four states:
- //
- // - Unused (stored with an index _firstFreeEntry and above)
- // depHnd.IsAllocated == false
- // hashCode == <dontcare>
- // next == <dontcare>)
- //
- // - Used with live key (linked into a bucket list where _buckets[hashCode & (_buckets.Length - 1)] points to first entry)
- // depHnd.IsAllocated == true, depHnd.GetPrimary() != null
- // hashCode == RuntimeHelpers.GetHashCode(depHnd.GetPrimary()) & int.MaxValue
- // next links to next Entry in bucket.
- //
- // - Used with dead key (linked into a bucket list where _buckets[hashCode & (_buckets.Length - 1)] points to first entry)
- // depHnd.IsAllocated == true, depHnd.GetPrimary() is null
- // hashCode == <notcare>
- // next links to next Entry in bucket.
- //
- // - Has been removed from the table (by a call to Remove)
- // depHnd.IsAllocated == true, depHnd.GetPrimary() == <notcare>
- // hashCode == -1
- // next links to next Entry in bucket.
- //
- // The only difference between "used with live key" and "used with dead key" is that
- // depHnd.GetPrimary() returns null. The transition from "used with live key" to "used with dead key"
- // happens asynchronously as a result of normal garbage collection. The dictionary itself
- // receives no notification when this happens.
- //
- // When the dictionary grows the _entries table, it scours it for expired keys and does not
- // add those to the new container.
- //--------------------------------------------------------------------------------------------
- private struct Entry
- {
- public DependentHandle depHnd; // Holds key and value using a weak reference for the key and a strong reference
- // for the value that is traversed only if the key is reachable without going through the value.
- public int HashCode; // Cached copy of key's hashcode
- public int Next; // Index of next entry, -1 if last
- }
-
- /// <summary>
- /// Container holds the actual data for the table. A given instance of Container always has the same capacity. When we need
- /// more capacity, we create a new Container, copy the old one into the new one, and discard the old one. This helps enable lock-free
- /// reads from the table, as readers never need to deal with motion of entries due to rehashing.
- /// </summary>
- private sealed class Container
- {
- private readonly ConditionalWeakTable<TKey, TValue> _parent; // the ConditionalWeakTable with which this container is associated
- private int[] _buckets; // _buckets[hashcode & (_buckets.Length - 1)] contains index of the first entry in bucket (-1 if empty)
- private Entry[] _entries; // the table entries containing the stored dependency handles
- private int _firstFreeEntry; // _firstFreeEntry < _entries.Length => table has capacity, entries grow from the bottom of the table.
- private bool _invalid; // flag detects if OOM or other background exception threw us out of the lock.
- private bool _finalized; // set to true when initially finalized
- private volatile object? _oldKeepAlive; // used to ensure the next allocated container isn't finalized until this one is GC'd
-
- internal Container(ConditionalWeakTable<TKey, TValue> parent)
- {
- Debug.Assert(parent != null);
- Debug.Assert(IsPowerOfTwo(InitialCapacity));
-
- const int Size = InitialCapacity;
- _buckets = new int[Size];
- for (int i = 0; i < _buckets.Length; i++)
- {
- _buckets[i] = -1;
- }
- _entries = new Entry[Size];
-
- // Only store the parent after all of the allocations have happened successfully.
- // Otherwise, as part of growing or clearing the container, we could end up allocating
- // a new Container that fails (OOMs) part way through construction but that gets finalized
- // and ends up clearing out some other container present in the associated CWT.
- _parent = parent;
- }
-
- private Container(ConditionalWeakTable<TKey, TValue> parent, int[] buckets, Entry[] entries, int firstFreeEntry)
- {
- Debug.Assert(parent != null);
- Debug.Assert(buckets != null);
- Debug.Assert(entries != null);
- Debug.Assert(buckets.Length == entries.Length);
- Debug.Assert(IsPowerOfTwo(buckets.Length));
-
- _parent = parent;
- _buckets = buckets;
- _entries = entries;
- _firstFreeEntry = firstFreeEntry;
- }
-
- internal bool HasCapacity => _firstFreeEntry < _entries.Length;
-
- internal int FirstFreeEntry => _firstFreeEntry;
-
- /// <summary>Worker for adding a new key/value pair. Container must NOT be full.</summary>
- internal void CreateEntryNoResize(TKey key, TValue value)
- {
- Debug.Assert(key != null); // key already validated as non-null and not already in table.
- Debug.Assert(HasCapacity);
-
- VerifyIntegrity();
- _invalid = true;
-
- int hashCode = RuntimeHelpers.GetHashCode(key) & int.MaxValue;
- int newEntry = _firstFreeEntry++;
-
- _entries[newEntry].HashCode = hashCode;
- _entries[newEntry].depHnd = new DependentHandle(key, value);
- int bucket = hashCode & (_buckets.Length - 1);
- _entries[newEntry].Next = _buckets[bucket];
-
- // This write must be volatile, as we may be racing with concurrent readers. If they see
- // the new entry, they must also see all of the writes earlier in this method.
- Volatile.Write(ref _buckets[bucket], newEntry);
-
- _invalid = false;
- }
-
- /// <summary>Worker for finding a key/value pair. Must hold _lock.</summary>
- internal bool TryGetValueWorker(TKey key, [MaybeNullWhen(false)] out TValue value)
- {
- Debug.Assert(key != null); // Key already validated as non-null
-
- int entryIndex = FindEntry(key, out object? secondary);
- value = Unsafe.As<TValue>(secondary);
- return entryIndex != -1;
- }
-
- /// <summary>
- /// Returns -1 if not found (if key expires during FindEntry, this can be treated as "not found.").
- /// Must hold _lock, or be prepared to retry the search while holding _lock.
- /// </summary>
- internal int FindEntry(TKey key, out object? value)
- {
- Debug.Assert(key != null); // Key already validated as non-null.
-
- int hashCode = RuntimeHelpers.GetHashCode(key) & int.MaxValue;
- int bucket = hashCode & (_buckets.Length - 1);
- for (int entriesIndex = Volatile.Read(ref _buckets[bucket]); entriesIndex != -1; entriesIndex = _entries[entriesIndex].Next)
- {
- if (_entries[entriesIndex].HashCode == hashCode && _entries[entriesIndex].depHnd.GetPrimaryAndSecondary(out value) == key)
- {
- GC.KeepAlive(this); // ensure we don't get finalized while accessing DependentHandles.
- return entriesIndex;
- }
- }
-
- GC.KeepAlive(this); // ensure we don't get finalized while accessing DependentHandles.
- value = null;
- return -1;
- }
-
- /// <summary>Gets the entry at the specified entry index.</summary>
- internal bool TryGetEntry(int index, [NotNullWhen(true)] out TKey? key, [MaybeNullWhen(false)] out TValue value)
- {
- if (index < _entries.Length)
- {
- object? oKey = _entries[index].depHnd.GetPrimaryAndSecondary(out object? oValue);
- GC.KeepAlive(this); // ensure we don't get finalized while accessing DependentHandles.
-
- if (oKey != null)
- {
- key = Unsafe.As<TKey>(oKey);
- value = Unsafe.As<TValue>(oValue);
- return true;
- }
- }
-
- key = default;
- value = default!;
- return false;
- }
-
- /// <summary>Removes all of the keys in the table.</summary>
- internal void RemoveAllKeys()
- {
- for (int i = 0; i < _firstFreeEntry; i++)
- {
- RemoveIndex(i);
- }
- }
-
- /// <summary>Removes the specified key from the table, if it exists.</summary>
- internal bool Remove(TKey key)
- {
- VerifyIntegrity();
-
- int entryIndex = FindEntry(key, out _);
- if (entryIndex != -1)
- {
- RemoveIndex(entryIndex);
- return true;
- }
-
- return false;
- }
-
- private void RemoveIndex(int entryIndex)
- {
- Debug.Assert(entryIndex >= 0 && entryIndex < _firstFreeEntry);
-
- ref Entry entry = ref _entries[entryIndex];
-
- // We do not free the handle here, as we may be racing with readers who already saw the hash code.
- // Instead, we simply overwrite the entry's hash code, so subsequent reads will ignore it.
- // The handle will be free'd in Container's finalizer, after the table is resized or discarded.
- Volatile.Write(ref entry.HashCode, -1);
-
- // Also, clear the key to allow GC to collect objects pointed to by the entry
- entry.depHnd.SetPrimary(null);
- }
-
- internal void UpdateValue(int entryIndex, TValue newValue)
- {
- Debug.Assert(entryIndex != -1);
-
- VerifyIntegrity();
- _invalid = true;
-
- _entries[entryIndex].depHnd.SetSecondary(newValue);
-
- _invalid = false;
- }
-
- /// <summary>Resize, and scrub expired keys off bucket lists. Must hold _lock.</summary>
- /// <remarks>
- /// _firstEntry is less than _entries.Length on exit, that is, the table has at least one free entry.
- /// </remarks>
- internal Container Resize()
- {
- Debug.Assert(!HasCapacity);
-
- bool hasExpiredEntries = false;
- int newSize = _buckets.Length;
-
- if (_parent is null || _parent._activeEnumeratorRefCount == 0)
- {
- // If any expired or removed keys exist, we won't resize.
- // If there any active enumerators, though, we don't want
- // to compact and thus have no expired entries.
- for (int entriesIndex = 0; entriesIndex < _entries.Length; entriesIndex++)
- {
- ref Entry entry = ref _entries[entriesIndex];
-
- if (entry.HashCode == -1)
- {
- // the entry was removed
- hasExpiredEntries = true;
- break;
- }
-
- if (entry.depHnd.IsAllocated && entry.depHnd.GetPrimary() is null)
- {
- // the entry has expired
- hasExpiredEntries = true;
- break;
- }
- }
- }
-
- if (!hasExpiredEntries)
- {
- // Not necessary to check for overflow here, the attempt to allocate new arrays will throw
- newSize = _buckets.Length * 2;
- }
-
- return Resize(newSize);
- }
-
- internal Container Resize(int newSize)
- {
- Debug.Assert(newSize >= _buckets.Length);
- Debug.Assert(IsPowerOfTwo(newSize));
-
- // Reallocate both buckets and entries and rebuild the bucket and entries from scratch.
- // This serves both to scrub entries with expired keys and to put the new entries in the proper bucket.
- int[] newBuckets = new int[newSize];
- for (int bucketIndex = 0; bucketIndex < newBuckets.Length; bucketIndex++)
- {
- newBuckets[bucketIndex] = -1;
- }
- Entry[] newEntries = new Entry[newSize];
- int newEntriesIndex = 0;
- bool activeEnumerators = _parent != null && _parent._activeEnumeratorRefCount > 0;
-
- // Migrate existing entries to the new table.
- if (activeEnumerators)
- {
- // There's at least one active enumerator, which means we don't want to
- // remove any expired/removed entries, in order to not affect existing
- // entries indices. Copy over the entries while rebuilding the buckets list,
- // as the buckets are dependent on the buckets list length, which is changing.
- for (; newEntriesIndex < _entries.Length; newEntriesIndex++)
- {
- ref Entry oldEntry = ref _entries[newEntriesIndex];
- ref Entry newEntry = ref newEntries[newEntriesIndex];
- int hashCode = oldEntry.HashCode;
-
- newEntry.HashCode = hashCode;
- newEntry.depHnd = oldEntry.depHnd;
- int bucket = hashCode & (newBuckets.Length - 1);
- newEntry.Next = newBuckets[bucket];
- newBuckets[bucket] = newEntriesIndex;
- }
- }
- else
- {
- // There are no active enumerators, which means we want to compact by
- // removing expired/removed entries.
- for (int entriesIndex = 0; entriesIndex < _entries.Length; entriesIndex++)
- {
- ref Entry oldEntry = ref _entries[entriesIndex];
- int hashCode = oldEntry.HashCode;
- DependentHandle depHnd = oldEntry.depHnd;
- if (hashCode != -1 && depHnd.IsAllocated)
- {
- if (depHnd.GetPrimary() != null)
- {
- ref Entry newEntry = ref newEntries[newEntriesIndex];
-
- // Entry is used and has not expired. Link it into the appropriate bucket list.
- newEntry.HashCode = hashCode;
- newEntry.depHnd = depHnd;
- int bucket = hashCode & (newBuckets.Length - 1);
- newEntry.Next = newBuckets[bucket];
- newBuckets[bucket] = newEntriesIndex;
- newEntriesIndex++;
- }
- else
- {
- // Pretend the item was removed, so that this container's finalizer
- // will clean up this dependent handle.
- Volatile.Write(ref oldEntry.HashCode, -1);
- }
- }
- }
- }
-
- // Create the new container. We want to transfer the responsibility of freeing the handles from
- // the old container to the new container, and also ensure that the new container isn't finalized
- // while the old container may still be in use. As such, we store a reference from the old container
- // to the new one, which will keep the new container alive as long as the old one is.
- var newContainer = new Container(_parent!, newBuckets, newEntries, newEntriesIndex);
- if (activeEnumerators)
- {
- // If there are active enumerators, both the old container and the new container may be storing
- // the same entries with -1 hash codes, which the finalizer will clean up even if the container
- // is not the active container for the table. To prevent that, we want to stop the old container
- // from being finalized, as it no longer has any responsibility for any cleanup.
- GC.SuppressFinalize(this);
- }
- _oldKeepAlive = newContainer; // once this is set, the old container's finalizer will not free transferred dependent handles
-
- GC.KeepAlive(this); // ensure we don't get finalized while accessing DependentHandles.
-
- return newContainer;
- }
-
- private void VerifyIntegrity()
- {
- if (_invalid)
- {
- throw new InvalidOperationException(SR.InvalidOperation_CollectionCorrupted);
- }
- }
-
- ~Container()
- {
- // Skip doing anything if the container is invalid, including if somehow
- // the container object was allocated but its associated table never set.
- if (_invalid || _parent is null)
- {
- return;
- }
-
- // It's possible that the ConditionalWeakTable could have been resurrected, in which case code could
- // be accessing this Container as it's being finalized. We don't support usage after finalization,
- // but we also don't want to potentially corrupt state by allowing dependency handles to be used as
- // or after they've been freed. To avoid that, if it's at all possible that another thread has a
- // reference to this container via the CWT, we remove such a reference and then re-register for
- // finalization: the next time around, we can be sure that no references remain to this and we can
- // clean up the dependency handles without fear of corruption.
- if (!_finalized)
- {
- _finalized = true;
- lock (_parent._lock)
- {
- if (_parent._container == this)
- {
- _parent._container = null!;
- }
- }
- GC.ReRegisterForFinalize(this); // next time it's finalized, we'll be sure there are no remaining refs
- return;
- }
-
- Entry[] entries = _entries;
- _invalid = true;
- _entries = null!;
- _buckets = null!;
-
- if (entries != null)
- {
- for (int entriesIndex = 0; entriesIndex < entries.Length; entriesIndex++)
- {
- // We need to free handles in two cases:
- // - If this container still owns the dependency handle (meaning ownership hasn't been transferred
- // to another container that replaced this one), then it should be freed.
- // - If this container had the entry removed, then even if in general ownership was transferred to
- // another container, removed entries are not, therefore this container must free them.
- if (_oldKeepAlive is null || entries[entriesIndex].HashCode == -1)
- {
- entries[entriesIndex].depHnd.Free();
- }
- }
- }
- }
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ConfiguredAsyncDisposable.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ConfiguredAsyncDisposable.cs
deleted file mode 100644
index aa5e882dc65..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ConfiguredAsyncDisposable.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- /// <summary>Provides a type that can be used to configure how awaits on an <see cref="IAsyncDisposable"/> are performed.</summary>
- [StructLayout(LayoutKind.Auto)]
- public readonly struct ConfiguredAsyncDisposable
- {
- private readonly IAsyncDisposable _source;
- private readonly bool _continueOnCapturedContext;
-
- internal ConfiguredAsyncDisposable(IAsyncDisposable source, bool continueOnCapturedContext)
- {
- _source = source;
- _continueOnCapturedContext = continueOnCapturedContext;
- }
-
- public ConfiguredValueTaskAwaitable DisposeAsync() =>
- // as with other "configured" awaitable-related type in CompilerServices, we don't null check to defend against
- // misuse like `default(ConfiguredAsyncDisposable).DisposeAsync()`, which will null ref by design.
- _source.DisposeAsync().ConfigureAwait(_continueOnCapturedContext);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ConfiguredCancelableAsyncEnumerable.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ConfiguredCancelableAsyncEnumerable.cs
deleted file mode 100644
index 4f1bca71695..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ConfiguredCancelableAsyncEnumerable.cs
+++ /dev/null
@@ -1,78 +0,0 @@
-// 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.Collections.Generic;
-using System.Runtime.InteropServices;
-using System.Threading;
-
-namespace System.Runtime.CompilerServices
-{
- /// <summary>Provides an awaitable async enumerable that enables cancelable iteration and configured awaits.</summary>
- [StructLayout(LayoutKind.Auto)]
- public readonly struct ConfiguredCancelableAsyncEnumerable<T>
- {
- private readonly IAsyncEnumerable<T> _enumerable;
- private readonly CancellationToken _cancellationToken;
- private readonly bool _continueOnCapturedContext;
-
- internal ConfiguredCancelableAsyncEnumerable(IAsyncEnumerable<T> enumerable, bool continueOnCapturedContext, CancellationToken cancellationToken)
- {
- _enumerable = enumerable;
- _continueOnCapturedContext = continueOnCapturedContext;
- _cancellationToken = cancellationToken;
- }
-
- /// <summary>Configures how awaits on the tasks returned from an async iteration will be performed.</summary>
- /// <param name="continueOnCapturedContext">Whether to capture and marshal back to the current context.</param>
- /// <returns>The configured enumerable.</returns>
- /// <remarks>This will replace any previous value set by <see cref="ConfigureAwait(bool)"/> for this iteration.</remarks>
- public ConfiguredCancelableAsyncEnumerable<T> ConfigureAwait(bool continueOnCapturedContext) =>
- new ConfiguredCancelableAsyncEnumerable<T>(_enumerable, continueOnCapturedContext, _cancellationToken);
-
- /// <summary>Sets the <see cref="CancellationToken"/> to be passed to <see cref="IAsyncEnumerable{T}.GetAsyncEnumerator(CancellationToken)"/> when iterating.</summary>
- /// <param name="cancellationToken">The <see cref="CancellationToken"/> to use.</param>
- /// <returns>The configured enumerable.</returns>
- /// <remarks>This will replace any previous <see cref="CancellationToken"/> set by <see cref="WithCancellation(CancellationToken)"/> for this iteration.</remarks>
- public ConfiguredCancelableAsyncEnumerable<T> WithCancellation(CancellationToken cancellationToken) =>
- new ConfiguredCancelableAsyncEnumerable<T>(_enumerable, _continueOnCapturedContext, cancellationToken);
-
- public Enumerator GetAsyncEnumerator() =>
- // as with other "configured" awaitable-related type in CompilerServices, we don't null check to defend against
- // misuse like `default(ConfiguredCancelableAsyncEnumerable<T>).GetAsyncEnumerator()`, which will null ref by design.
- new Enumerator(_enumerable.GetAsyncEnumerator(_cancellationToken), _continueOnCapturedContext);
-
- /// <summary>Provides an awaitable async enumerator that enables cancelable iteration and configured awaits.</summary>
- [StructLayout(LayoutKind.Auto)]
- public readonly struct Enumerator
- {
- private readonly IAsyncEnumerator<T> _enumerator;
- private readonly bool _continueOnCapturedContext;
-
- internal Enumerator(IAsyncEnumerator<T> enumerator, bool continueOnCapturedContext)
- {
- _enumerator = enumerator;
- _continueOnCapturedContext = continueOnCapturedContext;
- }
-
- /// <summary>Advances the enumerator asynchronously to the next element of the collection.</summary>
- /// <returns>
- /// A <see cref="ConfiguredValueTaskAwaitable{Boolean}"/> that will complete with a result of <c>true</c>
- /// if the enumerator was successfully advanced to the next element, or <c>false</c> if the enumerator has
- /// passed the end of the collection.
- /// </returns>
- public ConfiguredValueTaskAwaitable<bool> MoveNextAsync() =>
- _enumerator.MoveNextAsync().ConfigureAwait(_continueOnCapturedContext);
-
- /// <summary>Gets the element in the collection at the current position of the enumerator.</summary>
- public T Current => _enumerator.Current;
-
- /// <summary>
- /// Performs application-defined tasks associated with freeing, releasing, or
- /// resetting unmanaged resources asynchronously.
- /// </summary>
- public ConfiguredValueTaskAwaitable DisposeAsync() =>
- _enumerator.DisposeAsync().ConfigureAwait(_continueOnCapturedContext);
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ConfiguredValueTaskAwaitable.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ConfiguredValueTaskAwaitable.cs
deleted file mode 100644
index 493269218df..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ConfiguredValueTaskAwaitable.cs
+++ /dev/null
@@ -1,225 +0,0 @@
-// 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.Diagnostics;
-using System.Runtime.InteropServices;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Threading.Tasks.Sources;
-
-#if !NETSTANDARD2_0
-using Internal.Runtime.CompilerServices;
-#endif
-
-namespace System.Runtime.CompilerServices
-{
- /// <summary>Provides an awaitable type that enables configured awaits on a <see cref="ValueTask"/>.</summary>
- [StructLayout(LayoutKind.Auto)]
- public readonly struct ConfiguredValueTaskAwaitable
- {
- /// <summary>The wrapped <see cref="Task"/>.</summary>
- private readonly ValueTask _value;
-
- /// <summary>Initializes the awaitable.</summary>
- /// <param name="value">The wrapped <see cref="ValueTask"/>.</param>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- internal ConfiguredValueTaskAwaitable(in ValueTask value) => _value = value;
-
- /// <summary>Returns an awaiter for this <see cref="ConfiguredValueTaskAwaitable"/> instance.</summary>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public ConfiguredValueTaskAwaiter GetAwaiter() => new ConfiguredValueTaskAwaiter(in _value);
-
- /// <summary>Provides an awaiter for a <see cref="ConfiguredValueTaskAwaitable"/>.</summary>
- [StructLayout(LayoutKind.Auto)]
- public readonly struct ConfiguredValueTaskAwaiter : ICriticalNotifyCompletion, IStateMachineBoxAwareAwaiter
- {
- /// <summary>The value being awaited.</summary>
- private readonly ValueTask _value;
-
- /// <summary>Initializes the awaiter.</summary>
- /// <param name="value">The value to be awaited.</param>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- internal ConfiguredValueTaskAwaiter(in ValueTask value) => _value = value;
-
- /// <summary>Gets whether the <see cref="ConfiguredValueTaskAwaitable"/> has completed.</summary>
- public bool IsCompleted
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get => _value.IsCompleted;
- }
-
- /// <summary>Gets the result of the ValueTask.</summary>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void GetResult() => _value.ThrowIfCompletedUnsuccessfully();
-
- /// <summary>Schedules the continuation action for the <see cref="ConfiguredValueTaskAwaitable"/>.</summary>
- public void OnCompleted(Action continuation)
- {
- object? obj = _value._obj;
- Debug.Assert(obj == null || obj is Task || obj is IValueTaskSource);
-
- if (obj is Task t)
- {
- t.ConfigureAwait(_value._continueOnCapturedContext).GetAwaiter().OnCompleted(continuation);
- }
- else if (obj != null)
- {
- Unsafe.As<IValueTaskSource>(obj).OnCompleted(ValueTaskAwaiter.s_invokeActionDelegate, continuation, _value._token,
- ValueTaskSourceOnCompletedFlags.FlowExecutionContext |
- (_value._continueOnCapturedContext ? ValueTaskSourceOnCompletedFlags.UseSchedulingContext : ValueTaskSourceOnCompletedFlags.None));
- }
- else
- {
- ValueTask.CompletedTask.ConfigureAwait(_value._continueOnCapturedContext).GetAwaiter().OnCompleted(continuation);
- }
- }
-
- /// <summary>Schedules the continuation action for the <see cref="ConfiguredValueTaskAwaitable"/>.</summary>
- public void UnsafeOnCompleted(Action continuation)
- {
- object? obj = _value._obj;
- Debug.Assert(obj == null || obj is Task || obj is IValueTaskSource);
-
- if (obj is Task t)
- {
- t.ConfigureAwait(_value._continueOnCapturedContext).GetAwaiter().UnsafeOnCompleted(continuation);
- }
- else if (obj != null)
- {
- Unsafe.As<IValueTaskSource>(obj).OnCompleted(ValueTaskAwaiter.s_invokeActionDelegate, continuation, _value._token,
- _value._continueOnCapturedContext ? ValueTaskSourceOnCompletedFlags.UseSchedulingContext : ValueTaskSourceOnCompletedFlags.None);
- }
- else
- {
- ValueTask.CompletedTask.ConfigureAwait(_value._continueOnCapturedContext).GetAwaiter().UnsafeOnCompleted(continuation);
- }
- }
-
- void IStateMachineBoxAwareAwaiter.AwaitUnsafeOnCompleted(IAsyncStateMachineBox box)
- {
- object? obj = _value._obj;
- Debug.Assert(obj == null || obj is Task || obj is IValueTaskSource);
-
- if (obj is Task t)
- {
- TaskAwaiter.UnsafeOnCompletedInternal(t, box, _value._continueOnCapturedContext);
- }
- else if (obj != null)
- {
- Unsafe.As<IValueTaskSource>(obj).OnCompleted(ThreadPoolGlobals.s_invokeAsyncStateMachineBox, box, _value._token,
- _value._continueOnCapturedContext ? ValueTaskSourceOnCompletedFlags.UseSchedulingContext : ValueTaskSourceOnCompletedFlags.None);
- }
- else
- {
- TaskAwaiter.UnsafeOnCompletedInternal(Task.CompletedTask, box, _value._continueOnCapturedContext);
- }
- }
- }
- }
-
- /// <summary>Provides an awaitable type that enables configured awaits on a <see cref="ValueTask{TResult}"/>.</summary>
- /// <typeparam name="TResult">The type of the result produced.</typeparam>
- [StructLayout(LayoutKind.Auto)]
- public readonly struct ConfiguredValueTaskAwaitable<TResult>
- {
- /// <summary>The wrapped <see cref="ValueTask{TResult}"/>.</summary>
- private readonly ValueTask<TResult> _value;
-
- /// <summary>Initializes the awaitable.</summary>
- /// <param name="value">The wrapped <see cref="ValueTask{TResult}"/>.</param>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- internal ConfiguredValueTaskAwaitable(in ValueTask<TResult> value) => _value = value;
-
- /// <summary>Returns an awaiter for this <see cref="ConfiguredValueTaskAwaitable{TResult}"/> instance.</summary>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public ConfiguredValueTaskAwaiter GetAwaiter() => new ConfiguredValueTaskAwaiter(in _value);
-
- /// <summary>Provides an awaiter for a <see cref="ConfiguredValueTaskAwaitable{TResult}"/>.</summary>
- [StructLayout(LayoutKind.Auto)]
- public readonly struct ConfiguredValueTaskAwaiter : ICriticalNotifyCompletion, IStateMachineBoxAwareAwaiter
- {
- /// <summary>The value being awaited.</summary>
- private readonly ValueTask<TResult> _value;
-
- /// <summary>Initializes the awaiter.</summary>
- /// <param name="value">The value to be awaited.</param>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- internal ConfiguredValueTaskAwaiter(in ValueTask<TResult> value) => _value = value;
-
- /// <summary>Gets whether the <see cref="ConfiguredValueTaskAwaitable{TResult}"/> has completed.</summary>
- public bool IsCompleted
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get => _value.IsCompleted;
- }
-
- /// <summary>Gets the result of the ValueTask.</summary>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public TResult GetResult() => _value.Result;
-
- /// <summary>Schedules the continuation action for the <see cref="ConfiguredValueTaskAwaitable{TResult}"/>.</summary>
- public void OnCompleted(Action continuation)
- {
- object? obj = _value._obj;
- Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>);
-
- if (obj is Task<TResult> t)
- {
- t.ConfigureAwait(_value._continueOnCapturedContext).GetAwaiter().OnCompleted(continuation);
- }
- else if (obj != null)
- {
- Unsafe.As<IValueTaskSource<TResult>>(obj).OnCompleted(ValueTaskAwaiter.s_invokeActionDelegate, continuation, _value._token,
- ValueTaskSourceOnCompletedFlags.FlowExecutionContext |
- (_value._continueOnCapturedContext ? ValueTaskSourceOnCompletedFlags.UseSchedulingContext : ValueTaskSourceOnCompletedFlags.None));
- }
- else
- {
- ValueTask.CompletedTask.ConfigureAwait(_value._continueOnCapturedContext).GetAwaiter().OnCompleted(continuation);
- }
- }
-
- /// <summary>Schedules the continuation action for the <see cref="ConfiguredValueTaskAwaitable{TResult}"/>.</summary>
- public void UnsafeOnCompleted(Action continuation)
- {
- object? obj = _value._obj;
- Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>);
-
- if (obj is Task<TResult> t)
- {
- t.ConfigureAwait(_value._continueOnCapturedContext).GetAwaiter().UnsafeOnCompleted(continuation);
- }
- else if (obj != null)
- {
- Unsafe.As<IValueTaskSource<TResult>>(obj).OnCompleted(ValueTaskAwaiter.s_invokeActionDelegate, continuation, _value._token,
- _value._continueOnCapturedContext ? ValueTaskSourceOnCompletedFlags.UseSchedulingContext : ValueTaskSourceOnCompletedFlags.None);
- }
- else
- {
- ValueTask.CompletedTask.ConfigureAwait(_value._continueOnCapturedContext).GetAwaiter().UnsafeOnCompleted(continuation);
- }
- }
-
- void IStateMachineBoxAwareAwaiter.AwaitUnsafeOnCompleted(IAsyncStateMachineBox box)
- {
- object? obj = _value._obj;
- Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>);
-
- if (obj is Task<TResult> t)
- {
- TaskAwaiter.UnsafeOnCompletedInternal(t, box, _value._continueOnCapturedContext);
- }
- else if (obj != null)
- {
- Unsafe.As<IValueTaskSource<TResult>>(obj).OnCompleted(ThreadPoolGlobals.s_invokeAsyncStateMachineBox, box, _value._token,
- _value._continueOnCapturedContext ? ValueTaskSourceOnCompletedFlags.UseSchedulingContext : ValueTaskSourceOnCompletedFlags.None);
- }
- else
- {
- TaskAwaiter.UnsafeOnCompletedInternal(Task.CompletedTask, box, _value._continueOnCapturedContext);
- }
- }
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ContractHelper.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ContractHelper.cs
deleted file mode 100644
index 5adf4471e8f..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ContractHelper.cs
+++ /dev/null
@@ -1,156 +0,0 @@
-// 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.
-
-#define DEBUG // The behavior of this contract library should be consistent regardless of build type.
-
-using System.Diagnostics.Contracts;
-
-namespace System.Runtime.CompilerServices
-{
- public static class ContractHelper
- {
- /// <summary>
- /// Allows a managed application environment such as an interactive interpreter (IronPython) or a
- /// web browser host (Jolt hosting Silverlight in IE) to be notified of contract failures and
- /// potentially "handle" them, either by throwing a particular exception type, etc. If any of the
- /// event handlers sets the Cancel flag in the ContractFailedEventArgs, then the Contract class will
- /// not pop up an assert dialog box or trigger escalation policy.
- /// </summary>
- internal static event EventHandler<ContractFailedEventArgs>? InternalContractFailed;
-
- /// <summary>
- /// Rewriter will call this method on a contract failure to allow listeners to be notified.
- /// The method should not perform any failure (assert/throw) itself.
- /// This method has 3 functions:
- /// 1. Call any contract hooks (such as listeners to Contract failed events)
- /// 2. Determine if the listeners deem the failure as handled (then resultFailureMessage should be set to null)
- /// 3. Produce a localized resultFailureMessage used in advertising the failure subsequently.
- /// On exit: null if the event was handled and should not trigger a failure.
- /// Otherwise, returns the localized failure message.
- /// </summary>
- [System.Diagnostics.DebuggerNonUserCode]
- public static string? RaiseContractFailedEvent(ContractFailureKind failureKind, string? userMessage, string? conditionText, Exception? innerException)
- {
- if (failureKind < ContractFailureKind.Precondition || failureKind > ContractFailureKind.Assume)
- throw new ArgumentException(SR.Format(SR.Arg_EnumIllegalVal, failureKind), nameof(failureKind));
-
- string? returnValue;
- string displayMessage = "contract failed."; // Incomplete, but in case of OOM during resource lookup...
- ContractFailedEventArgs? eventArgs = null; // In case of OOM.
-
- try
- {
- displayMessage = GetDisplayMessage(failureKind, userMessage, conditionText);
- EventHandler<ContractFailedEventArgs>? contractFailedEventLocal = InternalContractFailed;
- if (contractFailedEventLocal != null)
- {
- eventArgs = new ContractFailedEventArgs(failureKind, displayMessage, conditionText, innerException);
- foreach (EventHandler<ContractFailedEventArgs> handler in contractFailedEventLocal.GetInvocationList())
- {
- try
- {
- handler(null, eventArgs);
- }
- catch (Exception e)
- {
- eventArgs.thrownDuringHandler = e;
- eventArgs.SetUnwind();
- }
- }
- if (eventArgs.Unwind)
- {
- // unwind
- innerException ??= eventArgs.thrownDuringHandler;
- throw new ContractException(failureKind, displayMessage, userMessage, conditionText, innerException);
- }
- }
- }
- finally
- {
- if (eventArgs != null && eventArgs.Handled)
- {
- returnValue = null; // handled
- }
- else
- {
- returnValue = displayMessage;
- }
- }
-
- return returnValue;
- }
-
- /// <summary>
- /// Rewriter calls this method to get the default failure behavior.
- /// </summary>
- [System.Diagnostics.DebuggerNonUserCode]
- public static void TriggerFailure(ContractFailureKind kind, string? displayMessage, string? userMessage, string? conditionText, Exception? innerException)
- {
- if (string.IsNullOrEmpty(displayMessage))
- {
- displayMessage = GetDisplayMessage(kind, userMessage, conditionText);
- }
-
- System.Diagnostics.Debug.ContractFailure(displayMessage, string.Empty, GetFailureMessage(kind, null));
- }
-
- private static string GetFailureMessage(ContractFailureKind failureKind, string? conditionText)
- {
- bool hasConditionText = !string.IsNullOrEmpty(conditionText);
- switch (failureKind)
- {
- case ContractFailureKind.Assert:
- return hasConditionText ? SR.Format(SR.AssertionFailed_Cnd, conditionText) : SR.AssertionFailed;
-
- case ContractFailureKind.Assume:
- return hasConditionText ? SR.Format(SR.AssumptionFailed_Cnd, conditionText) : SR.AssumptionFailed;
-
- case ContractFailureKind.Precondition:
- return hasConditionText ? SR.Format(SR.PreconditionFailed_Cnd, conditionText) : SR.PreconditionFailed;
-
- case ContractFailureKind.Postcondition:
- return hasConditionText ? SR.Format(SR.PostconditionFailed_Cnd, conditionText) : SR.PostconditionFailed;
-
- case ContractFailureKind.Invariant:
- return hasConditionText ? SR.Format(SR.InvariantFailed_Cnd, conditionText) : SR.InvariantFailed;
-
- case ContractFailureKind.PostconditionOnException:
- return hasConditionText ? SR.Format(SR.PostconditionOnExceptionFailed_Cnd, conditionText) : SR.PostconditionOnExceptionFailed;
-
- default:
- Contract.Assume(false, "Unreachable code");
- return SR.AssumptionFailed;
- }
- }
-
- private static string GetDisplayMessage(ContractFailureKind failureKind, string? userMessage, string? conditionText)
- {
- string failureMessage;
- // Well-formatted English messages will take one of four forms. A sentence ending in
- // either a period or a colon, the condition string, then the message tacked
- // on to the end with two spaces in front.
- // Note that both the conditionText and userMessage may be null. Also,
- // on Silverlight we may not be able to look up a friendly string for the
- // error message. Let's leverage Silverlight's default error message there.
- if (!string.IsNullOrEmpty(conditionText))
- {
- failureMessage = GetFailureMessage(failureKind, conditionText);
- }
- else
- {
- failureMessage = "";
- }
-
- // Now add in the user message, if present.
- if (!string.IsNullOrEmpty(userMessage))
- {
- return failureMessage + " " + userMessage;
- }
- else
- {
- return failureMessage;
- }
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CustomConstantAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CustomConstantAttribute.cs
deleted file mode 100644
index f3db0a276b5..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/CustomConstantAttribute.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter, Inherited = false)]
- public abstract class CustomConstantAttribute : Attribute
- {
- public abstract object? Value { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/DateTimeConstantAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/DateTimeConstantAttribute.cs
deleted file mode 100644
index 315e9e3b938..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/DateTimeConstantAttribute.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter, Inherited = false)]
- public sealed class DateTimeConstantAttribute : CustomConstantAttribute
- {
- private readonly DateTime _date;
-
- public DateTimeConstantAttribute(long ticks)
- {
- _date = new DateTime(ticks);
- }
-
-#pragma warning disable CS8608
- public override object Value => _date;
-#pragma warning restore CS8608
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/DecimalConstantAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/DecimalConstantAttribute.cs
deleted file mode 100644
index 7aea9e6cc78..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/DecimalConstantAttribute.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-// 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.
-
-// Note: If you add a new ctor overloads you need to update ParameterInfo.RawDefaultValue
-
-namespace System.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter, Inherited = false)]
- public sealed class DecimalConstantAttribute : Attribute
- {
- private readonly decimal _dec;
-
- [CLSCompliant(false)]
- public DecimalConstantAttribute(
- byte scale,
- byte sign,
- uint hi,
- uint mid,
- uint low
- )
- {
- _dec = new decimal((int)low, (int)mid, (int)hi, sign != 0, scale);
- }
-
- public DecimalConstantAttribute(
- byte scale,
- byte sign,
- int hi,
- int mid,
- int low
- )
- {
- _dec = new decimal(low, mid, hi, sign != 0, scale);
- }
-
- public decimal Value => _dec;
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/DefaultDependencyAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/DefaultDependencyAttribute.cs
deleted file mode 100644
index 31abdcbb3ec..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/DefaultDependencyAttribute.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Assembly)]
- public sealed class DefaultDependencyAttribute : Attribute
- {
- public DefaultDependencyAttribute(LoadHint loadHintArgument)
- {
- LoadHint = loadHintArgument;
- }
-
- public LoadHint LoadHint { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/DependencyAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/DependencyAttribute.cs
deleted file mode 100644
index 5b589fbde82..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/DependencyAttribute.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true)]
- public sealed class DependencyAttribute : Attribute
- {
- public DependencyAttribute(string dependentAssemblyArgument, LoadHint loadHintArgument)
- {
- DependentAssembly = dependentAssemblyArgument;
- LoadHint = loadHintArgument;
- }
-
- public string DependentAssembly { get; }
- public LoadHint LoadHint { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/DisablePrivateReflectionAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/DisablePrivateReflectionAttribute.cs
deleted file mode 100644
index dfe4a98a949..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/DisablePrivateReflectionAttribute.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false, Inherited = false)]
- public sealed class DisablePrivateReflectionAttribute : Attribute
- {
- public DisablePrivateReflectionAttribute() { }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/DiscardableAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/DiscardableAttribute.cs
deleted file mode 100644
index 4a860b15878..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/DiscardableAttribute.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- // Custom attribute to indicating a TypeDef is a discardable attribute.
- [AttributeUsage(AttributeTargets.All)]
- public class DiscardableAttribute : Attribute
- {
- public DiscardableAttribute() { }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ExtensionAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ExtensionAttribute.cs
deleted file mode 100644
index d971d633ef3..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ExtensionAttribute.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- /// <summary>
- /// Indicates that a method is an extension method, or that a class or assembly contains extension methods.
- /// </summary>
- [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Assembly)]
- public sealed class ExtensionAttribute : Attribute { }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/FixedAddressValueTypeAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/FixedAddressValueTypeAttribute.cs
deleted file mode 100644
index 1810340f545..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/FixedAddressValueTypeAttribute.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Field)]
- public sealed class FixedAddressValueTypeAttribute : Attribute
- {
- public FixedAddressValueTypeAttribute() { }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/FixedBufferAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/FixedBufferAttribute.cs
deleted file mode 100644
index 2215606c19d..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/FixedBufferAttribute.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-// 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.
-
-/*============================================================
-**
-**
-** Purpose: Used by a compiler for generating value types
-** in-place within other value types containing a certain
-** number of elements of the given (primitive) type. Somewhat
-** similar to P/Invoke's ByValTStr attribute.
-** Used by C# with this syntax: "fixed int buffer[10];"
-**
-===========================================================*/
-
-namespace System.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Field, Inherited = false)]
- public sealed class FixedBufferAttribute : Attribute
- {
- public FixedBufferAttribute(Type elementType, int length)
- {
- ElementType = elementType;
- Length = length;
- }
-
- public Type ElementType { get; }
- public int Length { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/FormattableStringFactory.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/FormattableStringFactory.cs
deleted file mode 100644
index c08ebaee061..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/FormattableStringFactory.cs
+++ /dev/null
@@ -1,58 +0,0 @@
-// 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.
-
-/*============================================================
-**
-**
-**
-** Purpose: implementation of the FormattableStringFactory
-** class.
-**
-===========================================================*/
-
-namespace System.Runtime.CompilerServices
-{
- /// <summary>
- /// A factory type used by compilers to create instances of the type <see cref="FormattableString"/>.
- /// </summary>
- public static class FormattableStringFactory
- {
- /// <summary>
- /// Create a <see cref="FormattableString"/> from a composite format string and object
- /// array containing zero or more objects to format.
- /// </summary>
- public static FormattableString Create(string format, params object?[] arguments)
- {
- if (format == null)
- {
- throw new ArgumentNullException(nameof(format));
- }
-
- if (arguments == null)
- {
- throw new ArgumentNullException(nameof(arguments));
- }
-
- return new ConcreteFormattableString(format, arguments);
- }
-
- private sealed class ConcreteFormattableString : FormattableString
- {
- private readonly string _format;
- private readonly object?[] _arguments;
-
- internal ConcreteFormattableString(string format, object?[] arguments)
- {
- _format = format;
- _arguments = arguments;
- }
-
- public override string Format => _format;
- public override object?[] GetArguments() { return _arguments; }
- public override int ArgumentCount => _arguments.Length;
- public override object? GetArgument(int index) { return _arguments[index]; }
- public override string ToString(IFormatProvider? formatProvider) { return string.Format(formatProvider, _format, _arguments); }
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IAsyncStateMachine.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IAsyncStateMachine.cs
deleted file mode 100644
index 7fb7ea53952..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IAsyncStateMachine.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-// 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.
-
-// =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
-//
-//
-//
-// Represents state machines generated for asynchronous methods.
-//
-// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-
-namespace System.Runtime.CompilerServices
-{
- /// <summary>
- /// Represents state machines generated for asynchronous methods.
- /// This type is intended for compiler use only.
- /// </summary>
- public interface IAsyncStateMachine
- {
- /// <summary>Moves the state machine to its next state.</summary>
- void MoveNext();
- /// <summary>Configures the state machine with a heap-allocated replica.</summary>
- /// <param name="stateMachine">The heap-allocated replica.</param>
- void SetStateMachine(IAsyncStateMachine stateMachine);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IAsyncStateMachineBox.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IAsyncStateMachineBox.cs
deleted file mode 100644
index bb09d35dd7d..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IAsyncStateMachineBox.cs
+++ /dev/null
@@ -1,24 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- /// <summary>
- /// An interface implemented by all <see cref="AsyncTaskMethodBuilder{TResult}.AsyncStateMachineBox{TStateMachine}"/> instances, regardless of generics.
- /// </summary>
- internal interface IAsyncStateMachineBox
- {
- /// <summary>Move the state machine forward.</summary>
- void MoveNext();
-
- /// <summary>
- /// Gets an action for moving forward the contained state machine.
- /// This will lazily-allocate the delegate as needed.
- /// </summary>
- Action MoveNextAction { get; }
-
- /// <summary>Gets the state machine as a boxed object. This should only be used for debugging purposes.</summary>
- IAsyncStateMachine GetStateMachineObject();
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ICastable.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ICastable.cs
deleted file mode 100644
index 7320c2d0840..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ICastable.cs
+++ /dev/null
@@ -1,61 +0,0 @@
-// 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.Diagnostics.CodeAnalysis;
-
-namespace System.Runtime.CompilerServices
-{
- /// <summary>
- /// Support for dynamic interface casting. Specifically implementing this interface on a type will allow the
- /// type to support interfaces (for the purposes of casting and interface dispatch) that do not appear in its
- /// interface map.
- /// </summary>
- public interface ICastable
- {
- // This is called if casting this object to the given interface type would otherwise fail. Casting
- // here means the IL isinst and castclass instructions in the case where they are given an interface
- // type as the target type.
- //
- // A return value of true indicates the cast is valid.
- //
- // If false is returned when this is called as part of a castclass then the usual InvalidCastException
- // will be thrown unless an alternate exception is assigned to the castError output parameter. This
- // parameter is ignored on successful casts or during the evaluation of an isinst (which returns null
- // rather than throwing on error).
- //
- // No exception should be thrown from this method (it will cause unpredictable effects, including the
- // possibility of an immediate failfast).
- //
- // The results of this call are not cached, so it is advisable to provide a performant implementation.
- //
- // The results of this call should be invariant for the same class, interface type pair. That is
- // because this is the only guard placed before an interface invocation at runtime. If a type decides
- // it no longer wants to implement a given interface it has no way to synchronize with callers that
- // have already cached this relationship and can invoke directly via the interface pointer.
- bool IsInstanceOfInterface(RuntimeTypeHandle interfaceType, [NotNullWhen(true)] out Exception? castError);
-
- // This is called as part of the interface dispatch mechanism when the dispatcher logic cannot find
- // the given interface type in the interface map of this object.
- //
- // It allows the implementor to return an alternate class type which does implement the interface. The
- // interface lookup shall be performed again on this type (failure to find the interface this time
- // resulting in a fail fast) and the corresponding implemented method on that class called instead.
- //
- // Naturally, since the call is dispatched to a method on a class which does not match the type of the
- // this pointer, extreme care must be taken in the implementation of the interface methods of this
- // surrogate type.
- //
- // No exception should be thrown from this method (it will cause unpredictable effects, including the
- // possibility of an immediate failfast).
- //
- // There is no error path defined here. By construction all interface dispatches will already have
- // been verified via the castclass/isinst mechanism (and thus a call to IsInstanceOfInterface above)
- // so this method is expected to succeed in all cases. The contract for interface dispatch does not
- // include any errors from the infrastructure, of which this is a part.
- //
- // The results of this lookup are cached so computation of the result is not as perf-sensitive as
- // IsInstanceOfInterface.
- RuntimeTypeHandle GetImplType(RuntimeTypeHandle interfaceType);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/INotifyCompletion.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/INotifyCompletion.cs
deleted file mode 100644
index 24f4f45cbea..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/INotifyCompletion.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-// 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.
-
-// =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=
-//
-//
-//
-// Interfaces used to represent instances that notify listeners of their completion via continuations.
-// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
-
-namespace System.Runtime.CompilerServices
-{
- /// <summary>
- /// Represents an operation that will schedule continuations when the operation completes.
- /// </summary>
- public interface INotifyCompletion
- {
- /// <summary>Schedules the continuation action to be invoked when the instance completes.</summary>
- /// <param name="continuation">The action to invoke when the operation completes.</param>
- /// <exception cref="System.ArgumentNullException">The <paramref name="continuation"/> argument is null (Nothing in Visual Basic).</exception>
- void OnCompleted(Action continuation);
- }
-
- /// <summary>
- /// Represents an awaiter used to schedule continuations when an await operation completes.
- /// </summary>
- public interface ICriticalNotifyCompletion : INotifyCompletion
- {
- /// <summary>Schedules the continuation action to be invoked when the instance completes.</summary>
- /// <param name="continuation">The action to invoke when the operation completes.</param>
- /// <exception cref="System.ArgumentNullException">The <paramref name="continuation"/> argument is null (Nothing in Visual Basic).</exception>
- /// <remarks>Unlike OnCompleted, UnsafeOnCompleted need not propagate ExecutionContext information.</remarks>
- void UnsafeOnCompleted(Action continuation);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ITuple.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ITuple.cs
deleted file mode 100644
index 55b948b3e37..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ITuple.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- /// <summary>
- /// This interface is required for types that want to be indexed into by dynamic patterns.
- /// </summary>
- public interface ITuple
- {
- /// <summary>
- /// The number of positions in this data structure.
- /// </summary>
- int Length { get; }
-
- /// <summary>
- /// Get the element at position <param name="index"/>.
- /// </summary>
- object? this[int index] { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IndexerNameAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IndexerNameAttribute.cs
deleted file mode 100644
index bc76250adc8..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IndexerNameAttribute.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Property, Inherited = true)]
- public sealed class IndexerNameAttribute : Attribute
- {
- public IndexerNameAttribute(string indexerName)
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/InternalsVisibleToAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/InternalsVisibleToAttribute.cs
deleted file mode 100644
index 0967b96c1b2..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/InternalsVisibleToAttribute.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)]
- public sealed class InternalsVisibleToAttribute : Attribute
- {
- public InternalsVisibleToAttribute(string assemblyName)
- {
- AssemblyName = assemblyName;
- }
-
- public string AssemblyName { get; }
- public bool AllInternalsVisible { get; set; } = true;
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IntrinsicAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IntrinsicAttribute.cs
deleted file mode 100644
index 6bdd91d8448..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IntrinsicAttribute.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- // Calls to methods or references to fields marked with this attribute may be replaced at
- // some call sites with jit intrinsic expansions.
- // Types marked with this attribute may be specially treated by the runtime/compiler.
- [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Field, Inherited = false)]
- internal sealed class IntrinsicAttribute : Attribute
- {
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IsByRefLikeAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IsByRefLikeAttribute.cs
deleted file mode 100644
index 90e49d2a425..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IsByRefLikeAttribute.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// 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.ComponentModel;
-
-namespace System.Runtime.CompilerServices
-{
- /// <summary>
- /// Reserved to be used by the compiler for tracking metadata.
- /// This attribute should not be used by developers in source code.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- [AttributeUsage(AttributeTargets.Struct)]
- public sealed class IsByRefLikeAttribute : Attribute
- {
- public IsByRefLikeAttribute()
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IsConst.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IsConst.cs
deleted file mode 100644
index 7f948b608a1..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IsConst.cs
+++ /dev/null
@@ -1,10 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- public static partial class IsConst
- {
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IsReadOnlyAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IsReadOnlyAttribute.cs
deleted file mode 100644
index 657df43957f..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IsReadOnlyAttribute.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// 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.ComponentModel;
-
-namespace System.Runtime.CompilerServices
-{
- /// <summary>
- /// Reserved to be used by the compiler for tracking metadata.
- /// This attribute should not be used by developers in source code.
- /// </summary>
- [EditorBrowsable(EditorBrowsableState.Never)]
- [AttributeUsage(AttributeTargets.All, Inherited = false)]
- public sealed class IsReadOnlyAttribute : Attribute
- {
- public IsReadOnlyAttribute()
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IsVolatile.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IsVolatile.cs
deleted file mode 100644
index 58aaebc8d1a..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IsVolatile.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- public static class IsVolatile
- {
- // no instantiation, please!
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IteratorStateMachineAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IteratorStateMachineAttribute.cs
deleted file mode 100644
index 53afc956643..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/IteratorStateMachineAttribute.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)]
- public sealed class IteratorStateMachineAttribute : StateMachineAttribute
- {
- public IteratorStateMachineAttribute(Type stateMachineType)
- : base(stateMachineType)
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/LoadHint.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/LoadHint.cs
deleted file mode 100644
index fa490c2c9bb..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/LoadHint.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- public enum LoadHint
- {
- Default = 0x0000, // No preference specified
- Always = 0x0001, // Dependency is always loaded
- Sometimes = 0x0002, // Dependency is sometimes loaded
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/MethodCodeType.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/MethodCodeType.cs
deleted file mode 100644
index 841b6661989..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/MethodCodeType.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-// 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.Reflection;
-
-namespace System.Runtime.CompilerServices
-{
- public enum MethodCodeType
- {
- IL = MethodImplAttributes.IL,
- Native = MethodImplAttributes.Native,
- OPTIL = MethodImplAttributes.OPTIL,
- Runtime = MethodImplAttributes.Runtime
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/MethodImplAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/MethodImplAttribute.cs
deleted file mode 100644
index 18900b37bea..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/MethodImplAttribute.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- // Custom attribute to specify additional method properties.
- [AttributeUsage(AttributeTargets.Method | AttributeTargets.Constructor, Inherited = false)]
- public sealed class MethodImplAttribute : Attribute
- {
- public MethodCodeType MethodCodeType;
-
- public MethodImplAttribute(MethodImplOptions methodImplOptions)
- {
- Value = methodImplOptions;
- }
-
- public MethodImplAttribute(short value)
- {
- Value = (MethodImplOptions)value;
- }
-
- public MethodImplAttribute()
- {
- }
-
- public MethodImplOptions Value { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/MethodImplOptions.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/MethodImplOptions.cs
deleted file mode 100644
index 27757683511..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/MethodImplOptions.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- // This Enum matchs the miImpl flags defined in corhdr.h. It is used to specify
- // certain method properties.
- [Flags]
- public enum MethodImplOptions
- {
- Unmanaged = 0x0004,
- NoInlining = 0x0008,
- ForwardRef = 0x0010,
- Synchronized = 0x0020,
- NoOptimization = 0x0040,
- PreserveSig = 0x0080,
- AggressiveInlining = 0x0100,
- AggressiveOptimization = 0x0200,
- InternalCall = 0x1000
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/PreserveDependencyAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/PreserveDependencyAttribute.cs
deleted file mode 100644
index de14ff35e04..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/PreserveDependencyAttribute.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-// 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.
-
-#nullable enable
-
-// TODO https://github.com/dotnet/corefx/issues/41201: Design and expose this publicly.
-
-namespace System.Runtime.CompilerServices
-{
- /// <summary>States a dependency that one member has on another.</summary>
- /// <remarks>
- /// This can be used to inform tooling of a dependency that is otherwise not evident purely from
- /// metadata and IL, for example a member relied on via reflection.
- /// </remarks>
- [AttributeUsage(
- AttributeTargets.Method | AttributeTargets.Constructor | AttributeTargets.Field /* AttributeTargets.Class | AttributeTargets.Struct */, // TODO: https://github.com/mono/linker/issues/797
- AllowMultiple = true, Inherited = false)]
- internal sealed class PreserveDependencyAttribute : Attribute
- {
- /// <summary>Initializes the attribute.</summary>
- /// <param name="memberSignature">The signature of the member depended.</param>
- public PreserveDependencyAttribute(string memberSignature)
- {
- MemberSignature = memberSignature;
- }
-
- /// <summary>Initializes the attribute.</summary>
- /// <param name="memberSignature">The signature of the member depended on.</param>
- /// <param name="typeName">The full name of the type containing <paramref name="memberSignature"/>.</param>
- public PreserveDependencyAttribute(string memberSignature, string typeName)
- {
- MemberSignature = memberSignature;
- TypeName = typeName;
- }
-
- /// <summary>Initializes the attribute.</summary>
- /// <param name="memberSignature">The signature of the member depended on.</param>
- /// <param name="typeName">The full name of the type containing <paramref name="memberSignature"/>.</param>
- /// <param name="assemblyName">The name of the assembly containing <paramref name="typeName"/>.</param>
- public PreserveDependencyAttribute(string memberSignature, string typeName, string assemblyName)
- {
- MemberSignature = memberSignature;
- TypeName = typeName;
- AssemblyName = assemblyName;
- }
-
- /// <summary>Gets the signature of the member depended on.</summary>
- public string MemberSignature { get; }
-
- /// <summary>Gets the full name of the type containing the specified member.</summary>
- /// <remarks>If no type name is specified, the type of the consumer is assumed.</remarks>
- public string? TypeName { get; }
-
- /// <summary>Gets the assembly name of the specified type.</summary>
- /// <remarks>If no assembly name is specified, the assembly of the consumer is assumed.</remarks>
- public string? AssemblyName { get; }
-
- /// <summary>Gets or sets the condition in which the dependency is applicable, e.g. "DEBUG".</summary>
- public string? Condition { get; set; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ReferenceAssemblyAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ReferenceAssemblyAttribute.cs
deleted file mode 100644
index e2c7cb47b4f..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ReferenceAssemblyAttribute.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-// 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.
-
-/*============================================================
-**
-** Attribute: ReferenceAssemblyAttribute
-**
-** Purpose: Identifies an assembly as being a "reference
-** assembly", meaning it contains public surface area but
-** no usable implementation. Reference assemblies
-** should be loadable for introspection, but not execution.
-**
-============================================================*/
-
-namespace System.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)]
- public sealed class ReferenceAssemblyAttribute : Attribute
- {
- public ReferenceAssemblyAttribute()
- {
- }
-
- public ReferenceAssemblyAttribute(string? description)
- {
- Description = description;
- }
-
- public string? Description { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/RuntimeCompatibilityAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/RuntimeCompatibilityAttribute.cs
deleted file mode 100644
index 609c5603300..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/RuntimeCompatibilityAttribute.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-// 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.
-
-/*=============================================================================
-**
-**
-**
-** Purpose: Mark up the program to indicate various legacy or new opt-in behaviors.
-**
-**
-=============================================================================*/
-
-namespace System.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Assembly, Inherited = false, AllowMultiple = false)]
- public sealed class RuntimeCompatibilityAttribute : Attribute
- {
- public RuntimeCompatibilityAttribute()
- {
- // legacy behavior is the default, and WrapNonExceptionThrows is implicitly
- // false thanks to the CLR's guarantee of zeroed memory.
- }
-
- // If a non-CLSCompliant exception (i.e. one that doesn't derive from System.Exception) is
- // thrown, should it be wrapped up in a System.Runtime.CompilerServices.RuntimeWrappedException
- // instance when presented to catch handlers?
- public bool WrapNonExceptionThrows { get; set; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/RuntimeFeature.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/RuntimeFeature.cs
deleted file mode 100644
index b0cd9ddce26..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/RuntimeFeature.cs
+++ /dev/null
@@ -1,42 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- public static partial class RuntimeFeature
- {
- /// <summary>
- /// Name of the Portable PDB feature.
- /// </summary>
- public const string PortablePdb = nameof(PortablePdb);
-
-#if FEATURE_DEFAULT_INTERFACES
- /// <summary>
- /// Indicates that this version of runtime supports default interface method implementations.
- /// </summary>
- public const string DefaultImplementationsOfInterfaces = nameof(DefaultImplementationsOfInterfaces);
-#endif
-
- /// <summary>
- /// Checks whether a certain feature is supported by the Runtime.
- /// </summary>
- public static bool IsSupported(string feature)
- {
- switch (feature)
- {
- case PortablePdb:
-#if FEATURE_DEFAULT_INTERFACES
- case DefaultImplementationsOfInterfaces:
-#endif
- return true;
- case nameof(IsDynamicCodeSupported):
- return IsDynamicCodeSupported;
- case nameof(IsDynamicCodeCompiled):
- return IsDynamicCodeCompiled;
- }
-
- return false;
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/RuntimeHelpers.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/RuntimeHelpers.cs
deleted file mode 100644
index cd2971f0350..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/RuntimeHelpers.cs
+++ /dev/null
@@ -1,109 +0,0 @@
-// 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.Serialization;
-using System.Reflection;
-using Internal.Runtime.CompilerServices;
-
-namespace System.Runtime.CompilerServices
-{
- public static partial class RuntimeHelpers
- {
- public delegate void TryCode(object? userData);
-
- public delegate void CleanupCode(object? userData, bool exceptionThrown);
-
- /// <summary>
- /// Slices the specified array using the specified range.
- /// </summary>
- public static T[] GetSubArray<T>(T[] array, Range range)
- {
- if (array == null)
- {
- ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
- }
-
- (int offset, int length) = range.GetOffsetAndLength(array.Length);
-
- if (default(T)! != null || typeof(T[]) == array.GetType()) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757)
- {
- // We know the type of the array to be exactly T[].
-
- if (length == 0)
- {
- return Array.Empty<T>();
- }
-
- var dest = new T[length];
- Buffer.Memmove(
- ref Unsafe.As<byte, T>(ref dest.GetRawSzArrayData()),
- ref Unsafe.Add(ref Unsafe.As<byte, T>(ref array.GetRawSzArrayData()), offset),
- (uint)length);
- return dest;
- }
- else
- {
- // The array is actually a U[] where U:T.
- T[] dest = (T[])Array.CreateInstance(array.GetType().GetElementType()!, length);
- Array.Copy(array, offset, dest, 0, length);
- return dest;
- }
- }
-
- public static object GetUninitializedObject(Type type)
- {
- if (type is null)
- {
- throw new ArgumentNullException(nameof(type), SR.ArgumentNull_Type);
- }
-
- if (!type.IsRuntimeImplemented())
- {
- throw new SerializationException(SR.Format(SR.Serialization_InvalidType, type.ToString()));
- }
-
- return GetUninitializedObjectInternal(type);
- }
-
- public static void ExecuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, object? userData)
- {
- if (code == null)
- throw new ArgumentNullException(nameof(code));
- if (backoutCode == null)
- throw new ArgumentNullException(nameof(backoutCode));
-
- bool exceptionThrown = true;
-
- try
- {
- code(userData);
- exceptionThrown = false;
- }
- finally
- {
- backoutCode(userData, exceptionThrown);
- }
- }
-
- public static void PrepareContractedDelegate(Delegate d)
- {
- }
-
- public static void ProbeForSufficientStack()
- {
- }
-
- public static void PrepareConstrainedRegions()
- {
- }
-
- public static void PrepareConstrainedRegionsNoOP()
- {
- }
-
- internal static bool IsPrimitiveType(this CorElementType et)
- // COR_ELEMENT_TYPE_I1,I2,I4,I8,U1,U2,U4,U8,R4,R8,I,U,CHAR,BOOLEAN
- => ((1 << (int)et) & 0b_0011_0000_0000_0011_1111_1111_1100) != 0;
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/RuntimeWrappedException.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/RuntimeWrappedException.cs
deleted file mode 100644
index 65fd6d24e64..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/RuntimeWrappedException.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-// 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.Serialization;
-
-namespace System.Runtime.CompilerServices
-{
- /// <summary>
- /// Exception used to wrap all non-CLS compliant exceptions.
- /// </summary>
- [Serializable]
- [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
- public sealed class RuntimeWrappedException : Exception
- {
- private object _wrappedException; // EE expects this name
-
- // Not an api but has to be public as System.Linq.Expression invokes this through Reflection when an expression
- // throws an object that doesn't derive from Exception.
- public RuntimeWrappedException(object thrownObject)
- : base(SR.RuntimeWrappedException)
- {
- HResult = HResults.COR_E_RUNTIMEWRAPPED;
- _wrappedException = thrownObject;
- }
-
- private RuntimeWrappedException(SerializationInfo info, StreamingContext context)
- : base(info, context)
- {
- _wrappedException = info.GetValue("WrappedException", typeof(object))!;
- }
-
- public override void GetObjectData(SerializationInfo info, StreamingContext context)
- {
- base.GetObjectData(info, context);
- info.AddValue("WrappedException", _wrappedException, typeof(object));
- }
-
- public object WrappedException => _wrappedException;
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/SpecialNameAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/SpecialNameAttribute.cs
deleted file mode 100644
index 4cd78621cb5..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/SpecialNameAttribute.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Class | AttributeTargets.Method | AttributeTargets.Property | AttributeTargets.Field | AttributeTargets.Event | AttributeTargets.Struct)]
- public sealed class SpecialNameAttribute : Attribute
- {
- public SpecialNameAttribute() { }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/StateMachineAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/StateMachineAttribute.cs
deleted file mode 100644
index d3522f5c470..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/StateMachineAttribute.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Method, Inherited = false, AllowMultiple = false)]
- public class StateMachineAttribute : Attribute
- {
- public StateMachineAttribute(Type stateMachineType)
- {
- StateMachineType = stateMachineType;
- }
-
- public Type StateMachineType { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/StringFreezingAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/StringFreezingAttribute.cs
deleted file mode 100644
index 9d73197de42..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/StringFreezingAttribute.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- // Custom attribute to indicate that strings should be frozen.
-
- [AttributeUsage(AttributeTargets.Assembly, Inherited = false)]
- public sealed class StringFreezingAttribute : Attribute
- {
- public StringFreezingAttribute() { }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/StrongBox.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/StrongBox.cs
deleted file mode 100644
index bdee5189b3c..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/StrongBox.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-// 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.Diagnostics.CodeAnalysis;
-
-namespace System.Runtime.CompilerServices
-{
- /// <summary>
- /// Holds a reference to a value.
- /// </summary>
- /// <typeparam name="T">The type of the value that the <see cref = "StrongBox{T}"></see> references.</typeparam>
- public class StrongBox<T> : IStrongBox
- {
- /// <summary>
- /// Gets the strongly typed value associated with the <see cref = "StrongBox{T}"></see>
- /// <remarks>This is explicitly exposed as a field instead of a property to enable loading the address of the field.</remarks>
- /// </summary>
- [MaybeNull] public T Value = default!;
-
- /// <summary>
- /// Initializes a new StrongBox which can receive a value when used in a reference call.
- /// </summary>
- public StrongBox()
- {
- }
-
- /// <summary>
- /// Initializes a new <see cref = "StrongBox{T}"></see> with the specified value.
- /// </summary>
- /// <param name="value">A value that the <see cref = "StrongBox{T}"></see> will reference.</param>
- public StrongBox(T value)
- {
- Value = value;
- }
-
- object? IStrongBox.Value
- {
- get => Value;
- set => Value = (T)value!;
- }
- }
-
- /// <summary>
- /// Defines a property for accessing the value that an object references.
- /// </summary>
- public interface IStrongBox
- {
- /// <summary>
- /// Gets or sets the value the object references.
- /// </summary>
- object? Value { get; set; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/SuppressIldasmAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/SuppressIldasmAttribute.cs
deleted file mode 100644
index e9abf134be9..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/SuppressIldasmAttribute.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Module)]
- public sealed class SuppressIldasmAttribute : Attribute
- {
- public SuppressIldasmAttribute() { }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/TaskAwaiter.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/TaskAwaiter.cs
deleted file mode 100644
index f1c5b07071a..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/TaskAwaiter.cs
+++ /dev/null
@@ -1,556 +0,0 @@
-// 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.
-
-// =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
-//
-//
-//
-// Types for awaiting Task and Task<T>. These types are emitted from Task{<T>}.GetAwaiter
-// and Task{<T>}.ConfigureAwait. They are meant to be used only by the compiler, e.g.
-//
-// await nonGenericTask;
-// =====================
-// var $awaiter = nonGenericTask.GetAwaiter();
-// if (!$awaiter.IsCompleted)
-// {
-// SPILL:
-// $builder.AwaitUnsafeOnCompleted(ref $awaiter, ref this);
-// return;
-// Label:
-// UNSPILL;
-// }
-// $awaiter.GetResult();
-//
-// result += await genericTask.ConfigureAwait(false);
-// ===================================================================================
-// var $awaiter = genericTask.ConfigureAwait(false).GetAwaiter();
-// if (!$awaiter.IsCompleted)
-// {
-// SPILL;
-// $builder.AwaitUnsafeOnCompleted(ref $awaiter, ref this);
-// return;
-// Label:
-// UNSPILL;
-// }
-// result += $awaiter.GetResult();
-//
-// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-
-using System.Collections.ObjectModel;
-using System.Diagnostics;
-using System.Diagnostics.Tracing;
-using System.Runtime.ExceptionServices;
-using System.Threading;
-using System.Threading.Tasks;
-
-// NOTE: For performance reasons, initialization is not verified. If a developer
-// incorrectly initializes a task awaiter, which should only be done by the compiler,
-// NullReferenceExceptions may be generated (the alternative would be for us to detect
-// this case and then throw a different exception instead). This is the same tradeoff
-// that's made with other compiler-focused value types like List<T>.Enumerator.
-
-namespace System.Runtime.CompilerServices
-{
- /// <summary>Provides an awaiter for awaiting a <see cref="System.Threading.Tasks.Task"/>.</summary>
- /// <remarks>This type is intended for compiler use only.</remarks>
- public readonly struct TaskAwaiter : ICriticalNotifyCompletion, ITaskAwaiter
- {
- // WARNING: Unsafe.As is used to access the generic TaskAwaiter<> as TaskAwaiter.
- // Its layout must remain the same.
-
- /// <summary>The task being awaited.</summary>
- internal readonly Task m_task;
-
- /// <summary>Initializes the <see cref="TaskAwaiter"/>.</summary>
- /// <param name="task">The <see cref="System.Threading.Tasks.Task"/> to be awaited.</param>
- internal TaskAwaiter(Task task)
- {
- Debug.Assert(task != null, "Constructing an awaiter requires a task to await.");
- m_task = task;
- }
-
- /// <summary>Gets whether the task being awaited is completed.</summary>
- /// <remarks>This property is intended for compiler user rather than use directly in code.</remarks>
- /// <exception cref="System.NullReferenceException">The awaiter was not properly initialized.</exception>
- public bool IsCompleted => m_task.IsCompleted;
-
- /// <summary>Schedules the continuation onto the <see cref="System.Threading.Tasks.Task"/> associated with this <see cref="TaskAwaiter"/>.</summary>
- /// <param name="continuation">The action to invoke when the await operation completes.</param>
- /// <exception cref="System.ArgumentNullException">The <paramref name="continuation"/> argument is null (Nothing in Visual Basic).</exception>
- /// <exception cref="System.InvalidOperationException">The awaiter was not properly initialized.</exception>
- /// <remarks>This method is intended for compiler user rather than use directly in code.</remarks>
- public void OnCompleted(Action continuation)
- {
- OnCompletedInternal(m_task, continuation, continueOnCapturedContext: true, flowExecutionContext: true);
- }
-
- /// <summary>Schedules the continuation onto the <see cref="System.Threading.Tasks.Task"/> associated with this <see cref="TaskAwaiter"/>.</summary>
- /// <param name="continuation">The action to invoke when the await operation completes.</param>
- /// <exception cref="System.ArgumentNullException">The <paramref name="continuation"/> argument is null (Nothing in Visual Basic).</exception>
- /// <exception cref="System.InvalidOperationException">The awaiter was not properly initialized.</exception>
- /// <remarks>This method is intended for compiler user rather than use directly in code.</remarks>
- public void UnsafeOnCompleted(Action continuation)
- {
- OnCompletedInternal(m_task, continuation, continueOnCapturedContext: true, flowExecutionContext: false);
- }
-
- /// <summary>Ends the await on the completed <see cref="System.Threading.Tasks.Task"/>.</summary>
- /// <exception cref="System.NullReferenceException">The awaiter was not properly initialized.</exception>
- /// <exception cref="System.Threading.Tasks.TaskCanceledException">The task was canceled.</exception>
- /// <exception cref="System.Exception">The task completed in a Faulted state.</exception>
- [StackTraceHidden]
- public void GetResult()
- {
- ValidateEnd(m_task);
- }
-
- /// <summary>
- /// Fast checks for the end of an await operation to determine whether more needs to be done
- /// prior to completing the await.
- /// </summary>
- /// <param name="task">The awaited task.</param>
- [StackTraceHidden]
- internal static void ValidateEnd(Task task)
- {
- // Fast checks that can be inlined.
- if (task.IsWaitNotificationEnabledOrNotRanToCompletion)
- {
- // If either the end await bit is set or we're not completed successfully,
- // fall back to the slower path.
- HandleNonSuccessAndDebuggerNotification(task);
- }
- }
-
- /// <summary>
- /// Ensures the task is completed, triggers any necessary debugger breakpoints for completing
- /// the await on the task, and throws an exception if the task did not complete successfully.
- /// </summary>
- /// <param name="task">The awaited task.</param>
- [StackTraceHidden]
- private static void HandleNonSuccessAndDebuggerNotification(Task task)
- {
- // NOTE: The JIT refuses to inline ValidateEnd when it contains the contents
- // of HandleNonSuccessAndDebuggerNotification, hence the separation.
-
- // Synchronously wait for the task to complete. When used by the compiler,
- // the task will already be complete. This code exists only for direct GetResult use,
- // for cases where the same exception propagation semantics used by "await" are desired,
- // but where for one reason or another synchronous rather than asynchronous waiting is needed.
- if (!task.IsCompleted)
- {
- bool taskCompleted = task.InternalWait(Timeout.Infinite, default);
- Debug.Assert(taskCompleted, "With an infinite timeout, the task should have always completed.");
- }
-
- // Now that we're done, alert the debugger if so requested
- task.NotifyDebuggerOfWaitCompletionIfNecessary();
-
- // And throw an exception if the task is faulted or canceled.
- if (!task.IsCompletedSuccessfully) ThrowForNonSuccess(task);
- }
-
- /// <summary>Throws an exception to handle a task that completed in a state other than RanToCompletion.</summary>
- [StackTraceHidden]
- private static void ThrowForNonSuccess(Task task)
- {
- Debug.Assert(task.IsCompleted, "Task must have been completed by now.");
- Debug.Assert(task.Status != TaskStatus.RanToCompletion, "Task should not be completed successfully.");
-
- // Handle whether the task has been canceled or faulted
- switch (task.Status)
- {
- // If the task completed in a canceled state, throw an OperationCanceledException.
- // This will either be the OCE that actually caused the task to cancel, or it will be a new
- // TaskCanceledException. TCE derives from OCE, and by throwing it we automatically pick up the
- // completed task's CancellationToken if it has one, including that CT in the OCE.
- case TaskStatus.Canceled:
- ExceptionDispatchInfo? oceEdi = task.GetCancellationExceptionDispatchInfo();
- if (oceEdi != null)
- {
- oceEdi.Throw();
- Debug.Fail("Throw() should have thrown");
- }
- throw new TaskCanceledException(task);
-
- // If the task faulted, throw its first exception,
- // even if it contained more than one.
- case TaskStatus.Faulted:
- ReadOnlyCollection<ExceptionDispatchInfo> edis = task.GetExceptionDispatchInfos();
- if (edis.Count > 0)
- {
- edis[0].Throw();
- Debug.Fail("Throw() should have thrown");
- break; // Necessary to compile: non-reachable, but compiler can't determine that
- }
- else
- {
- Debug.Fail("There should be exceptions if we're Faulted.");
- throw task.Exception!;
- }
- }
- }
-
- /// <summary>Schedules the continuation onto the <see cref="System.Threading.Tasks.Task"/> associated with this <see cref="TaskAwaiter"/>.</summary>
- /// <param name="task">The task being awaited.</param>
- /// <param name="continuation">The action to invoke when the await operation completes.</param>
- /// <param name="continueOnCapturedContext">Whether to capture and marshal back to the current context.</param>
- /// <param name="flowExecutionContext">Whether to flow ExecutionContext across the await.</param>
- /// <exception cref="System.ArgumentNullException">The <paramref name="continuation"/> argument is null (Nothing in Visual Basic).</exception>
- /// <exception cref="System.NullReferenceException">The awaiter was not properly initialized.</exception>
- /// <remarks>This method is intended for compiler user rather than use directly in code.</remarks>
- internal static void OnCompletedInternal(Task task, Action continuation, bool continueOnCapturedContext, bool flowExecutionContext)
- {
- if (continuation == null) throw new ArgumentNullException(nameof(continuation));
-
- // If TaskWait* ETW events are enabled, trace a beginning event for this await
- // and set up an ending event to be traced when the asynchronous await completes.
- if (TplEventSource.Log.IsEnabled() || Task.s_asyncDebuggingEnabled)
- {
- continuation = OutputWaitEtwEvents(task, continuation);
- }
-
- // Set the continuation onto the awaited task.
- task.SetContinuationForAwait(continuation, continueOnCapturedContext, flowExecutionContext);
- }
-
- /// <summary>Schedules the continuation onto the <see cref="System.Threading.Tasks.Task"/> associated with this <see cref="TaskAwaiter"/>.</summary>
- /// <param name="task">The task being awaited.</param>
- /// <param name="stateMachineBox">The box to invoke when the await operation completes.</param>
- /// <param name="continueOnCapturedContext">Whether to capture and marshal back to the current context.</param>
- internal static void UnsafeOnCompletedInternal(Task task, IAsyncStateMachineBox stateMachineBox, bool continueOnCapturedContext)
- {
- Debug.Assert(stateMachineBox != null);
-
- // If TaskWait* ETW events are enabled, trace a beginning event for this await
- // and set up an ending event to be traced when the asynchronous await completes.
- if (TplEventSource.Log.IsEnabled() || Task.s_asyncDebuggingEnabled)
- {
- task.SetContinuationForAwait(OutputWaitEtwEvents(task, stateMachineBox.MoveNextAction), continueOnCapturedContext, flowExecutionContext: false);
- }
- else
- {
- task.UnsafeSetContinuationForAwait(stateMachineBox, continueOnCapturedContext);
- }
- }
-
- /// <summary>
- /// Outputs a WaitBegin ETW event, and augments the continuation action to output a WaitEnd ETW event.
- /// </summary>
- /// <param name="task">The task being awaited.</param>
- /// <param name="continuation">The action to invoke when the await operation completes.</param>
- /// <returns>The action to use as the actual continuation.</returns>
- private static Action OutputWaitEtwEvents(Task task, Action continuation)
- {
- Debug.Assert(task != null, "Need a task to wait on");
- Debug.Assert(continuation != null, "Need a continuation to invoke when the wait completes");
-
- if (Task.s_asyncDebuggingEnabled)
- {
- Task.AddToActiveTasks(task);
- }
-
- TplEventSource log = TplEventSource.Log;
-
- if (log.IsEnabled())
- {
- // ETW event for Task Wait Begin
- Task? currentTaskAtBegin = Task.InternalCurrent;
-
- // If this task's continuation is another task, get it.
- Task? continuationTask = AsyncMethodBuilderCore.TryGetContinuationTask(continuation);
- log.TaskWaitBegin(
- currentTaskAtBegin != null ? currentTaskAtBegin.m_taskScheduler!.Id : TaskScheduler.Default.Id,
- currentTaskAtBegin != null ? currentTaskAtBegin.Id : 0,
- task.Id, TplEventSource.TaskWaitBehavior.Asynchronous,
- continuationTask != null ? continuationTask.Id : 0);
- }
-
- // Create a continuation action that outputs the end event and then invokes the user
- // provided delegate. This incurs the allocations for the closure/delegate, but only if the event
- // is enabled, and in doing so it allows us to pass the awaited task's information into the end event
- // in a purely pay-for-play manner (the alternatively would be to increase the size of TaskAwaiter
- // just for this ETW purpose, not pay-for-play, since GetResult would need to know whether a real yield occurred).
- return AsyncMethodBuilderCore.CreateContinuationWrapper(continuation, (innerContinuation, innerTask) =>
- {
- if (Task.s_asyncDebuggingEnabled)
- {
- Task.RemoveFromActiveTasks(innerTask);
- }
-
- TplEventSource innerEtwLog = TplEventSource.Log;
-
- // ETW event for Task Wait End.
- Guid prevActivityId = default;
- bool bEtwLogEnabled = innerEtwLog.IsEnabled();
- if (bEtwLogEnabled)
- {
- Task? currentTaskAtEnd = Task.InternalCurrent;
- innerEtwLog.TaskWaitEnd(
- currentTaskAtEnd != null ? currentTaskAtEnd.m_taskScheduler!.Id : TaskScheduler.Default.Id,
- currentTaskAtEnd != null ? currentTaskAtEnd.Id : 0,
- innerTask.Id);
-
- // Ensure the continuation runs under the activity ID of the task that completed for the
- // case the antecedent is a promise (in the other cases this is already the case).
- if (innerEtwLog.TasksSetActivityIds && (innerTask.Options & (TaskCreationOptions)InternalTaskOptions.PromiseTask) != 0)
- EventSource.SetCurrentThreadActivityId(TplEventSource.CreateGuidForTaskID(innerTask.Id), out prevActivityId);
- }
-
- // Invoke the original continuation provided to OnCompleted.
- innerContinuation();
-
- if (bEtwLogEnabled)
- {
- innerEtwLog.TaskWaitContinuationComplete(innerTask.Id);
- if (innerEtwLog.TasksSetActivityIds && (innerTask.Options & (TaskCreationOptions)InternalTaskOptions.PromiseTask) != 0)
- EventSource.SetCurrentThreadActivityId(prevActivityId);
- }
- }, task);
- }
- }
-
- /// <summary>Provides an awaiter for awaiting a <see cref="System.Threading.Tasks.Task{TResult}"/>.</summary>
- /// <remarks>This type is intended for compiler use only.</remarks>
- public readonly struct TaskAwaiter<TResult> : ICriticalNotifyCompletion, ITaskAwaiter
- {
- // WARNING: Unsafe.As is used to access TaskAwaiter<> as the non-generic TaskAwaiter.
- // Its layout must remain the same.
-
- /// <summary>The task being awaited.</summary>
- private readonly Task<TResult> m_task;
-
- /// <summary>Initializes the <see cref="TaskAwaiter{TResult}"/>.</summary>
- /// <param name="task">The <see cref="System.Threading.Tasks.Task{TResult}"/> to be awaited.</param>
- internal TaskAwaiter(Task<TResult> task)
- {
- Debug.Assert(task != null, "Constructing an awaiter requires a task to await.");
- m_task = task;
- }
-
- /// <summary>Gets whether the task being awaited is completed.</summary>
- /// <remarks>This property is intended for compiler user rather than use directly in code.</remarks>
- /// <exception cref="System.NullReferenceException">The awaiter was not properly initialized.</exception>
- public bool IsCompleted => m_task.IsCompleted;
-
- /// <summary>Schedules the continuation onto the <see cref="System.Threading.Tasks.Task"/> associated with this <see cref="TaskAwaiter"/>.</summary>
- /// <param name="continuation">The action to invoke when the await operation completes.</param>
- /// <exception cref="System.ArgumentNullException">The <paramref name="continuation"/> argument is null (Nothing in Visual Basic).</exception>
- /// <exception cref="System.NullReferenceException">The awaiter was not properly initialized.</exception>
- /// <remarks>This method is intended for compiler user rather than use directly in code.</remarks>
- public void OnCompleted(Action continuation)
- {
- TaskAwaiter.OnCompletedInternal(m_task, continuation, continueOnCapturedContext: true, flowExecutionContext: true);
- }
-
- /// <summary>Schedules the continuation onto the <see cref="System.Threading.Tasks.Task"/> associated with this <see cref="TaskAwaiter"/>.</summary>
- /// <param name="continuation">The action to invoke when the await operation completes.</param>
- /// <exception cref="System.ArgumentNullException">The <paramref name="continuation"/> argument is null (Nothing in Visual Basic).</exception>
- /// <exception cref="System.NullReferenceException">The awaiter was not properly initialized.</exception>
- /// <remarks>This method is intended for compiler user rather than use directly in code.</remarks>
- public void UnsafeOnCompleted(Action continuation)
- {
- TaskAwaiter.OnCompletedInternal(m_task, continuation, continueOnCapturedContext: true, flowExecutionContext: false);
- }
-
- /// <summary>Ends the await on the completed <see cref="System.Threading.Tasks.Task{TResult}"/>.</summary>
- /// <returns>The result of the completed <see cref="System.Threading.Tasks.Task{TResult}"/>.</returns>
- /// <exception cref="System.NullReferenceException">The awaiter was not properly initialized.</exception>
- /// <exception cref="System.Threading.Tasks.TaskCanceledException">The task was canceled.</exception>
- /// <exception cref="System.Exception">The task completed in a Faulted state.</exception>
- [StackTraceHidden]
- public TResult GetResult()
- {
- TaskAwaiter.ValidateEnd(m_task);
- return m_task.ResultOnSuccess;
- }
- }
-
- /// <summary>
- /// Marker interface used to know whether a particular awaiter is either a
- /// TaskAwaiter or a TaskAwaiter`1. It must not be implemented by any other
- /// awaiters.
- /// </summary>
- internal interface ITaskAwaiter { }
-
- /// <summary>
- /// Marker interface used to know whether a particular awaiter is either a
- /// CTA.ConfiguredTaskAwaiter or a CTA`1.ConfiguredTaskAwaiter. It must not
- /// be implemented by any other awaiters.
- /// </summary>
- internal interface IConfiguredTaskAwaiter { }
-
- /// <summary>Provides an awaitable object that allows for configured awaits on <see cref="System.Threading.Tasks.Task"/>.</summary>
- /// <remarks>This type is intended for compiler use only.</remarks>
- public readonly struct ConfiguredTaskAwaitable
- {
- /// <summary>The task being awaited.</summary>
- private readonly ConfiguredTaskAwaitable.ConfiguredTaskAwaiter m_configuredTaskAwaiter;
-
- /// <summary>Initializes the <see cref="ConfiguredTaskAwaitable"/>.</summary>
- /// <param name="task">The awaitable <see cref="System.Threading.Tasks.Task"/>.</param>
- /// <param name="continueOnCapturedContext">
- /// true to attempt to marshal the continuation back to the original context captured; otherwise, false.
- /// </param>
- internal ConfiguredTaskAwaitable(Task task, bool continueOnCapturedContext)
- {
- Debug.Assert(task != null, "Constructing an awaitable requires a task to await.");
- m_configuredTaskAwaiter = new ConfiguredTaskAwaitable.ConfiguredTaskAwaiter(task, continueOnCapturedContext);
- }
-
- /// <summary>Gets an awaiter for this awaitable.</summary>
- /// <returns>The awaiter.</returns>
- public ConfiguredTaskAwaitable.ConfiguredTaskAwaiter GetAwaiter()
- {
- return m_configuredTaskAwaiter;
- }
-
- /// <summary>Provides an awaiter for a <see cref="ConfiguredTaskAwaitable"/>.</summary>
- /// <remarks>This type is intended for compiler use only.</remarks>
- public readonly struct ConfiguredTaskAwaiter : ICriticalNotifyCompletion, IConfiguredTaskAwaiter
- {
- // WARNING: Unsafe.As is used to access the generic ConfiguredTaskAwaiter as this.
- // Its layout must remain the same.
-
- /// <summary>The task being awaited.</summary>
- internal readonly Task m_task;
- /// <summary>Whether to attempt marshaling back to the original context.</summary>
- internal readonly bool m_continueOnCapturedContext;
-
- /// <summary>Initializes the <see cref="ConfiguredTaskAwaiter"/>.</summary>
- /// <param name="task">The <see cref="System.Threading.Tasks.Task"/> to await.</param>
- /// <param name="continueOnCapturedContext">
- /// true to attempt to marshal the continuation back to the original context captured
- /// when BeginAwait is called; otherwise, false.
- /// </param>
- internal ConfiguredTaskAwaiter(Task task, bool continueOnCapturedContext)
- {
- Debug.Assert(task != null, "Constructing an awaiter requires a task to await.");
- m_task = task;
- m_continueOnCapturedContext = continueOnCapturedContext;
- }
-
- /// <summary>Gets whether the task being awaited is completed.</summary>
- /// <remarks>This property is intended for compiler user rather than use directly in code.</remarks>
- /// <exception cref="System.NullReferenceException">The awaiter was not properly initialized.</exception>
- public bool IsCompleted => m_task.IsCompleted;
-
- /// <summary>Schedules the continuation onto the <see cref="System.Threading.Tasks.Task"/> associated with this <see cref="TaskAwaiter"/>.</summary>
- /// <param name="continuation">The action to invoke when the await operation completes.</param>
- /// <exception cref="System.ArgumentNullException">The <paramref name="continuation"/> argument is null (Nothing in Visual Basic).</exception>
- /// <exception cref="System.NullReferenceException">The awaiter was not properly initialized.</exception>
- /// <remarks>This method is intended for compiler user rather than use directly in code.</remarks>
- public void OnCompleted(Action continuation)
- {
- TaskAwaiter.OnCompletedInternal(m_task, continuation, m_continueOnCapturedContext, flowExecutionContext: true);
- }
-
- /// <summary>Schedules the continuation onto the <see cref="System.Threading.Tasks.Task"/> associated with this <see cref="TaskAwaiter"/>.</summary>
- /// <param name="continuation">The action to invoke when the await operation completes.</param>
- /// <exception cref="System.ArgumentNullException">The <paramref name="continuation"/> argument is null (Nothing in Visual Basic).</exception>
- /// <exception cref="System.NullReferenceException">The awaiter was not properly initialized.</exception>
- /// <remarks>This method is intended for compiler user rather than use directly in code.</remarks>
- public void UnsafeOnCompleted(Action continuation)
- {
- TaskAwaiter.OnCompletedInternal(m_task, continuation, m_continueOnCapturedContext, flowExecutionContext: false);
- }
-
- /// <summary>Ends the await on the completed <see cref="System.Threading.Tasks.Task"/>.</summary>
- /// <exception cref="System.NullReferenceException">The awaiter was not properly initialized.</exception>
- /// <exception cref="System.Threading.Tasks.TaskCanceledException">The task was canceled.</exception>
- /// <exception cref="System.Exception">The task completed in a Faulted state.</exception>
- [StackTraceHidden]
- public void GetResult()
- {
- TaskAwaiter.ValidateEnd(m_task);
- }
- }
- }
-
- /// <summary>Provides an awaitable object that allows for configured awaits on <see cref="System.Threading.Tasks.Task{TResult}"/>.</summary>
- /// <remarks>This type is intended for compiler use only.</remarks>
- public readonly struct ConfiguredTaskAwaitable<TResult>
- {
- /// <summary>The underlying awaitable on whose logic this awaitable relies.</summary>
- private readonly ConfiguredTaskAwaitable<TResult>.ConfiguredTaskAwaiter m_configuredTaskAwaiter;
-
- /// <summary>Initializes the <see cref="ConfiguredTaskAwaitable{TResult}"/>.</summary>
- /// <param name="task">The awaitable <see cref="System.Threading.Tasks.Task{TResult}"/>.</param>
- /// <param name="continueOnCapturedContext">
- /// true to attempt to marshal the continuation back to the original context captured; otherwise, false.
- /// </param>
- internal ConfiguredTaskAwaitable(Task<TResult> task, bool continueOnCapturedContext)
- {
- m_configuredTaskAwaiter = new ConfiguredTaskAwaitable<TResult>.ConfiguredTaskAwaiter(task, continueOnCapturedContext);
- }
-
- /// <summary>Gets an awaiter for this awaitable.</summary>
- /// <returns>The awaiter.</returns>
- public ConfiguredTaskAwaitable<TResult>.ConfiguredTaskAwaiter GetAwaiter()
- {
- return m_configuredTaskAwaiter;
- }
-
- /// <summary>Provides an awaiter for a <see cref="ConfiguredTaskAwaitable{TResult}"/>.</summary>
- /// <remarks>This type is intended for compiler use only.</remarks>
- public readonly struct ConfiguredTaskAwaiter : ICriticalNotifyCompletion, IConfiguredTaskAwaiter
- {
- // WARNING: Unsafe.As is used to access this as the non-generic ConfiguredTaskAwaiter.
- // Its layout must remain the same.
-
- /// <summary>The task being awaited.</summary>
- private readonly Task<TResult> m_task;
- /// <summary>Whether to attempt marshaling back to the original context.</summary>
- private readonly bool m_continueOnCapturedContext;
-
- /// <summary>Initializes the <see cref="ConfiguredTaskAwaiter"/>.</summary>
- /// <param name="task">The awaitable <see cref="System.Threading.Tasks.Task{TResult}"/>.</param>
- /// <param name="continueOnCapturedContext">
- /// true to attempt to marshal the continuation back to the original context captured; otherwise, false.
- /// </param>
- internal ConfiguredTaskAwaiter(Task<TResult> task, bool continueOnCapturedContext)
- {
- Debug.Assert(task != null, "Constructing an awaiter requires a task to await.");
- m_task = task;
- m_continueOnCapturedContext = continueOnCapturedContext;
- }
-
- /// <summary>Gets whether the task being awaited is completed.</summary>
- /// <remarks>This property is intended for compiler user rather than use directly in code.</remarks>
- /// <exception cref="System.NullReferenceException">The awaiter was not properly initialized.</exception>
- public bool IsCompleted => m_task.IsCompleted;
-
- /// <summary>Schedules the continuation onto the <see cref="System.Threading.Tasks.Task"/> associated with this <see cref="TaskAwaiter"/>.</summary>
- /// <param name="continuation">The action to invoke when the await operation completes.</param>
- /// <exception cref="System.ArgumentNullException">The <paramref name="continuation"/> argument is null (Nothing in Visual Basic).</exception>
- /// <exception cref="System.NullReferenceException">The awaiter was not properly initialized.</exception>
- /// <remarks>This method is intended for compiler user rather than use directly in code.</remarks>
- public void OnCompleted(Action continuation)
- {
- TaskAwaiter.OnCompletedInternal(m_task, continuation, m_continueOnCapturedContext, flowExecutionContext: true);
- }
-
- /// <summary>Schedules the continuation onto the <see cref="System.Threading.Tasks.Task"/> associated with this <see cref="TaskAwaiter"/>.</summary>
- /// <param name="continuation">The action to invoke when the await operation completes.</param>
- /// <exception cref="System.ArgumentNullException">The <paramref name="continuation"/> argument is null (Nothing in Visual Basic).</exception>
- /// <exception cref="System.NullReferenceException">The awaiter was not properly initialized.</exception>
- /// <remarks>This method is intended for compiler user rather than use directly in code.</remarks>
- public void UnsafeOnCompleted(Action continuation)
- {
- TaskAwaiter.OnCompletedInternal(m_task, continuation, m_continueOnCapturedContext, flowExecutionContext: false);
- }
-
- /// <summary>Ends the await on the completed <see cref="System.Threading.Tasks.Task{TResult}"/>.</summary>
- /// <returns>The result of the completed <see cref="System.Threading.Tasks.Task{TResult}"/>.</returns>
- /// <exception cref="System.NullReferenceException">The awaiter was not properly initialized.</exception>
- /// <exception cref="System.Threading.Tasks.TaskCanceledException">The task was canceled.</exception>
- /// <exception cref="System.Exception">The task completed in a Faulted state.</exception>
- [StackTraceHidden]
- public TResult GetResult()
- {
- TaskAwaiter.ValidateEnd(m_task);
- return m_task.ResultOnSuccess;
- }
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/TupleElementNamesAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/TupleElementNamesAttribute.cs
deleted file mode 100644
index d4bdcd1fa7f..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/TupleElementNamesAttribute.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-// 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.Collections.Generic;
-
-namespace System.Runtime.CompilerServices
-{
- /// <summary>
- /// Indicates that the use of <see cref="System.ValueTuple"/> on a member is meant to be treated as a tuple with element names.
- /// </summary>
- [CLSCompliant(false)]
- [AttributeUsage(AttributeTargets.Field | AttributeTargets.Parameter | AttributeTargets.Property | AttributeTargets.ReturnValue | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Event)]
- public sealed class TupleElementNamesAttribute : Attribute
- {
- private readonly string?[] _transformNames;
-
- /// <summary>
- /// Initializes a new instance of the <see
- /// cref="TupleElementNamesAttribute"/> class.
- /// </summary>
- /// <param name="transformNames">
- /// Specifies, in a pre-order depth-first traversal of a type's
- /// construction, which <see cref="System.ValueType"/> occurrences are
- /// meant to carry element names.
- /// </param>
- /// <remarks>
- /// This constructor is meant to be used on types that contain an
- /// instantiation of <see cref="System.ValueType"/> that contains
- /// element names. For instance, if <c>C</c> is a generic type with
- /// two type parameters, then a use of the constructed type <c>C{<see
- /// cref="System.ValueTuple{T1, T2}"/>, <see
- /// cref="System.ValueTuple{T1, T2, T3}"/></c> might be intended to
- /// treat the first type argument as a tuple with element names and the
- /// second as a tuple without element names. In which case, the
- /// appropriate attribute specification should use a
- /// <c>transformNames</c> value of <c>{ "name1", "name2", null, null,
- /// null }</c>.
- /// </remarks>
- public TupleElementNamesAttribute(string?[] transformNames)
- {
- if (transformNames == null)
- {
- throw new ArgumentNullException(nameof(transformNames));
- }
-
- _transformNames = transformNames;
- }
-
- /// <summary>
- /// Specifies, in a pre-order depth-first traversal of a type's
- /// construction, which <see cref="System.ValueTuple"/> elements are
- /// meant to carry element names.
- /// </summary>
- public IList<string?> TransformNames => _transformNames;
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/TypeForwardedFromAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/TypeForwardedFromAttribute.cs
deleted file mode 100644
index 27dd6457557..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/TypeForwardedFromAttribute.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Enum | AttributeTargets.Interface | AttributeTargets.Delegate, Inherited = false, AllowMultiple = false)]
- public sealed class TypeForwardedFromAttribute : Attribute
- {
- public TypeForwardedFromAttribute(string assemblyFullName)
- {
- if (string.IsNullOrEmpty(assemblyFullName))
- throw new ArgumentNullException(nameof(assemblyFullName));
-
- AssemblyFullName = assemblyFullName;
- }
-
- public string AssemblyFullName { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/TypeForwardedToAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/TypeForwardedToAttribute.cs
deleted file mode 100644
index 85d5c030c19..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/TypeForwardedToAttribute.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = true, Inherited = false)]
- public sealed class TypeForwardedToAttribute : Attribute
- {
- public TypeForwardedToAttribute(Type destination)
- {
- Destination = destination;
- }
-
- public Type Destination { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/UnsafeValueTypeAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/UnsafeValueTypeAttribute.cs
deleted file mode 100644
index b1f274367e8..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/UnsafeValueTypeAttribute.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-// 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.Runtime.CompilerServices
-{
- [AttributeUsage(AttributeTargets.Struct)]
- public sealed class UnsafeValueTypeAttribute : Attribute
- {
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ValueTaskAwaiter.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ValueTaskAwaiter.cs
deleted file mode 100644
index b3817d33904..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/ValueTaskAwaiter.cs
+++ /dev/null
@@ -1,198 +0,0 @@
-// 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.Diagnostics;
-using System.Threading;
-using System.Threading.Tasks;
-using System.Threading.Tasks.Sources;
-
-#if !NETSTANDARD2_0
-using Internal.Runtime.CompilerServices;
-#endif
-
-namespace System.Runtime.CompilerServices
-{
- /// <summary>Provides an awaiter for a <see cref="ValueTask"/>.</summary>
- public readonly struct ValueTaskAwaiter : ICriticalNotifyCompletion, IStateMachineBoxAwareAwaiter
- {
- /// <summary>Shim used to invoke an <see cref="Action"/> passed as the state argument to a <see cref="Action{Object}"/>.</summary>
- internal static readonly Action<object?> s_invokeActionDelegate = state =>
- {
- if (!(state is Action action))
- {
- ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.state);
- return;
- }
-
- action();
- };
- /// <summary>The value being awaited.</summary>
- private readonly ValueTask _value;
-
- /// <summary>Initializes the awaiter.</summary>
- /// <param name="value">The value to be awaited.</param>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- internal ValueTaskAwaiter(in ValueTask value) => _value = value;
-
- /// <summary>Gets whether the <see cref="ValueTask"/> has completed.</summary>
- public bool IsCompleted
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get => _value.IsCompleted;
- }
-
- /// <summary>Gets the result of the ValueTask.</summary>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public void GetResult() => _value.ThrowIfCompletedUnsuccessfully();
-
- /// <summary>Schedules the continuation action for this ValueTask.</summary>
- public void OnCompleted(Action continuation)
- {
- object? obj = _value._obj;
- Debug.Assert(obj == null || obj is Task || obj is IValueTaskSource);
-
- if (obj is Task t)
- {
- t.GetAwaiter().OnCompleted(continuation);
- }
- else if (obj != null)
- {
- Unsafe.As<IValueTaskSource>(obj).OnCompleted(s_invokeActionDelegate, continuation, _value._token, ValueTaskSourceOnCompletedFlags.UseSchedulingContext | ValueTaskSourceOnCompletedFlags.FlowExecutionContext);
- }
- else
- {
- ValueTask.CompletedTask.GetAwaiter().OnCompleted(continuation);
- }
- }
-
- /// <summary>Schedules the continuation action for this ValueTask.</summary>
- public void UnsafeOnCompleted(Action continuation)
- {
- object? obj = _value._obj;
- Debug.Assert(obj == null || obj is Task || obj is IValueTaskSource);
-
- if (obj is Task t)
- {
- t.GetAwaiter().UnsafeOnCompleted(continuation);
- }
- else if (obj != null)
- {
- Unsafe.As<IValueTaskSource>(obj).OnCompleted(s_invokeActionDelegate, continuation, _value._token, ValueTaskSourceOnCompletedFlags.UseSchedulingContext);
- }
- else
- {
- ValueTask.CompletedTask.GetAwaiter().UnsafeOnCompleted(continuation);
- }
- }
-
- void IStateMachineBoxAwareAwaiter.AwaitUnsafeOnCompleted(IAsyncStateMachineBox box)
- {
- object? obj = _value._obj;
- Debug.Assert(obj == null || obj is Task || obj is IValueTaskSource);
-
- if (obj is Task t)
- {
- TaskAwaiter.UnsafeOnCompletedInternal(t, box, continueOnCapturedContext: true);
- }
- else if (obj != null)
- {
- Unsafe.As<IValueTaskSource>(obj).OnCompleted(ThreadPoolGlobals.s_invokeAsyncStateMachineBox, box, _value._token, ValueTaskSourceOnCompletedFlags.UseSchedulingContext);
- }
- else
- {
- TaskAwaiter.UnsafeOnCompletedInternal(Task.CompletedTask, box, continueOnCapturedContext: true);
- }
- }
- }
-
- /// <summary>Provides an awaiter for a <see cref="ValueTask{TResult}"/>.</summary>
- public readonly struct ValueTaskAwaiter<TResult> : ICriticalNotifyCompletion, IStateMachineBoxAwareAwaiter
- {
- /// <summary>The value being awaited.</summary>
- private readonly ValueTask<TResult> _value;
-
- /// <summary>Initializes the awaiter.</summary>
- /// <param name="value">The value to be awaited.</param>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- internal ValueTaskAwaiter(in ValueTask<TResult> value) => _value = value;
-
- /// <summary>Gets whether the <see cref="ValueTask{TResult}"/> has completed.</summary>
- public bool IsCompleted
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get => _value.IsCompleted;
- }
-
- /// <summary>Gets the result of the ValueTask.</summary>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public TResult GetResult() => _value.Result;
-
- /// <summary>Schedules the continuation action for this ValueTask.</summary>
- public void OnCompleted(Action continuation)
- {
- object? obj = _value._obj;
- Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>);
-
- if (obj is Task<TResult> t)
- {
- t.GetAwaiter().OnCompleted(continuation);
- }
- else if (obj != null)
- {
- Unsafe.As<IValueTaskSource<TResult>>(obj).OnCompleted(ValueTaskAwaiter.s_invokeActionDelegate, continuation, _value._token, ValueTaskSourceOnCompletedFlags.UseSchedulingContext | ValueTaskSourceOnCompletedFlags.FlowExecutionContext);
- }
- else
- {
- ValueTask.CompletedTask.GetAwaiter().OnCompleted(continuation);
- }
- }
-
- /// <summary>Schedules the continuation action for this ValueTask.</summary>
- public void UnsafeOnCompleted(Action continuation)
- {
- object? obj = _value._obj;
- Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>);
-
- if (obj is Task<TResult> t)
- {
- t.GetAwaiter().UnsafeOnCompleted(continuation);
- }
- else if (obj != null)
- {
- Unsafe.As<IValueTaskSource<TResult>>(obj).OnCompleted(ValueTaskAwaiter.s_invokeActionDelegate, continuation, _value._token, ValueTaskSourceOnCompletedFlags.UseSchedulingContext);
- }
- else
- {
- ValueTask.CompletedTask.GetAwaiter().UnsafeOnCompleted(continuation);
- }
- }
-
- void IStateMachineBoxAwareAwaiter.AwaitUnsafeOnCompleted(IAsyncStateMachineBox box)
- {
- object? obj = _value._obj;
- Debug.Assert(obj == null || obj is Task<TResult> || obj is IValueTaskSource<TResult>);
-
- if (obj is Task<TResult> t)
- {
- TaskAwaiter.UnsafeOnCompletedInternal(t, box, continueOnCapturedContext: true);
- }
- else if (obj != null)
- {
- Unsafe.As<IValueTaskSource<TResult>>(obj).OnCompleted(ThreadPoolGlobals.s_invokeAsyncStateMachineBox, box, _value._token, ValueTaskSourceOnCompletedFlags.UseSchedulingContext);
- }
- else
- {
- TaskAwaiter.UnsafeOnCompletedInternal(Task.CompletedTask, box, continueOnCapturedContext: true);
- }
- }
- }
-
- /// <summary>Internal interface used to enable optimizations from <see cref="AsyncTaskMethodBuilder"/>.</summary>>
- internal interface IStateMachineBoxAwareAwaiter
- {
- /// <summary>Invoked to set <see cref="ITaskCompletionAction.Invoke"/> of the <paramref name="box"/> as the awaiter's continuation.</summary>
- /// <param name="box">The box object.</param>
- void AwaitUnsafeOnCompleted(IAsyncStateMachineBox box);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/YieldAwaitable.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/YieldAwaitable.cs
deleted file mode 100644
index cda89738f3e..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/CompilerServices/YieldAwaitable.cs
+++ /dev/null
@@ -1,195 +0,0 @@
-// 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.
-
-// =+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+=+
-//
-//
-//
-// Compiler-targeted type for switching back into the current execution context, e.g.
-//
-// await Task.Yield();
-// =====================
-// var $awaiter = Task.Yield().GetAwaiter();
-// if (!$awaiter.IsCompleted)
-// {
-// $builder.AwaitUnsafeOnCompleted(ref $awaiter, ref this);
-// return;
-// Label:
-// }
-// $awaiter.GetResult();
-//
-// =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
-
-using System.Diagnostics;
-using System.Diagnostics.Tracing;
-using System.Threading;
-using System.Threading.Tasks;
-
-namespace System.Runtime.CompilerServices
-{
- // NOTE: YieldAwaitable currently has no state; while developers are encouraged to use Task.Yield() to produce one,
- // no validation is performed to ensure that the developer isn't doing "await new YieldAwaitable()". Such validation
- // would require additional, useless state to be stored, and as this is a type in the CompilerServices namespace, and
- // as the above example isn't harmful, we take the cheaper approach of not validating anything.
-
- /// <summary>Provides an awaitable context for switching into a target environment.</summary>
- /// <remarks>This type is intended for compiler use only.</remarks>
- public readonly struct YieldAwaitable
- {
- /// <summary>Gets an awaiter for this <see cref="YieldAwaitable"/>.</summary>
- /// <returns>An awaiter for this awaitable.</returns>
- /// <remarks>This method is intended for compiler user rather than use directly in code.</remarks>
- public YieldAwaiter GetAwaiter() { return default; }
-
- /// <summary>Provides an awaiter that switches into a target environment.</summary>
- /// <remarks>This type is intended for compiler use only.</remarks>
- public readonly struct YieldAwaiter : ICriticalNotifyCompletion, IStateMachineBoxAwareAwaiter
- {
- /// <summary>Gets whether a yield is not required.</summary>
- /// <remarks>This property is intended for compiler user rather than use directly in code.</remarks>
- public bool IsCompleted => false; // yielding is always required for YieldAwaiter, hence false
-
- /// <summary>Posts the <paramref name="continuation"/> back to the current context.</summary>
- /// <param name="continuation">The action to invoke asynchronously.</param>
- /// <exception cref="System.ArgumentNullException">The <paramref name="continuation"/> argument is null (Nothing in Visual Basic).</exception>
- public void OnCompleted(Action continuation)
- {
- QueueContinuation(continuation, flowContext: true);
- }
-
- /// <summary>Posts the <paramref name="continuation"/> back to the current context.</summary>
- /// <param name="continuation">The action to invoke asynchronously.</param>
- /// <exception cref="System.ArgumentNullException">The <paramref name="continuation"/> argument is null (Nothing in Visual Basic).</exception>
- public void UnsafeOnCompleted(Action continuation)
- {
- QueueContinuation(continuation, flowContext: false);
- }
-
- /// <summary>Posts the <paramref name="continuation"/> back to the current context.</summary>
- /// <param name="continuation">The action to invoke asynchronously.</param>
- /// <param name="flowContext">true to flow ExecutionContext; false if flowing is not required.</param>
- /// <exception cref="System.ArgumentNullException">The <paramref name="continuation"/> argument is null (Nothing in Visual Basic).</exception>
- private static void QueueContinuation(Action continuation, bool flowContext)
- {
- // Validate arguments
- if (continuation == null) throw new ArgumentNullException(nameof(continuation));
-
- if (TplEventSource.Log.IsEnabled())
- {
- continuation = OutputCorrelationEtwEvent(continuation);
- }
- // Get the current SynchronizationContext, and if there is one,
- // post the continuation to it. However, treat the base type
- // as if there wasn't a SynchronizationContext, since that's what it
- // logically represents.
- SynchronizationContext? syncCtx = SynchronizationContext.Current;
- if (syncCtx != null && syncCtx.GetType() != typeof(SynchronizationContext))
- {
- syncCtx.Post(s_sendOrPostCallbackRunAction, continuation);
- }
- else
- {
- // If we're targeting the default scheduler, queue to the thread pool, so that we go into the global
- // queue. As we're going into the global queue, we might as well use QUWI, which for the global queue is
- // just a tad faster than task, due to a smaller object getting allocated and less work on the execution path.
- TaskScheduler scheduler = TaskScheduler.Current;
- if (scheduler == TaskScheduler.Default)
- {
- if (flowContext)
- {
- ThreadPool.QueueUserWorkItem(s_waitCallbackRunAction, continuation);
- }
- else
- {
- ThreadPool.UnsafeQueueUserWorkItem(s_waitCallbackRunAction, continuation);
- }
- }
- // We're targeting a custom scheduler, so queue a task.
- else
- {
- Task.Factory.StartNew(continuation, default, TaskCreationOptions.PreferFairness, scheduler);
- }
- }
- }
-
- void IStateMachineBoxAwareAwaiter.AwaitUnsafeOnCompleted(IAsyncStateMachineBox box)
- {
- Debug.Assert(box != null);
-
- // If tracing is enabled, delegate the Action-based implementation.
- if (TplEventSource.Log.IsEnabled())
- {
- QueueContinuation(box.MoveNextAction, flowContext: false);
- return;
- }
-
- // Otherwise, this is the same logic as in QueueContinuation, except using
- // an IAsyncStateMachineBox instead of an Action, and only for flowContext:false.
-
- SynchronizationContext? syncCtx = SynchronizationContext.Current;
- if (syncCtx != null && syncCtx.GetType() != typeof(SynchronizationContext))
- {
- syncCtx.Post(s => ((IAsyncStateMachineBox)s!).MoveNext(), box);
- }
- else
- {
- TaskScheduler scheduler = TaskScheduler.Current;
- if (scheduler == TaskScheduler.Default)
- {
- ThreadPool.UnsafeQueueUserWorkItemInternal(box, preferLocal: false);
- }
- else
- {
- Task.Factory.StartNew(s => ((IAsyncStateMachineBox)s!).MoveNext(), box, default, TaskCreationOptions.PreferFairness, scheduler);
- }
- }
- }
-
- private static Action OutputCorrelationEtwEvent(Action continuation)
- {
-#if CORERT
- // TODO
- return continuation;
-#else
- int continuationId = Task.NewId();
- Task? currentTask = Task.InternalCurrent;
- // fire the correlation ETW event
- TplEventSource.Log.AwaitTaskContinuationScheduled(TaskScheduler.Current.Id, (currentTask != null) ? currentTask.Id : 0, continuationId);
-
- return AsyncMethodBuilderCore.CreateContinuationWrapper(continuation, (innerContinuation, continuationIdTask) =>
- {
- TplEventSource log = TplEventSource.Log;
- log.TaskWaitContinuationStarted(((Task<int>)continuationIdTask).Result);
-
- // ETW event for Task Wait End.
- Guid prevActivityId = default;
- // Ensure the continuation runs under the correlated activity ID generated above
- if (log.TasksSetActivityIds)
- EventSource.SetCurrentThreadActivityId(TplEventSource.CreateGuidForTaskID(((Task<int>)continuationIdTask).Result), out prevActivityId);
-
- // Invoke the original continuation provided to OnCompleted.
- innerContinuation();
- // Restore activity ID
-
- if (log.TasksSetActivityIds)
- EventSource.SetCurrentThreadActivityId(prevActivityId);
-
- log.TaskWaitContinuationComplete(((Task<int>)continuationIdTask).Result);
- }, Task.FromResult(continuationId)); // pass the ID in a task to avoid a closure\
-#endif
- }
-
- /// <summary>WaitCallback that invokes the Action supplied as object state.</summary>
- private static readonly WaitCallback s_waitCallbackRunAction = RunAction;
- /// <summary>SendOrPostCallback that invokes the Action supplied as object state.</summary>
- private static readonly SendOrPostCallback s_sendOrPostCallbackRunAction = RunAction;
- /// <summary>Runs an Action delegate provided as state.</summary>
- /// <param name="state">The Action delegate to invoke.</param>
- private static void RunAction(object? state) { ((Action)state!)(); }
-
- /// <summary>Ends the await operation.</summary>
- public void GetResult() { } // Nop. It exists purely because the compiler pattern demands it.
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/Cer.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/Cer.cs
deleted file mode 100644
index 77ab3ea770e..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/Cer.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// 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.Runtime.ConstrainedExecution
-{
- public enum Cer : int
- {
- None = 0,
- MayFail = 1, // Might fail, but the method will say it failed
- Success = 2,
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/Consistency.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/Consistency.cs
deleted file mode 100644
index e2cc79ec350..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/Consistency.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-// 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.Runtime.ConstrainedExecution
-{
- public enum Consistency : int
- {
- MayCorruptProcess = 0,
- MayCorruptAppDomain = 1,
- MayCorruptInstance = 2,
- WillNotCorruptState = 3,
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/CriticalFinalizerObject.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/CriticalFinalizerObject.cs
deleted file mode 100644
index a6e07b8e53d..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/CriticalFinalizerObject.cs
+++ /dev/null
@@ -1,30 +0,0 @@
-// 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.
-
-/*============================================================
-**
-**
-** Deriving from this class will cause any finalizer you define to be critical
-** (i.e. the finalizer is guaranteed to run, won't be aborted by the host and is
-** run after the finalizers of other objects collected at the same time).
-**
-**
-===========================================================*/
-
-using System.Diagnostics.CodeAnalysis;
-
-namespace System.Runtime.ConstrainedExecution
-{
- public abstract class CriticalFinalizerObject
- {
- protected CriticalFinalizerObject()
- {
- }
-
- [SuppressMessage("Microsoft.Performance", "CA1821:RemoveEmptyFinalizers")]
- ~CriticalFinalizerObject()
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/ReliabilityContractAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/ReliabilityContractAttribute.cs
deleted file mode 100644
index 0b987f32fdd..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/ConstrainedExecution/ReliabilityContractAttribute.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-// 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.
-
-//
-/*============================================================
-**
-**
-**
-** Purpose: Defines a publically documentable contract for
-** reliability between a method and its callers, expressing
-** what state will remain consistent in the presence of
-** failures (ie async exceptions like thread abort) and whether
-** the method needs to be called from within a CER.
-**
-**
-===========================================================*/
-
-namespace System.Runtime.ConstrainedExecution
-{
- [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Constructor | AttributeTargets.Method | AttributeTargets.Interface /* | AttributeTargets.Delegate*/, Inherited = false)]
- public sealed class ReliabilityContractAttribute : Attribute
- {
- public ReliabilityContractAttribute(Consistency consistencyGuarantee, Cer cer)
- {
- ConsistencyGuarantee = consistencyGuarantee;
- Cer = cer;
- }
-
- public Consistency ConsistencyGuarantee { get; }
- public Cer Cer { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/ExceptionServices/ExceptionDispatchInfo.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/ExceptionServices/ExceptionDispatchInfo.cs
deleted file mode 100644
index 93236955f2a..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/ExceptionServices/ExceptionDispatchInfo.cs
+++ /dev/null
@@ -1,83 +0,0 @@
-// 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.Diagnostics;
-using System.Diagnostics.CodeAnalysis;
-
-namespace System.Runtime.ExceptionServices
-{
- // This class defines support for separating the exception dispatch details
- // (like stack trace, watson buckets, etc) from the actual managed exception
- // object. This allows us to track error (via the exception object) independent
- // of the path the error takes.
- //
- // This is particularly useful for frameworks that wish to propagate
- // exceptions (i.e. errors to be precise) across threads.
- public sealed class ExceptionDispatchInfo
- {
- private readonly Exception _exception;
- private readonly Exception.DispatchState _dispatchState;
-
- private ExceptionDispatchInfo(Exception exception)
- {
- _exception = exception;
- _dispatchState = exception.CaptureDispatchState();
- }
-
- // This static method is used to create an instance of ExceptionDispatchInfo for
- // the specified exception object and save all the required details that maybe
- // needed to be propagated when the exception is "rethrown" on a different thread.
- public static ExceptionDispatchInfo Capture(Exception source)
- {
- if (source == null)
- {
- throw new ArgumentNullException(nameof(source));
- }
-
- return new ExceptionDispatchInfo(source);
- }
-
- // Return the exception object represented by this ExceptionDispatchInfo instance
- public Exception SourceException => _exception;
-
- // When a framework needs to "Rethrow" an exception on a thread different (but not necessarily so) from
- // where it was thrown, it should invoke this method against the ExceptionDispatchInfo
- // created for the exception in question.
- //
- // This method will restore the original stack trace and bucketing details before throwing
- // the exception so that it is easy, from debugging standpoint, to understand what really went wrong on
- // the original thread.
- [DoesNotReturn]
- [StackTraceHidden]
- public void Throw()
- {
- // Restore the exception dispatch details before throwing the exception.
- _exception.RestoreDispatchState(_dispatchState);
- throw _exception;
- }
-
- // Throws the source exception, maintaining the original bucketing details and augmenting
- // rather than replacing the original stack trace.
- [DoesNotReturn]
- public static void Throw(Exception source) => Capture(source).Throw();
-
- /// <summary>Stores the current stack trace into the specified <see cref="Exception"/> instance.</summary>
- /// <param name="source">The unthrown <see cref="Exception"/> instance.</param>
- /// <exception cref="ArgumentNullException">The <paramref name="source"/> argument was null.</exception>
- /// <exception cref="InvalidOperationException">The <paramref name="source"/> argument was previously thrown or previously had a stack trace stored into it..</exception>
- /// <returns>The <paramref name="source"/> exception instance.</returns>
- [StackTraceHidden]
- public static Exception SetCurrentStackTrace(Exception source)
- {
- if (source is null)
- {
- throw new ArgumentNullException(nameof(source));
- }
-
- source.SetCurrentStackTrace();
-
- return source;
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/ExceptionServices/ExceptionNotification.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/ExceptionServices/ExceptionNotification.cs
deleted file mode 100644
index 605588d657f..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/ExceptionServices/ExceptionNotification.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-// 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.Runtime.ExceptionServices
-{
- // Definition of the argument-type passed to the FirstChanceException event handler
- public class FirstChanceExceptionEventArgs : EventArgs
- {
- public FirstChanceExceptionEventArgs(Exception exception)
- {
- Exception = exception;
- }
-
- // Returns the exception object pertaining to the first chance exception
- public Exception Exception { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/ExceptionServices/HandleProcessCorruptedStateExceptionsAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/ExceptionServices/HandleProcessCorruptedStateExceptionsAttribute.cs
deleted file mode 100644
index cc1bc81e5a6..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/ExceptionServices/HandleProcessCorruptedStateExceptionsAttribute.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-// 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.Runtime.ExceptionServices
-{
- // This attribute can be applied to methods to indicate that ProcessCorruptedState
- // Exceptions should be delivered to them.
- [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
- public sealed class HandleProcessCorruptedStateExceptionsAttribute : Attribute
- {
- public HandleProcessCorruptedStateExceptionsAttribute()
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/GCSettings.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/GCSettings.cs
deleted file mode 100644
index 77303ae07d7..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/GCSettings.cs
+++ /dev/null
@@ -1,69 +0,0 @@
-// 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.Diagnostics;
-
-namespace System.Runtime
-{
- public enum GCLargeObjectHeapCompactionMode
- {
- Default = 1,
- CompactOnce = 2
- }
-
- // These settings are the same format as in the GC in the runtime.
- public enum GCLatencyMode
- {
- Batch = 0,
- Interactive = 1,
- LowLatency = 2,
- SustainedLowLatency = 3,
- NoGCRegion = 4
- }
-
- public static partial class GCSettings
- {
- private enum SetLatencyModeStatus
- {
- Succeeded = 0,
- NoGCInProgress = 1 // NoGCRegion is in progress, can't change pause mode.
- }
-
- public static GCLatencyMode LatencyMode
- {
- get => GetGCLatencyMode();
- set
- {
- if ((value < GCLatencyMode.Batch) ||
- (value > GCLatencyMode.SustainedLowLatency))
- {
- throw new ArgumentOutOfRangeException(nameof(value), SR.ArgumentOutOfRange_Enum);
- }
-
- SetLatencyModeStatus status = SetGCLatencyMode(value);
- if (status == SetLatencyModeStatus.NoGCInProgress)
- {
- throw new InvalidOperationException(SR.InvalidOperation_SetLatencyModeNoGC);
- }
-
- Debug.Assert(status == SetLatencyModeStatus.Succeeded, $"Unexpected return value '{status}' from {nameof(SetGCLatencyMode)}.");
- }
- }
-
- public static GCLargeObjectHeapCompactionMode LargeObjectHeapCompactionMode
- {
- get => GetLOHCompactionMode();
- set
- {
- if ((value < GCLargeObjectHeapCompactionMode.Default) ||
- (value > GCLargeObjectHeapCompactionMode.CompactOnce))
- {
- throw new ArgumentOutOfRangeException(nameof(value), SR.ArgumentOutOfRange_Enum);
- }
-
- SetLOHCompactionMode(value);
- }
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/AllowReversePInvokeCallsAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/AllowReversePInvokeCallsAttribute.cs
deleted file mode 100644
index cb640a7a8c8..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/AllowReversePInvokeCallsAttribute.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-// 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.Runtime.InteropServices
-{
- // To be used on methods that sink reverse P/Invoke calls.
- // This attribute was a Silverlight security measure, currently ignored.
- [AttributeUsage(AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
- public sealed class AllowReversePInvokeCallsAttribute : Attribute
- {
- public AllowReversePInvokeCallsAttribute()
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ArrayWithOffset.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ArrayWithOffset.cs
deleted file mode 100644
index ca1567c514f..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ArrayWithOffset.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-// 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;
-
-#pragma warning disable SA1121 // explicitly using type aliases instead of built-in types
-#if BIT64
-using nuint = System.UInt64;
-#else
-using nuint = System.UInt32;
-#endif
-
-namespace System.Runtime.InteropServices
-{
- public struct ArrayWithOffset
- {
- private readonly object? m_array;
- private readonly int m_offset;
- private readonly int m_count;
-
- // From MAX_SIZE_FOR_INTEROP in mlinfo.h
- private const int MaxSizeForInterop = 0x7ffffff0;
-
- public ArrayWithOffset(object? array, int offset)
- {
- int totalSize = 0;
- if (array != null)
- {
- if (!(array is Array arrayObj) || (arrayObj.Rank != 1) || !Marshal.IsPinnable(arrayObj))
- {
- throw new ArgumentException(SR.ArgumentException_NotIsomorphic);
- }
-
- nuint nativeTotalSize = (nuint)arrayObj.LongLength * (nuint)arrayObj.GetElementSize();
- if (nativeTotalSize > MaxSizeForInterop)
- {
- throw new ArgumentException(SR.Argument_StructArrayTooLarge);
- }
-
- totalSize = (int)nativeTotalSize;
- }
-
- if ((uint)offset > (uint)totalSize)
- {
- throw new IndexOutOfRangeException(SR.IndexOutOfRange_ArrayWithOffset);
- }
-
- m_array = array;
- m_offset = offset;
- m_count = totalSize - offset;
- }
-
- public object? GetArray() => m_array;
-
- public int GetOffset() => m_offset;
-
- public override int GetHashCode() => m_count + m_offset;
-
- public override bool Equals(object? obj)
- {
- return obj is ArrayWithOffset && Equals((ArrayWithOffset)obj);
- }
-
- public bool Equals(ArrayWithOffset obj)
- {
- return obj.m_array == m_array && obj.m_offset == m_offset && obj.m_count == m_count;
- }
-
- public static bool operator ==(ArrayWithOffset a, ArrayWithOffset b) => a.Equals(b);
-
- public static bool operator !=(ArrayWithOffset a, ArrayWithOffset b) => !(a == b);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/BStrWrapper.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/BStrWrapper.cs
deleted file mode 100644
index 9329b0513cf..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/BStrWrapper.cs
+++ /dev/null
@@ -1,22 +0,0 @@
-// 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.Runtime.InteropServices
-{
- // Wrapper that is converted to a variant with VT_BSTR.
- public sealed class BStrWrapper
- {
- public BStrWrapper(string? value)
- {
- WrappedObject = value;
- }
-
- public BStrWrapper(object? value)
- {
- WrappedObject = (string?)value;
- }
-
- public string? WrappedObject { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/BestFitMappingAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/BestFitMappingAttribute.cs
deleted file mode 100644
index 4ebee1538ca..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/BestFitMappingAttribute.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Interface | AttributeTargets.Class | AttributeTargets.Struct, Inherited = false)]
- public sealed class BestFitMappingAttribute : Attribute
- {
- public BestFitMappingAttribute(bool BestFitMapping)
- {
- this.BestFitMapping = BestFitMapping;
- }
-
- public bool BestFitMapping { get; }
-
- public bool ThrowOnUnmappableChar;
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/COMException.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/COMException.cs
deleted file mode 100644
index 6b22d026313..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/COMException.cs
+++ /dev/null
@@ -1,74 +0,0 @@
-// 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.Serialization;
-using System.Globalization;
-using System.Text;
-
-namespace System.Runtime.InteropServices
-{
- // Exception for COM Interop errors where we don't recognize the HResult.
- /// <summary>
- /// Exception class for all errors from COM Interop where we don't
- /// recognize the HResult.
- /// </summary>
- [Serializable]
- [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
- public class COMException : ExternalException
- {
- public COMException()
- : base(SR.Arg_COMException)
- {
- HResult = HResults.E_FAIL;
- }
-
- public COMException(string? message)
- : base(message)
- {
- HResult = HResults.E_FAIL;
- }
-
- public COMException(string? message, Exception? inner)
- : base(message, inner)
- {
- HResult = HResults.E_FAIL;
- }
-
- public COMException(string? message, int errorCode)
- : base(message)
- {
- HResult = errorCode;
- }
-
- protected COMException(SerializationInfo info, StreamingContext context) : base(info, context)
- {
- }
-
- public override string ToString()
- {
- StringBuilder s = new StringBuilder();
-
- string className = GetType().ToString();
- s.Append(className).Append(" (0x").Append(HResult.ToString("X8", CultureInfo.InvariantCulture)).Append(')');
-
- string message = Message;
- if (!string.IsNullOrEmpty(message))
- {
- s.Append(": ").Append(message);
- }
-
- Exception? innerException = InnerException;
- if (innerException != null)
- {
- s.Append(Environment.NewLineConst + InnerExceptionPrefix).Append(innerException.ToString());
- }
-
- string? stackTrace = StackTrace;
- if (stackTrace != null)
- s.AppendLine().Append(stackTrace);
-
- return s.ToString();
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CallingConvention.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CallingConvention.cs
deleted file mode 100644
index 3b18fdee3a8..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CallingConvention.cs
+++ /dev/null
@@ -1,16 +0,0 @@
-// 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.Runtime.InteropServices
-{
- // Used for the CallingConvention named argument to the DllImport and NativeCallable attribute
- public enum CallingConvention
- {
- Winapi = 1,
- Cdecl = 2,
- StdCall = 3,
- ThisCall = 4,
- FastCall = 5,
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CharSet.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CharSet.cs
deleted file mode 100644
index 955ec8eb2f7..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CharSet.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// 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.Runtime.InteropServices
-{
- // Use this in P/Invoke function prototypes to specify
- // which character set to use when marshalling Strings.
- // Using Ansi will marshal the strings as 1 byte char*'s.
- // Using Unicode will marshal the strings as 2 byte wchar*'s.
- // Generally you probably want to use Auto, which does the
- // right thing 99% of the time.
-
- public enum CharSet
- {
- None = 1, // User didn't specify how to marshal strings.
- Ansi = 2, // Strings should be marshalled as ANSI 1 byte chars.
- Unicode = 3, // Strings should be marshalled as Unicode 2 byte chars.
- Auto = 4, // Marshal Strings in the right way for the target system.
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ClassInterfaceAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ClassInterfaceAttribute.cs
deleted file mode 100644
index 59d79ff4438..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ClassInterfaceAttribute.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Class, Inherited = false)]
- public sealed class ClassInterfaceAttribute : Attribute
- {
- public ClassInterfaceAttribute(ClassInterfaceType classInterfaceType)
- {
- Value = classInterfaceType;
- }
- public ClassInterfaceAttribute(short classInterfaceType)
- {
- Value = (ClassInterfaceType)classInterfaceType;
- }
-
- public ClassInterfaceType Value { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ClassInterfaceType.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ClassInterfaceType.cs
deleted file mode 100644
index ef1fe841940..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ClassInterfaceType.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// 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.Runtime.InteropServices
-{
- public enum ClassInterfaceType
- {
- None = 0,
- AutoDispatch = 1,
- AutoDual = 2
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CoClassAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CoClassAttribute.cs
deleted file mode 100644
index 4be6622c3da..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CoClassAttribute.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Interface, Inherited = false)]
- public sealed class CoClassAttribute : Attribute
- {
- public CoClassAttribute(Type coClass)
- {
- CoClass = coClass;
- }
-
- public Type CoClass { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CollectionsMarshal.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CollectionsMarshal.cs
deleted file mode 100644
index 8b38858d084..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CollectionsMarshal.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// 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.Collections.Generic;
-
-namespace System.Runtime.InteropServices
-{
- /// <summary>
- /// An unsafe class that provides a set of methods to access the underlying data representations of collections.
- /// </summary>
- public static class CollectionsMarshal
- {
- /// <summary>
- /// Get a <see cref="Span{T}"/> view over a <see cref="List{T}"/>'s data.
- /// Items should not be added or removed from the <see cref="List{T}"/> while the <see cref="Span{T}"/> is in use.
- /// </summary>
- public static Span<T> AsSpan<T>(List<T>? list)
- => list is null ? default : new Span<T>(list._items, 0, list._size);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComDefaultInterfaceAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComDefaultInterfaceAttribute.cs
deleted file mode 100644
index 1b84f5f561a..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComDefaultInterfaceAttribute.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Class, Inherited = false)]
- public sealed class ComDefaultInterfaceAttribute : Attribute
- {
- public ComDefaultInterfaceAttribute(Type defaultInterface)
- {
- Value = defaultInterface;
- }
-
- public Type Value { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComEventInterfaceAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComEventInterfaceAttribute.cs
deleted file mode 100644
index d4ccc702e05..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComEventInterfaceAttribute.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Interface, Inherited = false)]
- public sealed class ComEventInterfaceAttribute : Attribute
- {
- public ComEventInterfaceAttribute(Type SourceInterface, Type EventProvider)
- {
- this.SourceInterface = SourceInterface;
- this.EventProvider = EventProvider;
- }
-
- public Type SourceInterface { get; }
- public Type EventProvider { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComEventsHelpers.NoCom.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComEventsHelpers.NoCom.cs
deleted file mode 100644
index 7b29d6f9ad0..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComEventsHelpers.NoCom.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// 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.ComTypes;
-
-namespace System.Runtime.InteropServices
-{
- public static class ComEventsHelper
- {
- public static void Combine(object rcw, Guid iid, int dispid, Delegate d)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static Delegate Remove(object rcw, Guid iid, int dispid, Delegate d)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComImportAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComImportAttribute.cs
deleted file mode 100644
index a290bf4510d..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComImportAttribute.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Class | AttributeTargets.Interface, Inherited = false)]
- public sealed class ComImportAttribute : Attribute
- {
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComInterfaceType.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComInterfaceType.cs
deleted file mode 100644
index 03b8ae534ad..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComInterfaceType.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-// 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.Runtime.InteropServices
-{
- public enum ComInterfaceType
- {
- InterfaceIsDual = 0,
- InterfaceIsIUnknown = 1,
- InterfaceIsIDispatch = 2,
- InterfaceIsIInspectable = 3,
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComMemberType.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComMemberType.cs
deleted file mode 100644
index 4be75b03b9f..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComMemberType.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// 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.Runtime.InteropServices
-{
- public enum ComMemberType
- {
- Method = 0,
- PropGet = 1,
- PropSet = 2
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComSourceInterfacesAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComSourceInterfacesAttribute.cs
deleted file mode 100644
index a62871a3997..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComSourceInterfacesAttribute.cs
+++ /dev/null
@@ -1,37 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Class, Inherited = true)]
- public sealed class ComSourceInterfacesAttribute : Attribute
- {
- public ComSourceInterfacesAttribute(string sourceInterfaces)
- {
- Value = sourceInterfaces;
- }
-
- public ComSourceInterfacesAttribute(Type sourceInterface)
- {
- Value = sourceInterface.FullName!;
- }
-
- public ComSourceInterfacesAttribute(Type sourceInterface1, Type sourceInterface2)
- {
- Value = sourceInterface1.FullName + "\0" + sourceInterface2.FullName;
- }
-
- public ComSourceInterfacesAttribute(Type sourceInterface1, Type sourceInterface2, Type sourceInterface3)
- {
- Value = sourceInterface1.FullName + "\0" + sourceInterface2.FullName + "\0" + sourceInterface3.FullName;
- }
-
- public ComSourceInterfacesAttribute(Type sourceInterface1, Type sourceInterface2, Type sourceInterface3, Type sourceInterface4)
- {
- Value = sourceInterface1.FullName + "\0" + sourceInterface2.FullName + "\0" + sourceInterface3.FullName + "\0" + sourceInterface4.FullName;
- }
-
- public string Value { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IBindCtx.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IBindCtx.cs
deleted file mode 100644
index 0ad56c23bd9..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IBindCtx.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-// 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.Runtime.InteropServices.ComTypes
-{
- [StructLayout(LayoutKind.Sequential)]
- public struct BIND_OPTS
- {
- public int cbStruct;
- public int grfFlags;
- public int grfMode;
- public int dwTickCountDeadline;
- }
-
- [Guid("0000000e-0000-0000-C000-000000000046")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComImport]
- public interface IBindCtx
- {
- void RegisterObjectBound([MarshalAs(UnmanagedType.Interface)] object punk);
- void RevokeObjectBound([MarshalAs(UnmanagedType.Interface)] object punk);
- void ReleaseBoundObjects();
- void SetBindOptions([In] ref BIND_OPTS pbindopts);
- void GetBindOptions(ref BIND_OPTS pbindopts);
- void GetRunningObjectTable(out IRunningObjectTable? pprot);
- void RegisterObjectParam([MarshalAs(UnmanagedType.LPWStr)] string pszKey, [MarshalAs(UnmanagedType.Interface)] object punk);
- void GetObjectParam([MarshalAs(UnmanagedType.LPWStr)] string pszKey, [MarshalAs(UnmanagedType.Interface)] out object? ppunk);
- void EnumObjectParam(out IEnumString? ppenum);
- [PreserveSig]
- int RevokeObjectParam([MarshalAs(UnmanagedType.LPWStr)] string pszKey);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IConnectionPoint.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IConnectionPoint.cs
deleted file mode 100644
index b2ce1928a13..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IConnectionPoint.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-// 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.Runtime.InteropServices.ComTypes
-{
- [Guid("B196B286-BAB4-101A-B69C-00AA00341D07")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComImport]
- public interface IConnectionPoint
- {
- void GetConnectionInterface(out Guid pIID);
- void GetConnectionPointContainer(out IConnectionPointContainer ppCPC);
- void Advise([MarshalAs(UnmanagedType.Interface)] object pUnkSink, out int pdwCookie);
- void Unadvise(int dwCookie);
- void EnumConnections(out IEnumConnections ppEnum);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IConnectionPointContainer.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IConnectionPointContainer.cs
deleted file mode 100644
index 4dd08658a0d..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IConnectionPointContainer.cs
+++ /dev/null
@@ -1,15 +0,0 @@
-// 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.Runtime.InteropServices.ComTypes
-{
- [Guid("B196B284-BAB4-101A-B69C-00AA00341D07")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComImport]
- public interface IConnectionPointContainer
- {
- void EnumConnectionPoints(out IEnumConnectionPoints ppEnum);
- void FindConnectionPoint([In] ref Guid riid, out IConnectionPoint? ppCP);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IEnumConnectionPoints.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IEnumConnectionPoints.cs
deleted file mode 100644
index 99df6ac60e4..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IEnumConnectionPoints.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-// 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.Runtime.InteropServices.ComTypes
-{
- [Guid("B196B285-BAB4-101A-B69C-00AA00341D07")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComImport]
- public interface IEnumConnectionPoints
- {
- [PreserveSig]
- int Next(int celt, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0), Out] IConnectionPoint[] rgelt, IntPtr pceltFetched);
- [PreserveSig]
- int Skip(int celt);
- void Reset();
- void Clone(out IEnumConnectionPoints ppenum);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IEnumConnections.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IEnumConnections.cs
deleted file mode 100644
index 951685beff7..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IEnumConnections.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-// 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.Runtime.InteropServices.ComTypes
-{
- [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
- public struct CONNECTDATA
- {
- [MarshalAs(UnmanagedType.Interface)]
- public object pUnk;
- public int dwCookie;
- }
-
- [Guid("B196B287-BAB4-101A-B69C-00AA00341D07")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComImport]
- public interface IEnumConnections
- {
- [PreserveSig]
- int Next(int celt, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0), Out] CONNECTDATA[] rgelt, IntPtr pceltFetched);
- [PreserveSig]
- int Skip(int celt);
- void Reset();
- void Clone(out IEnumConnections ppenum);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IEnumMoniker.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IEnumMoniker.cs
deleted file mode 100644
index 9a63ba0a11a..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IEnumMoniker.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-// 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.Runtime.InteropServices.ComTypes
-{
- [Guid("00000102-0000-0000-C000-000000000046")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComImport]
- public interface IEnumMoniker
- {
- [PreserveSig]
- int Next(int celt, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0), Out] IMoniker[] rgelt, IntPtr pceltFetched);
- [PreserveSig]
- int Skip(int celt);
- void Reset();
- void Clone(out IEnumMoniker ppenum);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IEnumString.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IEnumString.cs
deleted file mode 100644
index 57fc59121f0..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IEnumString.cs
+++ /dev/null
@@ -1,19 +0,0 @@
-// 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.Runtime.InteropServices.ComTypes
-{
- [Guid("00000101-0000-0000-C000-000000000046")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComImport]
- public interface IEnumString
- {
- [PreserveSig]
- int Next(int celt, [MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPWStr, SizeParamIndex = 0), Out] string[] rgelt, IntPtr pceltFetched);
- [PreserveSig]
- int Skip(int celt);
- void Reset();
- void Clone(out IEnumString ppenum);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IEnumVARIANT.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IEnumVARIANT.cs
deleted file mode 100644
index bb6688ee2c7..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IEnumVARIANT.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-// 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.Runtime.InteropServices.ComTypes
-{
- [Guid("00020404-0000-0000-C000-000000000046")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComImport]
- public interface IEnumVARIANT
- {
- [PreserveSig]
- int Next(int celt, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 0), Out] object?[] rgVar, IntPtr pceltFetched);
-
- [PreserveSig]
- int Skip(int celt);
-
- [PreserveSig]
- int Reset();
-
- IEnumVARIANT Clone();
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IMoniker.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IMoniker.cs
deleted file mode 100644
index f2d5242294d..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IMoniker.cs
+++ /dev/null
@@ -1,49 +0,0 @@
-// 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.Runtime.InteropServices.ComTypes
-{
- [StructLayout(LayoutKind.Sequential)]
- public struct FILETIME
- {
- public int dwLowDateTime;
- public int dwHighDateTime;
- }
-
- [Guid("0000000f-0000-0000-C000-000000000046")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComImport]
- public interface IMoniker
- {
- // IPersist portion
- void GetClassID(out Guid pClassID);
-
- // IPersistStream portion
- [PreserveSig]
- int IsDirty();
- void Load(IStream pStm);
- void Save(IStream pStm, [MarshalAs(UnmanagedType.Bool)] bool fClearDirty);
- void GetSizeMax(out long pcbSize);
-
- // IMoniker portion
- void BindToObject(IBindCtx pbc, IMoniker? pmkToLeft, [In] ref Guid riidResult, [MarshalAs(UnmanagedType.Interface)] out object ppvResult);
- void BindToStorage(IBindCtx pbc, IMoniker? pmkToLeft, [In] ref Guid riid, [MarshalAs(UnmanagedType.Interface)] out object ppvObj);
- void Reduce(IBindCtx pbc, int dwReduceHowFar, ref IMoniker? ppmkToLeft, out IMoniker? ppmkReduced);
- void ComposeWith(IMoniker pmkRight, [MarshalAs(UnmanagedType.Bool)] bool fOnlyIfNotGeneric, out IMoniker? ppmkComposite);
- void Enum([MarshalAs(UnmanagedType.Bool)] bool fForward, out IEnumMoniker? ppenumMoniker);
- [PreserveSig]
- int IsEqual(IMoniker pmkOtherMoniker);
- void Hash(out int pdwHash);
- [PreserveSig]
- int IsRunning(IBindCtx pbc, IMoniker? pmkToLeft, IMoniker? pmkNewlyRunning);
- void GetTimeOfLastChange(IBindCtx pbc, IMoniker? pmkToLeft, out FILETIME pFileTime);
- void Inverse(out IMoniker ppmk);
- void CommonPrefixWith(IMoniker pmkOther, out IMoniker? ppmkPrefix);
- void RelativePathTo(IMoniker pmkOther, out IMoniker? ppmkRelPath);
- void GetDisplayName(IBindCtx pbc, IMoniker? pmkToLeft, [MarshalAs(UnmanagedType.LPWStr)] out string ppszDisplayName);
- void ParseDisplayName(IBindCtx pbc, IMoniker pmkToLeft, [MarshalAs(UnmanagedType.LPWStr)] string pszDisplayName, out int pchEaten, out IMoniker ppmkOut);
- [PreserveSig]
- int IsSystemMoniker(out int pdwMksys);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IPersistFile.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IPersistFile.cs
deleted file mode 100644
index 4ae9d127ea9..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IPersistFile.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-// 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.Runtime.InteropServices.ComTypes
-{
- [Guid("0000010b-0000-0000-C000-000000000046")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComImport]
- public interface IPersistFile
- {
- // IPersist portion
- void GetClassID(out Guid pClassID);
-
- // IPersistFile portion
- [PreserveSig]
- int IsDirty();
- void Load([MarshalAs(UnmanagedType.LPWStr)] string pszFileName, int dwMode);
- void Save([MarshalAs(UnmanagedType.LPWStr)] string? pszFileName, [MarshalAs(UnmanagedType.Bool)] bool fRemember);
- void SaveCompleted([MarshalAs(UnmanagedType.LPWStr)] string pszFileName);
- void GetCurFile([MarshalAs(UnmanagedType.LPWStr)] out string ppszFileName);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IRunningObjectTable.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IRunningObjectTable.cs
deleted file mode 100644
index 1884fcc99b5..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IRunningObjectTable.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-// 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.Runtime.InteropServices.ComTypes
-{
- [Guid("00000010-0000-0000-C000-000000000046")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComImport]
- public interface IRunningObjectTable
- {
- int Register(int grfFlags, [MarshalAs(UnmanagedType.Interface)] object punkObject, IMoniker pmkObjectName);
- void Revoke(int dwRegister);
- [PreserveSig]
- int IsRunning(IMoniker pmkObjectName);
- [PreserveSig]
- int GetObject(IMoniker pmkObjectName, [MarshalAs(UnmanagedType.Interface)] out object ppunkObject);
- void NoteChangeTime(int dwRegister, ref FILETIME pfiletime);
- [PreserveSig]
- int GetTimeOfLastChange(IMoniker pmkObjectName, out FILETIME pfiletime);
- void EnumRunning(out IEnumMoniker ppenumMoniker);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IStream.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IStream.cs
deleted file mode 100644
index 09b284041e7..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/IStream.cs
+++ /dev/null
@@ -1,43 +0,0 @@
-// 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.Runtime.InteropServices.ComTypes
-{
- [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
- public struct STATSTG
- {
- public string pwcsName;
- public int type;
- public long cbSize;
- public FILETIME mtime;
- public FILETIME ctime;
- public FILETIME atime;
- public int grfMode;
- public int grfLocksSupported;
- public Guid clsid;
- public int grfStateBits;
- public int reserved;
- }
-
- [Guid("0000000c-0000-0000-C000-000000000046")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComImport]
- public interface IStream
- {
- // ISequentialStream portion
- void Read([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1), Out] byte[] pv, int cb, IntPtr pcbRead);
- void Write([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] byte[] pv, int cb, IntPtr pcbWritten);
-
- // IStream portion
- void Seek(long dlibMove, int dwOrigin, IntPtr plibNewPosition);
- void SetSize(long libNewSize);
- void CopyTo(IStream pstm, long cb, IntPtr pcbRead, IntPtr pcbWritten);
- void Commit(int grfCommitFlags);
- void Revert();
- void LockRegion(long libOffset, long cb, int dwLockType);
- void UnlockRegion(long libOffset, long cb, int dwLockType);
- void Stat(out STATSTG pstatstg, int grfStatFlag);
- void Clone(out IStream ppstm);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeComp.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeComp.cs
deleted file mode 100644
index 7e637936151..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeComp.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-// 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.Runtime.InteropServices.ComTypes
-{
- public enum DESCKIND
- {
- DESCKIND_NONE = 0,
- DESCKIND_FUNCDESC = DESCKIND_NONE + 1,
- DESCKIND_VARDESC = DESCKIND_FUNCDESC + 1,
- DESCKIND_TYPECOMP = DESCKIND_VARDESC + 1,
- DESCKIND_IMPLICITAPPOBJ = DESCKIND_TYPECOMP + 1,
- DESCKIND_MAX = DESCKIND_IMPLICITAPPOBJ + 1
- }
-
- [StructLayout(LayoutKind.Explicit, CharSet = CharSet.Unicode)]
- public struct BINDPTR
- {
- [FieldOffset(0)]
- public IntPtr lpfuncdesc;
- [FieldOffset(0)]
- public IntPtr lpvardesc;
- [FieldOffset(0)]
- public IntPtr lptcomp;
- }
-
- [Guid("00020403-0000-0000-C000-000000000046")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComImport]
- public interface ITypeComp
- {
- void Bind([MarshalAs(UnmanagedType.LPWStr)] string szName, int lHashVal, short wFlags, out ITypeInfo ppTInfo, out DESCKIND pDescKind, out BINDPTR pBindPtr);
- void BindType([MarshalAs(UnmanagedType.LPWStr)] string szName, int lHashVal, out ITypeInfo ppTInfo, out ITypeComp ppTComp);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeInfo.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeInfo.cs
deleted file mode 100644
index 0b00fdceab8..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeInfo.cs
+++ /dev/null
@@ -1,303 +0,0 @@
-// 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.Runtime.InteropServices.ComTypes
-{
- public enum TYPEKIND
- {
- TKIND_ENUM = 0,
- TKIND_RECORD = TKIND_ENUM + 1,
- TKIND_MODULE = TKIND_RECORD + 1,
- TKIND_INTERFACE = TKIND_MODULE + 1,
- TKIND_DISPATCH = TKIND_INTERFACE + 1,
- TKIND_COCLASS = TKIND_DISPATCH + 1,
- TKIND_ALIAS = TKIND_COCLASS + 1,
- TKIND_UNION = TKIND_ALIAS + 1,
- TKIND_MAX = TKIND_UNION + 1
- }
-
- [Flags]
- public enum TYPEFLAGS : short
- {
- TYPEFLAG_FAPPOBJECT = 0x1,
- TYPEFLAG_FCANCREATE = 0x2,
- TYPEFLAG_FLICENSED = 0x4,
- TYPEFLAG_FPREDECLID = 0x8,
- TYPEFLAG_FHIDDEN = 0x10,
- TYPEFLAG_FCONTROL = 0x20,
- TYPEFLAG_FDUAL = 0x40,
- TYPEFLAG_FNONEXTENSIBLE = 0x80,
- TYPEFLAG_FOLEAUTOMATION = 0x100,
- TYPEFLAG_FRESTRICTED = 0x200,
- TYPEFLAG_FAGGREGATABLE = 0x400,
- TYPEFLAG_FREPLACEABLE = 0x800,
- TYPEFLAG_FDISPATCHABLE = 0x1000,
- TYPEFLAG_FREVERSEBIND = 0x2000,
- TYPEFLAG_FPROXY = 0x4000
- }
-
- [Flags]
- public enum IMPLTYPEFLAGS
- {
- IMPLTYPEFLAG_FDEFAULT = 0x1,
- IMPLTYPEFLAG_FSOURCE = 0x2,
- IMPLTYPEFLAG_FRESTRICTED = 0x4,
- IMPLTYPEFLAG_FDEFAULTVTABLE = 0x8,
- }
-
- [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
- public struct TYPEATTR
- {
- // Constant used with the memid fields.
- public const int MEMBER_ID_NIL = unchecked((int)0xFFFFFFFF);
-
- // Actual fields of the TypeAttr struct.
- public Guid guid;
- public int lcid;
- public int dwReserved;
- public int memidConstructor;
- public int memidDestructor;
- public IntPtr lpstrSchema;
- public int cbSizeInstance;
- public TYPEKIND typekind;
- public short cFuncs;
- public short cVars;
- public short cImplTypes;
- public short cbSizeVft;
- public short cbAlignment;
- public TYPEFLAGS wTypeFlags;
- public short wMajorVerNum;
- public short wMinorVerNum;
- public TYPEDESC tdescAlias;
- public IDLDESC idldescType;
- }
-
- [StructLayout(LayoutKind.Sequential)]
- public struct FUNCDESC
- {
- public int memid; // MEMBERID memid;
- public IntPtr lprgscode; // /* [size_is(cScodes)] */ SCODE RPC_FAR *lprgscode;
- public IntPtr lprgelemdescParam; // /* [size_is(cParams)] */ ELEMDESC __RPC_FAR *lprgelemdescParam;
- public FUNCKIND funckind; // FUNCKIND funckind;
- public INVOKEKIND invkind; // INVOKEKIND invkind;
- public CALLCONV callconv; // CALLCONV callconv;
- public short cParams; // short cParams;
- public short cParamsOpt; // short cParamsOpt;
- public short oVft; // short oVft;
- public short cScodes; // short cScodes;
- public ELEMDESC elemdescFunc; // ELEMDESC elemdescFunc;
- public short wFuncFlags; // WORD wFuncFlags;
- }
-
- [Flags]
- public enum IDLFLAG : short
- {
- IDLFLAG_NONE = PARAMFLAG.PARAMFLAG_NONE,
- IDLFLAG_FIN = PARAMFLAG.PARAMFLAG_FIN,
- IDLFLAG_FOUT = PARAMFLAG.PARAMFLAG_FOUT,
- IDLFLAG_FLCID = PARAMFLAG.PARAMFLAG_FLCID,
- IDLFLAG_FRETVAL = PARAMFLAG.PARAMFLAG_FRETVAL
- }
-
- [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
- public struct IDLDESC
- {
- public IntPtr dwReserved;
- public IDLFLAG wIDLFlags;
- }
-
- [Flags]
- public enum PARAMFLAG : short
- {
- PARAMFLAG_NONE = 0,
- PARAMFLAG_FIN = 0x1,
- PARAMFLAG_FOUT = 0x2,
- PARAMFLAG_FLCID = 0x4,
- PARAMFLAG_FRETVAL = 0x8,
- PARAMFLAG_FOPT = 0x10,
- PARAMFLAG_FHASDEFAULT = 0x20,
- PARAMFLAG_FHASCUSTDATA = 0x40
- }
-
- [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
- public struct PARAMDESC
- {
- public IntPtr lpVarValue;
- public PARAMFLAG wParamFlags;
- }
-
- [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
- public struct TYPEDESC
- {
- public IntPtr lpValue;
- public short vt;
- }
-
- [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
- public struct ELEMDESC
- {
- public TYPEDESC tdesc;
-
- [StructLayout(LayoutKind.Explicit, CharSet = CharSet.Unicode)]
- public struct DESCUNION
- {
- [FieldOffset(0)]
- public IDLDESC idldesc;
- [FieldOffset(0)]
- public PARAMDESC paramdesc;
- }
- public DESCUNION desc;
- }
-
- public enum VARKIND : int
- {
- VAR_PERINSTANCE = 0x0,
- VAR_STATIC = 0x1,
- VAR_CONST = 0x2,
- VAR_DISPATCH = 0x3
- }
-
- [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
-
- public struct VARDESC
- {
- public int memid;
- public string lpstrSchema;
-
- [StructLayout(LayoutKind.Explicit, CharSet = CharSet.Unicode)]
- public struct DESCUNION
- {
- [FieldOffset(0)]
- public int oInst;
- [FieldOffset(0)]
- public IntPtr lpvarValue;
- }
-
- public DESCUNION desc;
-
- public ELEMDESC elemdescVar;
- public short wVarFlags;
- public VARKIND varkind;
- }
-
- [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
- public struct DISPPARAMS
- {
- public IntPtr rgvarg;
- public IntPtr rgdispidNamedArgs;
- public int cArgs;
- public int cNamedArgs;
- }
-
- [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
- public struct EXCEPINFO
- {
- public short wCode;
- public short wReserved;
- [MarshalAs(UnmanagedType.BStr)] public string bstrSource;
- [MarshalAs(UnmanagedType.BStr)] public string bstrDescription;
- [MarshalAs(UnmanagedType.BStr)] public string bstrHelpFile;
- public int dwHelpContext;
- public IntPtr pvReserved;
- public IntPtr pfnDeferredFillIn;
- public int scode;
- }
-
- public enum FUNCKIND : int
- {
- FUNC_VIRTUAL = 0,
- FUNC_PUREVIRTUAL = 1,
- FUNC_NONVIRTUAL = 2,
- FUNC_STATIC = 3,
- FUNC_DISPATCH = 4
- }
-
- [Flags]
- public enum INVOKEKIND : int
- {
- INVOKE_FUNC = 0x1,
- INVOKE_PROPERTYGET = 0x2,
- INVOKE_PROPERTYPUT = 0x4,
- INVOKE_PROPERTYPUTREF = 0x8
- }
-
- public enum CALLCONV : int
- {
- CC_CDECL = 1,
- CC_MSCPASCAL = 2,
- CC_PASCAL = CC_MSCPASCAL,
- CC_MACPASCAL = 3,
- CC_STDCALL = 4,
- CC_RESERVED = 5,
- CC_SYSCALL = 6,
- CC_MPWCDECL = 7,
- CC_MPWPASCAL = 8,
- CC_MAX = 9
- }
-
- [Flags]
- public enum FUNCFLAGS : short
- {
- FUNCFLAG_FRESTRICTED = 0x1,
- FUNCFLAG_FSOURCE = 0x2,
- FUNCFLAG_FBINDABLE = 0x4,
- FUNCFLAG_FREQUESTEDIT = 0x8,
- FUNCFLAG_FDISPLAYBIND = 0x10,
- FUNCFLAG_FDEFAULTBIND = 0x20,
- FUNCFLAG_FHIDDEN = 0x40,
- FUNCFLAG_FUSESGETLASTERROR = 0x80,
- FUNCFLAG_FDEFAULTCOLLELEM = 0x100,
- FUNCFLAG_FUIDEFAULT = 0x200,
- FUNCFLAG_FNONBROWSABLE = 0x400,
- FUNCFLAG_FREPLACEABLE = 0x800,
- FUNCFLAG_FIMMEDIATEBIND = 0x1000
- }
-
- [Flags]
- public enum VARFLAGS : short
- {
- VARFLAG_FREADONLY = 0x1,
- VARFLAG_FSOURCE = 0x2,
- VARFLAG_FBINDABLE = 0x4,
- VARFLAG_FREQUESTEDIT = 0x8,
- VARFLAG_FDISPLAYBIND = 0x10,
- VARFLAG_FDEFAULTBIND = 0x20,
- VARFLAG_FHIDDEN = 0x40,
- VARFLAG_FRESTRICTED = 0x80,
- VARFLAG_FDEFAULTCOLLELEM = 0x100,
- VARFLAG_FUIDEFAULT = 0x200,
- VARFLAG_FNONBROWSABLE = 0x400,
- VARFLAG_FREPLACEABLE = 0x800,
- VARFLAG_FIMMEDIATEBIND = 0x1000
- }
-
- [Guid("00020401-0000-0000-C000-000000000046")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComImport]
- public interface ITypeInfo
- {
- void GetTypeAttr(out IntPtr ppTypeAttr);
- void GetTypeComp(out ITypeComp ppTComp);
- void GetFuncDesc(int index, out IntPtr ppFuncDesc);
- void GetVarDesc(int index, out IntPtr ppVarDesc);
- void GetNames(int memid, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2), Out] string[] rgBstrNames, int cMaxNames, out int pcNames);
- void GetRefTypeOfImplType(int index, out int href);
- void GetImplTypeFlags(int index, out IMPLTYPEFLAGS pImplTypeFlags);
- void GetIDsOfNames([MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPWStr, SizeParamIndex = 1), In] string[] rgszNames, int cNames, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1), Out] int[] pMemId);
- void Invoke([MarshalAs(UnmanagedType.IUnknown)] object pvInstance, int memid, short wFlags, ref DISPPARAMS pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, out int puArgErr);
- void GetDocumentation(int index, out string strName, out string strDocString, out int dwHelpContext, out string strHelpFile);
- void GetDllEntry(int memid, INVOKEKIND invKind, IntPtr pBstrDllName, IntPtr pBstrName, IntPtr pwOrdinal);
- void GetRefTypeInfo(int hRef, out ITypeInfo ppTI);
- void AddressOfMember(int memid, INVOKEKIND invKind, out IntPtr ppv);
- void CreateInstance([MarshalAs(UnmanagedType.IUnknown)] object? pUnkOuter, [In] ref Guid riid, [MarshalAs(UnmanagedType.IUnknown), Out] out object ppvObj);
- void GetMops(int memid, out string? pBstrMops);
- void GetContainingTypeLib(out ITypeLib ppTLB, out int pIndex);
- [PreserveSig]
- void ReleaseTypeAttr(IntPtr pTypeAttr);
- [PreserveSig]
- void ReleaseFuncDesc(IntPtr pFuncDesc);
- [PreserveSig]
- void ReleaseVarDesc(IntPtr pVarDesc);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeInfo2.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeInfo2.cs
deleted file mode 100644
index e322f8a4f86..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeInfo2.cs
+++ /dev/null
@@ -1,51 +0,0 @@
-// 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.Runtime.InteropServices.ComTypes
-{
- [Guid("00020412-0000-0000-C000-000000000046")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComImport]
- public interface ITypeInfo2 : ITypeInfo
- {
- new void GetTypeAttr(out IntPtr ppTypeAttr);
- new void GetTypeComp(out ITypeComp ppTComp);
- new void GetFuncDesc(int index, out IntPtr ppFuncDesc);
- new void GetVarDesc(int index, out IntPtr ppVarDesc);
- new void GetNames(int memid, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 2), Out] string[] rgBstrNames, int cMaxNames, out int pcNames);
- new void GetRefTypeOfImplType(int index, out int href);
- new void GetImplTypeFlags(int index, out IMPLTYPEFLAGS pImplTypeFlags);
- new void GetIDsOfNames([MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.LPWStr, SizeParamIndex = 1), In] string[] rgszNames, int cNames, [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1), Out] int[] pMemId);
- new void Invoke([MarshalAs(UnmanagedType.IUnknown)] object pvInstance, int memid, short wFlags, ref DISPPARAMS pDispParams, IntPtr pVarResult, IntPtr pExcepInfo, out int puArgErr);
- new void GetDocumentation(int index, out string strName, out string strDocString, out int dwHelpContext, out string strHelpFile);
- new void GetDllEntry(int memid, INVOKEKIND invKind, IntPtr pBstrDllName, IntPtr pBstrName, IntPtr pwOrdinal);
- new void GetRefTypeInfo(int hRef, out ITypeInfo ppTI);
- new void AddressOfMember(int memid, INVOKEKIND invKind, out IntPtr ppv);
- new void CreateInstance([MarshalAs(UnmanagedType.IUnknown)] object? pUnkOuter, [In] ref Guid riid, [MarshalAs(UnmanagedType.IUnknown), Out] out object ppvObj);
- new void GetMops(int memid, out string? pBstrMops);
- new void GetContainingTypeLib(out ITypeLib ppTLB, out int pIndex);
- [PreserveSig]
- new void ReleaseTypeAttr(IntPtr pTypeAttr);
- [PreserveSig]
- new void ReleaseFuncDesc(IntPtr pFuncDesc);
- [PreserveSig]
- new void ReleaseVarDesc(IntPtr pVarDesc);
- void GetTypeKind(out TYPEKIND pTypeKind);
- void GetTypeFlags(out int pTypeFlags);
- void GetFuncIndexOfMemId(int memid, INVOKEKIND invKind, out int pFuncIndex);
- void GetVarIndexOfMemId(int memid, out int pVarIndex);
- void GetCustData(ref Guid guid, out object pVarVal);
- void GetFuncCustData(int index, ref Guid guid, out object pVarVal);
- void GetParamCustData(int indexFunc, int indexParam, ref Guid guid, out object pVarVal);
- void GetVarCustData(int index, ref Guid guid, out object pVarVal);
- void GetImplTypeCustData(int index, ref Guid guid, out object pVarVal);
- [LCIDConversion(1)]
- void GetDocumentation2(int memid, out string pbstrHelpString, out int pdwHelpStringContext, out string pbstrHelpStringDll);
- void GetAllCustData(IntPtr pCustData);
- void GetAllFuncCustData(int index, IntPtr pCustData);
- void GetAllParamCustData(int indexFunc, int indexParam, IntPtr pCustData);
- void GetAllVarCustData(int index, IntPtr pCustData);
- void GetAllImplTypeCustData(int index, IntPtr pCustData);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeLib.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeLib.cs
deleted file mode 100644
index 6cab58e117d..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeLib.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-// 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.Runtime.InteropServices.ComTypes
-{
- public enum SYSKIND
- {
- SYS_WIN16 = 0,
- SYS_WIN32 = SYS_WIN16 + 1,
- SYS_MAC = SYS_WIN32 + 1,
- SYS_WIN64 = SYS_MAC + 1
- }
-
- [Flags]
- public enum LIBFLAGS : short
- {
- LIBFLAG_FRESTRICTED = 0x1,
- LIBFLAG_FCONTROL = 0x2,
- LIBFLAG_FHIDDEN = 0x4,
- LIBFLAG_FHASDISKIMAGE = 0x8
- }
-
- [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)]
- public struct TYPELIBATTR
- {
- public Guid guid;
- public int lcid;
- public SYSKIND syskind;
- public short wMajorVerNum;
- public short wMinorVerNum;
- public LIBFLAGS wLibFlags;
- }
-
- [Guid("00020402-0000-0000-C000-000000000046")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComImport]
- public interface ITypeLib
- {
- [PreserveSig]
- int GetTypeInfoCount();
- void GetTypeInfo(int index, out ITypeInfo ppTI);
- void GetTypeInfoType(int index, out TYPEKIND pTKind);
- void GetTypeInfoOfGuid(ref Guid guid, out ITypeInfo ppTInfo);
- void GetLibAttr(out IntPtr ppTLibAttr);
- void GetTypeComp(out ITypeComp ppTComp);
- void GetDocumentation(int index, out string strName, out string strDocString, out int dwHelpContext, out string strHelpFile);
- [return: MarshalAs(UnmanagedType.Bool)]
- bool IsName([MarshalAs(UnmanagedType.LPWStr)] string szNameBuf, int lHashVal);
- void FindName([MarshalAs(UnmanagedType.LPWStr)] string szNameBuf, int lHashVal, [MarshalAs(UnmanagedType.LPArray), Out] ITypeInfo[] ppTInfo, [MarshalAs(UnmanagedType.LPArray), Out] int[] rgMemId, ref short pcFound);
- [PreserveSig]
- void ReleaseTLibAttr(IntPtr pTLibAttr);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs
deleted file mode 100644
index 61703d1cfe3..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComTypes/ITypeLib2.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-// 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.Runtime.InteropServices.ComTypes
-{
- [Guid("00020411-0000-0000-C000-000000000046")]
- [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)]
- [ComImport]
- public interface ITypeLib2 : ITypeLib
- {
- [PreserveSig]
- new int GetTypeInfoCount();
- new void GetTypeInfo(int index, out ITypeInfo ppTI);
- new void GetTypeInfoType(int index, out TYPEKIND pTKind);
- new void GetTypeInfoOfGuid(ref Guid guid, out ITypeInfo ppTInfo);
- new void GetLibAttr(out IntPtr ppTLibAttr);
- new void GetTypeComp(out ITypeComp ppTComp);
- new void GetDocumentation(int index, out string strName, out string strDocString, out int dwHelpContext, out string strHelpFile);
- [return: MarshalAs(UnmanagedType.Bool)]
- new bool IsName([MarshalAs(UnmanagedType.LPWStr)] string szNameBuf, int lHashVal);
- new void FindName([MarshalAs(UnmanagedType.LPWStr)] string szNameBuf, int lHashVal, [MarshalAs(UnmanagedType.LPArray), Out] ITypeInfo[] ppTInfo, [MarshalAs(UnmanagedType.LPArray), Out] int[] rgMemId, ref short pcFound);
- [PreserveSig]
- new void ReleaseTLibAttr(IntPtr pTLibAttr);
- void GetCustData(ref Guid guid, out object pVarVal);
- [LCIDConversion(1)]
- void GetDocumentation2(int index, out string pbstrHelpString, out int pdwHelpStringContext, out string pbstrHelpStringDll);
- void GetLibStatistics(IntPtr pcUniqueNames, out int pcchUniqueNames);
- void GetAllCustData(IntPtr pCustData);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComVisibleAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComVisibleAttribute.cs
deleted file mode 100644
index 84b9505a5a4..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ComVisibleAttribute.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Interface | AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Delegate | AttributeTargets.Enum | AttributeTargets.Field | AttributeTargets.Method | AttributeTargets.Property, Inherited = false)]
- public sealed class ComVisibleAttribute : Attribute
- {
- public ComVisibleAttribute(bool visibility)
- {
- Value = visibility;
- }
-
- public bool Value { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CriticalHandle.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CriticalHandle.cs
deleted file mode 100644
index fc6a27d18ca..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CriticalHandle.cs
+++ /dev/null
@@ -1,211 +0,0 @@
-// 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.
-
-/*============================================================
-**
-**
-**
-** A specially designed handle wrapper to ensure we never leak
-** an OS handle. The runtime treats this class specially during
-** P/Invoke marshaling and finalization. Users should write
-** subclasses of CriticalHandle for each distinct handle type.
-** This class is similar to SafeHandle, but lacks the ref counting
-** behavior on marshaling that prevents handle recycling errors
-** or security holes. This lowers the overhead of using the handle
-** considerably, but leaves the onus on the caller to protect
-** themselves from any recycling effects.
-**
-** **** NOTE ****
-**
-** Since there are no ref counts tracking handle usage there is
-** no thread safety either. Your application must ensure that
-** usages of the handle do not cross with attempts to close the
-** handle (or tolerate such crossings). Normal GC mechanics will
-** prevent finalization until the handle class isn't used any more,
-** but explicit Close or Dispose operations may be initiated at any
-** time.
-**
-** Similarly, multiple calls to Close or Dispose on different
-** threads at the same time may cause the ReleaseHandle method to be
-** called more than once.
-**
-** In general (and as might be inferred from the lack of handle
-** recycle protection) you should be very cautious about exposing
-** CriticalHandle instances directly or indirectly to untrusted users.
-** At a minimum you should restrict their ability to queue multiple
-** operations against a single handle at the same time or block their
-** access to Close and Dispose unless you are very comfortable with the
-** semantics of passing an invalid (or possibly invalidated and
-** reallocated) to the unamanged routines you marshal your handle to
-** (and the effects of closing such a handle while those calls are in
-** progress). The runtime cannot protect you from undefined program
-** behvior that might result from such scenarios. You have been warned.
-**
-**
-===========================================================*/
-
-using System.Runtime.ConstrainedExecution;
-
-/*
- Problems addressed by the CriticalHandle class:
- 1) Critical finalization - ensure we never leak OS resources in SQL. Done
- without running truly arbitrary & unbounded amounts of managed code.
- 2) Reduced graph promotion - during finalization, keep object graph small
- 3) GC.KeepAlive behavior - P/Invoke vs. finalizer thread race condition (HandleRef)
- 4) Enforcement of the above via the type system - Don't use IntPtr anymore.
-
- Subclasses of CriticalHandle will implement the ReleaseHandle
- abstract method used to execute any code required to free the
- handle. This method will be prepared as a constrained execution
- region at instance construction time (along with all the methods in
- its statically determinable call graph). This implies that we won't
- get any inconvenient jit allocation errors or rude thread abort
- interrupts while releasing the handle but the user must still write
- careful code to avoid injecting fault paths of their own (see the
- CER spec for more details). In particular, any sub-methods you call
- should be decorated with a reliability contract of the appropriate
- level. In most cases this should be:
- ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)
-
- Subclasses must also implement the IsInvalid property so that the
- infrastructure can tell when critical finalization is actually required.
- Again, this method is prepared ahead of time. It's envisioned that direct
- subclasses of CriticalHandle will provide an IsInvalid implementation that suits
- the general type of handle they support (null is invalid, -1 is invalid etc.)
- and then these classes will be further derived for specific handle types.
-
- Most classes using CriticalHandle should not provide a finalizer. If they do
- need to do so (ie, for flushing out file buffers, needing to write some data
- back into memory, etc), then they can provide a finalizer that will be
- guaranteed to run before the CriticalHandle's critical finalizer.
-
- Subclasses are expected to be written as follows:
-
- internal sealed MyCriticalHandleSubclass : CriticalHandle {
- // Called by P/Invoke when returning CriticalHandles
- private MyCriticalHandleSubclass() : base(IntPtr.Zero)
- {
- }
-
- // Do not provide a finalizer - CriticalHandle's critical finalizer will
- // call ReleaseHandle for you.
-
- public override bool IsInvalid {
- get { return handle == IntPtr.Zero; }
- }
-
- [DllImport(Interop.Libraries.Kernel32), ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
- private static extern bool CloseHandle(IntPtr handle);
-
- override protected bool ReleaseHandle()
- {
- return CloseHandle(handle);
- }
- }
-
- Then elsewhere to create one of these CriticalHandles, define a method
- with the following type of signature (CreateFile follows this model).
- Note that when returning a CriticalHandle like this, P/Invoke will call your
- classes default constructor.
-
- [DllImport(Interop.Libraries.Kernel32)]
- private static extern MyCriticalHandleSubclass CreateHandle(int someState);
-
- */
-
-namespace System.Runtime.InteropServices
-{
- // This class should not be serializable - it's a handle
- public abstract partial class CriticalHandle : CriticalFinalizerObject, IDisposable
- {
- // ! Do not add or rearrange fields as the EE depends on this layout.
- //------------------------------------------------------------------
- protected IntPtr handle; // This must be protected so derived classes can use out params.
- private bool _isClosed; // Set by SetHandleAsInvalid or Close/Dispose/finalization.
-
- // Creates a CriticalHandle class. Users must then set the Handle property or allow P/Invoke marshaling to set it implicitly.
- protected CriticalHandle(IntPtr invalidHandleValue)
- {
- handle = invalidHandleValue;
- }
-
- ~CriticalHandle()
- {
- Dispose(false);
- }
-
- private void Cleanup()
- {
- if (IsClosed)
- return;
- _isClosed = true;
-
- if (IsInvalid)
- return;
-
- // Save last error from P/Invoke in case the implementation of
- // ReleaseHandle trashes it (important because this ReleaseHandle could
- // occur implicitly as part of unmarshaling another P/Invoke).
- int lastError = Marshal.GetLastWin32Error();
-
- ReleaseHandle();
-
- Marshal.SetLastWin32Error(lastError);
- GC.SuppressFinalize(this);
- }
-
- protected void SetHandle(IntPtr handle)
- {
- this.handle = handle;
- }
-
- // Returns whether the handle has been explicitly marked as closed
- // (Close/Dispose) or invalid (SetHandleAsInvalid).
- public bool IsClosed => _isClosed;
-
- // Returns whether the handle looks like an invalid value (i.e. matches one
- // of the handle's designated illegal values). CriticalHandle itself doesn't
- // know what an invalid handle looks like, so this method is abstract and
- // must be provided by a derived type.
- public abstract bool IsInvalid
- {
- get;
- }
-
- public void Close()
- {
- Dispose(true);
- }
-
- public void Dispose()
- {
- Dispose(true);
- }
-
- protected virtual void Dispose(bool disposing)
- {
- Cleanup();
- }
-
- // This should only be called for cases when you know for a fact that
- // your handle is invalid and you want to record that information.
- // An example is calling a syscall and getting back ERROR_INVALID_HANDLE.
- // This method will normally leak handles!
- public void SetHandleAsInvalid()
- {
- _isClosed = true;
- GC.SuppressFinalize(this);
- }
-
- // Implement this abstract method in your derived class to specify how to
- // free the handle. Be careful not write any code that's subject to faults
- // in this method (the runtime will prepare the infrastructure for you so
- // that no jit allocations etc. will occur, but don't allocate memory unless
- // you can deal with the failure and still free the handle).
- // The boolean returned should be true for success and false if a
- // catastrophic error occurred and you wish to trigger a diagnostic for
- // debugging purposes.
- protected abstract bool ReleaseHandle();
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CurrencyWrapper.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CurrencyWrapper.cs
deleted file mode 100644
index 373f9bb9c5e..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CurrencyWrapper.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-// 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.Runtime.InteropServices
-{
- // Wrapper that is converted to a variant with VT_CURRENCY.
- public sealed class CurrencyWrapper
- {
- public CurrencyWrapper(decimal obj)
- {
- WrappedObject = obj;
- }
-
- public CurrencyWrapper(object obj)
- {
- if (!(obj is decimal))
- throw new ArgumentException(SR.Arg_MustBeDecimal, nameof(obj));
-
- WrappedObject = (decimal)obj;
- }
-
- public decimal WrappedObject { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CustomQueryInterfaceMode.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CustomQueryInterfaceMode.cs
deleted file mode 100644
index 7b5eddacf4c..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CustomQueryInterfaceMode.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-// 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.Runtime.InteropServices
-{
- public enum CustomQueryInterfaceMode
- {
- Ignore = 0,
- Allow = 1,
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CustomQueryInterfaceResult.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CustomQueryInterfaceResult.cs
deleted file mode 100644
index 1e1d3fd7ead..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/CustomQueryInterfaceResult.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-// 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.Runtime.InteropServices
-{
- // The enum of the return value of IQuerable.GetInterface
- public enum CustomQueryInterfaceResult
- {
- Handled = 0,
- NotHandled = 1,
- Failed = 2,
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DefaultCharSetAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DefaultCharSetAttribute.cs
deleted file mode 100644
index 7a486f7017b..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DefaultCharSetAttribute.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Module, Inherited = false)]
- public sealed class DefaultCharSetAttribute : Attribute
- {
- public DefaultCharSetAttribute(CharSet charSet)
- {
- CharSet = charSet;
- }
-
- public CharSet CharSet { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DefaultDllImportSearchPathsAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DefaultDllImportSearchPathsAttribute.cs
deleted file mode 100644
index 1ff27fbbd55..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DefaultDllImportSearchPathsAttribute.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Method, AllowMultiple = false)]
- public sealed class DefaultDllImportSearchPathsAttribute : Attribute
- {
- public DefaultDllImportSearchPathsAttribute(DllImportSearchPath paths)
- {
- Paths = paths;
- }
-
- public DllImportSearchPath Paths { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DefaultParameterValueAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DefaultParameterValueAttribute.cs
deleted file mode 100644
index ed709f16d1c..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DefaultParameterValueAttribute.cs
+++ /dev/null
@@ -1,23 +0,0 @@
-// 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.Runtime.InteropServices
-{
- //
- // The DefaultParameterValueAttribute is used in C# to set
- // the default value for parameters when calling methods
- // from other languages. This is particularly useful for
- // methods defined in COM interop interfaces.
- //
- [AttributeUsage(AttributeTargets.Parameter)]
- public sealed class DefaultParameterValueAttribute : Attribute
- {
- public DefaultParameterValueAttribute(object? value)
- {
- Value = value;
- }
-
- public object? Value { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DispIdAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DispIdAttribute.cs
deleted file mode 100644
index 1f147280c5c..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DispIdAttribute.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Method | AttributeTargets.Field | AttributeTargets.Property | AttributeTargets.Event, Inherited = false)]
- public sealed class DispIdAttribute : Attribute
- {
- public DispIdAttribute(int dispId)
- {
- Value = dispId;
- }
-
- public int Value { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DispatchWrapper.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DispatchWrapper.cs
deleted file mode 100644
index 3bb1507203c..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DispatchWrapper.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-// 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.Runtime.InteropServices
-{
- // Wrapper that is converted to a variant with VT_DISPATCH
- public sealed class DispatchWrapper
- {
- public DispatchWrapper(object? obj)
- {
- if (obj != null)
- {
- // Make sure this guy has an IDispatch
- IntPtr pdisp = Marshal.GetIDispatchForObject(obj);
-
- // If we got here without throwing an exception, the QI for IDispatch succeeded.
- Marshal.Release(pdisp);
-
- WrappedObject = obj;
- }
- }
-
- public object? WrappedObject { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DllImportAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DllImportAttribute.cs
deleted file mode 100644
index 11e3deb21c3..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DllImportAttribute.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Method, Inherited = false)]
- public sealed class DllImportAttribute : Attribute
- {
- public DllImportAttribute(string dllName)
- {
- Value = dllName;
- }
-
- public string Value { get; }
-
- public string? EntryPoint;
- public CharSet CharSet;
- public bool SetLastError;
- public bool ExactSpelling;
- public CallingConvention CallingConvention;
- public bool BestFitMapping;
- public bool PreserveSig;
- public bool ThrowOnUnmappableChar;
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DllImportSearchPath.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DllImportSearchPath.cs
deleted file mode 100644
index 8dbdb40be96..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/DllImportSearchPath.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [Flags]
- public enum DllImportSearchPath
- {
- UseDllDirectoryForDependencies = 0x100,
- ApplicationDirectory = 0x200,
- UserDirectories = 0x400,
- System32 = 0x800,
- SafeDirectories = 0x1000,
- AssemblyDirectory = 0x2,
- LegacyBehavior = 0x0
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ErrorWrapper.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ErrorWrapper.cs
deleted file mode 100644
index d25f0231a44..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ErrorWrapper.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-// 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.Runtime.InteropServices
-{
- // Wrapper that is converted to a variant with VT_ERROR.
- public sealed class ErrorWrapper
- {
- public ErrorWrapper(int errorCode)
- {
- ErrorCode = errorCode;
- }
-
- public ErrorWrapper(object errorCode)
- {
- if (!(errorCode is int))
- throw new ArgumentException(SR.Arg_MustBeInt32, nameof(errorCode));
- ErrorCode = (int)errorCode;
- }
-
- public ErrorWrapper(Exception e)
- {
- ErrorCode = Marshal.GetHRForException(e);
- }
-
- public int ErrorCode { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ExternalException.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ExternalException.cs
deleted file mode 100644
index b9bc042986e..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ExternalException.cs
+++ /dev/null
@@ -1,81 +0,0 @@
-// 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.
-
-/*=============================================================================
-**
-**
-**
-** Purpose: Exception base class for all errors from Interop or Structured
-** Exception Handling code.
-**
-**
-=============================================================================*/
-
-using System.Globalization;
-using System.Runtime.Serialization;
-
-namespace System.Runtime.InteropServices
-{
- // Base exception for COM Interop errors &; Structured Exception Handler
- // exceptions.
- [Serializable]
- [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
- public class ExternalException : SystemException
- {
- public ExternalException()
- : base(SR.Arg_ExternalException)
- {
- HResult = HResults.E_FAIL;
- }
-
- public ExternalException(string? message)
- : base(message)
- {
- HResult = HResults.E_FAIL;
- }
-
- public ExternalException(string? message, Exception? inner)
- : base(message, inner)
- {
- HResult = HResults.E_FAIL;
- }
-
- public ExternalException(string? message, int errorCode)
- : base(message)
- {
- HResult = errorCode;
- }
-
- protected ExternalException(SerializationInfo info, StreamingContext context)
- : base(info, context)
- {
- }
-
- public virtual int ErrorCode => HResult;
-
- public override string ToString()
- {
- string message = Message;
- string className = GetType().ToString();
-
- string s = className + " (0x" + HResult.ToString("X8", CultureInfo.InvariantCulture) + ")";
-
- if (!string.IsNullOrEmpty(message))
- {
- s += ": " + message;
- }
-
- Exception? innerException = InnerException;
- if (innerException != null)
- {
- s += Environment.NewLineConst + InnerExceptionPrefix + innerException.ToString();
- }
-
- if (StackTrace != null)
- s += Environment.NewLineConst + StackTrace;
-
- return s;
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/FieldOffsetAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/FieldOffsetAttribute.cs
deleted file mode 100644
index 27e1097749f..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/FieldOffsetAttribute.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Field, Inherited = false)]
- public sealed class FieldOffsetAttribute : Attribute
- {
- public FieldOffsetAttribute(int offset)
- {
- Value = offset;
- }
-
- public int Value { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/GCHandle.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/GCHandle.cs
deleted file mode 100644
index b39bc98ef37..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/GCHandle.cs
+++ /dev/null
@@ -1,195 +0,0 @@
-// 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.Diagnostics;
-using System.Runtime.CompilerServices;
-using System.Threading;
-using Internal.Runtime.CompilerServices;
-
-#pragma warning disable SA1121 // explicitly using type aliases instead of built-in types
-#if BIT64
-using nint = System.Int64;
-#else
-using nint = System.Int32;
-#endif
-
-namespace System.Runtime.InteropServices
-{
- /// <summary>
- /// Represents an opaque, GC handle to a managed object. A GC handle is used when an
- /// object reference must be reachable from unmanaged memory.
- /// </summary>
- /// <remarks>
- /// There are 4 kinds of roots:
- /// Normal: Keeps the object from being collected.
- /// Weak: Allows object to be collected and handle contents will be zeroed.
- /// Weak references are zeroed before the finalizer runs, so if the
- /// object is resurrected in the finalizer the weak reference is still zeroed.
- /// WeakTrackResurrection: Same as Weak, but stays until after object is really gone.
- /// Pinned - same as Normal, but allows the address of the actual object to be taken.
- /// </remarks>
- [StructLayout(LayoutKind.Sequential)]
- public partial struct GCHandle
- {
- // The actual integer handle value that the EE uses internally.
- private IntPtr _handle;
-
- // Allocate a handle storing the object and the type.
- private GCHandle(object? value, GCHandleType type)
- {
- // Make sure the type parameter is within the valid range for the enum.
- if ((uint)type > (uint)GCHandleType.Pinned) // IMPORTANT: This must be kept in sync with the GCHandleType enum.
- {
- throw new ArgumentOutOfRangeException(nameof(type), SR.ArgumentOutOfRange_Enum);
- }
-
- if (type == GCHandleType.Pinned && !Marshal.IsPinnable(value))
- {
- throw new ArgumentException(SR.ArgumentException_NotIsomorphic, nameof(value));
- }
-
- IntPtr handle = InternalAlloc(value, type);
-
- if (type == GCHandleType.Pinned)
- {
- // Record if the handle is pinned.
- handle = (IntPtr)((nint)handle | 1);
- }
-
- _handle = handle;
- }
-
- // Used in the conversion functions below.
- private GCHandle(IntPtr handle) => _handle = handle;
-
- /// <summary>Creates a new GC handle for an object.</summary>
- /// <param name="value">The object that the GC handle is created for.</param>
- /// <returns>A new GC handle that protects the object.</returns>
- public static GCHandle Alloc(object? value) => new GCHandle(value, GCHandleType.Normal);
-
- /// <summary>Creates a new GC handle for an object.</summary>
- /// <param name="value">The object that the GC handle is created for.</param>
- /// <param name="type">The type of GC handle to create.</param>
- /// <returns>A new GC handle that protects the object.</returns>
- public static GCHandle Alloc(object? value, GCHandleType type) => new GCHandle(value, type);
-
- /// <summary>Frees a GC handle.</summary>
- public void Free()
- {
- // Free the handle if it hasn't already been freed.
- IntPtr handle = Interlocked.Exchange(ref _handle, IntPtr.Zero);
- ThrowIfInvalid(handle);
- InternalFree(GetHandleValue(handle));
- }
-
- // Target property - allows getting / updating of the handle's referent.
- public object? Target
- {
- get
- {
- IntPtr handle = _handle;
- ThrowIfInvalid(handle);
-
- return InternalGet(GetHandleValue(handle));
- }
- set
- {
- IntPtr handle = _handle;
- ThrowIfInvalid(handle);
-
- if (IsPinned(handle) && !Marshal.IsPinnable(value))
- {
- throw new ArgumentException(SR.ArgumentException_NotIsomorphic, nameof(value));
- }
-
- InternalSet(GetHandleValue(handle), value);
- }
- }
-
- /// <summary>
- /// Retrieve the address of an object in a Pinned handle. This throws
- /// an exception if the handle is any type other than Pinned.
- /// </summary>
- public IntPtr AddrOfPinnedObject()
- {
- // Check if the handle was not a pinned handle.
- // You can only get the address of pinned handles.
- IntPtr handle = _handle;
- ThrowIfInvalid(handle);
-
- if (!IsPinned(handle))
- {
- ThrowHelper.ThrowInvalidOperationException_HandleIsNotPinned();
- }
-
- // Get the address.
-
- object target = InternalGet(GetHandleValue(handle));
- if (target is null)
- {
- return default;
- }
-
- unsafe
- {
- if (RuntimeHelpers.ObjectHasComponentSize(target))
- {
- if (target.GetType() == typeof(string))
- {
- return (IntPtr)Unsafe.AsPointer(ref Unsafe.As<string>(target).GetRawStringData());
- }
-
- Debug.Assert(target is Array);
- return (IntPtr)Unsafe.AsPointer(ref Unsafe.As<Array>(target).GetRawArrayData());
- }
-
- return (IntPtr)Unsafe.AsPointer(ref target.GetRawData());
- }
- }
-
- /// <summary>Determine whether this handle has been allocated or not.</summary>
- public bool IsAllocated => _handle != IntPtr.Zero;
-
- /// <summary>
- /// Used to create a GCHandle from an int. This is intended to
- /// be used with the reverse conversion.
- /// </summary>
- public static explicit operator GCHandle(IntPtr value) => FromIntPtr(value);
-
- public static GCHandle FromIntPtr(IntPtr value)
- {
- ThrowIfInvalid(value);
- return new GCHandle(value);
- }
-
- /// <summary>Used to get the internal integer representation of the handle out.</summary>
- public static explicit operator IntPtr(GCHandle value) => ToIntPtr(value);
-
- public static IntPtr ToIntPtr(GCHandle value) => value._handle;
-
- public override int GetHashCode() => _handle.GetHashCode();
-
- public override bool Equals(object? o) => o is GCHandle && _handle == ((GCHandle)o)._handle;
-
- public static bool operator ==(GCHandle a, GCHandle b) => a._handle == b._handle;
-
- public static bool operator !=(GCHandle a, GCHandle b) => a._handle != b._handle;
-
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- private static IntPtr GetHandleValue(IntPtr handle) => new IntPtr((nint)handle & ~(nint)1); // Remove Pin flag
-
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- private static bool IsPinned(IntPtr handle) => ((nint)handle & 1) != 0; // Check Pin flag
-
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- private static void ThrowIfInvalid(IntPtr handle)
- {
- // Check if the handle was never initialized or was freed.
- if (handle == IntPtr.Zero)
- {
- ThrowHelper.ThrowInvalidOperationException_HandleIsNotInitialized();
- }
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/GCHandleType.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/GCHandleType.cs
deleted file mode 100644
index 68da96830ae..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/GCHandleType.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-// 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.Runtime.InteropServices
-{
- // These are the types of handles used by the EE.
- // IMPORTANT: These must match the definitions in ObjectHandle.h in the EE.
- // IMPORTANT: If new values are added to the enum the GCHandle.MaxHandleType
- // constant must be updated.
- public enum GCHandleType
- {
- Weak = 0,
- WeakTrackResurrection = 1,
- Normal = 2,
- Pinned = 3
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/GuidAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/GuidAttribute.cs
deleted file mode 100644
index cf60b9bf70a..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/GuidAttribute.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Assembly | AttributeTargets.Interface | AttributeTargets.Class | AttributeTargets.Enum | AttributeTargets.Struct | AttributeTargets.Delegate, Inherited = false)]
- public sealed class GuidAttribute : Attribute
- {
- public GuidAttribute(string guid)
- {
- Value = guid;
- }
-
- public string Value { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/HandleRef.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/HandleRef.cs
deleted file mode 100644
index 075d78f2416..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/HandleRef.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-// 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.Runtime.InteropServices
-{
- public readonly struct HandleRef
- {
- // ! Do not add or rearrange fields as the EE depends on this layout.
- //------------------------------------------------------------------
- private readonly object? _wrapper;
- private readonly IntPtr _handle;
- //------------------------------------------------------------------
-
- public HandleRef(object? wrapper, IntPtr handle)
- {
- _wrapper = wrapper;
- _handle = handle;
- }
-
- public object? Wrapper => _wrapper;
-
- public IntPtr Handle => _handle;
-
- public static explicit operator IntPtr(HandleRef value) => value._handle;
-
- public static IntPtr ToIntPtr(HandleRef value) => value._handle;
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ICustomAdapter.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ICustomAdapter.cs
deleted file mode 100644
index 6dd90e2dace..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ICustomAdapter.cs
+++ /dev/null
@@ -1,13 +0,0 @@
-// 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.Runtime.InteropServices
-{
- // This the base interface that custom adapters can chose to implement when they want to expose the underlying object.
- public interface ICustomAdapter
- {
- [return: MarshalAs(UnmanagedType.IUnknown)]
- object GetUnderlyingObject();
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ICustomFactory.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ICustomFactory.cs
deleted file mode 100644
index 799db6a2d3a..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ICustomFactory.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-// 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.Runtime.InteropServices
-{
- public interface ICustomFactory
- {
- MarshalByRefObject CreateInstance(Type serverType);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ICustomMarshaler.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ICustomMarshaler.cs
deleted file mode 100644
index cf442d4fde1..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ICustomMarshaler.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-// 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.Runtime.InteropServices
-{
- // This the base interface that must be implemented by all custom marshalers.
- public interface ICustomMarshaler
- {
- object MarshalNativeToManaged(IntPtr pNativeData);
-
- IntPtr MarshalManagedToNative(object ManagedObj);
-
- void CleanUpNativeData(IntPtr pNativeData);
-
- void CleanUpManagedData(object ManagedObj);
-
- int GetNativeDataSize();
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ICustomQueryInterface.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ICustomQueryInterface.cs
deleted file mode 100644
index a91fd7f5fbb..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ICustomQueryInterface.cs
+++ /dev/null
@@ -1,12 +0,0 @@
-// 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.Runtime.InteropServices
-{
- // This the interface that be implemented by class that want to customize the behavior of QueryInterface.
- public interface ICustomQueryInterface
- {
- CustomQueryInterfaceResult GetInterface([In]ref Guid iid, out IntPtr ppv);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/InAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/InAttribute.cs
deleted file mode 100644
index 39f5a958bc8..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/InAttribute.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
- public sealed class InAttribute : Attribute
- {
- public InAttribute()
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/InterfaceTypeAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/InterfaceTypeAttribute.cs
deleted file mode 100644
index 695faa79378..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/InterfaceTypeAttribute.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Interface, Inherited = false)]
- public sealed class InterfaceTypeAttribute : Attribute
- {
- public InterfaceTypeAttribute(ComInterfaceType interfaceType)
- {
- Value = interfaceType;
- }
- public InterfaceTypeAttribute(short interfaceType)
- {
- Value = (ComInterfaceType)interfaceType;
- }
-
- public ComInterfaceType Value { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/InvalidComObjectException.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/InvalidComObjectException.cs
deleted file mode 100644
index 5bc16e54b74..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/InvalidComObjectException.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-// 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.Serialization;
-
-namespace System.Runtime.InteropServices
-{
- /// <summary>
- /// The exception thrown when an invalid COM object is used. This happens
- /// when a the __ComObject type is used directly without having a backing
- /// class factory.
- /// </summary>
- [Serializable]
- [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
- public class InvalidComObjectException : SystemException
- {
- public InvalidComObjectException()
- : base(SR.Arg_InvalidComObjectException)
- {
- HResult = HResults.COR_E_INVALIDCOMOBJECT;
- }
-
- public InvalidComObjectException(string? message)
- : base(message)
- {
- HResult = HResults.COR_E_INVALIDCOMOBJECT;
- }
-
- public InvalidComObjectException(string? message, Exception? inner)
- : base(message, inner)
- {
- HResult = HResults.COR_E_INVALIDCOMOBJECT;
- }
-
- protected InvalidComObjectException(SerializationInfo info, StreamingContext context)
- : base(info, context)
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/InvalidOleVariantTypeException.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/InvalidOleVariantTypeException.cs
deleted file mode 100644
index e5aedb000f9..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/InvalidOleVariantTypeException.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-// 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.Serialization;
-
-namespace System.Runtime.InteropServices
-{
- /// <summary>
- /// Exception thrown when the type of an OLE variant that was passed into the
- /// runtime is invalid.
- /// </summary>
- [Serializable]
- [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
- public class InvalidOleVariantTypeException : SystemException
- {
- public InvalidOleVariantTypeException()
- : base(SR.Arg_InvalidOleVariantTypeException)
- {
- HResult = HResults.COR_E_INVALIDOLEVARIANTTYPE;
- }
-
- public InvalidOleVariantTypeException(string? message)
- : base(message)
- {
- HResult = HResults.COR_E_INVALIDOLEVARIANTTYPE;
- }
-
- public InvalidOleVariantTypeException(string? message, Exception? inner)
- : base(message, inner)
- {
- HResult = HResults.COR_E_INVALIDOLEVARIANTTYPE;
- }
-
- protected InvalidOleVariantTypeException(SerializationInfo info, StreamingContext context)
- : base(info, context)
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/LCIDConversionAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/LCIDConversionAttribute.cs
deleted file mode 100644
index 75f8fcfc914..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/LCIDConversionAttribute.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Method, Inherited = false)]
- public sealed class LCIDConversionAttribute : Attribute
- {
- public LCIDConversionAttribute(int lcid)
- {
- Value = lcid;
- }
-
- public int Value { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/LayoutKind.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/LayoutKind.cs
deleted file mode 100644
index dbd7ec62d54..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/LayoutKind.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-// 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.Runtime.InteropServices
-{
- // Used in the StructLayoutAttribute class
- public enum LayoutKind
- {
- Sequential = 0,
- Explicit = 2,
- Auto = 3,
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/Marshal.NoCom.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/Marshal.NoCom.cs
deleted file mode 100644
index b3101344516..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/Marshal.NoCom.cs
+++ /dev/null
@@ -1,204 +0,0 @@
-// 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.Diagnostics.CodeAnalysis;
-using System.Reflection;
-using System.Runtime.InteropServices.ComTypes;
-
-namespace System.Runtime.InteropServices
-{
- public static partial class Marshal
- {
- public static int GetHRForException(Exception? e)
- {
- return e?.HResult ?? 0;
- }
-
- public static int AddRef(IntPtr pUnk)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static bool AreComObjectsAvailableForCleanup() => false;
-
- public static IntPtr CreateAggregatedObject(IntPtr pOuter, object o)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static object BindToMoniker(string monikerName)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static void CleanupUnusedObjectsInCurrentContext()
- {
- }
-
- public static IntPtr CreateAggregatedObject<T>(IntPtr pOuter, T o) where T : notnull
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static object? CreateWrapperOfType(object? o, Type t)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static TWrapper CreateWrapperOfType<T, TWrapper>([AllowNull] T o)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static void ChangeWrapperHandleStrength(object otp, bool fIsWeak)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static int FinalReleaseComObject(object o)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static IntPtr GetComInterfaceForObject(object o, Type T)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static IntPtr GetComInterfaceForObject(object o, Type T, CustomQueryInterfaceMode mode)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static IntPtr GetComInterfaceForObject<T, TInterface>([DisallowNull] T o)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static object? GetComObjectData(object obj, object key)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static IntPtr GetHINSTANCE(Module m)
- {
- if (m is null)
- {
- throw new ArgumentNullException(nameof(m));
- }
-
- return (IntPtr)(-1);
- }
-
- public static IntPtr GetIUnknownForObject(object o)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static void GetNativeVariantForObject(object? obj, IntPtr pDstNativeVariant)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static void GetNativeVariantForObject<T>([AllowNull] T obj, IntPtr pDstNativeVariant)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static object GetTypedObjectForIUnknown(IntPtr pUnk, Type t)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static object GetObjectForIUnknown(IntPtr pUnk)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static object? GetObjectForNativeVariant(IntPtr pSrcNativeVariant)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- [return: MaybeNull]
- public static T GetObjectForNativeVariant<T>(IntPtr pSrcNativeVariant)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static object?[] GetObjectsForNativeVariants(IntPtr aSrcNativeVariant, int cVars)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static T[] GetObjectsForNativeVariants<T>(IntPtr aSrcNativeVariant, int cVars)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static int GetStartComSlot(Type t)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static int GetEndComSlot(Type t)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static Type GetTypeFromCLSID(Guid clsid)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static string GetTypeInfoName(ITypeInfo typeInfo)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static object GetUniqueObjectForIUnknown(IntPtr unknown)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static bool IsComObject(object o)
- {
- if (o is null)
- {
- throw new ArgumentNullException(nameof(o));
- }
-
- return false;
- }
-
- public static bool IsTypeVisibleFromCom(Type t)
- {
- if (t is null)
- {
- throw new ArgumentNullException(nameof(t));
- }
- return false;
- }
-
- public static int QueryInterface(IntPtr pUnk, ref Guid iid, out IntPtr ppv)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static int Release(IntPtr pUnk)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static int ReleaseComObject(object o)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
-
- public static bool SetComObjectData(object obj, object key, object? data)
- {
- throw new PlatformNotSupportedException(SR.PlatformNotSupported_ComInterop);
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/Marshal.Unix.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/Marshal.Unix.cs
deleted file mode 100644
index 63c790501e7..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/Marshal.Unix.cs
+++ /dev/null
@@ -1,66 +0,0 @@
-// 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.Diagnostics;
-using System.Text;
-
-namespace System.Runtime.InteropServices
-{
- public static partial class Marshal
- {
- public static string? PtrToStringAuto(IntPtr ptr, int len)
- {
- return PtrToStringUTF8(ptr, len);
- }
-
- public static string? PtrToStringAuto(IntPtr ptr)
- {
- return PtrToStringUTF8(ptr);
- }
-
- public static IntPtr StringToHGlobalAuto(string? s)
- {
- return StringToHGlobalUTF8(s);
- }
-
- public static IntPtr StringToCoTaskMemAuto(string? s)
- {
- return StringToCoTaskMemUTF8(s);
- }
-
- private static int GetSystemMaxDBCSCharSize() => 3;
-
- private static bool IsNullOrWin32Atom(IntPtr ptr) => ptr == IntPtr.Zero;
-
- internal static unsafe int StringToAnsiString(string s, byte* buffer, int bufferLength, bool bestFit = false, bool throwOnUnmappableChar = false)
- {
- Debug.Assert(bufferLength >= (s.Length + 1) * SystemMaxDBCSCharSize, "Insufficient buffer length passed to StringToAnsiString");
-
- int convertedBytes;
-
- fixed (char* pChar = s)
- {
- convertedBytes = Encoding.UTF8.GetBytes(pChar, s.Length, buffer, bufferLength);
- }
-
- buffer[convertedBytes] = 0;
-
- return convertedBytes;
- }
-
- // Returns number of bytes required to convert given string to Ansi string. The return value includes null terminator.
- internal static unsafe int GetAnsiStringByteCount(ReadOnlySpan<char> chars)
- {
- int byteLength = Encoding.UTF8.GetByteCount(chars);
- return checked(byteLength + 1);
- }
-
- // Converts given string to Ansi string. The destination buffer must be large enough to hold the converted value, including null terminator.
- internal static unsafe void GetAnsiStringBytes(ReadOnlySpan<char> chars, Span<byte> bytes)
- {
- int actualByteLength = Encoding.UTF8.GetBytes(chars, bytes);
- bytes[actualByteLength] = 0;
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/Marshal.Windows.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/Marshal.Windows.cs
deleted file mode 100644
index 9889030d882..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/Marshal.Windows.cs
+++ /dev/null
@@ -1,131 +0,0 @@
-// 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.Diagnostics;
-
-namespace System.Runtime.InteropServices
-{
- public static partial class Marshal
- {
- public static string? PtrToStringAuto(IntPtr ptr, int len)
- {
- return PtrToStringUni(ptr, len);
- }
-
- public static string? PtrToStringAuto(IntPtr ptr)
- {
- return PtrToStringUni(ptr);
- }
-
- public static IntPtr StringToHGlobalAuto(string? s)
- {
- return StringToHGlobalUni(s);
- }
-
- public static IntPtr StringToCoTaskMemAuto(string? s)
- {
- return StringToCoTaskMemUni(s);
- }
-
- private static unsafe int GetSystemMaxDBCSCharSize()
- {
- Interop.Kernel32.CPINFO cpInfo = default;
-
- if (Interop.Kernel32.GetCPInfo(Interop.Kernel32.CP_ACP, &cpInfo) == Interop.BOOL.FALSE)
- return 2;
-
- return cpInfo.MaxCharSize;
- }
-
- // Win32 has the concept of Atoms, where a pointer can either be a pointer
- // or an int. If it's less than 64K, this is guaranteed to NOT be a
- // pointer since the bottom 64K bytes are reserved in a process' page table.
- // We should be careful about deallocating this stuff.
- private static bool IsNullOrWin32Atom(IntPtr ptr)
- {
- const long HIWORDMASK = unchecked((long)0xffffffffffff0000L);
-
- long lPtr = (long)ptr;
- return 0 == (lPtr & HIWORDMASK);
- }
-
- internal static unsafe int StringToAnsiString(string s, byte* buffer, int bufferLength, bool bestFit = false, bool throwOnUnmappableChar = false)
- {
- Debug.Assert(bufferLength >= (s.Length + 1) * SystemMaxDBCSCharSize, "Insufficient buffer length passed to StringToAnsiString");
-
- int nb;
-
- uint flags = bestFit ? 0 : Interop.Kernel32.WC_NO_BEST_FIT_CHARS;
- uint defaultCharUsed = 0;
-
- fixed (char* pwzChar = s)
- {
- nb = Interop.Kernel32.WideCharToMultiByte(
- Interop.Kernel32.CP_ACP,
- flags,
- pwzChar,
- s.Length,
- buffer,
- bufferLength,
- IntPtr.Zero,
- throwOnUnmappableChar ? new IntPtr(&defaultCharUsed) : IntPtr.Zero);
- }
-
- if (defaultCharUsed != 0)
- {
- throw new ArgumentException(SR.Interop_Marshal_Unmappable_Char);
- }
-
- buffer[nb] = 0;
- return nb;
- }
-
- // Returns number of bytes required to convert given string to Ansi string. The return value includes null terminator.
- internal static unsafe int GetAnsiStringByteCount(ReadOnlySpan<char> chars)
- {
- int byteLength;
-
- if (chars.Length == 0)
- {
- byteLength = 0;
- }
- else
- {
- fixed (char* pChars = chars)
- {
- byteLength = Interop.Kernel32.WideCharToMultiByte(
- Interop.Kernel32.CP_ACP, Interop.Kernel32.WC_NO_BEST_FIT_CHARS, pChars, chars.Length, null, 0, IntPtr.Zero, IntPtr.Zero);
- if (byteLength <= 0)
- throw new ArgumentException();
- }
- }
-
- return checked(byteLength + 1);
- }
-
- // Converts given string to Ansi string. The destination buffer must be large enough to hold the converted value, including null terminator.
- internal static unsafe void GetAnsiStringBytes(ReadOnlySpan<char> chars, Span<byte> bytes)
- {
- int byteLength;
-
- if (chars.Length == 0)
- {
- byteLength = 0;
- }
- else
- {
- fixed (char* pChars = chars)
- fixed (byte* pBytes = bytes)
- {
- byteLength = Interop.Kernel32.WideCharToMultiByte(
- Interop.Kernel32.CP_ACP, Interop.Kernel32.WC_NO_BEST_FIT_CHARS, pChars, chars.Length, pBytes, bytes.Length, IntPtr.Zero, IntPtr.Zero);
- if (byteLength <= 0)
- throw new ArgumentException();
- }
- }
-
- bytes[byteLength] = 0;
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/Marshal.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/Marshal.cs
deleted file mode 100644
index 4eaef53ec42..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/Marshal.cs
+++ /dev/null
@@ -1,978 +0,0 @@
-// 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.Security;
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Text;
-
-using Internal.Runtime.CompilerServices;
-using System.Diagnostics.CodeAnalysis;
-
-#pragma warning disable SA1121 // explicitly using type aliases instead of built-in types
-#if BIT64
-using nuint = System.UInt64;
-#else
-using nuint = System.UInt32;
-#endif
-
-namespace System.Runtime.InteropServices
-{
- /// <summary>
- /// This class contains methods that are mainly used to marshal between unmanaged
- /// and managed types.
- /// </summary>
- public static partial class Marshal
- {
- /// <summary>
- /// The default character size for the system. This is always 2 because
- /// the framework only runs on UTF-16 systems.
- /// </summary>
- public static readonly int SystemDefaultCharSize = 2;
-
- /// <summary>
- /// The max DBCS character size for the system.
- /// </summary>
- public static readonly int SystemMaxDBCSCharSize = GetSystemMaxDBCSCharSize();
-
- public static IntPtr AllocHGlobal(int cb) => AllocHGlobal((IntPtr)cb);
-
- public static unsafe string? PtrToStringAnsi(IntPtr ptr)
- {
- if (IsNullOrWin32Atom(ptr))
- {
- return null;
- }
-
- return new string((sbyte*)ptr);
- }
-
- public static unsafe string PtrToStringAnsi(IntPtr ptr, int len)
- {
- if (ptr == IntPtr.Zero)
- {
- throw new ArgumentNullException(nameof(ptr));
- }
- if (len < 0)
- {
- throw new ArgumentOutOfRangeException(nameof(len), len, SR.ArgumentOutOfRange_NeedNonNegNum);
- }
-
- return new string((sbyte*)ptr, 0, len);
- }
-
- public static unsafe string? PtrToStringUni(IntPtr ptr)
- {
- if (IsNullOrWin32Atom(ptr))
- {
- return null;
- }
-
- return new string((char*)ptr);
- }
-
- public static unsafe string PtrToStringUni(IntPtr ptr, int len)
- {
- if (ptr == IntPtr.Zero)
- {
- throw new ArgumentNullException(nameof(ptr));
- }
- if (len < 0)
- {
- throw new ArgumentOutOfRangeException(nameof(len), len, SR.ArgumentOutOfRange_NeedNonNegNum);
- }
-
- return new string((char*)ptr, 0, len);
- }
-
- public static unsafe string? PtrToStringUTF8(IntPtr ptr)
- {
- if (IsNullOrWin32Atom(ptr))
- {
- return null;
- }
-
- int nbBytes = string.strlen((byte*)ptr);
- return string.CreateStringFromEncoding((byte*)ptr, nbBytes, Encoding.UTF8);
- }
-
- public static unsafe string PtrToStringUTF8(IntPtr ptr, int byteLen)
- {
- if (ptr == IntPtr.Zero)
- {
- throw new ArgumentNullException(nameof(ptr));
- }
- if (byteLen < 0)
- {
- throw new ArgumentOutOfRangeException(nameof(byteLen), byteLen, SR.ArgumentOutOfRange_NeedNonNegNum);
- }
-
- return string.CreateStringFromEncoding((byte*)ptr, byteLen, Encoding.UTF8);
- }
-
- public static int SizeOf(object structure)
- {
- if (structure is null)
- {
- throw new ArgumentNullException(nameof(structure));
- }
-
- return SizeOfHelper(structure.GetType(), throwIfNotMarshalable: true);
- }
-
- public static int SizeOf<T>(T structure)
- {
- if (structure is null)
- {
- throw new ArgumentNullException(nameof(structure));
- }
-
- return SizeOfHelper(structure.GetType(), throwIfNotMarshalable: true);
- }
-
- public static int SizeOf(Type t)
- {
- if (t is null)
- {
- throw new ArgumentNullException(nameof(t));
- }
- if (!t.IsRuntimeImplemented())
- {
- throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(t));
- }
- if (t.IsGenericType)
- {
- throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(t));
- }
-
- return SizeOfHelper(t, throwIfNotMarshalable: true);
- }
-
- public static int SizeOf<T>() => SizeOf(typeof(T));
-
- /// <summary>
- /// IMPORTANT NOTICE: This method does not do any verification on the array.
- /// It must be used with EXTREME CAUTION since passing in invalid index or
- /// an array that is not pinned can cause unexpected results.
- /// </summary>
- public static unsafe IntPtr UnsafeAddrOfPinnedArrayElement(Array arr, int index)
- {
- if (arr is null)
- throw new ArgumentNullException(nameof(arr));
-
- void* pRawData = Unsafe.AsPointer(ref arr.GetRawArrayData());
- return (IntPtr)((byte*)pRawData + (uint)index * (nuint)arr.GetElementSize());
- }
-
- public static unsafe IntPtr UnsafeAddrOfPinnedArrayElement<T>(T[] arr, int index)
- {
- if (arr is null)
- throw new ArgumentNullException(nameof(arr));
-
- void* pRawData = Unsafe.AsPointer(ref arr.GetRawSzArrayData());
- return (IntPtr)((byte*)pRawData + (uint)index * (nuint)Unsafe.SizeOf<T>());
- }
-
- public static IntPtr OffsetOf<T>(string fieldName) => OffsetOf(typeof(T), fieldName);
-
- public static void Copy(int[] source, int startIndex, IntPtr destination, int length)
- {
- CopyToNative(source, startIndex, destination, length);
- }
-
- public static void Copy(char[] source, int startIndex, IntPtr destination, int length)
- {
- CopyToNative(source, startIndex, destination, length);
- }
-
- public static void Copy(short[] source, int startIndex, IntPtr destination, int length)
- {
- CopyToNative(source, startIndex, destination, length);
- }
-
- public static void Copy(long[] source, int startIndex, IntPtr destination, int length)
- {
- CopyToNative(source, startIndex, destination, length);
- }
-
- public static void Copy(float[] source, int startIndex, IntPtr destination, int length)
- {
- CopyToNative(source, startIndex, destination, length);
- }
-
- public static void Copy(double[] source, int startIndex, IntPtr destination, int length)
- {
- CopyToNative(source, startIndex, destination, length);
- }
-
- public static void Copy(byte[] source, int startIndex, IntPtr destination, int length)
- {
- CopyToNative(source, startIndex, destination, length);
- }
-
- public static void Copy(IntPtr[] source, int startIndex, IntPtr destination, int length)
- {
- CopyToNative(source, startIndex, destination, length);
- }
-
- private static unsafe void CopyToNative<T>(T[] source, int startIndex, IntPtr destination, int length)
- {
- if (source is null)
- throw new ArgumentNullException(nameof(source));
- if (destination == IntPtr.Zero)
- throw new ArgumentNullException(nameof(destination));
-
- // The rest of the argument validation is done by CopyTo
-
- new Span<T>(source, startIndex, length).CopyTo(new Span<T>((void*)destination, length));
- }
-
- public static void Copy(IntPtr source, int[] destination, int startIndex, int length)
- {
- CopyToManaged(source, destination, startIndex, length);
- }
-
- public static void Copy(IntPtr source, char[] destination, int startIndex, int length)
- {
- CopyToManaged(source, destination, startIndex, length);
- }
-
- public static void Copy(IntPtr source, short[] destination, int startIndex, int length)
- {
- CopyToManaged(source, destination, startIndex, length);
- }
-
- public static void Copy(IntPtr source, long[] destination, int startIndex, int length)
- {
- CopyToManaged(source, destination, startIndex, length);
- }
-
- public static void Copy(IntPtr source, float[] destination, int startIndex, int length)
- {
- CopyToManaged(source, destination, startIndex, length);
- }
-
- public static void Copy(IntPtr source, double[] destination, int startIndex, int length)
- {
- CopyToManaged(source, destination, startIndex, length);
- }
-
- public static void Copy(IntPtr source, byte[] destination, int startIndex, int length)
- {
- CopyToManaged(source, destination, startIndex, length);
- }
-
- public static void Copy(IntPtr source, IntPtr[] destination, int startIndex, int length)
- {
- CopyToManaged(source, destination, startIndex, length);
- }
-
- private static unsafe void CopyToManaged<T>(IntPtr source, T[] destination, int startIndex, int length)
- {
- if (source == IntPtr.Zero)
- throw new ArgumentNullException(nameof(source));
- if (destination is null)
- throw new ArgumentNullException(nameof(destination));
- if (startIndex < 0)
- throw new ArgumentOutOfRangeException(nameof(startIndex), SR.ArgumentOutOfRange_StartIndex);
- if (length < 0)
- throw new ArgumentOutOfRangeException(nameof(length), SR.ArgumentOutOfRange_NeedNonNegNum);
-
- // The rest of the argument validation is done by CopyTo
-
- new Span<T>((void*)source, length).CopyTo(new Span<T>(destination, startIndex, length));
- }
-
- public static unsafe byte ReadByte(IntPtr ptr, int ofs)
- {
- try
- {
- byte* addr = (byte*)ptr + ofs;
- return *addr;
- }
- catch (NullReferenceException)
- {
- // this method is documented to throw AccessViolationException on any AV
- throw new AccessViolationException();
- }
- }
-
- public static byte ReadByte(IntPtr ptr) => ReadByte(ptr, 0);
-
- public static unsafe short ReadInt16(IntPtr ptr, int ofs)
- {
- try
- {
- byte* addr = (byte*)ptr + ofs;
- if ((unchecked((int)addr) & 0x1) == 0)
- {
- // aligned read
- return *((short*)addr);
- }
- else
- {
- return Unsafe.ReadUnaligned<short>(addr);
- }
- }
- catch (NullReferenceException)
- {
- // this method is documented to throw AccessViolationException on any AV
- throw new AccessViolationException();
- }
- }
-
- public static short ReadInt16(IntPtr ptr) => ReadInt16(ptr, 0);
-
- public static unsafe int ReadInt32(IntPtr ptr, int ofs)
- {
- try
- {
- byte* addr = (byte*)ptr + ofs;
- if ((unchecked((int)addr) & 0x3) == 0)
- {
- // aligned read
- return *((int*)addr);
- }
- else
- {
- return Unsafe.ReadUnaligned<int>(addr);
- }
- }
- catch (NullReferenceException)
- {
- // this method is documented to throw AccessViolationException on any AV
- throw new AccessViolationException();
- }
- }
-
- public static int ReadInt32(IntPtr ptr) => ReadInt32(ptr, 0);
-
- public static IntPtr ReadIntPtr(object ptr, int ofs)
- {
-#if BIT64
- return (IntPtr)ReadInt64(ptr, ofs);
-#else // 32
- return (IntPtr)ReadInt32(ptr, ofs);
-#endif
- }
-
- public static IntPtr ReadIntPtr(IntPtr ptr, int ofs)
- {
-#if BIT64
- return (IntPtr)ReadInt64(ptr, ofs);
-#else // 32
- return (IntPtr)ReadInt32(ptr, ofs);
-#endif
- }
-
- public static IntPtr ReadIntPtr(IntPtr ptr) => ReadIntPtr(ptr, 0);
-
- public static unsafe long ReadInt64(IntPtr ptr, int ofs)
- {
- try
- {
- byte* addr = (byte*)ptr + ofs;
- if ((unchecked((int)addr) & 0x7) == 0)
- {
- // aligned read
- return *((long*)addr);
- }
- else
- {
- return Unsafe.ReadUnaligned<long>(addr);
- }
- }
- catch (NullReferenceException)
- {
- // this method is documented to throw AccessViolationException on any AV
- throw new AccessViolationException();
- }
- }
-
- public static long ReadInt64(IntPtr ptr) => ReadInt64(ptr, 0);
-
- public static unsafe void WriteByte(IntPtr ptr, int ofs, byte val)
- {
- try
- {
- byte* addr = (byte*)ptr + ofs;
- *addr = val;
- }
- catch (NullReferenceException)
- {
- // this method is documented to throw AccessViolationException on any AV
- throw new AccessViolationException();
- }
- }
-
- public static void WriteByte(IntPtr ptr, byte val) => WriteByte(ptr, 0, val);
-
- public static unsafe void WriteInt16(IntPtr ptr, int ofs, short val)
- {
- try
- {
- byte* addr = (byte*)ptr + ofs;
- if ((unchecked((int)addr) & 0x1) == 0)
- {
- // aligned write
- *((short*)addr) = val;
- }
- else
- {
- Unsafe.WriteUnaligned(addr, val);
- }
- }
- catch (NullReferenceException)
- {
- // this method is documented to throw AccessViolationException on any AV
- throw new AccessViolationException();
- }
- }
-
- public static void WriteInt16(IntPtr ptr, short val) => WriteInt16(ptr, 0, val);
-
- public static void WriteInt16(IntPtr ptr, int ofs, char val) => WriteInt16(ptr, ofs, (short)val);
-
- public static void WriteInt16([In, Out]object ptr, int ofs, char val) => WriteInt16(ptr, ofs, (short)val);
-
- public static void WriteInt16(IntPtr ptr, char val) => WriteInt16(ptr, 0, (short)val);
-
- public static unsafe void WriteInt32(IntPtr ptr, int ofs, int val)
- {
- try
- {
- byte* addr = (byte*)ptr + ofs;
- if ((unchecked((int)addr) & 0x3) == 0)
- {
- // aligned write
- *((int*)addr) = val;
- }
- else
- {
- Unsafe.WriteUnaligned(addr, val);
- }
- }
- catch (NullReferenceException)
- {
- // this method is documented to throw AccessViolationException on any AV
- throw new AccessViolationException();
- }
- }
-
- public static void WriteInt32(IntPtr ptr, int val) => WriteInt32(ptr, 0, val);
-
- public static void WriteIntPtr(IntPtr ptr, int ofs, IntPtr val)
- {
-#if BIT64
- WriteInt64(ptr, ofs, (long)val);
-#else // 32
- WriteInt32(ptr, ofs, (int)val);
-#endif
- }
-
- public static void WriteIntPtr(object ptr, int ofs, IntPtr val)
- {
-#if BIT64
- WriteInt64(ptr, ofs, (long)val);
-#else // 32
- WriteInt32(ptr, ofs, (int)val);
-#endif
- }
-
- public static void WriteIntPtr(IntPtr ptr, IntPtr val) => WriteIntPtr(ptr, 0, val);
-
- public static unsafe void WriteInt64(IntPtr ptr, int ofs, long val)
- {
- try
- {
- byte* addr = (byte*)ptr + ofs;
- if ((unchecked((int)addr) & 0x7) == 0)
- {
- // aligned write
- *((long*)addr) = val;
- }
- else
- {
- Unsafe.WriteUnaligned(addr, val);
- }
- }
- catch (NullReferenceException)
- {
- // this method is documented to throw AccessViolationException on any AV
- throw new AccessViolationException();
- }
- }
-
- public static void WriteInt64(IntPtr ptr, long val) => WriteInt64(ptr, 0, val);
-
- public static void Prelink(MethodInfo m)
- {
- if (m is null)
- {
- throw new ArgumentNullException(nameof(m));
- }
-
- PrelinkCore(m);
- }
-
- public static void PrelinkAll(Type c)
- {
- if (c is null)
- {
- throw new ArgumentNullException(nameof(c));
- }
-
- MethodInfo[] mi = c.GetMethods();
-
- for (int i = 0; i < mi.Length; i++)
- {
- Prelink(mi[i]);
- }
- }
-
- public static void StructureToPtr<T>([DisallowNull] T structure, IntPtr ptr, bool fDeleteOld)
- {
- StructureToPtr((object)structure!, ptr, fDeleteOld);
- }
-
- /// <summary>
- /// Creates a new instance of "structuretype" and marshals data from a
- /// native memory block to it.
- /// </summary>
- public static object? PtrToStructure(IntPtr ptr, Type structureType)
- {
- if (ptr == IntPtr.Zero)
- {
- return null;
- }
-
- if (structureType is null)
- {
- throw new ArgumentNullException(nameof(structureType));
- }
- if (structureType.IsGenericType)
- {
- throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(structureType));
- }
- if (!structureType.IsRuntimeImplemented())
- {
- throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(structureType));
- }
-
- return PtrToStructureHelper(ptr, structureType);
- }
-
- /// <summary>
- /// Marshals data from a native memory block to a preallocated structure class.
- /// </summary>
- public static void PtrToStructure(IntPtr ptr, object structure)
- {
- PtrToStructureHelper(ptr, structure, allowValueClasses: false);
- }
-
- public static void PtrToStructure<T>(IntPtr ptr, [DisallowNull] T structure)
- {
- PtrToStructure(ptr, (object)structure!);
- }
-
- [return: MaybeNull]
- public static T PtrToStructure<T>(IntPtr ptr) => (T)PtrToStructure(ptr, typeof(T))!;
-
- public static void DestroyStructure<T>(IntPtr ptr) => DestroyStructure(ptr, typeof(T));
-
- /// <summary>
- /// Converts the HRESULT to a CLR exception.
- /// </summary>
- public static Exception? GetExceptionForHR(int errorCode) => GetExceptionForHR(errorCode, IntPtr.Zero);
-
- public static Exception? GetExceptionForHR(int errorCode, IntPtr errorInfo)
- {
- if (errorCode >= 0)
- {
- return null;
- }
-
- return GetExceptionForHRInternal(errorCode, errorInfo);
- }
-
- /// <summary>
- /// Throws a CLR exception based on the HRESULT.
- /// </summary>
- public static void ThrowExceptionForHR(int errorCode)
- {
- if (errorCode < 0)
- {
- throw GetExceptionForHR(errorCode, IntPtr.Zero)!;
- }
- }
-
- public static void ThrowExceptionForHR(int errorCode, IntPtr errorInfo)
- {
- if (errorCode < 0)
- {
- throw GetExceptionForHR(errorCode, errorInfo)!;
- }
- }
-
- public static IntPtr SecureStringToBSTR(SecureString s)
- {
- if (s is null)
- {
- throw new ArgumentNullException(nameof(s));
- }
-
- return s.MarshalToBSTR();
- }
-
- public static IntPtr SecureStringToCoTaskMemAnsi(SecureString s)
- {
- if (s is null)
- {
- throw new ArgumentNullException(nameof(s));
- }
-
- return s.MarshalToString(globalAlloc: false, unicode: false);
- }
-
- public static IntPtr SecureStringToCoTaskMemUnicode(SecureString s)
- {
- if (s is null)
- {
- throw new ArgumentNullException(nameof(s));
- }
-
- return s.MarshalToString(globalAlloc: false, unicode: true);
- }
-
- public static IntPtr SecureStringToGlobalAllocAnsi(SecureString s)
- {
- if (s is null)
- {
- throw new ArgumentNullException(nameof(s));
- }
-
- return s.MarshalToString(globalAlloc: true, unicode: false);
- }
-
- public static IntPtr SecureStringToGlobalAllocUnicode(SecureString s)
- {
- if (s is null)
- {
- throw new ArgumentNullException(nameof(s));
- }
-
- return s.MarshalToString(globalAlloc: true, unicode: true);
- }
-
- public static unsafe IntPtr StringToHGlobalAnsi(string? s)
- {
- if (s is null)
- {
- return IntPtr.Zero;
- }
-
- long lnb = (s.Length + 1) * (long)SystemMaxDBCSCharSize;
- int nb = (int)lnb;
-
- // Overflow checking
- if (nb != lnb)
- {
- throw new ArgumentOutOfRangeException(nameof(s));
- }
-
- IntPtr hglobal = AllocHGlobal((IntPtr)nb);
-
- StringToAnsiString(s, (byte*)hglobal, nb);
- return hglobal;
- }
-
- public static unsafe IntPtr StringToHGlobalUni(string? s)
- {
- if (s is null)
- {
- return IntPtr.Zero;
- }
-
- int nb = (s.Length + 1) * 2;
-
- // Overflow checking
- if (nb < s.Length)
- {
- throw new ArgumentOutOfRangeException(nameof(s));
- }
-
- IntPtr hglobal = AllocHGlobal((IntPtr)nb);
-
- fixed (char* firstChar = s)
- {
- string.wstrcpy((char*)hglobal, firstChar, s.Length + 1);
- }
- return hglobal;
- }
-
- private static unsafe IntPtr StringToHGlobalUTF8(string? s)
- {
- if (s is null)
- {
- return IntPtr.Zero;
- }
-
- int nb = Encoding.UTF8.GetMaxByteCount(s.Length);
-
- IntPtr pMem = AllocHGlobal(nb + 1);
-
- int nbWritten;
- byte* pbMem = (byte*)pMem;
-
- fixed (char* firstChar = s)
- {
- nbWritten = Encoding.UTF8.GetBytes(firstChar, s.Length, pbMem, nb);
- }
-
- pbMem[nbWritten] = 0;
-
- return pMem;
- }
-
- public static unsafe IntPtr StringToCoTaskMemUni(string? s)
- {
- if (s is null)
- {
- return IntPtr.Zero;
- }
-
- int nb = (s.Length + 1) * 2;
-
- // Overflow checking
- if (nb < s.Length)
- {
- throw new ArgumentOutOfRangeException(nameof(s));
- }
-
- IntPtr hglobal = AllocCoTaskMem(nb);
-
- fixed (char* firstChar = s)
- {
- string.wstrcpy((char*)hglobal, firstChar, s.Length + 1);
- }
- return hglobal;
- }
-
- public static unsafe IntPtr StringToCoTaskMemUTF8(string? s)
- {
- if (s is null)
- {
- return IntPtr.Zero;
- }
-
- int nb = Encoding.UTF8.GetMaxByteCount(s.Length);
-
- IntPtr pMem = AllocCoTaskMem(nb + 1);
-
- int nbWritten;
- byte* pbMem = (byte*)pMem;
-
- fixed (char* firstChar = s)
- {
- nbWritten = Encoding.UTF8.GetBytes(firstChar, s.Length, pbMem, nb);
- }
-
- pbMem[nbWritten] = 0;
-
- return pMem;
- }
-
- public static unsafe IntPtr StringToCoTaskMemAnsi(string? s)
- {
- if (s is null)
- {
- return IntPtr.Zero;
- }
-
- long lnb = (s.Length + 1) * (long)SystemMaxDBCSCharSize;
- int nb = (int)lnb;
-
- // Overflow checking
- if (nb != lnb)
- {
- throw new ArgumentOutOfRangeException(nameof(s));
- }
-
- IntPtr hglobal = AllocCoTaskMem(nb);
-
- StringToAnsiString(s, (byte*)hglobal, nb);
- return hglobal;
- }
-
- /// <summary>
- /// Generates a GUID for the specified type. If the type has a GUID in the
- /// metadata then it is returned otherwise a stable guid is generated based
- /// on the fully qualified name of the type.
- /// </summary>
- public static Guid GenerateGuidForType(Type type)
- {
- if (type is null)
- {
- throw new ArgumentNullException(nameof(type));
- }
- if (!type.IsRuntimeImplemented())
- {
- throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(type));
- }
-
- return type.GUID;
- }
-
- /// <summary>
- /// This method generates a PROGID for the specified type. If the type has
- /// a PROGID in the metadata then it is returned otherwise a stable PROGID
- /// is generated based on the fully qualified name of the type.
- /// </summary>
- public static string? GenerateProgIdForType(Type type)
- {
- if (type is null)
- {
- throw new ArgumentNullException(nameof(type));
- }
- if (type.IsImport)
- {
- throw new ArgumentException(SR.Argument_TypeMustNotBeComImport, nameof(type));
- }
- if (type.IsGenericType)
- {
- throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(type));
- }
-
- ProgIdAttribute? progIdAttribute = type.GetCustomAttribute<ProgIdAttribute>();
- if (progIdAttribute != null)
- {
- return progIdAttribute.Value ?? string.Empty;
- }
-
- // If there is no prog ID attribute then use the full name of the type as the prog id.
- return type.FullName;
- }
-
- public static Delegate GetDelegateForFunctionPointer(IntPtr ptr, Type t)
- {
- if (ptr == IntPtr.Zero)
- {
- throw new ArgumentNullException(nameof(ptr));
- }
- if (t is null)
- {
- throw new ArgumentNullException(nameof(t));
- }
- if (!t.IsRuntimeImplemented())
- {
- throw new ArgumentException(SR.Argument_MustBeRuntimeType, nameof(t));
- }
- if (t.IsGenericType)
- {
- throw new ArgumentException(SR.Argument_NeedNonGenericType, nameof(t));
- }
-
- Type? c = t.BaseType;
- if (c != typeof(Delegate) && c != typeof(MulticastDelegate))
- {
- throw new ArgumentException(SR.Arg_MustBeDelegate, nameof(t));
- }
-
- return GetDelegateForFunctionPointerInternal(ptr, t);
- }
-
- public static TDelegate GetDelegateForFunctionPointer<TDelegate>(IntPtr ptr)
- {
- return (TDelegate)(object)GetDelegateForFunctionPointer(ptr, typeof(TDelegate));
- }
-
- public static IntPtr GetFunctionPointerForDelegate(Delegate d)
- {
- if (d is null)
- {
- throw new ArgumentNullException(nameof(d));
- }
-
- return GetFunctionPointerForDelegateInternal(d);
- }
-
- public static IntPtr GetFunctionPointerForDelegate<TDelegate>(TDelegate d) where TDelegate : notnull
- {
- return GetFunctionPointerForDelegate((Delegate)(object)d);
- }
-
- public static int GetHRForLastWin32Error()
- {
- int dwLastError = GetLastWin32Error();
- if ((dwLastError & 0x80000000) == 0x80000000)
- {
- return dwLastError;
- }
-
- return (dwLastError & 0x0000FFFF) | unchecked((int)0x80070000);
- }
-
- public static IntPtr /* IDispatch */ GetIDispatchForObject(object o) => throw new PlatformNotSupportedException();
-
- public static unsafe void ZeroFreeBSTR(IntPtr s)
- {
- if (s == IntPtr.Zero)
- {
- return;
- }
- Buffer.ZeroMemory((byte*)s, SysStringByteLen(s));
- FreeBSTR(s);
- }
-
- public static unsafe void ZeroFreeCoTaskMemAnsi(IntPtr s)
- {
- ZeroFreeCoTaskMemUTF8(s);
- }
-
- public static unsafe void ZeroFreeCoTaskMemUnicode(IntPtr s)
- {
- if (s == IntPtr.Zero)
- {
- return;
- }
- Buffer.ZeroMemory((byte*)s, (nuint)string.wcslen((char*)s) * sizeof(char));
- FreeCoTaskMem(s);
- }
-
- public static unsafe void ZeroFreeCoTaskMemUTF8(IntPtr s)
- {
- if (s == IntPtr.Zero)
- {
- return;
- }
- Buffer.ZeroMemory((byte*)s, (nuint)string.strlen((byte*)s));
- FreeCoTaskMem(s);
- }
-
- public static unsafe void ZeroFreeGlobalAllocAnsi(IntPtr s)
- {
- if (s == IntPtr.Zero)
- {
- return;
- }
- Buffer.ZeroMemory((byte*)s, (nuint)string.strlen((byte*)s));
- FreeHGlobal(s);
- }
-
- public static unsafe void ZeroFreeGlobalAllocUnicode(IntPtr s)
- {
- if (s == IntPtr.Zero)
- {
- return;
- }
- Buffer.ZeroMemory((byte*)s, (nuint)string.wcslen((char*)s) * sizeof(char));
- FreeHGlobal(s);
- }
-
- internal static unsafe uint SysStringByteLen(IntPtr s)
- {
- return *(((uint*)s) - 1);
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/MarshalAsAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/MarshalAsAttribute.cs
deleted file mode 100644
index ae142a4323d..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/MarshalAsAttribute.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Parameter | AttributeTargets.Field | AttributeTargets.ReturnValue, Inherited = false)]
- public sealed partial class MarshalAsAttribute : Attribute
- {
- public MarshalAsAttribute(UnmanagedType unmanagedType)
- {
- Value = unmanagedType;
- }
- public MarshalAsAttribute(short unmanagedType)
- {
- Value = (UnmanagedType)unmanagedType;
- }
-
- public UnmanagedType Value { get; }
-
- // Fields used with SubType = SafeArray.
- public VarEnum SafeArraySubType;
- public Type? SafeArrayUserDefinedSubType;
-
- // Field used with iid_is attribute (interface pointers).
- public int IidParameterIndex;
-
- // Fields used with SubType = ByValArray and LPArray.
- // Array size = parameter(PI) * PM + C
- public UnmanagedType ArraySubType;
- public short SizeParamIndex; // param index PI
- public int SizeConst; // constant C
-
- // Fields used with SubType = CustomMarshaler
- public string? MarshalType; // Name of marshaler class
- public Type? MarshalTypeRef; // Type of marshaler class
- public string? MarshalCookie; // cookie to pass to marshaler
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/MarshalDirectiveException.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/MarshalDirectiveException.cs
deleted file mode 100644
index 1baae38e965..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/MarshalDirectiveException.cs
+++ /dev/null
@@ -1,44 +0,0 @@
-// 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.
-
-/*=============================================================================
-**
-**
-** Purpose: This exception is thrown when the marshaller encounters a signature
-** that has an invalid MarshalAs CA for a given argument or is not
-** supported.
-**
-=============================================================================*/
-
-using System.Runtime.Serialization;
-
-namespace System.Runtime.InteropServices
-{
- [Serializable]
- [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
- public class MarshalDirectiveException : SystemException
- {
- public MarshalDirectiveException()
- : base(SR.Arg_MarshalDirectiveException)
- {
- HResult = HResults.COR_E_MARSHALDIRECTIVE;
- }
-
- public MarshalDirectiveException(string? message)
- : base(message)
- {
- HResult = HResults.COR_E_MARSHALDIRECTIVE;
- }
-
- public MarshalDirectiveException(string? message, Exception? inner)
- : base(message, inner)
- {
- HResult = HResults.COR_E_MARSHALDIRECTIVE;
- }
-
- protected MarshalDirectiveException(SerializationInfo info, StreamingContext context) : base(info, context)
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/MemoryMarshal.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/MemoryMarshal.cs
deleted file mode 100644
index a61e0220885..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/MemoryMarshal.cs
+++ /dev/null
@@ -1,535 +0,0 @@
-// 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.Buffers;
-using System.Runtime.CompilerServices;
-using System.Collections.Generic;
-using System.Diagnostics;
-
-using Internal.Runtime.CompilerServices;
-using System.Diagnostics.CodeAnalysis;
-
-namespace System.Runtime.InteropServices
-{
- /// <summary>
- /// Provides a collection of methods for interoperating with <see cref="Memory{T}"/>, <see cref="ReadOnlyMemory{T}"/>,
- /// <see cref="Span{T}"/>, and <see cref="ReadOnlySpan{T}"/>.
- /// </summary>
- public static class MemoryMarshal
- {
- /// <summary>
- /// Casts a Span of one primitive type <typeparamref name="T"/> to Span of bytes.
- /// That type may not contain pointers or references. This is checked at runtime in order to preserve type safety.
- /// </summary>
- /// <param name="span">The source slice, of type <typeparamref name="T"/>.</param>
- /// <exception cref="System.ArgumentException">
- /// Thrown when <typeparamref name="T"/> contains pointers.
- /// </exception>
- /// <exception cref="System.OverflowException">
- /// Thrown if the Length property of the new Span would exceed int.MaxValue.
- /// </exception>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static Span<byte> AsBytes<T>(Span<T> span)
- where T : struct
- {
- if (RuntimeHelpers.IsReferenceOrContainsReferences<T>())
- ThrowHelper.ThrowInvalidTypeWithPointersNotSupported(typeof(T));
-
- return new Span<byte>(
- ref Unsafe.As<T, byte>(ref GetReference(span)),
- checked(span.Length * Unsafe.SizeOf<T>()));
- }
-
- /// <summary>
- /// Casts a ReadOnlySpan of one primitive type <typeparamref name="T"/> to ReadOnlySpan of bytes.
- /// That type may not contain pointers or references. This is checked at runtime in order to preserve type safety.
- /// </summary>
- /// <param name="span">The source slice, of type <typeparamref name="T"/>.</param>
- /// <exception cref="System.ArgumentException">
- /// Thrown when <typeparamref name="T"/> contains pointers.
- /// </exception>
- /// <exception cref="System.OverflowException">
- /// Thrown if the Length property of the new Span would exceed int.MaxValue.
- /// </exception>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static ReadOnlySpan<byte> AsBytes<T>(ReadOnlySpan<T> span)
- where T : struct
- {
- if (RuntimeHelpers.IsReferenceOrContainsReferences<T>())
- ThrowHelper.ThrowInvalidTypeWithPointersNotSupported(typeof(T));
-
- return new ReadOnlySpan<byte>(
- ref Unsafe.As<T, byte>(ref GetReference(span)),
- checked(span.Length * Unsafe.SizeOf<T>()));
- }
-
- /// <summary>Creates a <see cref="Memory{T}"/> from a <see cref="ReadOnlyMemory{T}"/>.</summary>
- /// <param name="memory">The <see cref="ReadOnlyMemory{T}"/>.</param>
- /// <returns>A <see cref="Memory{T}"/> representing the same memory as the <see cref="ReadOnlyMemory{T}"/>, but writable.</returns>
- /// <remarks>
- /// <see cref="AsMemory{T}(ReadOnlyMemory{T})"/> must be used with extreme caution. <see cref="ReadOnlyMemory{T}"/> is used
- /// to represent immutable data and other memory that is not meant to be written to; <see cref="Memory{T}"/> instances created
- /// by <see cref="AsMemory{T}(ReadOnlyMemory{T})"/> should not be written to. The method exists to enable variables typed
- /// as <see cref="Memory{T}"/> but only used for reading to store a <see cref="ReadOnlyMemory{T}"/>.
- /// </remarks>
- public static Memory<T> AsMemory<T>(ReadOnlyMemory<T> memory) =>
- Unsafe.As<ReadOnlyMemory<T>, Memory<T>>(ref memory);
-
- /// <summary>
- /// Returns a reference to the 0th element of the Span. If the Span is empty, returns a reference to the location where the 0th element
- /// would have been stored. Such a reference may or may not be null. It can be used for pinning but must never be dereferenced.
- /// </summary>
- public static ref T GetReference<T>(Span<T> span) => ref span._pointer.Value;
-
- /// <summary>
- /// Returns a reference to the 0th element of the ReadOnlySpan. If the ReadOnlySpan is empty, returns a reference to the location where the 0th element
- /// would have been stored. Such a reference may or may not be null. It can be used for pinning but must never be dereferenced.
- /// </summary>
- public static ref T GetReference<T>(ReadOnlySpan<T> span) => ref span._pointer.Value;
-
- /// <summary>
- /// Returns a reference to the 0th element of the Span. If the Span is empty, returns a reference to fake non-null pointer. Such a reference can be used
- /// for pinning but must never be dereferenced. This is useful for interop with methods that do not accept null pointers for zero-sized buffers.
- /// </summary>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- internal static unsafe ref T GetNonNullPinnableReference<T>(Span<T> span) => ref (span.Length != 0) ? ref span._pointer.Value : ref Unsafe.AsRef<T>((void*)1);
-
- /// <summary>
- /// Returns a reference to the 0th element of the ReadOnlySpan. If the ReadOnlySpan is empty, returns a reference to fake non-null pointer. Such a reference
- /// can be used for pinning but must never be dereferenced. This is useful for interop with methods that do not accept null pointers for zero-sized buffers.
- /// </summary>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- internal static unsafe ref T GetNonNullPinnableReference<T>(ReadOnlySpan<T> span) => ref (span.Length != 0) ? ref span._pointer.Value : ref Unsafe.AsRef<T>((void*)1);
-
- /// <summary>
- /// Casts a Span of one primitive type <typeparamref name="TFrom"/> to another primitive type <typeparamref name="TTo"/>.
- /// These types may not contain pointers or references. This is checked at runtime in order to preserve type safety.
- /// </summary>
- /// <remarks>
- /// Supported only for platforms that support misaligned memory access or when the memory block is aligned by other means.
- /// </remarks>
- /// <param name="span">The source slice, of type <typeparamref name="TFrom"/>.</param>
- /// <exception cref="System.ArgumentException">
- /// Thrown when <typeparamref name="TFrom"/> or <typeparamref name="TTo"/> contains pointers.
- /// </exception>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static Span<TTo> Cast<TFrom, TTo>(Span<TFrom> span)
- where TFrom : struct
- where TTo : struct
- {
- if (RuntimeHelpers.IsReferenceOrContainsReferences<TFrom>())
- ThrowHelper.ThrowInvalidTypeWithPointersNotSupported(typeof(TFrom));
- if (RuntimeHelpers.IsReferenceOrContainsReferences<TTo>())
- ThrowHelper.ThrowInvalidTypeWithPointersNotSupported(typeof(TTo));
-
- // Use unsigned integers - unsigned division by constant (especially by power of 2)
- // and checked casts are faster and smaller.
- uint fromSize = (uint)Unsafe.SizeOf<TFrom>();
- uint toSize = (uint)Unsafe.SizeOf<TTo>();
- uint fromLength = (uint)span.Length;
- int toLength;
- if (fromSize == toSize)
- {
- // Special case for same size types - `(ulong)fromLength * (ulong)fromSize / (ulong)toSize`
- // should be optimized to just `length` but the JIT doesn't do that today.
- toLength = (int)fromLength;
- }
- else if (fromSize == 1)
- {
- // Special case for byte sized TFrom - `(ulong)fromLength * (ulong)fromSize / (ulong)toSize`
- // becomes `(ulong)fromLength / (ulong)toSize` but the JIT can't narrow it down to `int`
- // and can't eliminate the checked cast. This also avoids a 32 bit specific issue,
- // the JIT can't eliminate long multiply by 1.
- toLength = (int)(fromLength / toSize);
- }
- else
- {
- // Ensure that casts are done in such a way that the JIT is able to "see"
- // the uint->ulong casts and the multiply together so that on 32 bit targets
- // 32x32to64 multiplication is used.
- ulong toLengthUInt64 = (ulong)fromLength * (ulong)fromSize / (ulong)toSize;
- toLength = checked((int)toLengthUInt64);
- }
-
- return new Span<TTo>(
- ref Unsafe.As<TFrom, TTo>(ref span._pointer.Value),
- toLength);
- }
-
- /// <summary>
- /// Casts a ReadOnlySpan of one primitive type <typeparamref name="TFrom"/> to another primitive type <typeparamref name="TTo"/>.
- /// These types may not contain pointers or references. This is checked at runtime in order to preserve type safety.
- /// </summary>
- /// <remarks>
- /// Supported only for platforms that support misaligned memory access or when the memory block is aligned by other means.
- /// </remarks>
- /// <param name="span">The source slice, of type <typeparamref name="TFrom"/>.</param>
- /// <exception cref="System.ArgumentException">
- /// Thrown when <typeparamref name="TFrom"/> or <typeparamref name="TTo"/> contains pointers.
- /// </exception>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static ReadOnlySpan<TTo> Cast<TFrom, TTo>(ReadOnlySpan<TFrom> span)
- where TFrom : struct
- where TTo : struct
- {
- if (RuntimeHelpers.IsReferenceOrContainsReferences<TFrom>())
- ThrowHelper.ThrowInvalidTypeWithPointersNotSupported(typeof(TFrom));
- if (RuntimeHelpers.IsReferenceOrContainsReferences<TTo>())
- ThrowHelper.ThrowInvalidTypeWithPointersNotSupported(typeof(TTo));
-
- // Use unsigned integers - unsigned division by constant (especially by power of 2)
- // and checked casts are faster and smaller.
- uint fromSize = (uint)Unsafe.SizeOf<TFrom>();
- uint toSize = (uint)Unsafe.SizeOf<TTo>();
- uint fromLength = (uint)span.Length;
- int toLength;
- if (fromSize == toSize)
- {
- // Special case for same size types - `(ulong)fromLength * (ulong)fromSize / (ulong)toSize`
- // should be optimized to just `length` but the JIT doesn't do that today.
- toLength = (int)fromLength;
- }
- else if (fromSize == 1)
- {
- // Special case for byte sized TFrom - `(ulong)fromLength * (ulong)fromSize / (ulong)toSize`
- // becomes `(ulong)fromLength / (ulong)toSize` but the JIT can't narrow it down to `int`
- // and can't eliminate the checked cast. This also avoids a 32 bit specific issue,
- // the JIT can't eliminate long multiply by 1.
- toLength = (int)(fromLength / toSize);
- }
- else
- {
- // Ensure that casts are done in such a way that the JIT is able to "see"
- // the uint->ulong casts and the multiply together so that on 32 bit targets
- // 32x32to64 multiplication is used.
- ulong toLengthUInt64 = (ulong)fromLength * (ulong)fromSize / (ulong)toSize;
- toLength = checked((int)toLengthUInt64);
- }
-
- return new ReadOnlySpan<TTo>(
- ref Unsafe.As<TFrom, TTo>(ref MemoryMarshal.GetReference(span)),
- toLength);
- }
-
- /// <summary>
- /// Create a new span over a portion of a regular managed object. This can be useful
- /// if part of a managed object represents a "fixed array." This is dangerous because the
- /// <paramref name="length"/> is not checked.
- /// </summary>
- /// <param name="reference">A reference to data.</param>
- /// <param name="length">The number of <typeparamref name="T"/> elements the memory contains.</param>
- /// <returns>The lifetime of the returned span will not be validated for safety by span-aware languages.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static Span<T> CreateSpan<T>(ref T reference, int length) => new Span<T>(ref reference, length);
-
- /// <summary>
- /// Create a new read-only span over a portion of a regular managed object. This can be useful
- /// if part of a managed object represents a "fixed array." This is dangerous because the
- /// <paramref name="length"/> is not checked.
- /// </summary>
- /// <param name="reference">A reference to data.</param>
- /// <param name="length">The number of <typeparamref name="T"/> elements the memory contains.</param>
- /// <returns>The lifetime of the returned span will not be validated for safety by span-aware languages.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static ReadOnlySpan<T> CreateReadOnlySpan<T>(ref T reference, int length) => new ReadOnlySpan<T>(ref reference, length);
-
- /// <summary>
- /// Get an array segment from the underlying memory.
- /// If unable to get the array segment, return false with a default array segment.
- /// </summary>
- public static bool TryGetArray<T>(ReadOnlyMemory<T> memory, out ArraySegment<T> segment)
- {
- object? obj = memory.GetObjectStartLength(out int index, out int length);
-
- // As an optimization, we skip the "is string?" check below if typeof(T) is not char,
- // as Memory<T> / ROM<T> can't possibly contain a string instance in this case.
-
- if (obj != null && !(
- (typeof(T) == typeof(char) && obj.GetType() == typeof(string))
-#if FEATURE_UTF8STRING
- || ((typeof(T) == typeof(byte) || typeof(T) == typeof(Char8)) && obj.GetType() == typeof(Utf8String))
-#endif // FEATURE_UTF8STRING
- ))
- {
- if (RuntimeHelpers.ObjectHasComponentSize(obj))
- {
- // The object has a component size, which means it's variable-length, but we already
- // checked above that it's not a string. The only remaining option is that it's a T[]
- // or a U[] which is blittable to a T[] (e.g., int[] and uint[]).
-
- // The array may be prepinned, so remove the high bit from the start index in the line below.
- // The ArraySegment<T> ctor will perform bounds checking on index & length.
-
- segment = new ArraySegment<T>(Unsafe.As<T[]>(obj), index & ReadOnlyMemory<T>.RemoveFlagsBitMask, length);
- return true;
- }
- else
- {
- // The object isn't null, and it's not variable-length, so the only remaining option
- // is MemoryManager<T>. The ArraySegment<T> ctor will perform bounds checking on index & length.
-
- Debug.Assert(obj is MemoryManager<T>);
- if (Unsafe.As<MemoryManager<T>>(obj).TryGetArray(out ArraySegment<T> tempArraySegment))
- {
- segment = new ArraySegment<T>(tempArraySegment.Array!, tempArraySegment.Offset + index, length);
- return true;
- }
- }
- }
-
- // If we got to this point, the object is null, or it's a string, or it's a MemoryManager<T>
- // which isn't backed by an array. We'll quickly homogenize all zero-length Memory<T> instances
- // to an empty array for the purposes of reporting back to our caller.
-
- if (length == 0)
- {
- segment = ArraySegment<T>.Empty;
- return true;
- }
-
- // Otherwise, there's *some* data, but it's not convertible to T[].
-
- segment = default;
- return false;
- }
-
- /// <summary>
- /// Gets an <see cref="MemoryManager{T}"/> from the underlying read-only memory.
- /// If unable to get the <typeparamref name="TManager"/> type, returns false.
- /// </summary>
- /// <typeparam name="T">The element type of the <paramref name="memory" />.</typeparam>
- /// <typeparam name="TManager">The type of <see cref="MemoryManager{T}"/> to try and retrive.</typeparam>
- /// <param name="memory">The memory to get the manager for.</param>
- /// <param name="manager">The returned manager of the <see cref="ReadOnlyMemory{T}"/>.</param>
- /// <returns>A <see cref="bool"/> indicating if it was successful.</returns>
- public static bool TryGetMemoryManager<T, TManager>(ReadOnlyMemory<T> memory, [NotNullWhen(true)] out TManager? manager)
- where TManager : MemoryManager<T>
- {
- TManager? localManager; // Use register for null comparison rather than byref
- manager = localManager = memory.GetObjectStartLength(out _, out _) as TManager;
- return localManager != null;
- }
-
- /// <summary>
- /// Gets an <see cref="MemoryManager{T}"/> and <paramref name="start" />, <paramref name="length" /> from the underlying read-only memory.
- /// If unable to get the <typeparamref name="TManager"/> type, returns false.
- /// </summary>
- /// <typeparam name="T">The element type of the <paramref name="memory" />.</typeparam>
- /// <typeparam name="TManager">The type of <see cref="MemoryManager{T}"/> to try and retrive.</typeparam>
- /// <param name="memory">The memory to get the manager for.</param>
- /// <param name="manager">The returned manager of the <see cref="ReadOnlyMemory{T}"/>.</param>
- /// <param name="start">The offset from the start of the <paramref name="manager" /> that the <paramref name="memory" /> represents.</param>
- /// <param name="length">The length of the <paramref name="manager" /> that the <paramref name="memory" /> represents.</param>
- /// <returns>A <see cref="bool"/> indicating if it was successful.</returns>
- public static bool TryGetMemoryManager<T, TManager>(ReadOnlyMemory<T> memory, [NotNullWhen(true)] out TManager? manager, out int start, out int length)
- where TManager : MemoryManager<T>
- {
- TManager? localManager; // Use register for null comparison rather than byref
- manager = localManager = memory.GetObjectStartLength(out start, out length) as TManager;
-
- Debug.Assert(length >= 0);
-
- if (localManager == null)
- {
- start = default;
- length = default;
- return false;
- }
- return true;
- }
-
- /// <summary>
- /// Creates an <see cref="IEnumerable{T}"/> view of the given <paramref name="memory" /> to allow
- /// the <paramref name="memory" /> to be used in existing APIs that take an <see cref="IEnumerable{T}"/>.
- /// </summary>
- /// <typeparam name="T">The element type of the <paramref name="memory" />.</typeparam>
- /// <param name="memory">The ReadOnlyMemory to view as an <see cref="IEnumerable{T}"/></param>
- /// <returns>An <see cref="IEnumerable{T}"/> view of the given <paramref name="memory" /></returns>
- public static IEnumerable<T> ToEnumerable<T>(ReadOnlyMemory<T> memory)
- {
- for (int i = 0; i < memory.Length; i++)
- yield return memory.Span[i];
- }
-
- /// <summary>Attempts to get the underlying <see cref="string"/> from a <see cref="ReadOnlyMemory{T}"/>.</summary>
- /// <param name="memory">The memory that may be wrapping a <see cref="string"/> object.</param>
- /// <param name="text">The string.</param>
- /// <param name="start">The starting location in <paramref name="text"/>.</param>
- /// <param name="length">The number of items in <paramref name="text"/>.</param>
- /// <returns></returns>
- public static bool TryGetString(ReadOnlyMemory<char> memory, [NotNullWhen(true)] out string? text, out int start, out int length)
- {
- if (memory.GetObjectStartLength(out int offset, out int count) is string s)
- {
- Debug.Assert(offset >= 0);
- Debug.Assert(count >= 0);
- text = s;
- start = offset;
- length = count;
- return true;
- }
- else
- {
- text = null;
- start = 0;
- length = 0;
- return false;
- }
- }
-
- /// <summary>
- /// Reads a structure of type T out of a read-only span of bytes.
- /// </summary>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static T Read<T>(ReadOnlySpan<byte> source)
- where T : struct
- {
- if (RuntimeHelpers.IsReferenceOrContainsReferences<T>())
- {
- ThrowHelper.ThrowInvalidTypeWithPointersNotSupported(typeof(T));
- }
- if (Unsafe.SizeOf<T>() > source.Length)
- {
- ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.length);
- }
- return Unsafe.ReadUnaligned<T>(ref GetReference(source));
- }
-
- /// <summary>
- /// Reads a structure of type T out of a span of bytes.
- /// <returns>If the span is too small to contain the type T, return false.</returns>
- /// </summary>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static bool TryRead<T>(ReadOnlySpan<byte> source, out T value)
- where T : struct
- {
- if (RuntimeHelpers.IsReferenceOrContainsReferences<T>())
- {
- ThrowHelper.ThrowInvalidTypeWithPointersNotSupported(typeof(T));
- }
- if (Unsafe.SizeOf<T>() > (uint)source.Length)
- {
- value = default;
- return false;
- }
- value = Unsafe.ReadUnaligned<T>(ref GetReference(source));
- return true;
- }
-
- /// <summary>
- /// Writes a structure of type T into a span of bytes.
- /// </summary>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static void Write<T>(Span<byte> destination, ref T value)
- where T : struct
- {
- if (RuntimeHelpers.IsReferenceOrContainsReferences<T>())
- {
- ThrowHelper.ThrowInvalidTypeWithPointersNotSupported(typeof(T));
- }
- if ((uint)Unsafe.SizeOf<T>() > (uint)destination.Length)
- {
- ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.length);
- }
- Unsafe.WriteUnaligned<T>(ref GetReference(destination), value);
- }
-
- /// <summary>
- /// Writes a structure of type T into a span of bytes.
- /// <returns>If the span is too small to contain the type T, return false.</returns>
- /// </summary>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static bool TryWrite<T>(Span<byte> destination, ref T value)
- where T : struct
- {
- if (RuntimeHelpers.IsReferenceOrContainsReferences<T>())
- {
- ThrowHelper.ThrowInvalidTypeWithPointersNotSupported(typeof(T));
- }
- if (Unsafe.SizeOf<T>() > (uint)destination.Length)
- {
- return false;
- }
- Unsafe.WriteUnaligned<T>(ref GetReference(destination), value);
- return true;
- }
-
- /// <summary>
- /// Re-interprets a span of bytes as a reference to structure of type T.
- /// The type may not contain pointers or references. This is checked at runtime in order to preserve type safety.
- /// </summary>
- /// <remarks>
- /// Supported only for platforms that support misaligned memory access or when the memory block is aligned by other means.
- /// </remarks>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static ref T AsRef<T>(Span<byte> span)
- where T : struct
- {
- if (RuntimeHelpers.IsReferenceOrContainsReferences<T>())
- {
- ThrowHelper.ThrowInvalidTypeWithPointersNotSupported(typeof(T));
- }
- if (Unsafe.SizeOf<T>() > (uint)span.Length)
- {
- ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.length);
- }
- return ref Unsafe.As<byte, T>(ref GetReference(span));
- }
-
- /// <summary>
- /// Re-interprets a span of bytes as a reference to structure of type T.
- /// The type may not contain pointers or references. This is checked at runtime in order to preserve type safety.
- /// </summary>
- /// <remarks>
- /// Supported only for platforms that support misaligned memory access or when the memory block is aligned by other means.
- /// </remarks>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static ref readonly T AsRef<T>(ReadOnlySpan<byte> span)
- where T : struct
- {
- if (RuntimeHelpers.IsReferenceOrContainsReferences<T>())
- {
- ThrowHelper.ThrowInvalidTypeWithPointersNotSupported(typeof(T));
- }
- if (Unsafe.SizeOf<T>() > (uint)span.Length)
- {
- ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.length);
- }
- return ref Unsafe.As<byte, T>(ref GetReference(span));
- }
-
- /// <summary>
- /// Creates a new memory over the portion of the pre-pinned target array beginning
- /// at 'start' index and ending at 'end' index (exclusive).
- /// </summary>
- /// <param name="array">The pre-pinned target array.</param>
- /// <param name="start">The index at which to begin the memory.</param>
- /// <param name="length">The number of items in the memory.</param>
- /// <remarks>This method should only be called on an array that is already pinned and
- /// that array should not be unpinned while the returned Memory<typeparamref name="T"/> is still in use.
- /// Calling this method on an unpinned array could result in memory corruption.</remarks>
- /// <remarks>Returns default when <paramref name="array"/> is null.</remarks>
- /// <exception cref="System.ArrayTypeMismatchException">Thrown when <paramref name="array"/> is covariant and array's type is not exactly T[].</exception>
- /// <exception cref="System.ArgumentOutOfRangeException">
- /// Thrown when the specified <paramref name="start"/> or end index is not in the range (&lt;0 or &gt;=Length).
- /// </exception>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static Memory<T> CreateFromPinnedArray<T>(T[]? array, int start, int length)
- {
- if (array == null)
- {
- if (start != 0 || length != 0)
- ThrowHelper.ThrowArgumentOutOfRangeException();
- return default;
- }
- if (default(T)! == null && array.GetType() != typeof(T[])) // TODO-NULLABLE: default(T) == null warning (https://github.com/dotnet/roslyn/issues/34757)
- ThrowHelper.ThrowArrayTypeMismatchException();
- if ((uint)start > (uint)array.Length || (uint)length > (uint)(array.Length - start))
- ThrowHelper.ThrowArgumentOutOfRangeException();
-
- // Before using _index, check if _index < 0, then 'and' it with RemoveFlagsBitMask
- return new Memory<T>((object)array, start | (1 << 31), length);
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/NativeCallableAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/NativeCallableAttribute.cs
deleted file mode 100644
index 5fa60f460f8..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/NativeCallableAttribute.cs
+++ /dev/null
@@ -1,29 +0,0 @@
-// 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.Runtime.InteropServices
-{
- /// <summary>
- /// Any method marked with NativeCallableAttribute can be directly called from
- /// native code. The function token can be loaded to a local variable using LDFTN
- /// and passed as a callback to native method.
- /// </summary>
- [AttributeUsage(AttributeTargets.Method)]
- public sealed class NativeCallableAttribute : Attribute
- {
- public NativeCallableAttribute()
- {
- }
-
- /// <summary>
- /// Optional. If omitted, compiler will choose one for you.
- /// </summary>
- public CallingConvention CallingConvention;
-
- /// <summary>
- /// Optional. If omitted, then the method is native callable, but no EAT is emitted.
- /// </summary>
- public string? EntryPoint;
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/NativeLibrary.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/NativeLibrary.cs
deleted file mode 100644
index 9bd65fe57b1..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/NativeLibrary.cs
+++ /dev/null
@@ -1,248 +0,0 @@
-// 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.Reflection;
-using System.Runtime.CompilerServices;
-using System.Threading;
-
-namespace System.Runtime.InteropServices
-{
- /// <summary>
- /// A delegate used to resolve native libraries via callback.
- /// </summary>
- /// <param name="libraryName">The native library to resolve</param>
- /// <param name="assembly">The assembly requesting the resolution</param>
- /// <param name="searchPath">
- /// The DllImportSearchPathsAttribute on the PInvoke, if any.
- /// Otherwise, the DllImportSearchPathsAttribute on the assembly, if any.
- /// Otherwise null.
- /// </param>
- /// <returns>The handle for the loaded native library on success, null on failure</returns>
- public delegate IntPtr DllImportResolver(string libraryName,
- Assembly assembly,
- DllImportSearchPath? searchPath);
-
- /// <summary>
- /// APIs for managing Native Libraries
- /// </summary>
- public static partial class NativeLibrary
- {
- /// <summary>
- /// NativeLibrary Loader: Simple API
- /// This method is a wrapper around OS loader, using "default" flags.
- /// </summary>
- /// <param name="libraryPath">The name of the native library to be loaded</param>
- /// <returns>The handle for the loaded native library</returns>
- /// <exception cref="System.ArgumentNullException">If libraryPath is null</exception>
- /// <exception cref="System.DllNotFoundException ">If the library can't be found.</exception>
- /// <exception cref="System.BadImageFormatException">If the library is not valid.</exception>
- public static IntPtr Load(string libraryPath)
- {
- if (libraryPath == null)
- throw new ArgumentNullException(nameof(libraryPath));
-
- return LoadFromPath(libraryPath, throwOnError: true);
- }
-
- /// <summary>
- /// NativeLibrary Loader: Simple API that doesn't throw
- /// </summary>
- /// <param name="libraryPath">The name of the native library to be loaded</param>
- /// <param name="handle">The out-parameter for the loaded native library handle</param>
- /// <returns>True on successful load, false otherwise</returns>
- /// <exception cref="System.ArgumentNullException">If libraryPath is null</exception>
- public static bool TryLoad(string libraryPath, out IntPtr handle)
- {
- if (libraryPath == null)
- throw new ArgumentNullException(nameof(libraryPath));
-
- handle = LoadFromPath(libraryPath, throwOnError: false);
- return handle != IntPtr.Zero;
- }
-
- /// <summary>
- /// NativeLibrary Loader: High-level API
- /// Given a library name, this function searches specific paths based on the
- /// runtime configuration, input parameters, and attributes of the calling assembly.
- /// If DllImportSearchPath parameter is non-null, the flags in this enumeration are used.
- /// Otherwise, the flags specified by the DefaultDllImportSearchPaths attribute on the
- /// calling assembly (if any) are used.
- /// This LoadLibrary() method does not invoke the managed call-backs for native library resolution:
- /// * The per-assembly registered callback
- /// * AssemblyLoadContext.LoadUnmanagedDll()
- /// * AssemblyLoadContext.ResolvingUnmanagedDllEvent
- /// </summary>
- /// <param name="libraryName">The name of the native library to be loaded</param>
- /// <param name="assembly">The assembly loading the native library</param>
- /// <param name="searchPath">The search path</param>
- /// <returns>The handle for the loaded library</returns>
- /// <exception cref="System.ArgumentNullException">If libraryPath or assembly is null</exception>
- /// <exception cref="System.ArgumentException">If assembly is not a RuntimeAssembly</exception>
- /// <exception cref="System.DllNotFoundException ">If the library can't be found.</exception>
- /// <exception cref="System.BadImageFormatException">If the library is not valid.</exception>
- public static IntPtr Load(string libraryName, Assembly assembly, DllImportSearchPath? searchPath)
- {
- if (libraryName == null)
- throw new ArgumentNullException(nameof(libraryName));
- if (assembly == null)
- throw new ArgumentNullException(nameof(assembly));
- if (!assembly.IsRuntimeImplemented())
- throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly);
-
- return LoadLibraryByName(libraryName,
- assembly,
- searchPath,
- throwOnError: true);
- }
-
- /// <summary>
- /// NativeLibrary Loader: High-level API that doesn't throw.
- /// </summary>
- /// <param name="libraryName">The name of the native library to be loaded</param>
- /// <param name="searchPath">The search path</param>
- /// <param name="assembly">The assembly loading the native library</param>
- /// <param name="handle">The out-parameter for the loaded native library handle</param>
- /// <returns>True on successful load, false otherwise</returns>
- /// <exception cref="System.ArgumentNullException">If libraryPath or assembly is null</exception>
- /// <exception cref="System.ArgumentException">If assembly is not a RuntimeAssembly</exception>
- public static bool TryLoad(string libraryName, Assembly assembly, DllImportSearchPath? searchPath, out IntPtr handle)
- {
- if (libraryName == null)
- throw new ArgumentNullException(nameof(libraryName));
- if (assembly == null)
- throw new ArgumentNullException(nameof(assembly));
- if (!assembly.IsRuntimeImplemented())
- throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly);
-
- handle = LoadLibraryByName(libraryName,
- assembly,
- searchPath,
- throwOnError: false);
- return handle != IntPtr.Zero;
- }
-
- /// <summary>
- /// Free a loaded library
- /// Given a library handle, free it.
- /// No action if the input handle is null.
- /// </summary>
- /// <param name="handle">The native library handle to be freed</param>
- public static void Free(IntPtr handle)
- {
- if (handle == IntPtr.Zero)
- return;
- FreeLib(handle);
- }
-
- /// <summary>
- /// Get the address of an exported Symbol
- /// This is a simple wrapper around OS calls, and does not perform any name mangling.
- /// </summary>
- /// <param name="handle">The native library handle</param>
- /// <param name="name">The name of the exported symbol</param>
- /// <returns>The address of the symbol</returns>
- /// <exception cref="System.ArgumentNullException">If handle or name is null</exception>
- /// <exception cref="System.EntryPointNotFoundException">If the symbol is not found</exception>
- public static IntPtr GetExport(IntPtr handle, string name)
- {
- if (handle == IntPtr.Zero)
- throw new ArgumentNullException(nameof(handle));
- if (name == null)
- throw new ArgumentNullException(nameof(name));
-
- return GetSymbol(handle, name, throwOnError: true);
- }
-
- /// <summary>
- /// Get the address of an exported Symbol, but do not throw
- /// </summary>
- /// <param name="handle">The native library handle</param>
- /// <param name="name">The name of the exported symbol</param>
- /// <param name="address"> The out-parameter for the symbol address, if it exists</param>
- /// <returns>True on success, false otherwise</returns>
- /// <exception cref="System.ArgumentNullException">If handle or name is null</exception>
- public static bool TryGetExport(IntPtr handle, string name, out IntPtr address)
- {
- if (handle == IntPtr.Zero)
- throw new ArgumentNullException(nameof(handle));
- if (name == null)
- throw new ArgumentNullException(nameof(name));
-
- address = GetSymbol(handle, name, throwOnError: false);
- return address != IntPtr.Zero;
- }
-
- /// <summary>
- /// Map from assembly to native-library resolver.
- /// Interop specific fields and properties are generally not added to Assembly class.
- /// Therefore, this table uses weak assembly pointers to indirectly achieve
- /// similar behavior.
- /// </summary>
- private static ConditionalWeakTable<Assembly, DllImportResolver>? s_nativeDllResolveMap;
-
- /// <summary>
- /// Set a callback for resolving native library imports from an assembly.
- /// This per-assembly resolver is the first attempt to resolve native library loads
- /// initiated by this assembly.
- ///
- /// Only one resolver can be registered per assembly.
- /// Trying to register a second resolver fails with InvalidOperationException.
- /// </summary>
- /// <param name="assembly">The assembly for which the resolver is registered</param>
- /// <param name="resolver">The resolver callback to register</param>
- /// <exception cref="System.ArgumentNullException">If assembly or resolver is null</exception>
- /// <exception cref="System.ArgumentException">If a resolver is already set for this assembly</exception>
- public static void SetDllImportResolver(Assembly assembly, DllImportResolver resolver)
- {
- if (assembly == null)
- throw new ArgumentNullException(nameof(assembly));
- if (resolver == null)
- throw new ArgumentNullException(nameof(resolver));
- if (!assembly.IsRuntimeImplemented())
- throw new ArgumentException(SR.Argument_MustBeRuntimeAssembly);
-
- if (s_nativeDllResolveMap == null)
- {
- Interlocked.CompareExchange(ref s_nativeDllResolveMap,
- new ConditionalWeakTable<Assembly, DllImportResolver>(), null);
- }
-
- try
- {
- s_nativeDllResolveMap.Add(assembly, resolver);
- }
- catch (ArgumentException)
- {
- // ConditionalWealTable throws ArgumentException if the Key already exists
- throw new InvalidOperationException(SR.InvalidOperation_CannotRegisterSecondResolver);
- }
- }
-
- /// <summary>
- /// The helper function that calls the per-assembly native-library resolver
- /// if one is registered for this assembly.
- /// </summary>
- /// <param name="libraryName">The native library to load</param>
- /// <param name="assembly">The assembly trying load the native library</param>
- /// <param name="hasDllImportSearchPathFlags">If the pInvoke has DefaultDllImportSearchPathAttribute</param>
- /// <param name="dllImportSearchPathFlags">If hasdllImportSearchPathFlags is true, the flags in
- /// DefaultDllImportSearchPathAttribute; meaningless otherwise </param>
- /// <returns>The handle for the loaded library on success. Null on failure.</returns>
- internal static IntPtr LoadLibraryCallbackStub(string libraryName, Assembly assembly,
- bool hasDllImportSearchPathFlags, uint dllImportSearchPathFlags)
- {
- if (s_nativeDllResolveMap == null)
- {
- return IntPtr.Zero;
- }
-
- if (!s_nativeDllResolveMap.TryGetValue(assembly, out DllImportResolver? resolver))
- {
- return IntPtr.Zero;
- }
-
- return resolver(libraryName, assembly, hasDllImportSearchPathFlags ? (DllImportSearchPath?)dllImportSearchPathFlags : null);
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/OptionalAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/OptionalAttribute.cs
deleted file mode 100644
index 5ac75d7b3e9..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/OptionalAttribute.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
- public sealed class OptionalAttribute : Attribute
- {
- public OptionalAttribute()
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/OutAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/OutAttribute.cs
deleted file mode 100644
index 338ceac91e1..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/OutAttribute.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Parameter, Inherited = false)]
- public sealed class OutAttribute : Attribute
- {
- public OutAttribute()
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/PreserveSigAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/PreserveSigAttribute.cs
deleted file mode 100644
index 464e1abcbeb..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/PreserveSigAttribute.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Method, Inherited = false)]
- public sealed class PreserveSigAttribute : Attribute
- {
- public PreserveSigAttribute()
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ProgIdAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ProgIdAttribute.cs
deleted file mode 100644
index bc4bd18bb1b..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/ProgIdAttribute.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Class, Inherited = false)]
- public sealed class ProgIdAttribute : Attribute
- {
- public ProgIdAttribute(string progId)
- {
- Value = progId;
- }
-
- public string Value { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/SEHException.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/SEHException.cs
deleted file mode 100644
index 0f44e3e99ec..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/SEHException.cs
+++ /dev/null
@@ -1,47 +0,0 @@
-// 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.Serialization;
-
-namespace System.Runtime.InteropServices
-{
- /// <summary>
- /// Exception for Structured Exception Handler exceptions.
- /// </summary>
- [Serializable]
- [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
- public class SEHException : ExternalException
- {
- public SEHException()
- {
- HResult = HResults.E_FAIL;
- }
-
- public SEHException(string? message)
- : base(message)
- {
- HResult = HResults.E_FAIL;
- }
-
- public SEHException(string? message, Exception? inner)
- : base(message, inner)
- {
- HResult = HResults.E_FAIL;
- }
-
- protected SEHException(SerializationInfo info, StreamingContext context) : base(info, context)
- {
- }
-
- // Exceptions can be resumable, meaning a filtered exception
- // handler can correct the problem that caused the exception,
- // and the code will continue from the point that threw the
- // exception.
- //
- // Resumable exceptions aren't implemented in this version,
- // but this method exists and always returns false.
- //
- public virtual bool CanResume() => false;
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/SafeArrayRankMismatchException.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/SafeArrayRankMismatchException.cs
deleted file mode 100644
index 1bd3fdd9f3d..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/SafeArrayRankMismatchException.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-// 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.Serialization;
-
-namespace System.Runtime.InteropServices
-{
- /// <summary>
- /// The exception is thrown when the runtime rank of a safe array is different
- /// than the array rank specified in the metadata.
- /// </summary>
- [Serializable]
- [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
- public class SafeArrayRankMismatchException : SystemException
- {
- public SafeArrayRankMismatchException()
- : base(SR.Arg_SafeArrayRankMismatchException)
- {
- HResult = HResults.COR_E_SAFEARRAYRANKMISMATCH;
- }
-
- public SafeArrayRankMismatchException(string? message)
- : base(message)
- {
- HResult = HResults.COR_E_SAFEARRAYRANKMISMATCH;
- }
-
- public SafeArrayRankMismatchException(string? message, Exception? inner)
- : base(message, inner)
- {
- HResult = HResults.COR_E_SAFEARRAYRANKMISMATCH;
- }
-
- protected SafeArrayRankMismatchException(SerializationInfo info, StreamingContext context) : base(info, context)
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/SafeArrayTypeMismatchException.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/SafeArrayTypeMismatchException.cs
deleted file mode 100644
index 2cb1fc475ae..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/SafeArrayTypeMismatchException.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-// 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.Serialization;
-
-namespace System.Runtime.InteropServices
-{
- /// <summary>
- /// The exception is thrown when the runtime type of an array is different
- /// than the safe array sub type specified in the metadata.
- /// </summary>
- [Serializable]
- [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
- public class SafeArrayTypeMismatchException : SystemException
- {
- public SafeArrayTypeMismatchException()
- : base(SR.Arg_SafeArrayTypeMismatchException)
- {
- HResult = HResults.COR_E_SAFEARRAYTYPEMISMATCH;
- }
-
- public SafeArrayTypeMismatchException(string? message)
- : base(message)
- {
- HResult = HResults.COR_E_SAFEARRAYTYPEMISMATCH;
- }
-
- public SafeArrayTypeMismatchException(string? message, Exception? inner)
- : base(message, inner)
- {
- HResult = HResults.COR_E_SAFEARRAYTYPEMISMATCH;
- }
-
- protected SafeArrayTypeMismatchException(SerializationInfo info, StreamingContext context) : base(info, context)
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/SafeBuffer.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/SafeBuffer.cs
deleted file mode 100644
index 19e021c6b37..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/SafeBuffer.cs
+++ /dev/null
@@ -1,393 +0,0 @@
-// 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.
-
-/*============================================================
-**
-** Purpose: Unsafe code that uses pointers should use
-** SafePointer to fix subtle lifetime problems with the
-** underlying resource.
-**
-===========================================================*/
-
-// Design points:
-// *) Avoid handle-recycling problems (including ones triggered via
-// resurrection attacks) for all accesses via pointers. This requires tying
-// together the lifetime of the unmanaged resource with the code that reads
-// from that resource, in a package that uses synchronization to enforce
-// the correct semantics during finalization. We're using SafeHandle's
-// ref count as a gate on whether the pointer can be dereferenced because that
-// controls the lifetime of the resource.
-//
-// *) Keep the penalties for using this class small, both in terms of space
-// and time. Having multiple threads reading from a memory mapped file
-// will already require 2 additional interlocked operations. If we add in
-// a "current position" concept, that requires additional space in memory and
-// synchronization. Since the position in memory is often (but not always)
-// something that can be stored on the stack, we can save some memory by
-// excluding it from this object. However, avoiding the need for
-// synchronization is a more significant win. This design allows multiple
-// threads to read and write memory simultaneously without locks (as long as
-// you don't write to a region of memory that overlaps with what another
-// thread is accessing).
-//
-// *) Space-wise, we use the following memory, including SafeHandle's fields:
-// Object Header MT* handle int bool bool <2 pad bytes> length
-// On 32 bit platforms: 24 bytes. On 64 bit platforms: 40 bytes.
-// (We can safe 4 bytes on x86 only by shrinking SafeHandle)
-//
-// *) Wrapping a SafeHandle would have been a nice solution, but without an
-// ordering between critical finalizable objects, it would have required
-// changes to each SafeHandle subclass to opt in to being usable from a
-// SafeBuffer (or some clever exposure of SafeHandle's state fields and a
-// way of forcing ReleaseHandle to run even after the SafeHandle has been
-// finalized with a ref count > 1). We can use less memory and create fewer
-// objects by simply inserting a SafeBuffer into the class hierarchy.
-//
-// *) In an ideal world, we could get marshaling support for SafeBuffer that
-// would allow us to annotate a P/Invoke declaration, saying this parameter
-// specifies the length of the buffer, and the units of that length are X.
-// P/Invoke would then pass that size parameter to SafeBuffer.
-// [DllImport(...)]
-// static extern SafeMemoryHandle AllocCharBuffer(int numChars);
-// If we could put an attribute on the SafeMemoryHandle saying numChars is
-// the element length, and it must be multiplied by 2 to get to the byte
-// length, we can simplify the usage model for SafeBuffer.
-//
-// *) This class could benefit from a constraint saying T is a value type
-// containing no GC references.
-
-// Implementation notes:
-// *) The Initialize method must be called before you use any instance of
-// a SafeBuffer. To avoid race conditions when storing SafeBuffers in statics,
-// you either need to take a lock when publishing the SafeBuffer, or you
-// need to create a local, initialize the SafeBuffer, then assign to the
-// static variable (perhaps using Interlocked.CompareExchange). Of course,
-// assignments in a static class constructor are under a lock implicitly.
-
-using System.Runtime.CompilerServices;
-using Internal.Runtime.CompilerServices;
-using Microsoft.Win32.SafeHandles;
-
-namespace System.Runtime.InteropServices
-{
- public abstract unsafe class SafeBuffer : SafeHandleZeroOrMinusOneIsInvalid
- {
- // Steal UIntPtr.MaxValue as our uninitialized value.
- private static readonly UIntPtr Uninitialized = (UIntPtr.Size == 4) ?
- ((UIntPtr)uint.MaxValue) : ((UIntPtr)ulong.MaxValue);
-
- private UIntPtr _numBytes;
-
- protected SafeBuffer(bool ownsHandle) : base(ownsHandle)
- {
- _numBytes = Uninitialized;
- }
-
- /// <summary>
- /// Specifies the size of the region of memory, in bytes. Must be
- /// called before using the SafeBuffer.
- /// </summary>
- /// <param name="numBytes">Number of valid bytes in memory.</param>
- [CLSCompliant(false)]
- public void Initialize(ulong numBytes)
- {
- if (IntPtr.Size == 4 && numBytes > uint.MaxValue)
- throw new ArgumentOutOfRangeException(nameof(numBytes), SR.ArgumentOutOfRange_AddressSpace);
-
- if (numBytes >= (ulong)Uninitialized)
- throw new ArgumentOutOfRangeException(nameof(numBytes), SR.ArgumentOutOfRange_UIntPtrMax);
-
- _numBytes = (UIntPtr)numBytes;
- }
-
- /// <summary>
- /// Specifies the size of the region in memory, as the number of
- /// elements in an array. Must be called before using the SafeBuffer.
- /// </summary>
- [CLSCompliant(false)]
- public void Initialize(uint numElements, uint sizeOfEachElement)
- {
- Initialize((ulong)numElements * sizeOfEachElement);
- }
-
- /// <summary>
- /// Specifies the size of the region in memory, as the number of
- /// elements in an array. Must be called before using the SafeBuffer.
- /// </summary>
- [CLSCompliant(false)]
- public void Initialize<T>(uint numElements) where T : struct
- {
- Initialize(numElements, AlignedSizeOf<T>());
- }
-
- // Callers should ensure that they check whether the pointer ref param
- // is null when AcquirePointer returns. If it is not null, they must
- // call ReleasePointer. This method calls DangerousAddRef
- // & exposes the pointer. Unlike Read, it does not alter the "current
- // position" of the pointer. Here's how to use it:
- //
- // byte* pointer = null;
- // try {
- // safeBuffer.AcquirePointer(ref pointer);
- // // Use pointer here, with your own bounds checking
- // }
- // finally {
- // if (pointer != null)
- // safeBuffer.ReleasePointer();
- // }
- //
- // Note: If you cast this byte* to a T*, you have to worry about
- // whether your pointer is aligned. Additionally, you must take
- // responsibility for all bounds checking with this pointer.
- /// <summary>
- /// Obtain the pointer from a SafeBuffer for a block of code,
- /// with the express responsibility for bounds checking and calling
- /// ReleasePointer later to ensure the pointer can be freed later.
- /// This method either completes successfully or throws an exception
- /// and returns with pointer set to null.
- /// </summary>
- /// <param name="pointer">A byte*, passed by reference, to receive
- /// the pointer from within the SafeBuffer. You must set
- /// pointer to null before calling this method.</param>
- [CLSCompliant(false)]
- public void AcquirePointer(ref byte* pointer)
- {
- if (_numBytes == Uninitialized)
- throw NotInitialized();
-
- pointer = null;
-
- bool junk = false;
- DangerousAddRef(ref junk);
- pointer = (byte*)handle;
- }
-
- public void ReleasePointer()
- {
- if (_numBytes == Uninitialized)
- throw NotInitialized();
-
- DangerousRelease();
- }
-
- /// <summary>
- /// Read a value type from memory at the given offset. This is
- /// equivalent to: return *(T*)(bytePtr + byteOffset);
- /// </summary>
- /// <typeparam name="T">The value type to read</typeparam>
- /// <param name="byteOffset">Where to start reading from memory. You
- /// may have to consider alignment.</param>
- /// <returns>An instance of T read from memory.</returns>
- [CLSCompliant(false)]
- public T Read<T>(ulong byteOffset) where T : struct
- {
- if (_numBytes == Uninitialized)
- throw NotInitialized();
-
- uint sizeofT = SizeOf<T>();
- byte* ptr = (byte*)handle + byteOffset;
- SpaceCheck(ptr, sizeofT);
-
- // return *(T*) (_ptr + byteOffset);
- T value = default;
- bool mustCallRelease = false;
- try
- {
- DangerousAddRef(ref mustCallRelease);
-
- fixed (byte* pStructure = &Unsafe.As<T, byte>(ref value))
- Buffer.Memmove(pStructure, ptr, sizeofT);
- }
- finally
- {
- if (mustCallRelease)
- DangerousRelease();
- }
- return value;
- }
-
- [CLSCompliant(false)]
- public void ReadArray<T>(ulong byteOffset, T[] array, int index, int count)
- where T : struct
- {
- if (array == null)
- throw new ArgumentNullException(nameof(array), SR.ArgumentNull_Buffer);
- if (index < 0)
- throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_NeedNonNegNum);
- if (count < 0)
- throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_NeedNonNegNum);
- if (array.Length - index < count)
- throw new ArgumentException(SR.Argument_InvalidOffLen);
-
- if (_numBytes == Uninitialized)
- throw NotInitialized();
-
- uint sizeofT = SizeOf<T>();
- uint alignedSizeofT = AlignedSizeOf<T>();
- byte* ptr = (byte*)handle + byteOffset;
- SpaceCheck(ptr, checked((ulong)(alignedSizeofT * count)));
-
- bool mustCallRelease = false;
- try
- {
- DangerousAddRef(ref mustCallRelease);
-
- if (count > 0)
- {
- fixed (byte* pStructure = &Unsafe.As<T, byte>(ref array[index]))
- {
- for (int i = 0; i < count; i++)
- Buffer.Memmove(pStructure + sizeofT * i, ptr + alignedSizeofT * i, sizeofT);
- }
- }
- }
- finally
- {
- if (mustCallRelease)
- DangerousRelease();
- }
- }
-
- /// <summary>
- /// Write a value type to memory at the given offset. This is
- /// equivalent to: *(T*)(bytePtr + byteOffset) = value;
- /// </summary>
- /// <typeparam name="T">The type of the value type to write to memory.</typeparam>
- /// <param name="byteOffset">The location in memory to write to. You
- /// may have to consider alignment.</param>
- /// <param name="value">The value type to write to memory.</param>
- [CLSCompliant(false)]
- public void Write<T>(ulong byteOffset, T value) where T : struct
- {
- if (_numBytes == Uninitialized)
- throw NotInitialized();
-
- uint sizeofT = SizeOf<T>();
- byte* ptr = (byte*)handle + byteOffset;
- SpaceCheck(ptr, sizeofT);
-
- // *((T*) (_ptr + byteOffset)) = value;
- bool mustCallRelease = false;
- try
- {
- DangerousAddRef(ref mustCallRelease);
-
- fixed (byte* pStructure = &Unsafe.As<T, byte>(ref value))
- Buffer.Memmove(ptr, pStructure, sizeofT);
- }
- finally
- {
- if (mustCallRelease)
- DangerousRelease();
- }
- }
-
- [CLSCompliant(false)]
- public void WriteArray<T>(ulong byteOffset, T[] array, int index, int count)
- where T : struct
- {
- if (array == null)
- throw new ArgumentNullException(nameof(array), SR.ArgumentNull_Buffer);
- if (index < 0)
- throw new ArgumentOutOfRangeException(nameof(index), SR.ArgumentOutOfRange_NeedNonNegNum);
- if (count < 0)
- throw new ArgumentOutOfRangeException(nameof(count), SR.ArgumentOutOfRange_NeedNonNegNum);
- if (array.Length - index < count)
- throw new ArgumentException(SR.Argument_InvalidOffLen);
-
- if (_numBytes == Uninitialized)
- throw NotInitialized();
-
- uint sizeofT = SizeOf<T>();
- uint alignedSizeofT = AlignedSizeOf<T>();
- byte* ptr = (byte*)handle + byteOffset;
- SpaceCheck(ptr, checked((ulong)(alignedSizeofT * count)));
-
- bool mustCallRelease = false;
- try
- {
- DangerousAddRef(ref mustCallRelease);
-
- if (count > 0)
- {
- {
- fixed (byte* pStructure = &Unsafe.As<T, byte>(ref array[index]))
- {
- for (int i = 0; i < count; i++)
- Buffer.Memmove(ptr + alignedSizeofT * i, pStructure + sizeofT * i, sizeofT);
- }
- }
- }
- }
- finally
- {
- if (mustCallRelease)
- DangerousRelease();
- }
- }
-
- /// <summary>
- /// Returns the number of bytes in the memory region.
- /// </summary>
- [CLSCompliant(false)]
- public ulong ByteLength
- {
- get
- {
- if (_numBytes == Uninitialized)
- throw NotInitialized();
-
- return (ulong)_numBytes;
- }
- }
-
- /* No indexer. The perf would be misleadingly bad. People should use
- * AcquirePointer and ReleasePointer instead. */
-
- private void SpaceCheck(byte* ptr, ulong sizeInBytes)
- {
- if ((ulong)_numBytes < sizeInBytes)
- NotEnoughRoom();
- if ((ulong)(ptr - (byte*)handle) > ((ulong)_numBytes) - sizeInBytes)
- NotEnoughRoom();
- }
-
- private static void NotEnoughRoom()
- {
- throw new ArgumentException(SR.Arg_BufferTooSmall);
- }
-
- private static InvalidOperationException NotInitialized()
- {
- return new InvalidOperationException(SR.InvalidOperation_MustCallInitialize);
- }
-
- /// <summary>
- /// Returns the size that SafeBuffer (and hence, UnmanagedMemoryAccessor) reserves in the unmanaged buffer for each element of an array of T. This is not the same
- /// value that sizeof(T) returns! Since the primary use case is to parse memory mapped files, we cannot change this algorithm as this defines a de-facto serialization format.
- /// Throws if T contains GC references.
- /// </summary>
- internal static uint AlignedSizeOf<T>() where T : struct
- {
- uint size = SizeOf<T>();
- if (size == 1 || size == 2)
- {
- return size;
- }
-
- return (uint)((size + 3) & (~3));
- }
-
- /// <summary>
- /// Returns same value as sizeof(T) but throws if T contains GC references.
- /// </summary>
- internal static uint SizeOf<T>() where T : struct
- {
- if (RuntimeHelpers.IsReferenceOrContainsReferences<T>())
- throw new ArgumentException(SR.Argument_NeedStructWithNoRefs);
-
- return (uint)Unsafe.SizeOf<T>();
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/SafeHandle.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/SafeHandle.cs
deleted file mode 100644
index 053a70f1566..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/SafeHandle.cs
+++ /dev/null
@@ -1,253 +0,0 @@
-// 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.Diagnostics;
-using System.Runtime.ConstrainedExecution;
-using System.Threading;
-
-namespace System.Runtime.InteropServices
-{
- // This implementation does not employ critical execution regions and thus cannot
- // reliably guarantee handle release in the face of thread aborts.
-
- /// <summary>Represents a wrapper class for operating system handles.</summary>
- public abstract partial class SafeHandle : CriticalFinalizerObject, IDisposable
- {
- // IMPORTANT:
- // - Do not add or rearrange fields as the EE depends on this layout,
- // as well as on the values of the StateBits flags.
- // - The EE may also perform the same operations using equivalent native
- // code, so this managed code must not assume it is the only code
- // manipulating _state.
-
- /// <summary>Specifies the handle to be wrapped.</summary>
- protected IntPtr handle;
- /// <summary>Combined ref count and closed/disposed flags (so we can atomically modify them).</summary>
- private volatile int _state;
- /// <summary>Whether we can release this handle.</summary>
- private readonly bool _ownsHandle;
- /// <summary>Whether constructor completed.</summary>
- private volatile bool _fullyInitialized;
-
- /// <summary>Bitmasks for the <see cref="_state"/> field.</summary>
- /// <remarks>
- /// The state field ends up looking like this:
- ///
- /// 31 2 1 0
- /// +-----------------------------------------------------------+---+---+
- /// | Ref count | D | C |
- /// +-----------------------------------------------------------+---+---+
- ///
- /// Where D = 1 means a Dispose has been performed and C = 1 means the
- /// underlying handle has been (or will be shortly) released.
- /// </remarks>
- private static class StateBits
- {
- public const int Closed = 0b01;
- public const int Disposed = 0b10;
- public const int RefCount = unchecked(~0b11); // 2 bits reserved for closed/disposed; ref count gets 30 bits
- public const int RefCountOne = 1 << 2;
- }
-
- /// <summary>Creates a SafeHandle class.</summary>
- protected SafeHandle(IntPtr invalidHandleValue, bool ownsHandle)
- {
- handle = invalidHandleValue;
- _state = StateBits.RefCountOne; // Ref count 1 and not closed or disposed.
- _ownsHandle = ownsHandle;
-
- if (!ownsHandle)
- {
- GC.SuppressFinalize(this);
- }
-
- _fullyInitialized = true;
- }
-
-#if !CORERT // CoreRT doesn't correctly support CriticalFinalizerObject
- ~SafeHandle()
- {
- if (_fullyInitialized)
- {
- Dispose(disposing: false);
- }
- }
-#endif
-
- protected void SetHandle(IntPtr handle) => this.handle = handle;
-
- public IntPtr DangerousGetHandle() => handle;
-
- public bool IsClosed => (_state & StateBits.Closed) == StateBits.Closed;
-
- public abstract bool IsInvalid { get; }
-
- public void Close() => Dispose();
-
- public void Dispose()
- {
- Dispose(disposing: true);
- GC.SuppressFinalize(this);
- }
-
- protected virtual void Dispose(bool disposing)
- {
- Debug.Assert(_fullyInitialized);
- InternalRelease(disposeOrFinalizeOperation: true);
- }
-
- public void SetHandleAsInvalid()
- {
- Debug.Assert(_fullyInitialized);
-
- // Attempt to set closed state (low order bit of the _state field).
- // Might have to attempt these repeatedly, if the operation suffers
- // interference from an AddRef or Release.
- int oldState, newState;
- do
- {
- oldState = _state;
- newState = oldState | StateBits.Closed;
- } while (Interlocked.CompareExchange(ref _state, newState, oldState) != oldState);
-
- GC.SuppressFinalize(this);
- }
-
- protected abstract bool ReleaseHandle();
-
- public void DangerousAddRef(ref bool success)
- {
- // To prevent handle recycling security attacks we must enforce the
- // following invariant: we cannot successfully AddRef a handle on which
- // we've committed to the process of releasing.
-
- // We ensure this by never AddRef'ing a handle that is marked closed and
- // never marking a handle as closed while the ref count is non-zero. For
- // this to be thread safe we must perform inspection/updates of the two
- // values as a single atomic operation. We achieve this by storing them both
- // in a single aligned int and modifying the entire state via interlocked
- // compare exchange operations.
-
- // Additionally we have to deal with the problem of the Dispose operation.
- // We must assume that this operation is directly exposed to untrusted
- // callers and that malicious callers will try and use what is basically a
- // Release call to decrement the ref count to zero and free the handle while
- // it's still in use (the other way a handle recycling attack can be
- // mounted). We combat this by allowing only one Dispose to operate against
- // a given safe handle (which balances the creation operation given that
- // Dispose suppresses finalization). We record the fact that a Dispose has
- // been requested in the same state field as the ref count and closed state.
-
- Debug.Assert(_fullyInitialized);
-
- // Might have to perform the following steps multiple times due to
- // interference from other AddRef's and Release's.
- int oldState, newState;
- do
- {
- // First step is to read the current handle state. We use this as a
- // basis to decide whether an AddRef is legal and, if so, to propose an
- // update predicated on the initial state (a conditional write).
- // Check for closed state.
- oldState = _state;
- if ((oldState & StateBits.Closed) != 0)
- {
- throw new ObjectDisposedException(nameof(SafeHandle), SR.ObjectDisposed_SafeHandleClosed);
- }
-
- // Not closed, let's propose an update (to the ref count, just add
- // StateBits.RefCountOne to the state to effectively add 1 to the ref count).
- // Continue doing this until the update succeeds (because nobody
- // modifies the state field between the read and write operations) or
- // the state moves to closed.
- newState = oldState + StateBits.RefCountOne;
- } while (Interlocked.CompareExchange(ref _state, newState, oldState) != oldState);
-
- // If we got here we managed to update the ref count while the state
- // remained non closed. So we're done.
- success = true;
- }
-
- public void DangerousRelease() => InternalRelease(disposeOrFinalizeOperation: false);
-
- private void InternalRelease(bool disposeOrFinalizeOperation)
- {
- Debug.Assert(_fullyInitialized || disposeOrFinalizeOperation);
-
- // See AddRef above for the design of the synchronization here. Basically we
- // will try to decrement the current ref count and, if that would take us to
- // zero refs, set the closed state on the handle as well.
- bool performRelease = false;
-
- // Might have to perform the following steps multiple times due to
- // interference from other AddRef's and Release's.
- int oldState, newState;
- do
- {
- // First step is to read the current handle state. We use this cached
- // value to predicate any modification we might decide to make to the
- // state).
- oldState = _state;
-
- // If this is a Dispose operation we have additional requirements (to
- // ensure that Dispose happens at most once as the comments in AddRef
- // detail). We must check that the dispose bit is not set in the old
- // state and, in the case of successful state update, leave the disposed
- // bit set. Silently do nothing if Dispose has already been called.
- if (disposeOrFinalizeOperation && ((oldState & StateBits.Disposed) != 0))
- {
- return;
- }
-
- // We should never see a ref count of zero (that would imply we have
- // unbalanced AddRef and Releases). (We might see a closed state before
- // hitting zero though -- that can happen if SetHandleAsInvalid is
- // used).
- if ((oldState & StateBits.RefCount) == 0)
- {
- throw new ObjectDisposedException(nameof(SafeHandle), SR.ObjectDisposed_SafeHandleClosed);
- }
-
- // If we're proposing a decrement to zero and the handle is not closed
- // and we own the handle then we need to release the handle upon a
- // successful state update. If so we need to check whether the handle is
- // currently invalid by asking the SafeHandle subclass. We must do this before
- // transitioning the handle to closed, however, since setting the closed
- // state will cause IsInvalid to always return true.
- performRelease = ((oldState & (StateBits.RefCount | StateBits.Closed)) == StateBits.RefCountOne) &&
- _ownsHandle &&
- !IsInvalid;
-
- // Attempt the update to the new state, fail and retry if the initial
- // state has been modified in the meantime. Decrement the ref count by
- // substracting StateBits.RefCountOne from the state then OR in the bits for
- // Dispose (if that's the reason for the Release) and closed (if the
- // initial ref count was 1).
- newState = oldState - StateBits.RefCountOne;
- if ((oldState & StateBits.RefCount) == StateBits.RefCountOne)
- {
- newState |= StateBits.Closed;
- }
- if (disposeOrFinalizeOperation)
- {
- newState |= StateBits.Disposed;
- }
- } while (Interlocked.CompareExchange(ref _state, newState, oldState) != oldState);
-
- // If we get here we successfully decremented the ref count. Additionally we
- // may have decremented it to zero and set the handle state as closed. In
- // this case (providng we own the handle) we will call the ReleaseHandle
- // method on the SafeHandle subclass.
- if (performRelease)
- {
- // Save last error from P/Invoke in case the implementation of ReleaseHandle
- // trashes it (important because this ReleaseHandle could occur implicitly
- // as part of unmarshaling another P/Invoke).
- int lastError = Marshal.GetLastWin32Error();
- ReleaseHandle();
- Marshal.SetLastWin32Error(lastError);
- }
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/StructLayoutAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/StructLayoutAttribute.cs
deleted file mode 100644
index c4cce9956e1..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/StructLayoutAttribute.cs
+++ /dev/null
@@ -1,26 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct, Inherited = false)]
- public sealed class StructLayoutAttribute : Attribute
- {
- public StructLayoutAttribute(LayoutKind layoutKind)
- {
- Value = layoutKind;
- }
-
- public StructLayoutAttribute(short layoutKind)
- {
- Value = (LayoutKind)layoutKind;
- }
-
- public LayoutKind Value { get; }
-
- public int Pack;
- public int Size;
- public CharSet CharSet;
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/SuppressGCTransitionAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/SuppressGCTransitionAttribute.cs
deleted file mode 100644
index 21f1695192c..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/SuppressGCTransitionAttribute.cs
+++ /dev/null
@@ -1,65 +0,0 @@
-// 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.Runtime.InteropServices
-{
- /// <summary>
- /// An attribute used to indicate a GC transition should be skipped when making an unmanaged function call.
- /// </summary>
- /// <example>
- /// Example of a valid use case. The Win32 `GetTickCount()` function is a small performance related function
- /// that reads some global memory and returns the value. In this case, the GC transition overhead is significantly
- /// more than the memory read.
- /// <code>
- /// using System;
- /// using System.Runtime.InteropServices;
- /// class Program
- /// {
- /// [DllImport("Kernel32")]
- /// [SuppressGCTransition]
- /// static extern int GetTickCount();
- /// static void Main()
- /// {
- /// Console.WriteLine($"{GetTickCount()}");
- /// }
- /// }
- /// </code>
- /// </example>
- /// <remarks>
- /// This attribute is ignored if applied to a method without the <see cref="System.Runtime.InteropServices.DllImportAttribute"/>.
- ///
- /// Forgoing this transition can yield benefits when the cost of the transition is more than the execution time
- /// of the unmanaged function. However, avoiding this transition removes some of the guarantees the runtime
- /// provides through a normal P/Invoke. When exiting the managed runtime to enter an unmanaged function the
- /// GC must transition from Cooperative mode into Preemptive mode. Full details on these modes can be found at
- /// https://github.com/dotnet/coreclr/blob/master/Documentation/coding-guidelines/clr-code-guide.md#2.1.8.
- /// Suppressing the GC transition is an advanced scenario and should not be done without fully understanding
- /// potential consequences.
- ///
- /// One of these consequences is an impact to Mixed-mode debugging (https://docs.microsoft.com/visualstudio/debugger/how-to-debug-in-mixed-mode).
- /// During Mixed-mode debugging, it is not possible to step into or set breakpoints in a P/Invoke that
- /// has been marked with this attribute. A workaround is to switch to native debugging and set a breakpoint in the native function.
- /// In general, usage of this attribute is not recommended if debugging the P/Invoke is important, for example
- /// stepping through the native code or diagnosing an exception thrown from the native code.
- ///
- /// The P/Invoke method that this attribute is applied to must have all of the following properties:
- /// * Native function always executes for a trivial amount of time (less than 1 microsecond).
- /// * Native function does not perform a blocking syscall (e.g. any type of I/O).
- /// * Native function does not call back into the runtime (e.g. Reverse P/Invoke).
- /// * Native function does not throw exceptions.
- /// * Native function does not manipulate locks or other concurrency primitives.
- ///
- /// Consequences of invalid uses of this attribute:
- /// * GC starvation.
- /// * Immediate runtime termination.
- /// * Data corruption.
- /// </remarks>
- [AttributeUsage(AttributeTargets.Method, Inherited = false)]
- public sealed class SuppressGCTransitionAttribute : Attribute
- {
- public SuppressGCTransitionAttribute()
- {
- }
- }
-} \ No newline at end of file
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/TypeIdentifierAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/TypeIdentifierAttribute.cs
deleted file mode 100644
index 73069f36549..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/TypeIdentifierAttribute.cs
+++ /dev/null
@@ -1,20 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Interface | AttributeTargets.Enum | AttributeTargets.Struct | AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
- public sealed class TypeIdentifierAttribute : Attribute
- {
- public TypeIdentifierAttribute() { }
- public TypeIdentifierAttribute(string? scope, string? identifier)
- {
- Scope = scope;
- Identifier = identifier;
- }
-
- public string? Scope { get; }
- public string? Identifier { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/UnknownWrapper.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/UnknownWrapper.cs
deleted file mode 100644
index 3581ca93a51..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/UnknownWrapper.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// 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.Runtime.InteropServices
-{
- // Wrapper that is converted to a variant with VT_UNKNOWN.
- public sealed class UnknownWrapper
- {
- public UnknownWrapper(object? obj)
- {
- WrappedObject = obj;
- }
-
- public object? WrappedObject { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/UnmanagedFunctionPointerAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/UnmanagedFunctionPointerAttribute.cs
deleted file mode 100644
index c4f96903ee2..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/UnmanagedFunctionPointerAttribute.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-// 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.Runtime.InteropServices
-{
- [AttributeUsage(AttributeTargets.Delegate, AllowMultiple = false, Inherited = false)]
- public sealed class UnmanagedFunctionPointerAttribute : Attribute
- {
- public UnmanagedFunctionPointerAttribute()
- {
- CallingConvention = CallingConvention.Winapi;
- }
-
- public UnmanagedFunctionPointerAttribute(CallingConvention callingConvention)
- {
- CallingConvention = callingConvention;
- }
-
- public CallingConvention CallingConvention { get; }
-
- public bool BestFitMapping;
- public bool SetLastError;
- public bool ThrowOnUnmappableChar;
- public CharSet CharSet;
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/UnmanagedType.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/UnmanagedType.cs
deleted file mode 100644
index 4deca7fe0cf..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/UnmanagedType.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-// 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.Runtime.InteropServices
-{
- public enum UnmanagedType
- {
- Bool = 0x2, // 4 byte boolean value (true != 0, false == 0)
- I1 = 0x3, // 1 byte signed value
- U1 = 0x4, // 1 byte unsigned value
- I2 = 0x5, // 2 byte signed value
- U2 = 0x6, // 2 byte unsigned value
- I4 = 0x7, // 4 byte signed value
- U4 = 0x8, // 4 byte unsigned value
- I8 = 0x9, // 8 byte signed value
- U8 = 0xa, // 8 byte unsigned value
- R4 = 0xb, // 4 byte floating point
- R8 = 0xc, // 8 byte floating point
- Currency = 0xf, // A currency
- BStr = 0x13, // OLE Unicode BSTR
- LPStr = 0x14, // Ptr to SBCS string
- LPWStr = 0x15, // Ptr to Unicode string
- LPTStr = 0x16, // Ptr to OS preferred (SBCS/Unicode) string
- ByValTStr = 0x17, // OS preferred (SBCS/Unicode) inline string (only valid in structs)
- IUnknown = 0x19, // COM IUnknown pointer.
- IDispatch = 0x1a, // COM IDispatch pointer
- Struct = 0x1b, // Structure
- Interface = 0x1c, // COM interface
- SafeArray = 0x1d, // OLE SafeArray
- ByValArray = 0x1e, // Array of fixed size (only valid in structs)
- SysInt = 0x1f, // Hardware natural sized signed integer
- SysUInt = 0x20,
- VBByRefStr = 0x22,
- AnsiBStr = 0x23, // OLE BSTR containing SBCS characters
- TBStr = 0x24, // Ptr to OS preferred (SBCS/Unicode) BSTR
- VariantBool = 0x25, // OLE defined BOOLEAN (2 bytes, true == -1, false == 0)
- FunctionPtr = 0x26, // Function pointer
- AsAny = 0x28, // Paired with Object type and does runtime marshalling determination
- LPArray = 0x2a, // C style array
- LPStruct = 0x2b, // Pointer to a structure
- CustomMarshaler = 0x2c,
- Error = 0x2d,
- IInspectable = 0x2e,
- HString = 0x2f, // Windows Runtime HSTRING
- LPUTF8Str = 0x30, // UTF8 string
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/VarEnum.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/VarEnum.cs
deleted file mode 100644
index 495aeca6d1f..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/VarEnum.cs
+++ /dev/null
@@ -1,54 +0,0 @@
-// 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.Runtime.InteropServices
-{
- public enum VarEnum
- {
- VT_EMPTY = 0,
- VT_NULL = 1,
- VT_I2 = 2,
- VT_I4 = 3,
- VT_R4 = 4,
- VT_R8 = 5,
- VT_CY = 6,
- VT_DATE = 7,
- VT_BSTR = 8,
- VT_DISPATCH = 9,
- VT_ERROR = 10,
- VT_BOOL = 11,
- VT_VARIANT = 12,
- VT_UNKNOWN = 13,
- VT_DECIMAL = 14,
- VT_I1 = 16,
- VT_UI1 = 17,
- VT_UI2 = 18,
- VT_UI4 = 19,
- VT_I8 = 20,
- VT_UI8 = 21,
- VT_INT = 22,
- VT_UINT = 23,
- VT_VOID = 24,
- VT_HRESULT = 25,
- VT_PTR = 26,
- VT_SAFEARRAY = 27,
- VT_CARRAY = 28,
- VT_USERDEFINED = 29,
- VT_LPSTR = 30,
- VT_LPWSTR = 31,
- VT_RECORD = 36,
- VT_FILETIME = 64,
- VT_BLOB = 65,
- VT_STREAM = 66,
- VT_STORAGE = 67,
- VT_STREAMED_OBJECT = 68,
- VT_STORED_OBJECT = 69,
- VT_BLOB_OBJECT = 70,
- VT_CF = 71,
- VT_CLSID = 72,
- VT_VECTOR = 0x1000,
- VT_ARRAY = 0x2000,
- VT_BYREF = 0x4000
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/VariantWrapper.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/VariantWrapper.cs
deleted file mode 100644
index 74054d5dc9e..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/VariantWrapper.cs
+++ /dev/null
@@ -1,17 +0,0 @@
-// 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.Runtime.InteropServices
-{
- // Wrapper that is converted to a variant with VT_BYREF | VT_VARIANT.
- public sealed class VariantWrapper
- {
- public VariantWrapper(object? obj)
- {
- WrappedObject = obj;
- }
-
- public object? WrappedObject { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/WindowsRuntime/EventRegistrationToken.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/WindowsRuntime/EventRegistrationToken.cs
deleted file mode 100644
index 15b4a8302e1..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/InteropServices/WindowsRuntime/EventRegistrationToken.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-// 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.Runtime.InteropServices.WindowsRuntime
-{
- // Event registration tokens are 64 bit opaque structures returned from WinRT style event adders, in order
- // to signify a registration of a particular delegate to an event. The token's only real use is to
- // unregister the same delgate from the event at a later time.
- public struct EventRegistrationToken : IEquatable<EventRegistrationToken>
- {
- private readonly ulong _value;
-
- [CLSCompliant(false)]
- public EventRegistrationToken(ulong value) => _value = value;
-
- [CLSCompliant(false)]
- public ulong Value => _value;
-
- public static bool operator ==(EventRegistrationToken left, EventRegistrationToken right) =>
- left.Equals(right);
-
- public static bool operator !=(EventRegistrationToken left, EventRegistrationToken right) =>
- !left.Equals(right);
-
- public override bool Equals(object? obj) =>
- obj is EventRegistrationToken &&
- ((EventRegistrationToken)obj)._value == _value;
-
- public override int GetHashCode() => _value.GetHashCode();
-
- public bool Equals(EventRegistrationToken other) => other._value == _value;
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/AdvSimd.PlatformNotSupported.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/AdvSimd.PlatformNotSupported.cs
deleted file mode 100644
index 8ab12cd8c70..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/AdvSimd.PlatformNotSupported.cs
+++ /dev/null
@@ -1,2172 +0,0 @@
-// 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.Runtime.Intrinsics.Arm
-{
- /// <summary>
- /// This class provides access to the ARM AdvSIMD hardware instructions via intrinsics
- /// </summary>
- [CLSCompliant(false)]
- public abstract class AdvSimd : ArmBase
- {
- internal AdvSimd() { }
-
- public static new bool IsSupported { [Intrinsic] get { return false; } }
-
- public new abstract class Arm64 : ArmBase.Arm64
- {
- internal Arm64() { }
-
- public static new bool IsSupported { [Intrinsic] get { return false; } }
-
- /// <summary>
- /// float64x2_t vabsq_f64 (float64x2_t a)
- /// A64: FABS Vd.2D, Vn.2D
- /// </summary>
- public static Vector128<double> Abs(Vector128<double> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int64x2_t vabsq_s64 (int64x2_t a)
- /// A64: ABS Vd.2D, Vn.2D
- /// </summary>
- public static Vector128<ulong> Abs(Vector128<long> value) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// int64x1_t vabs_s64 (int64x1_t a)
- // /// A64: ABS Dd, Dn
- // /// </summary>
- // public static Vector64<ulong> AbsScalar(Vector64<long> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float64x2_t vaddq_f64 (float64x2_t a, float64x2_t b)
- /// A64: FADD Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<double> Add(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8_t vaddv_u8(uint8x8_t a)
- /// A64: ADDV Bd, Vn.8B
- /// </summary>
- public static byte AddAcross(Vector64<byte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16_t vaddv_s16(int16x4_t a)
- /// A64: ADDV Hd, Vn.4H
- /// </summary>
- public static short AddAcross(Vector64<short> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8_t vaddv_s8(int8x8_t a)
- /// A64: ADDV Bd, Vn.8B
- /// </summary>
- public static sbyte AddAcross(Vector64<sbyte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16_t vaddv_u16(uint16x4_t a)
- /// A64: ADDV Hd, Vn.4H
- /// </summary>
- public static ushort AddAcross(Vector64<ushort> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8_t vaddvq_u8(uint8x16_t a)
- /// A64: ADDV Bd, Vn.16B
- /// </summary>
- public static byte AddAcross(Vector128<byte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16_t vaddvq_s16(int16x8_t a)
- /// A64: ADDV Hd, Vn.8H
- /// </summary>
- public static short AddAcross(Vector128<short> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32_t vaddvq_s32(int32x4_t a)
- /// A64: ADDV Sd, Vn.4S
- /// </summary>
- public static int AddAcross(Vector128<int> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8_t vaddvq_s8(int8x16_t a)
- /// A64: ADDV Bd, Vn.16B
- /// </summary>
- public static sbyte AddAcross(Vector128<sbyte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16_t vaddvq_u16(uint16x8_t a)
- /// A64: ADDV Hd, Vn.8H
- /// </summary>
- public static ushort AddAcross(Vector128<ushort> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32_t vaddvq_u32(uint32x4_t a)
- /// A64: ADDV Sd, Vn.4S
- /// </summary>
- public static uint AddAcross(Vector128<uint> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float64x2_t vsubq_f64 (float64x2_t a, float64x2_t b)
- /// A64: FSUB Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<double> Subtract(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x8_t vrbit_u8 (uint8x8_t a)
- /// A64: RBIT Vd.8B, Vn.8B
- /// </summary>
- public static Vector64<byte> ReverseElementBits(Vector64<byte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x8_t vrbit_s8 (int8x8_t a)
- /// A64: RBIT Vd.8B, Vn.8B
- /// </summary>
- public static Vector64<sbyte> ReverseElementBits(Vector64<sbyte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x16_t vrbitq_u8 (uint8x16_t a)
- /// A64: RBIT Vd.16B, Vn.16B
- /// </summary>
- public static Vector128<byte> ReverseElementBits(Vector128<byte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x16_t vrbitq_s8 (int8x16_t a)
- /// A64: RBIT Vd.16B, Vn.16B
- /// </summary>
- public static Vector128<sbyte> ReverseElementBits(Vector128<sbyte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x8_t vuzp1_u8(uint8x8_t a, uint8x8_t b)
- /// A64: UZP1 Vd.8B, Vn.8B, Vm.8B
- /// </summary>
- public static Vector64<byte> UnzipEven(Vector64<byte> left, Vector64<byte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x4_t vuzp1_s16(int16x4_t a, int16x4_t b)
- /// A64: UZP1 Vd.4H, Vn.4H, Vm.4H
- /// </summary>
- public static Vector64<short> UnzipEven(Vector64<short> left, Vector64<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x2_t vuzp1_s32(int32x2_t a, int32x2_t b)
- /// A64: UZP1 Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<int> UnzipEven(Vector64<int> left, Vector64<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x8_t vuzp1_s8(int8x8_t a, int8x8_t b)
- /// A64: UZP1 Vd.8B, Vn.8B, Vm.8B
- /// </summary>
- public static Vector64<sbyte> UnzipEven(Vector64<sbyte> left, Vector64<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x2_t vuzp1_f32(float32x2_t a, float32x2_t b)
- /// A64: UZP1 Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<float> UnzipEven(Vector64<float> left, Vector64<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x4_t vuzp1_u16(uint16x4_t a, uint16x4_t b)
- /// A64: UZP1 Vd.4H, Vn.4H, Vm.4H
- /// </summary>
- public static Vector64<ushort> UnzipEven(Vector64<ushort> left, Vector64<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x2_t vuzp1_u32(uint32x2_t a, uint32x2_t b)
- /// A64: UZP1 Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<uint> UnzipEven(Vector64<uint> left, Vector64<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x16_t vuzp1q_u8(uint8x16_t a, uint8x16_t b)
- /// A64: UZP1 Vd.16B, Vn.16B, Vm.16B
- /// </summary>
- public static Vector128<byte> UnzipEven(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float64x2_t vuzp1q_f64(float64x2_t a, float64x2_t b)
- /// A64: UZP1 Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<double> UnzipEven(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x8_t vuzp1q_s16(int16x8_t a, int16x8_t b)
- /// A64: UZP1 Vd.8H, Vn.8H, Vm.8H
- /// </summary>
- public static Vector128<short> UnzipEven(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x4_t vuzp1q_s32(int32x4_t a, int32x4_t b)
- /// A64: UZP1 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<int> UnzipEven(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int64x2_t vuzp1q_s64(int64x2_t a, int64x2_t b)
- /// A64: UZP1 Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<long> UnzipEven(Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x16_t vuzp1q_u8(int8x16_t a, int8x16_t b)
- /// A64: UZP1 Vd.16B, Vn.16B, Vm.16B
- /// </summary>
- public static Vector128<sbyte> UnzipEven(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x4_t vuzp1q_f32(float32x4_t a, float32x4_t b)
- /// A64: UZP1 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<float> UnzipEven(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x8_t vuzp1q_u16(uint16x8_t a, uint16x8_t b)
- /// A64: UZP1 Vd.8H, Vn.8H, Vm.8H
- /// </summary>
- public static Vector128<ushort> UnzipEven(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x4_t vuzp1q_u32(uint32x4_t a, uint32x4_t b)
- /// A64: UZP1 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<uint> UnzipEven(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint64x2_t vuzp1q_u64(uint64x2_t a, uint64x2_t b)
- /// A64: UZP1 Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<ulong> UnzipEven(Vector128<ulong> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x8_t vuzp2_u8(uint8x8_t a, uint8x8_t b)
- /// A64: UZP2 Vd.8B, Vn.8B, Vm.8B
- /// </summary>
- public static Vector64<byte> UnzipOdd(Vector64<byte> left, Vector64<byte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x4_t vuzp2_s16(int16x4_t a, int16x4_t b)
- /// A64: UZP2 Vd.4H, Vn.4H, Vm.4H
- /// </summary>
- public static Vector64<short> UnzipOdd(Vector64<short> left, Vector64<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x2_t vuzp2_s32(int32x2_t a, int32x2_t b)
- /// A64: UZP2 Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<int> UnzipOdd(Vector64<int> left, Vector64<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x8_t vuzp2_s8(int8x8_t a, int8x8_t b)
- /// A64: UZP2 Vd.8B, Vn.8B, Vm.8B
- /// </summary>
- public static Vector64<sbyte> UnzipOdd(Vector64<sbyte> left, Vector64<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x2_t vuzp2_f32(float32x2_t a, float32x2_t b)
- /// A64: UZP2 Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<float> UnzipOdd(Vector64<float> left, Vector64<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x4_t vuzp2_u16(uint16x4_t a, uint16x4_t b)
- /// A64: UZP2 Vd.4H, Vn.4H, Vm.4H
- /// </summary>
- public static Vector64<ushort> UnzipOdd(Vector64<ushort> left, Vector64<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x2_t vuzp2_u32(uint32x2_t a, uint32x2_t b)
- /// A64: UZP2 Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<uint> UnzipOdd(Vector64<uint> left, Vector64<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x16_t vuzp2q_u8(uint8x16_t a, uint8x16_t b)
- /// A64: UZP2 Vd.16B, Vn.16B, Vm.16B
- /// </summary>
- public static Vector128<byte> UnzipOdd(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float64x2_t vuzp2q_f64(float64x2_t a, float64x2_t b)
- /// A64: UZP2 Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<double> UnzipOdd(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x8_t vuzp2q_s16(int16x8_t a, int16x8_t b)
- /// A64: UZP2 Vd.8H, Vn.8H, Vm.8H
- /// </summary>
- public static Vector128<short> UnzipOdd(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x4_t vuzp2q_s32(int32x4_t a, int32x4_t b)
- /// A64: UZP2 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<int> UnzipOdd(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int64x2_t vuzp2q_s64(int64x2_t a, int64x2_t b)
- /// A64: UZP2 Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<long> UnzipOdd(Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x16_t vuzp2q_u8(int8x16_t a, int8x16_t b)
- /// A64: UZP2 Vd.16B, Vn.16B, Vm.16B
- /// </summary>
- public static Vector128<sbyte> UnzipOdd(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x4_t vuzp2_f32(float32x4_t a, float32x4_t b)
- /// A64: UZP2 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<float> UnzipOdd(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x8_t vuzp2q_u16(uint16x8_t a, uint16x8_t b)
- /// A64: UZP2 Vd.8H, Vn.8H, Vm.8H
- /// </summary>
- public static Vector128<ushort> UnzipOdd(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x4_t vuzp2q_u32(uint32x4_t a, uint32x4_t b)
- /// A64: UZP2 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<uint> UnzipOdd(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint64x2_t vuzp2q_u64(uint64x2_t a, uint64x2_t b)
- /// A64: UZP2 Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<ulong> UnzipOdd(Vector128<ulong> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x8_t vzip2_u8(uint8x8_t a, uint8x8_t b)
- /// A64: ZIP2 Vd.8B, Vn.8B, Vm.8B
- /// </summary>
- public static Vector64<byte> ZipHigh(Vector64<byte> left, Vector64<byte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x4_t vzip2_s16(int16x4_t a, int16x4_t b)
- /// A64: ZIP2 Vd.4H, Vn.4H, Vm.4H
- /// </summary>
- public static Vector64<short> ZipHigh(Vector64<short> left, Vector64<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x2_t vzip2_s32(int32x2_t a, int32x2_t b)
- /// A64: ZIP2 Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<int> ZipHigh(Vector64<int> left, Vector64<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x8_t vzip2_s8(int8x8_t a, int8x8_t b)
- /// A64: ZIP2 Vd.8B, Vn.8B, Vm.8B
- /// </summary>
- public static Vector64<sbyte> ZipHigh(Vector64<sbyte> left, Vector64<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x2_t vzip2_f32(float32x2_t a, float32x2_t b)
- /// A64: ZIP2 Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<float> ZipHigh(Vector64<float> left, Vector64<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x4_t vzip2_u16(uint16x4_t a, uint16x4_t b)
- /// A64: ZIP2 Vd.4H, Vn.4H, Vm.4H
- /// </summary>
- public static Vector64<ushort> ZipHigh(Vector64<ushort> left, Vector64<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x2_t vzip2_u32(uint32x2_t a, uint32x2_t b)
- /// A64: ZIP2 Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<uint> ZipHigh(Vector64<uint> left, Vector64<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x16_t vzip2q_u8(uint8x16_t a, uint8x16_t b)
- /// A64: ZIP2 Vd.16B, Vn.16B, Vm.16B
- /// </summary>
- public static Vector128<byte> ZipHigh(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float64x2_t vzip2q_f64(float64x2_t a, float64x2_t b)
- /// A64: ZIP2 Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<double> ZipHigh(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x8_t vzip2q_s16(int16x8_t a, int16x8_t b)
- /// A64: ZIP2 Vd.8H, Vn.8H, Vm.8H
- /// </summary>
- public static Vector128<short> ZipHigh(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x4_t vzip2q_s32(int32x4_t a, int32x4_t b)
- /// A64: ZIP2 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<int> ZipHigh(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int64x2_t vzip2q_s64(int64x2_t a, int64x2_t b)
- /// A64: ZIP2 Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<long> ZipHigh(Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x16_t vzip2q_u8(int8x16_t a, int8x16_t b)
- /// A64: ZIP2 Vd.16B, Vn.16B, Vm.16B
- /// </summary>
- public static Vector128<sbyte> ZipHigh(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x4_t vzip2q_f32(float32x4_t a, float32x4_t b)
- /// A64: ZIP2 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<float> ZipHigh(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x8_t vzip2q_u16(uint16x8_t a, uint16x8_t b)
- /// A64: ZIP2 Vd.8H, Vn.8H, Vm.8H
- /// </summary>
- public static Vector128<ushort> ZipHigh(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x4_t vzip2q_u32(uint32x4_t a, uint32x4_t b)
- /// A64: ZIP2 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<uint> ZipHigh(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint64x2_t vzip2q_u64(uint64x2_t a, uint64x2_t b)
- /// A64: ZIP2 Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<ulong> ZipHigh(Vector128<ulong> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x8_t vzip1_u8(uint8x8_t a, uint8x8_t b)
- /// A64: ZIP1 Vd.8B, Vn.8B, Vm.8B
- /// </summary>
- public static Vector64<byte> ZipLow(Vector64<byte> left, Vector64<byte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x4_t vzip1_s16(int16x4_t a, int16x4_t b)
- /// A64: ZIP1 Vd.4H, Vn.4H, Vm.4H
- /// </summary>
- public static Vector64<short> ZipLow(Vector64<short> left, Vector64<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x2_t vzip1_s32(int32x2_t a, int32x2_t b)
- /// A64: ZIP1 Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<int> ZipLow(Vector64<int> left, Vector64<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x8_t vzip1_s8(int8x8_t a, int8x8_t b)
- /// A64: ZIP1 Vd.8B, Vn.8B, Vm.8B
- /// </summary>
- public static Vector64<sbyte> ZipLow(Vector64<sbyte> left, Vector64<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x2_t vzip1_f32(float32x2_t a, float32x2_t b)
- /// A64: ZIP1 Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<float> ZipLow(Vector64<float> left, Vector64<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x4_t vzip1_u16(uint16x4_t a, uint16x4_t b)
- /// A64: ZIP1 Vd.4H, Vn.4H, Vm.4H
- /// </summary>
- public static Vector64<ushort> ZipLow(Vector64<ushort> left, Vector64<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x2_t vzip1_u32(uint32x2_t a, uint32x2_t b)
- /// A64: ZIP1 Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<uint> ZipLow(Vector64<uint> left, Vector64<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x16_t vzip1q_u8(uint8x16_t a, uint8x16_t b)
- /// A64: ZIP1 Vd.16B, Vn.16B, Vm.16B
- /// </summary>
- public static Vector128<byte> ZipLow(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float64x2_t vzip1q_f64(float64x2_t a, float64x2_t b)
- /// A64: ZIP1 Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<double> ZipLow(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x8_t vzip1q_s16(int16x8_t a, int16x8_t b)
- /// A64: ZIP1 Vd.8H, Vn.8H, Vm.8H
- /// </summary>
- public static Vector128<short> ZipLow(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x4_t vzip1q_s32(int32x4_t a, int32x4_t b)
- /// A64: ZIP1 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<int> ZipLow(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int64x2_t vzip1q_s64(int64x2_t a, int64x2_t b)
- /// A64: ZIP1 Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<long> ZipLow(Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x16_t vzip1q_u8(int8x16_t a, int8x16_t b)
- /// A64: ZIP1 Vd.16B, Vn.16B, Vm.16B
- /// </summary>
- public static Vector128<sbyte> ZipLow(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x4_t vzip1q_f32(float32x4_t a, float32x4_t b)
- /// A64: ZIP1 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<float> ZipLow(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x8_t vzip1q_u16(uint16x8_t a, uint16x8_t b)
- /// A64: ZIP1 Vd.8H, Vn.8H, Vm.8H
- /// </summary>
- public static Vector128<ushort> ZipLow(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x4_t vzip1q_u32(uint32x4_t a, uint32x4_t b)
- /// A64: ZIP1 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<uint> ZipLow(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint64x2_t vzip1q_u64(uint64x2_t a, uint64x2_t b)
- /// A64: ZIP1 Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<ulong> ZipLow(Vector128<ulong> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
- }
-
- /// <summary>
- /// int8x8_t vabs_s8 (int8x8_t a)
- /// A32: VABS.S8 Dd, Dm
- /// A64: ABS Vd.8B, Vn.8B
- /// </summary>
- public static Vector64<byte> Abs(Vector64<sbyte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x4_t vabs_s16 (int16x4_t a)
- /// A32: VABS.S16 Dd, Dm
- /// A64: ABS Vd.4H, Vn.4H
- /// </summary>
- public static Vector64<ushort> Abs(Vector64<short> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x2_t vabs_s32 (int32x2_t a)
- /// A32: VABS.S32 Dd, Dm
- /// A64: ABS Vd.2S, Vn.2S
- /// </summary>
- public static Vector64<uint> Abs(Vector64<int> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x2_t vabs_f32 (float32x2_t a)
- /// A32: VABS.F32 Dd, Dm
- /// A64: FABS Vd.2S, Vn.2S
- /// </summary>
- public static Vector64<float> Abs(Vector64<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x16_t vabsq_s8 (int8x16_t a)
- /// A32: VABS.S8 Qd, Qm
- /// A64: ABS Vd.16B, Vn.16B
- /// </summary>
- public static Vector128<byte> Abs(Vector128<sbyte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x8_t vabsq_s16 (int16x8_t a)
- /// A32: VABS.S16 Qd, Qm
- /// A64: ABS Vd.8H, Vn.8H
- /// </summary>
- public static Vector128<ushort> Abs(Vector128<short> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x4_t vabsq_s32 (int32x4_t a)
- /// A32: VABS.S32 Qd, Qm
- /// A64: ABS Vd.4S, Vn.4S
- /// </summary>
- public static Vector128<uint> Abs(Vector128<int> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x4_t vabsq_f32 (float32x4_t a)
- /// A32: VABS.F32 Qd, Qm
- /// A64: FABS Vd.4S, Vn.4S
- /// </summary>
- public static Vector128<float> Abs(Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// float64x1_t vabs_f64 (float64x1_t a)
- // /// A32: VABS.F64 Dd, Dm
- // /// A64: FABS Dd, Dn
- // /// </summary>
- // public static Vector64<double> AbsScalar(Vector64<double> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// A32: VABS.F32 Sd, Sm
- /// A64: FABS Sd, Sn
- /// </summary>
- public static Vector64<float> AbsScalar(Vector64<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x8_t vadd_u8 (uint8x8_t a, uint8x8_t b)
- /// A32: VADD.I8 Dd, Dn, Dm
- /// A64: ADD Vd.8B, Vn.8B, Vm.8B
- /// </summary>
- public static Vector64<byte> Add(Vector64<byte> left, Vector64<byte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x4_t vadd_s16 (int16x4_t a, int16x4_t b)
- /// A32: VADD.I16 Dd, Dn, Dm
- /// A64: ADD Vd.4H, Vn.4H, Vm.4H
- /// </summary>
- public static Vector64<short> Add(Vector64<short> left, Vector64<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x2_t vadd_s32 (int32x2_t a, int32x2_t b)
- /// A32: VADD.I32 Dd, Dn, Dm
- /// A64: ADD Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<int> Add(Vector64<int> left, Vector64<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x8_t vadd_s8 (int8x8_t a, int8x8_t b)
- /// A32: VADD.I8 Dd, Dn, Dm
- /// A64: ADD Vd.8B, Vn.8B, Vm.8B
- /// </summary>
- public static Vector64<sbyte> Add(Vector64<sbyte> left, Vector64<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x2_t vadd_f32 (float32x2_t a, float32x2_t b)
- /// A32: VADD.F32 Dd, Dn, Dm
- /// A64: FADD Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<float> Add(Vector64<float> left, Vector64<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x4_t vadd_u16 (uint16x4_t a, uint16x4_t b)
- /// A32: VADD.I16 Dd, Dn, Dm
- /// A64: ADD Vd.4H, Vn.4H, Vm.4H
- /// </summary>
- public static Vector64<ushort> Add(Vector64<ushort> left, Vector64<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x2_t vadd_u32 (uint32x2_t a, uint32x2_t b)
- /// A32: VADD.I32 Dd, Dn, Dm
- /// A64: ADD Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<uint> Add(Vector64<uint> left, Vector64<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x16_t vaddq_u8 (uint8x16_t a, uint8x16_t b)
- /// A32: VADD.I8 Qd, Qn, Qm
- /// A64: ADD Vd.16B, Vn.16B, Vm.16B
- /// </summary>
- public static Vector128<byte> Add(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x8_t vaddq_s16 (int16x8_t a, int16x8_t b)
- /// A32: VADD.I16 Qd, Qn, Qm
- /// A64: ADD Vd.8H, Vn.8H, Vm.8H
- /// </summary>
- public static Vector128<short> Add(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x4_t vaddq_s32 (int32x4_t a, int32x4_t b)
- /// A32: VADD.I32 Qd, Qn, Qm
- /// A64: ADD Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<int> Add(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int64x2_t vaddq_s64 (int64x2_t a, int64x2_t b)
- /// A32: VADD.I64 Qd, Qn, Qm
- /// A64: ADD Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<long> Add(Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x16_t vaddq_s8 (int8x16_t a, int8x16_t b)
- /// A32: VADD.I8 Qd, Qn, Qm
- /// A64: ADD Vd.16B, Vn.16B, Vm.16B
- /// </summary>
- public static Vector128<sbyte> Add(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x4_t vaddq_f32 (float32x4_t a, float32x4_t b)
- /// A32: VADD.F32 Qd, Qn, Qm
- /// A64: FADD Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<float> Add(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x8_t vaddq_u16 (uint16x8_t a, uint16x8_t b)
- /// A32: VADD.I16 Qd, Qn, Qm
- /// A64: ADD Vd.8H, Vn.8H, Vm.8H
- /// </summary>
- public static Vector128<ushort> Add(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x4_t vaddq_u32 (uint32x4_t a, uint32x4_t b)
- /// A32: VADD.I32 Qd, Qn, Qm
- /// A64: ADD Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<uint> Add(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint64x2_t vaddq_u64 (uint64x2_t a, uint64x2_t b)
- /// A32: VADD.I64 Qd, Qn, Qm
- /// A64: ADD Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<ulong> Add(Vector128<ulong> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// float64x1_t vadd_f64 (float64x1_t a, float64x1_t b)
- // /// A32: VADD.F64 Dd, Dn, Dm
- // /// A64: FADD Dd, Dn, Dm
- // /// </summary>
- // public static Vector64<double> AddScalar(Vector64<double> left, Vector64<double> right) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// int64x1_t vadd_s64 (int64x1_t a, int64x1_t b)
- // /// A32: VADD.I64 Dd, Dn, Dm
- // /// A64: ADD Dd, Dn, Dm
- // /// </summary>
- // public static Vector64<long> AddScalar(Vector64<long> left, Vector64<long> right) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// uint64x1_t vadd_u64 (uint64x1_t a, uint64x1_t b)
- // /// A32: VADD.I64 Dd, Dn, Dm
- // /// A64: ADD Dd, Dn, Dm
- // /// </summary>
- // public static Vector64<ulong> AddScalar(Vector64<ulong> left, Vector64<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// A32: VADD.F32 Sd, Sn, Sm
- /// A64:
- /// </summary>
- public static Vector64<float> AddScalar(Vector64<float> left, Vector64<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x8_t vand_u8 (uint8x8_t a, uint8x8_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector64<byte> And(Vector64<byte> left, Vector64<byte> right) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// float64x1_t vand_f64 (float64x1_t a, float64x1_t b)
- // /// A32: VAND Dd, Dn, Dm
- // /// A64: AND Vd, Vn, Vm
- // /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- // /// </summary>
- // public static Vector64<double> And(Vector64<double> left, Vector64<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x4_t vand_s16 (int16x4_t a, int16x4_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector64<short> And(Vector64<short> left, Vector64<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x2_t vand_s32(int32x2_t a, int32x2_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector64<int> And(Vector64<int> left, Vector64<int> right) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// int64x1_t vand_s64 (int64x1_t a, int64x1_t b)
- // /// A32: VAND Dd, Dn, Dm
- // /// A64: AND Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<long> And(Vector64<long> left, Vector64<long> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x8_t vand_s8 (int8x8_t a, int8x8_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector64<sbyte> And(Vector64<sbyte> left, Vector64<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x2_t vand_f32 (float32x2_t a, float32x2_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector64<float> And(Vector64<float> left, Vector64<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x4_t vand_u16 (uint16x4_t a, uint16x4_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector64<ushort> And(Vector64<ushort> left, Vector64<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x2_t vand_u32 (uint32x2_t a, uint32x2_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector64<uint> And(Vector64<uint> left, Vector64<uint> right) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// uint64x1_t vand_u64 (uint64x1_t a, uint64x1_t b)
- // /// A32: VAND Dd, Dn, Dm
- // /// A64: AND Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<ulong> And(Vector64<ulong> left, Vector64<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x16_t vand_u8 (uint8x16_t a, uint8x16_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector128<byte> And(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float64x2_t vand_f64 (float64x2_t a, float64x2_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<double> And(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x8_t vand_s16 (int16x8_t a, int16x8_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector128<short> And(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x4_t vand_s32(int32x4_t a, int32x4_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector128<int> And(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int64x2_t vand_s64 (int64x2_t a, int64x2_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector128<long> And(Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x16_t vand_s8 (int8x16_t a, int8x16_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector128<sbyte> And(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x4_t vand_f32 (float32x4_t a, float32x4_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<float> And(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x8_t vand_u16 (uint16x8_t a, uint16x8_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector128<ushort> And(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x4_t vand_u32 (uint32x4_t a, uint32x4_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector128<uint> And(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint64x2_t vand_u64 (uint64x2_t a, uint64x2_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector128<ulong> And(Vector128<ulong> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x8_t vbic_u8 (uint8x8_t a, uint8x8_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector64<byte> AndNot(Vector64<byte> left, Vector64<byte> right) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// float64x1_t vbic_f64 (float64x1_t a, float64x1_t b)
- // /// A32: VBIC Dd, Dn, Dm
- // /// A64: BIC Vd, Vn, Vm
- // /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- // /// </summary>
- // public static Vector64<double> AndNot(Vector64<double> left, Vector64<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x4_t vbic_s16 (int16x4_t a, int16x4_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector64<short> AndNot(Vector64<short> left, Vector64<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x2_t vbic_s32(int32x2_t a, int32x2_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector64<int> AndNot(Vector64<int> left, Vector64<int> right) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// int64x1_t vbic_s64 (int64x1_t a, int64x1_t b)
- // /// A32: VBIC Dd, Dn, Dm
- // /// A64: BIC Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<long> AndNot(Vector64<long> left, Vector64<long> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x8_t vbic_s8 (int8x8_t a, int8x8_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector64<sbyte> AndNot(Vector64<sbyte> left, Vector64<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x2_t vbic_f32 (float32x2_t a, float32x2_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector64<float> AndNot(Vector64<float> left, Vector64<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x4_t vbic_u16 (uint16x4_t a, uint16x4_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector64<ushort> AndNot(Vector64<ushort> left, Vector64<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x2_t vbic_u32 (uint32x2_t a, uint32x2_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector64<uint> AndNot(Vector64<uint> left, Vector64<uint> right) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// uint64x1_t vbic_u64 (uint64x1_t a, uint64x1_t b)
- // /// A32: VBIC Dd, Dn, Dm
- // /// A64: BIC Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<ulong> AndNot(Vector64<ulong> left, Vector64<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x16_t vbic_u8 (uint8x16_t a, uint8x16_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector128<byte> AndNot(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float64x2_t vbic_f64 (float64x2_t a, float64x2_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<double> AndNot(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x8_t vbic_s16 (int16x8_t a, int16x8_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector128<short> AndNot(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x4_t vbic_s32(int32x4_t a, int32x4_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector128<int> AndNot(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int64x2_t vbic_s64 (int64x2_t a, int64x2_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector128<long> AndNot(Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x16_t vbic_s8 (int8x16_t a, int8x16_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector128<sbyte> AndNot(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x4_t vbic_f32 (float32x4_t a, float32x4_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<float> AndNot(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x8_t vbic_u16 (uint16x8_t a, uint16x8_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector128<ushort> AndNot(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x4_t vbic_u32 (uint32x4_t a, uint32x4_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector128<uint> AndNot(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint64x2_t vbic_u64 (uint64x2_t a, uint64x2_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector128<ulong> AndNot(Vector128<ulong> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x8_t vbsl_u8 (uint8x8_t a, uint8x8_t b, uint8x8_t c)
- /// A32: VBSL Dd, Dn, Dm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector64<byte> BitwiseSelect(Vector64<byte> select, Vector64<byte> left, Vector64<byte> right) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// float64x1_t vbsl_f64 (float64x1_t a, float64x1_t b, float64x1_t c)
- // /// A32: VBSL Dd, Dn, Dm
- // /// A64: BSL Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<double> BitwiseSelect(Vector64<double> select, Vector64<double> left, Vector64<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x4_t vbsl_s16 (int16x4_t a, int16x4_t b, int16x4_t c)
- /// A32: VBSL Dd, Dn, Dm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector64<short> BitwiseSelect(Vector64<short> select, Vector64<short> left, Vector64<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x2_t vbsl_s32 (int32x2_t a, int32x2_t b, int32x2_t c)
- /// A32: VBSL Dd, Dn, Dm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector64<int> BitwiseSelect(Vector64<int> select, Vector64<int> left, Vector64<int> right) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// int64x1_t vbsl_s64 (int64x1_t a, int64x1_t b, int64x1_t c)
- // /// A32: VBSL Dd, Dn, Dm
- // /// A64: BSL Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<long> BitwiseSelect(Vector64<long> select, Vector64<long> left, Vector64<long> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x8_t vbsl_s8 (int8x8_t a, int8x8_t b, int8x8_t c)
- /// A32: VBSL Dd, Dn, Dm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector64<sbyte> BitwiseSelect(Vector64<sbyte> select, Vector64<sbyte> left, Vector64<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x2_t vbsl_f32 (float32x2_t a, float32x2_t b, float32x2_t c)
- /// A32: VBSL Dd, Dn, Dm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector64<float> BitwiseSelect(Vector64<float> select, Vector64<float> left, Vector64<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x4_t vbsl_u16 (uint16x4_t a, uint16x4_t b, uint16x4_t c)
- /// A32: VBSL Dd, Dn, Dm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector64<ushort> BitwiseSelect(Vector64<ushort> select, Vector64<ushort> left, Vector64<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x2_t vbsl_u32 (uint32x2_t a, uint32x2_t b, uint32x2_t c)
- /// A32: VBSL Dd, Dn, Dm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector64<uint> BitwiseSelect(Vector64<uint> select, Vector64<uint> left, Vector64<uint> right) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// uint64x1_t vbsl_u64 (uint64x1_t a, uint64x1_t b, uint64x1_t c)
- // /// A32: VBSL Dd, Dn, Dm
- // /// A64: BSL Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<ulong> BitwiseSelect(Vector64<ulong> select, Vector64<ulong> left, Vector64<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x16_t vbslq_u8 (uint8x16_t a, uint8x16_t b, uint8x16_t c)
- /// A32: VBSL Qd, Qn, Qm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector128<byte> BitwiseSelect(Vector128<byte> select, Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float64x2_t vbslq_f64 (float64x2_t a, float64x2_t b, float64x2_t c)
- /// A32: VBSL Qd, Qn, Qm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector128<double> BitwiseSelect(Vector128<double> select, Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x8_t vbslq_s16 (int16x8_t a, int16x8_t b, int16x8_t c)
- /// A32: VBSL Qd, Qn, Qm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector128<short> BitwiseSelect(Vector128<short> select, Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x4_t vbslq_s32 (int32x4_t a, int32x4_t b, int32x4_t c)
- /// A32: VBSL Qd, Qn, Qm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector128<int> BitwiseSelect(Vector128<int> select, Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int64x2_t vbslq_s64 (int64x2_t a, int64x2_t b, int64x2_t c)
- /// A32: VBSL Qd, Qn, Qm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector128<long> BitwiseSelect(Vector128<long> select, Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x16_t vbslq_s8 (int8x16_t a, int8x16_t b, int8x16_t c)
- /// A32: VBSL Qd, Qn, Qm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector128<sbyte> BitwiseSelect(Vector128<sbyte> select, Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x4_t vbslq_f32 (float32x4_t a, float32x4_t b, float32x4_t c)
- /// A32: VBSL Qd, Qn, Qm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector128<float> BitwiseSelect(Vector128<float> select, Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x8_t vbslq_u16 (uint16x8_t a, uint16x8_t b, uint16x8_t c)
- /// A32: VBSL Qd, Qn, Qm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector128<ushort> BitwiseSelect(Vector128<ushort> select, Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x4_t vbslq_u32 (uint32x4_t a, uint32x4_t b, uint32x4_t c)
- /// A32: VBSL Qd, Qn, Qm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector128<uint> BitwiseSelect(Vector128<uint> select, Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint64x2_t vbslq_u64 (uint64x2_t a, uint64x2_t b, uint64x2_t c)
- /// A32: VBSL Qd, Qn, Qm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector128<ulong> BitwiseSelect(Vector128<ulong> select, Vector128<ulong> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x8_t vcls_s8 (int8x8_t a)
- /// A32: VCLS Dd, Dm
- /// A64: CLS Vd, Vn
- /// </summary>
- public static Vector64<sbyte> LeadingSignCount(Vector64<sbyte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x4_t vcls_s16 (int16x4_t a)
- /// A32: VCLS Dd, Dm
- /// A64: CLS Vd, Vn
- /// </summary>
- public static Vector64<short> LeadingSignCount(Vector64<short> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x2_t vcls_s32 (int32x2_t a)
- /// A32: VCLS Dd, Dm
- /// A64: CLS Vd, Vn
- /// </summary>
- public static Vector64<int> LeadingSignCount(Vector64<int> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x16_t vclsq_s8 (int8x16_t a)
- /// A32: VCLS Qd, Qm
- /// A64: CLS Vd, Vn
- /// </summary>
- public static Vector128<sbyte> LeadingSignCount(Vector128<sbyte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x8_t vclsq_s16 (int16x8_t a)
- /// A32: VCLS Qd, Qm
- /// A64: CLS Vd, Vn
- /// </summary>
- public static Vector128<short> LeadingSignCount(Vector128<short> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x4_t vclsq_s32 (int32x4_t a)
- /// A32: VCLS Qd, Qm
- /// A64: CLS Vd, Vn
- /// </summary>
- public static Vector128<int> LeadingSignCount(Vector128<int> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x8_t vclz_s8 (int8x8_t a)
- /// A32: VCLZ Dd, Dm
- /// A64: CLZ Vd, Vn
- /// </summary>
- public static Vector64<sbyte> LeadingZeroCount(Vector64<sbyte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x8_t vclz_u8 (uint8x8_t a)
- /// A32: VCLZ Dd, Dm
- /// A64: CLZ Vd, Vn
- /// </summary>
- public static Vector64<byte> LeadingZeroCount(Vector64<byte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x4_t vclz_s16 (int16x4_t a)
- /// A32: VCLZ Dd, Dm
- /// A64: CLZ Vd, Vn
- /// </summary>
- public static Vector64<short> LeadingZeroCount(Vector64<short> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x4_t vclz_u16 (uint16x4_t a)
- /// A32: VCLZ Dd, Dm
- /// A64: CLZ Vd, Vn
- /// </summary>
- public static Vector64<ushort> LeadingZeroCount(Vector64<ushort> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x2_t vclz_s32 (int32x2_t a)
- /// A32: VCLZ Dd, Dm
- /// A64: CLZ Vd, Vn
- /// </summary>
- public static Vector64<int> LeadingZeroCount(Vector64<int> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x2_t vclz_u32 (uint32x2_t a)
- /// A32: VCLZ Dd, Dm
- /// A64: CLZ Vd, Vn
- /// </summary>
- public static Vector64<uint> LeadingZeroCount(Vector64<uint> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x16_t vclzq_s8 (int8x16_t a)
- /// A32: VCLZ Qd, Qm
- /// A64: CLZ Vd, Vn
- /// </summary>
- public static Vector128<sbyte> LeadingZeroCount(Vector128<sbyte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x16_t vclzq_u8 (uint8x16_t a)
- /// A32: VCLZ Qd, Qm
- /// A64: CLZ Vd, Vn
- /// </summary>
- public static Vector128<byte> LeadingZeroCount(Vector128<byte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x8_t vclzq_s16 (int16x8_t a)
- /// A32: VCLZ Qd, Qm
- /// A64: CLZ Vd, Vn
- /// </summary>
- public static Vector128<short> LeadingZeroCount(Vector128<short> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x8_t vclzq_u16 (uint16x8_t a)
- /// A32: VCLZ Qd, Qm
- /// A64: CLZ Vd, Vn
- /// </summary>
- public static Vector128<ushort> LeadingZeroCount(Vector128<ushort> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x4_t vclzq_s32 (int32x4_t a)
- /// A32: VCLZ Qd, Qm
- /// A64: CLZ Vd, Vn
- /// </summary>
- public static Vector128<int> LeadingZeroCount(Vector128<int> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x4_t vclzq_u32 (uint32x4_t a)
- /// A32: VCLZ Qd, Qm
- /// A64: CLZ Vd, Vn
- /// </summary>
- public static Vector128<uint> LeadingZeroCount(Vector128<uint> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x8_t vld1_u8 (uint8_t const * ptr)
- /// A32: VLD1.8 Dd, [Rn]
- /// A64: LD1 Vt.8B, [Xn]
- /// </summary>
- public static unsafe Vector64<byte> LoadVector64(byte* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x4_t vld1_s16 (int16_t const * ptr)
- /// A32: VLD1.16 Dd, [Rn]
- /// A64: LD1 Vt.4H, [Xn]
- /// </summary>
- public static unsafe Vector64<short> LoadVector64(short* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x2_t vld1_s32 (int32_t const * ptr)
- /// A32: VLD1.32 Dd, [Rn]
- /// A64: LD1 Vt.2S, [Xn]
- /// </summary>
- public static unsafe Vector64<int> LoadVector64(int* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x8_t vld1_s8 (int8_t const * ptr)
- /// A32: VLD1.8 Dd, [Rn]
- /// A64: LD1 Vt.8B, [Xn]
- /// </summary>
- public static unsafe Vector64<sbyte> LoadVector64(sbyte* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x2_t vld1_f32 (float32_t const * ptr)
- /// A32: VLD1.32 Dd, [Rn]
- /// A64: LD1 Vt.2S, [Xn]
- /// </summary>
- public static unsafe Vector64<float> LoadVector64(float* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x4_t vld1_u16 (uint16_t const * ptr)
- /// A32: VLD1.16 Dd, [Rn]
- /// A64: LD1 Vt.4H, [Xn]
- /// </summary>
- public static unsafe Vector64<ushort> LoadVector64(ushort* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x2_t vld1_u32 (uint32_t const * ptr)
- /// A32: VLD1.32 Dd, [Rn]
- /// A64: LD1 Vt.2S, [Xn]
- /// </summary>
- public static unsafe Vector64<uint> LoadVector64(uint* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x16_t vld1q_u8 (uint8_t const * ptr)
- /// A32: VLD1.8 Dd, Dd+1, [Rn]
- /// A64: LD1 Vt.16B, [Xn]
- /// </summary>
- public static unsafe Vector128<byte> LoadVector128(byte* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float64x2_t vld1q_f64 (float64_t const * ptr)
- /// A32: VLD1.64 Dd, Dd+1, [Rn]
- /// A64: LD1 Vt.2D, [Xn]
- /// </summary>
- public static unsafe Vector128<double> LoadVector128(double* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x8_t vld1q_s16 (int16_t const * ptr)
- /// A32: VLD1.16 Dd, Dd+1, [Rn]
- /// A64: LD1 Vt.8H, [Xn]
- /// </summary>
- public static unsafe Vector128<short> LoadVector128(short* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x4_t vld1q_s32 (int32_t const * ptr)
- /// A32: VLD1.32 Dd, Dd+1, [Rn]
- /// A64: LD1 Vt.4S, [Xn]
- /// </summary>
- public static unsafe Vector128<int> LoadVector128(int* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int64x2_t vld1q_s64 (int64_t const * ptr)
- /// A32: VLD1.64 Dd, Dd+1, [Rn]
- /// A64: LD1 Vt.2D, [Xn]
- /// </summary>
- public static unsafe Vector128<long> LoadVector128(long* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x16_t vld1q_s8 (int8_t const * ptr)
- /// A32: VLD1.8 Dd, Dd+1, [Rn]
- /// A64: LD1 Vt.16B, [Xn]
- /// </summary>
- public static unsafe Vector128<sbyte> LoadVector128(sbyte* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x4_t vld1q_f32 (float32_t const * ptr)
- /// A32: VLD1.32 Dd, Dd+1, [Rn]
- /// A64: LD1 Vt.4S, [Xn]
- /// </summary>
- public static unsafe Vector128<float> LoadVector128(float* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x8_t vld1q_s16 (uint16_t const * ptr)
- /// A32: VLD1.16 Dd, Dd+1, [Rn]
- /// A64: LD1 Vt.8H, [Xn]
- /// </summary>
- public static unsafe Vector128<ushort> LoadVector128(ushort* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x4_t vld1q_s32 (uint32_t const * ptr)
- /// A32: VLD1.32 Dd, Dd+1, [Rn]
- /// A64: LD1 Vt.4S, [Xn]
- /// </summary>
- public static unsafe Vector128<uint> LoadVector128(uint* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint64x2_t vld1q_u64 (uint64_t const * ptr)
- /// A32: VLD1.64 Dd, Dd+1, [Rn]
- /// A64: LD1 Vt.2D, [Xn]
- /// </summary>
- public static unsafe Vector128<ulong> LoadVector128(ulong* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x8_t vmvn_u8 (uint8x8_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector64<byte> Not(Vector64<byte> value) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// float64x1_t vmvn_f64 (float64x1_t a)
- // /// A32: VMVN Dd, Dn, Dm
- // /// A64: MVN Vd, Vn, Vm
- // /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- // /// </summary>
- // public static Vector64<double> Not(Vector64<double> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x4_t vmvn_s16 (int16x4_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector64<short> Not(Vector64<short> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x2_t vmvn_s32(int32x2_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector64<int> Not(Vector64<int> value) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// int64x1_t vmvn_s64 (int64x1_t a)
- // /// A32: VMVN Dd, Dn, Dm
- // /// A64: MVN Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<long> Not(Vector64<long> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x8_t vmvn_s8 (int8x8_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector64<sbyte> Not(Vector64<sbyte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x2_t vmvn_f32 (float32x2_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector64<float> Not(Vector64<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x4_t vmvn_u16 (uint16x4_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector64<ushort> Not(Vector64<ushort> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x2_t vmvn_u32 (uint32x2_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector64<uint> Not(Vector64<uint> value) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// uint64x1_t vmvn_u64 (uint64x1_t a)
- // /// A32: VMVN Dd, Dn, Dm
- // /// A64: MVN Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<ulong> Not(Vector64<ulong> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x16_t vmvn_u8 (uint8x16_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector128<byte> Not(Vector128<byte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float64x2_t vmvn_f64 (float64x2_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<double> Not(Vector128<double> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x8_t vmvn_s16 (int16x8_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector128<short> Not(Vector128<short> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x4_t vmvn_s32(int32x4_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector128<int> Not(Vector128<int> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int64x2_t vmvn_s64 (int64x2_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector128<long> Not(Vector128<long> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x16_t vmvn_s8 (int8x16_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector128<sbyte> Not(Vector128<sbyte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x4_t vmvn_f32 (float32x4_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<float> Not(Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x8_t vmvn_u16 (uint16x8_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector128<ushort> Not(Vector128<ushort> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x4_t vmvn_u32 (uint32x4_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector128<uint> Not(Vector128<uint> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint64x2_t vmvn_u64 (uint64x2_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector128<ulong> Not(Vector128<ulong> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x8_t vorr_u8 (uint8x8_t a, uint8x8_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector64<byte> Or(Vector64<byte> left, Vector64<byte> right) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// float64x1_t vorr_f64 (float64x1_t a, float64x1_t b)
- // /// A32: VORR Dd, Dn, Dm
- // /// A64: ORR Vd, Vn, Vm
- // /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- // /// </summary>
- // public static Vector64<double> Or(Vector64<double> left, Vector64<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x4_t vorr_s16 (int16x4_t a, int16x4_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector64<short> Or(Vector64<short> left, Vector64<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x2_t vorr_s32(int32x2_t a, int32x2_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector64<int> Or(Vector64<int> left, Vector64<int> right) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// int64x1_t vorr_s64 (int64x1_t a, int64x1_t b)
- // /// A32: VORR Dd, Dn, Dm
- // /// A64: ORR Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<long> Or(Vector64<long> left, Vector64<long> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x8_t vorr_s8 (int8x8_t a, int8x8_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector64<sbyte> Or(Vector64<sbyte> left, Vector64<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x2_t vorr_f32 (float32x2_t a, float32x2_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector64<float> Or(Vector64<float> left, Vector64<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x4_t vorr_u16 (uint16x4_t a, uint16x4_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector64<ushort> Or(Vector64<ushort> left, Vector64<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x2_t vorr_u32 (uint32x2_t a, uint32x2_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector64<uint> Or(Vector64<uint> left, Vector64<uint> right) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// uint64x1_t vorr_u64 (uint64x1_t a, uint64x1_t b)
- // /// A32: VORR Dd, Dn, Dm
- // /// A64: ORR Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<ulong> Or(Vector64<ulong> left, Vector64<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x16_t vorr_u8 (uint8x16_t a, uint8x16_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector128<byte> Or(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float64x2_t vorr_f64 (float64x2_t a, float64x2_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<double> Or(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x8_t vorr_s16 (int16x8_t a, int16x8_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector128<short> Or(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x4_t vorr_s32(int32x4_t a, int32x4_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector128<int> Or(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int64x2_t vorr_s64 (int64x2_t a, int64x2_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector128<long> Or(Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x16_t vorr_s8 (int8x16_t a, int8x16_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector128<sbyte> Or(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x4_t vorr_f32 (float32x4_t a, float32x4_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<float> Or(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x8_t vorr_u16 (uint16x8_t a, uint16x8_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector128<ushort> Or(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x4_t vorr_u32 (uint32x4_t a, uint32x4_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector128<uint> Or(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint64x2_t vorr_u64 (uint64x2_t a, uint64x2_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector128<ulong> Or(Vector128<ulong> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x8_t vorn_u8 (uint8x8_t a, uint8x8_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector64<byte> OrNot(Vector64<byte> left, Vector64<byte> right) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// float64x1_t vorn_f64 (float64x1_t a, float64x1_t b)
- // /// A32: VORN Dd, Dn, Dm
- // /// A64: ORN Vd, Vn, Vm
- // /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- // /// </summary>
- // public static Vector64<double> OrNot(Vector64<double> left, Vector64<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x4_t vorn_s16 (int16x4_t a, int16x4_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector64<short> OrNot(Vector64<short> left, Vector64<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x2_t vorn_s32(int32x2_t a, int32x2_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector64<int> OrNot(Vector64<int> left, Vector64<int> right) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// int64x1_t vorn_s64 (int64x1_t a, int64x1_t b)
- // /// A32: VORN Dd, Dn, Dm
- // /// A64: ORN Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<long> OrNot(Vector64<long> left, Vector64<long> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x8_t vorn_s8 (int8x8_t a, int8x8_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector64<sbyte> OrNot(Vector64<sbyte> left, Vector64<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x2_t vorn_f32 (float32x2_t a, float32x2_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector64<float> OrNot(Vector64<float> left, Vector64<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x4_t vorn_u16 (uint16x4_t a, uint16x4_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector64<ushort> OrNot(Vector64<ushort> left, Vector64<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x2_t vorn_u32 (uint32x2_t a, uint32x2_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector64<uint> OrNot(Vector64<uint> left, Vector64<uint> right) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// uint64x1_t vorn_u64 (uint64x1_t a, uint64x1_t b)
- // /// A32: VORN Dd, Dn, Dm
- // /// A64: ORN Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<ulong> OrNot(Vector64<ulong> left, Vector64<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x16_t vorn_u8 (uint8x16_t a, uint8x16_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector128<byte> OrNot(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float64x2_t vorn_f64 (float64x2_t a, float64x2_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<double> OrNot(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x8_t vorn_s16 (int16x8_t a, int16x8_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector128<short> OrNot(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x4_t vorn_s32(int32x4_t a, int32x4_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector128<int> OrNot(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int64x2_t vorn_s64 (int64x2_t a, int64x2_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector128<long> OrNot(Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x16_t vorn_s8 (int8x16_t a, int8x16_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector128<sbyte> OrNot(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x4_t vorn_f32 (float32x4_t a, float32x4_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<float> OrNot(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x8_t vorn_u16 (uint16x8_t a, uint16x8_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector128<ushort> OrNot(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x4_t vorn_u32 (uint32x4_t a, uint32x4_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector128<uint> OrNot(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint64x2_t vorn_u64 (uint64x2_t a, uint64x2_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector128<ulong> OrNot(Vector128<ulong> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x8_t vcnt_s8 (int8x8_t a)
- /// A32: VCNT Dd, Dm
- /// A64: CNT Vd, Vn
- /// </summary>
- public static Vector64<sbyte> PopCount(Vector64<sbyte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x8_t vcnt_u8 (uint8x8_t a)
- /// A32: VCNT Dd, Dm
- /// A64: CNT Vd, Vn
- /// </summary>
- public static Vector64<byte> PopCount(Vector64<byte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x16_t vcntq_s8 (int8x16_t a)
- /// A32: VCNT Qd, Qm
- /// A64: CNT Vd, Vn
- /// </summary>
- public static Vector128<sbyte> PopCount(Vector128<sbyte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x16_t vcntq_u8 (uint8x16_t a)
- /// A32: VCNT Qd, Qm
- /// A64: CNT Vd, Vn
- /// </summary>
- public static Vector128<byte> PopCount(Vector128<byte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x8_t vsub_u8 (uint8x8_t a, uint8x8_t b)
- /// A32: VSUB.I8 Dd, Dn, Dm
- /// A64: SUB Vd.8B, Vn.8B, Vm.8B
- /// </summary>
- public static Vector64<byte> Subtract(Vector64<byte> left, Vector64<byte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x4_t vsub_s16 (int16x4_t a, int16x4_t b)
- /// A32: VSUB.I16 Dd, Dn, Dm
- /// A64: SUB Vd.4H, Vn.4H, Vm.4H
- /// </summary>
- public static Vector64<short> Subtract(Vector64<short> left, Vector64<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x2_t vsub_s32 (int32x2_t a, int32x2_t b)
- /// A32: VSUB.I32 Dd, Dn, Dm
- /// A64: SUB Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<int> Subtract(Vector64<int> left, Vector64<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x8_t vsub_s8 (int8x8_t a, int8x8_t b)
- /// A32: VSUB.I8 Dd, Dn, Dm
- /// A64: SUB Vd.8B, Vn.8B, Vm.8B
- /// </summary>
- public static Vector64<sbyte> Subtract(Vector64<sbyte> left, Vector64<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x2_t vsub_f32 (float32x2_t a, float32x2_t b)
- /// A32: VSUB.F32 Dd, Dn, Dm
- /// A64: FADD Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<float> Subtract(Vector64<float> left, Vector64<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x4_t vsub_u16 (uint16x4_t a, uint16x4_t b)
- /// A32: VSUB.I16 Dd, Dn, Dm
- /// A64: SUB Vd.4H, Vn.4H, Vm.4H
- /// </summary>
- public static Vector64<ushort> Subtract(Vector64<ushort> left, Vector64<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x2_t vsub_u32 (uint32x2_t a, uint32x2_t b)
- /// A32: VSUB.I32 Dd, Dn, Dm
- /// A64: SUB Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<uint> Subtract(Vector64<uint> left, Vector64<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x16_t vsubq_u8 (uint8x16_t a, uint8x16_t b)
- /// A32: VSUB.I8 Qd, Qn, Qm
- /// A64: SUB Vd.16B, Vn.16B, Vm.16B
- /// </summary>
- public static Vector128<byte> Subtract(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x8_t vsubq_s16 (int16x8_t a, int16x8_t b)
- /// A32: VSUB.I16 Qd, Qn, Qm
- /// A64: SUB Vd.8H, Vn.8H, Vm.8H
- /// </summary>
- public static Vector128<short> Subtract(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x4_t vsubq_s32 (int32x4_t a, int32x4_t b)
- /// A32: VSUB.I32 Qd, Qn, Qm
- /// A64: SUB Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<int> Subtract(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int64x2_t vsubq_s64 (int64x2_t a, int64x2_t b)
- /// A32: VSUB.I64 Qd, Qn, Qm
- /// A64: SUB Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<long> Subtract(Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x16_t vsubq_s8 (int8x16_t a, int8x16_t b)
- /// A32: VSUB.I8 Qd, Qn, Qm
- /// A64: SUB Vd.16B, Vn.16B, Vm.16B
- /// </summary>
- public static Vector128<sbyte> Subtract(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x4_t vsubq_f32 (float32x4_t a, float32x4_t b)
- /// A32: VSUB.F32 Qd, Qn, Qm
- /// A64: FADD Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<float> Subtract(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x8_t vsubq_u16 (uint16x8_t a, uint16x8_t b)
- /// A32: VSUB.I16 Qd, Qn, Qm
- /// A64: SUB Vd.8H, Vn.8H, Vm.8H
- /// </summary>
- public static Vector128<ushort> Subtract(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x4_t vsubq_u32 (uint32x4_t a, uint32x4_t b)
- /// A32: VSUB.I32 Qd, Qn, Qm
- /// A64: SUB Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<uint> Subtract(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint64x2_t vsubq_u64 (uint64x2_t a, uint64x2_t b)
- /// A32: VSUB.I64 Qd, Qn, Qm
- /// A64: SUB Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<ulong> Subtract(Vector128<ulong> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// float64x1_t vsub_f64 (float64x1_t a, float64x1_t b)
- // /// A32: VSUB.F64 Dd, Dn, Dm
- // /// A64: FADD Dd, Dn, Dm
- // /// </summary>
- // public static Vector64<double> SubtractScalar(Vector64<double> left, Vector64<double> right) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// int64x1_t vsub_s64 (int64x1_t a, int64x1_t b)
- // /// A32: VSUB.I64 Dd, Dn, Dm
- // /// A64: SUB Dd, Dn, Dm
- // /// </summary>
- // public static Vector64<long> SubtractScalar(Vector64<long> left, Vector64<long> right) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// uint64x1_t vsub_u64 (uint64x1_t a, uint64x1_t b)
- // /// A32: VSUB.I64 Dd, Dn, Dm
- // /// A64: SUB Dd, Dn, Dm
- // /// </summary>
- // public static Vector64<ulong> SubtractScalar(Vector64<ulong> left, Vector64<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// A32: VSUB.F32 Sd, Sn, Sm
- /// A64:
- /// </summary>
- public static Vector64<float> SubtractScalar(Vector64<float> left, Vector64<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x8_t veor_u8 (uint8x8_t a, uint8x8_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector64<byte> Xor(Vector64<byte> left, Vector64<byte> right) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// float64x1_t veor_f64 (float64x1_t a, float64x1_t b)
- // /// A32: VEOR Dd, Dn, Dm
- // /// A64: EOR Vd, Vn, Vm
- // /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- // /// </summary>
- // public static Vector64<double> Xor(Vector64<double> left, Vector64<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x4_t veor_s16 (int16x4_t a, int16x4_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector64<short> Xor(Vector64<short> left, Vector64<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x2_t veor_s32(int32x2_t a, int32x2_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector64<int> Xor(Vector64<int> left, Vector64<int> right) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// int64x1_t veor_s64 (int64x1_t a, int64x1_t b)
- // /// A32: VEOR Dd, Dn, Dm
- // /// A64: EOR Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<long> Xor(Vector64<long> left, Vector64<long> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x8_t veor_s8 (int8x8_t a, int8x8_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector64<sbyte> Xor(Vector64<sbyte> left, Vector64<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x2_t veor_f32 (float32x2_t a, float32x2_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector64<float> Xor(Vector64<float> left, Vector64<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x4_t veor_u16 (uint16x4_t a, uint16x4_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector64<ushort> Xor(Vector64<ushort> left, Vector64<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x2_t veor_u32 (uint32x2_t a, uint32x2_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector64<uint> Xor(Vector64<uint> left, Vector64<uint> right) { throw new PlatformNotSupportedException(); }
-
- // /// <summary>
- // /// uint64x1_t veor_u64 (uint64x1_t a, uint64x1_t b)
- // /// A32: VEOR Dd, Dn, Dm
- // /// A64: EOR Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<ulong> Xor(Vector64<ulong> left, Vector64<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x16_t veor_u8 (uint8x16_t a, uint8x16_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector128<byte> Xor(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float64x2_t veor_f64 (float64x2_t a, float64x2_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<double> Xor(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int16x8_t veor_s16 (int16x8_t a, int16x8_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector128<short> Xor(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int32x4_t veor_s32(int32x4_t a, int32x4_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector128<int> Xor(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int64x2_t veor_s64 (int64x2_t a, int64x2_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector128<long> Xor(Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int8x16_t veor_s8 (int8x16_t a, int8x16_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector128<sbyte> Xor(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// float32x4_t veor_f32 (float32x4_t a, float32x4_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<float> Xor(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint16x8_t veor_u16 (uint16x8_t a, uint16x8_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector128<ushort> Xor(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x4_t veor_u32 (uint32x4_t a, uint32x4_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector128<uint> Xor(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint64x2_t veor_u64 (uint64x2_t a, uint64x2_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector128<ulong> Xor(Vector128<ulong> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/AdvSimd.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/AdvSimd.cs
deleted file mode 100644
index 4907e7b8f7f..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/AdvSimd.cs
+++ /dev/null
@@ -1,2174 +0,0 @@
-// 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.Runtime.Intrinsics.Arm
-{
- /// <summary>
- /// This class provides access to the ARM AdvSIMD hardware instructions via intrinsics
- /// </summary>
- [Intrinsic]
- [CLSCompliant(false)]
- public abstract class AdvSimd : ArmBase
- {
- internal AdvSimd() { }
-
- public static new bool IsSupported { get => IsSupported; }
-
- [Intrinsic]
- public new abstract class Arm64 : ArmBase.Arm64
- {
- internal Arm64() { }
-
- public static new bool IsSupported { get => IsSupported; }
-
- /// <summary>
- /// float64x2_t vabsq_f64 (float64x2_t a)
- /// A64: FABS Vd.2D, Vn.2D
- /// </summary>
- public static Vector128<double> Abs(Vector128<double> value) => Abs(value);
-
- /// <summary>
- /// int64x2_t vabsq_s64 (int64x2_t a)
- /// A64: ABS Vd.2D, Vn.2D
- /// </summary>
- public static Vector128<ulong> Abs(Vector128<long> value) => Abs(value);
-
- // /// <summary>
- // /// int64x1_t vabs_s64 (int64x1_t a)
- // /// A64: ABS Dd, Dn
- // /// </summary>
- // public static Vector64<ulong> AbsScalar(Vector64<long> value) => AbsScalar(value);
-
- /// <summary>
- /// float64x2_t vaddq_f64 (float64x2_t a, float64x2_t b)
- /// A64: FADD Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<double> Add(Vector128<double> left, Vector128<double> right) => Add(left, right);
-
- /// <summary>
- /// uint8_t vaddv_u8(uint8x8_t a)
- /// A64: ADDV Bd, Vn.8B
- /// </summary>
- public static byte AddAcross(Vector64<byte> value) => AddAcross(value);
-
- /// <summary>
- /// int16_t vaddv_s16(int16x4_t a)
- /// A64: ADDV Hd, Vn.4H
- /// </summary>
- public static short AddAcross(Vector64<short> value) => AddAcross(value);
-
- /// <summary>
- /// int8_t vaddv_s8(int8x8_t a)
- /// A64: ADDV Bd, Vn.8B
- /// </summary>
- public static sbyte AddAcross(Vector64<sbyte> value) => AddAcross(value);
-
- /// <summary>
- /// uint16_t vaddv_u16(uint16x4_t a)
- /// A64: ADDV Hd, Vn.4H
- /// </summary>
- public static ushort AddAcross(Vector64<ushort> value) => AddAcross(value);
-
- /// <summary>
- /// uint8_t vaddvq_u8(uint8x16_t a)
- /// A64: ADDV Bd, Vn.16B
- /// </summary>
- public static byte AddAcross(Vector128<byte> value) => AddAcross(value);
-
- /// <summary>
- /// int16_t vaddvq_s16(int16x8_t a)
- /// A64: ADDV Hd, Vn.8H
- /// </summary>
- public static short AddAcross(Vector128<short> value) => AddAcross(value);
-
- /// <summary>
- /// int32_t vaddvq_s32(int32x4_t a)
- /// A64: ADDV Sd, Vn.4S
- /// </summary>
- public static int AddAcross(Vector128<int> value) => AddAcross(value);
-
- /// <summary>
- /// int8_t vaddvq_s8(int8x16_t a)
- /// A64: ADDV Bd, Vn.16B
- /// </summary>
- public static sbyte AddAcross(Vector128<sbyte> value) => AddAcross(value);
-
- /// <summary>
- /// uint16_t vaddvq_u16(uint16x8_t a)
- /// A64: ADDV Hd, Vn.8H
- /// </summary>
- public static ushort AddAcross(Vector128<ushort> value) => AddAcross(value);
-
- /// <summary>
- /// uint32_t vaddvq_u32(uint32x4_t a)
- /// A64: ADDV Sd, Vn.4S
- /// </summary>
- public static uint AddAcross(Vector128<uint> value) => AddAcross(value);
-
- /// <summary>
- /// float64x2_t vsubq_f64 (float64x2_t a, float64x2_t b)
- /// A64: FSUB Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<double> Subtract(Vector128<double> left, Vector128<double> right) => Add(left, right);
-
- /// <summary>
- /// uint8x8_t vrbit_u8 (uint8x8_t a)
- /// A64: RBIT Vd.8B, Vn.8B
- /// </summary>
- public static Vector64<byte> ReverseElementBits(Vector64<byte> value) => ReverseElementBits(value);
-
- /// <summary>
- /// int8x8_t vrbit_s8 (int8x8_t a)
- /// A64: RBIT Vd.8B, Vn.8B
- /// </summary>
- public static Vector64<sbyte> ReverseElementBits(Vector64<sbyte> value) => ReverseElementBits(value);
-
- /// <summary>
- /// uint8x16_t vrbitq_u8 (uint8x16_t a)
- /// A64: RBIT Vd.16B, Vn.16B
- /// </summary>
- public static Vector128<byte> ReverseElementBits(Vector128<byte> value) => ReverseElementBits(value);
-
- /// <summary>
- /// int8x16_t vrbitq_s8 (int8x16_t a)
- /// A64: RBIT Vd.16B, Vn.16B
- /// </summary>
- public static Vector128<sbyte> ReverseElementBits(Vector128<sbyte> value) => ReverseElementBits(value);
-
- /// <summary>
- /// uint8x8_t vuzp1_u8(uint8x8_t a, uint8x8_t b)
- /// A64: UZP1 Vd.8B, Vn.8B, Vm.8B
- /// </summary>
- public static Vector64<byte> UnzipEven(Vector64<byte> left, Vector64<byte> right) => UnzipEven(left, right);
-
- /// <summary>
- /// int16x4_t vuzp1_s16(int16x4_t a, int16x4_t b)
- /// A64: UZP1 Vd.4H, Vn.4H, Vm.4H
- /// </summary>
- public static Vector64<short> UnzipEven(Vector64<short> left, Vector64<short> right) => UnzipEven(left, right);
-
- /// <summary>
- /// int32x2_t vuzp1_s32(int32x2_t a, int32x2_t b)
- /// A64: UZP1 Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<int> UnzipEven(Vector64<int> left, Vector64<int> right) => UnzipEven(left, right);
-
- /// <summary>
- /// int8x8_t vuzp1_s8(int8x8_t a, int8x8_t b)
- /// A64: UZP1 Vd.8B, Vn.8B, Vm.8B
- /// </summary>
- public static Vector64<sbyte> UnzipEven(Vector64<sbyte> left, Vector64<sbyte> right) => UnzipEven(left, right);
-
- /// <summary>
- /// float32x2_t vuzp1_f32(float32x2_t a, float32x2_t b)
- /// A64: UZP1 Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<float> UnzipEven(Vector64<float> left, Vector64<float> right) => UnzipEven(left, right);
-
- /// <summary>
- /// uint16x4_t vuzp1_u16(uint16x4_t a, uint16x4_t b)
- /// A64: UZP1 Vd.4H, Vn.4H, Vm.4H
- /// </summary>
- public static Vector64<ushort> UnzipEven(Vector64<ushort> left, Vector64<ushort> right) => UnzipEven(left, right);
-
- /// <summary>
- /// uint32x2_t vuzp1_u32(uint32x2_t a, uint32x2_t b)
- /// A64: UZP1 Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<uint> UnzipEven(Vector64<uint> left, Vector64<uint> right) => UnzipEven(left, right);
-
- /// <summary>
- /// uint8x16_t vuzp1q_u8(uint8x16_t a, uint8x16_t b)
- /// A64: UZP1 Vd.16B, Vn.16B, Vm.16B
- /// </summary>
- public static Vector128<byte> UnzipEven(Vector128<byte> left, Vector128<byte> right) => UnzipEven(left, right);
-
- /// <summary>
- /// float64x2_t vuzp1q_f64(float64x2_t a, float64x2_t b)
- /// A64: UZP1 Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<double> UnzipEven(Vector128<double> left, Vector128<double> right) => UnzipEven(left, right);
-
- /// <summary>
- /// int16x8_t vuzp1q_s16(int16x8_t a, int16x8_t b)
- /// A64: UZP1 Vd.8H, Vn.8H, Vm.8H
- /// </summary>
- public static Vector128<short> UnzipEven(Vector128<short> left, Vector128<short> right) => UnzipEven(left, right);
-
- /// <summary>
- /// int32x4_t vuzp1q_s32(int32x4_t a, int32x4_t b)
- /// A64: UZP1 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<int> UnzipEven(Vector128<int> left, Vector128<int> right) => UnzipEven(left, right);
-
- /// <summary>
- /// int64x2_t vuzp1q_s64(int64x2_t a, int64x2_t b)
- /// A64: UZP1 Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<long> UnzipEven(Vector128<long> left, Vector128<long> right) => UnzipEven(left, right);
-
- /// <summary>
- /// int8x16_t vuzp1q_u8(int8x16_t a, int8x16_t b)
- /// A64: UZP1 Vd.16B, Vn.16B, Vm.16B
- /// </summary>
- public static Vector128<sbyte> UnzipEven(Vector128<sbyte> left, Vector128<sbyte> right) => UnzipEven(left, right);
-
- /// <summary>
- /// float32x4_t vuzp1q_f32(float32x4_t a, float32x4_t b)
- /// A64: UZP1 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<float> UnzipEven(Vector128<float> left, Vector128<float> right) => UnzipEven(left, right);
-
- /// <summary>
- /// uint16x8_t vuzp1q_u16(uint16x8_t a, uint16x8_t b)
- /// A64: UZP1 Vd.8H, Vn.8H, Vm.8H
- /// </summary>
- public static Vector128<ushort> UnzipEven(Vector128<ushort> left, Vector128<ushort> right) => UnzipEven(left, right);
-
- /// <summary>
- /// uint32x4_t vuzp1q_u32(uint32x4_t a, uint32x4_t b)
- /// A64: UZP1 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<uint> UnzipEven(Vector128<uint> left, Vector128<uint> right) => UnzipEven(left, right);
-
- /// <summary>
- /// uint64x2_t vuzp1q_u64(uint64x2_t a, uint64x2_t b)
- /// A64: UZP1 Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<ulong> UnzipEven(Vector128<ulong> left, Vector128<ulong> right) => UnzipEven(left, right);
-
- /// <summary>
- /// uint8x8_t vuzp2_u8(uint8x8_t a, uint8x8_t b)
- /// A64: UZP2 Vd.8B, Vn.8B, Vm.8B
- /// </summary>
- public static Vector64<byte> UnzipOdd(Vector64<byte> left, Vector64<byte> right) => UnzipOdd(left, right);
-
- /// <summary>
- /// int16x4_t vuzp2_s16(int16x4_t a, int16x4_t b)
- /// A64: UZP2 Vd.4H, Vn.4H, Vm.4H
- /// </summary>
- public static Vector64<short> UnzipOdd(Vector64<short> left, Vector64<short> right) => UnzipOdd(left, right);
-
- /// <summary>
- /// int32x2_t vuzp2_s32(int32x2_t a, int32x2_t b)
- /// A64: UZP2 Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<int> UnzipOdd(Vector64<int> left, Vector64<int> right) => UnzipOdd(left, right);
-
- /// <summary>
- /// int8x8_t vuzp2_s8(int8x8_t a, int8x8_t b)
- /// A64: UZP2 Vd.8B, Vn.8B, Vm.8B
- /// </summary>
- public static Vector64<sbyte> UnzipOdd(Vector64<sbyte> left, Vector64<sbyte> right) => UnzipOdd(left, right);
-
- /// <summary>
- /// float32x2_t vuzp2_f32(float32x2_t a, float32x2_t b)
- /// A64: UZP2 Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<float> UnzipOdd(Vector64<float> left, Vector64<float> right) => UnzipOdd(left, right);
-
- /// <summary>
- /// uint16x4_t vuzp2_u16(uint16x4_t a, uint16x4_t b)
- /// A64: UZP2 Vd.4H, Vn.4H, Vm.4H
- /// </summary>
- public static Vector64<ushort> UnzipOdd(Vector64<ushort> left, Vector64<ushort> right) => UnzipOdd(left, right);
-
- /// <summary>
- /// uint32x2_t vuzp2_u32(uint32x2_t a, uint32x2_t b)
- /// A64: UZP2 Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<uint> UnzipOdd(Vector64<uint> left, Vector64<uint> right) => UnzipOdd(left, right);
-
- /// <summary>
- /// uint8x16_t vuzp2q_u8(uint8x16_t a, uint8x16_t b)
- /// A64: UZP2 Vd.16B, Vn.16B, Vm.16B
- /// </summary>
- public static Vector128<byte> UnzipOdd(Vector128<byte> left, Vector128<byte> right) => UnzipOdd(left, right);
-
- /// <summary>
- /// float64x2_t vuzp2q_f64(float64x2_t a, float64x2_t b)
- /// A64: UZP2 Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<double> UnzipOdd(Vector128<double> left, Vector128<double> right) => UnzipOdd(left, right);
-
- /// <summary>
- /// int16x8_t vuzp2q_s16(int16x8_t a, int16x8_t b)
- /// A64: UZP2 Vd.8H, Vn.8H, Vm.8H
- /// </summary>
- public static Vector128<short> UnzipOdd(Vector128<short> left, Vector128<short> right) => UnzipOdd(left, right);
-
- /// <summary>
- /// int32x4_t vuzp2q_s32(int32x4_t a, int32x4_t b)
- /// A64: UZP2 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<int> UnzipOdd(Vector128<int> left, Vector128<int> right) => UnzipOdd(left, right);
-
- /// <summary>
- /// int64x2_t vuzp2q_s64(int64x2_t a, int64x2_t b)
- /// A64: UZP2 Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<long> UnzipOdd(Vector128<long> left, Vector128<long> right) => UnzipOdd(left, right);
-
- /// <summary>
- /// int8x16_t vuzp2q_u8(int8x16_t a, int8x16_t b)
- /// A64: UZP2 Vd.16B, Vn.16B, Vm.16B
- /// </summary>
- public static Vector128<sbyte> UnzipOdd(Vector128<sbyte> left, Vector128<sbyte> right) => UnzipOdd(left, right);
-
- /// <summary>
- /// float32x4_t vuzp2q_f32(float32x4_t a, float32x4_t b)
- /// A64: UZP2 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<float> UnzipOdd(Vector128<float> left, Vector128<float> right) => UnzipOdd(left, right);
-
- /// <summary>
- /// uint16x8_t vuzp2q_u16(uint16x8_t a, uint16x8_t b)
- /// A64: UZP2 Vd.8H, Vn.8H, Vm.8H
- /// </summary>
- public static Vector128<ushort> UnzipOdd(Vector128<ushort> left, Vector128<ushort> right) => UnzipOdd(left, right);
-
- /// <summary>
- /// uint32x4_t vuzp2q_u32(uint32x4_t a, uint32x4_t b)
- /// A64: UZP2 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<uint> UnzipOdd(Vector128<uint> left, Vector128<uint> right) => UnzipOdd(left, right);
-
- /// <summary>
- /// uint64x2_t vuzp2q_u64(uint64x2_t a, uint64x2_t b)
- /// A64: UZP2 Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<ulong> UnzipOdd(Vector128<ulong> left, Vector128<ulong> right) => UnzipOdd(left, right);
-
- /// <summary>
- /// uint8x8_t vzip2_u8(uint8x8_t a, uint8x8_t b)
- /// A64: ZIP2 Vd.8B, Vn.8B, Vm.8B
- /// </summary>
- public static Vector64<byte> ZipHigh(Vector64<byte> left, Vector64<byte> right) => ZipHigh(left, right);
-
- /// <summary>
- /// int16x4_t vzip2_s16(int16x4_t a, int16x4_t b)
- /// A64: ZIP2 Vd.4H, Vn.4H, Vm.4H
- /// </summary>
- public static Vector64<short> ZipHigh(Vector64<short> left, Vector64<short> right) => ZipHigh(left, right);
-
- /// <summary>
- /// int32x2_t vzip2_s32(int32x2_t a, int32x2_t b)
- /// A64: ZIP2 Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<int> ZipHigh(Vector64<int> left, Vector64<int> right) => ZipHigh(left, right);
-
- /// <summary>
- /// int8x8_t vzip2_s8(int8x8_t a, int8x8_t b)
- /// A64: ZIP2 Vd.8B, Vn.8B, Vm.8B
- /// </summary>
- public static Vector64<sbyte> ZipHigh(Vector64<sbyte> left, Vector64<sbyte> right) => ZipHigh(left, right);
-
- /// <summary>
- /// float32x2_t vzip2_f32(float32x2_t a, float32x2_t b)
- /// A64: ZIP2 Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<float> ZipHigh(Vector64<float> left, Vector64<float> right) => ZipHigh(left, right);
-
- /// <summary>
- /// uint16x4_t vzip2_u16(uint16x4_t a, uint16x4_t b)
- /// A64: ZIP2 Vd.4H, Vn.4H, Vm.4H
- /// </summary>
- public static Vector64<ushort> ZipHigh(Vector64<ushort> left, Vector64<ushort> right) => ZipHigh(left, right);
-
- /// <summary>
- /// uint32x2_t vzip2_u32(uint32x2_t a, uint32x2_t b)
- /// A64: ZIP2 Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<uint> ZipHigh(Vector64<uint> left, Vector64<uint> right) => ZipHigh(left, right);
-
- /// <summary>
- /// uint8x16_t vzip2q_u8(uint8x16_t a, uint8x16_t b)
- /// A64: ZIP2 Vd.16B, Vn.16B, Vm.16B
- /// </summary>
- public static Vector128<byte> ZipHigh(Vector128<byte> left, Vector128<byte> right) => ZipHigh(left, right);
-
- /// <summary>
- /// float64x2_t vzip2q_f64(float64x2_t a, float64x2_t b)
- /// A64: ZIP2 Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<double> ZipHigh(Vector128<double> left, Vector128<double> right) => ZipHigh(left, right);
-
- /// <summary>
- /// int16x8_t vzip2q_s16(int16x8_t a, int16x8_t b)
- /// A64: ZIP2 Vd.8H, Vn.8H, Vm.8H
- /// </summary>
- public static Vector128<short> ZipHigh(Vector128<short> left, Vector128<short> right) => ZipHigh(left, right);
-
- /// <summary>
- /// int32x4_t vzip2q_s32(int32x4_t a, int32x4_t b)
- /// A64: ZIP2 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<int> ZipHigh(Vector128<int> left, Vector128<int> right) => ZipHigh(left, right);
-
- /// <summary>
- /// int64x2_t vzip2q_s64(int64x2_t a, int64x2_t b)
- /// A64: ZIP2 Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<long> ZipHigh(Vector128<long> left, Vector128<long> right) => ZipHigh(left, right);
-
- /// <summary>
- /// int8x16_t vzip2q_u8(int8x16_t a, int8x16_t b)
- /// A64: ZIP2 Vd.16B, Vn.16B, Vm.16B
- /// </summary>
- public static Vector128<sbyte> ZipHigh(Vector128<sbyte> left, Vector128<sbyte> right) => ZipHigh(left, right);
-
- /// <summary>
- /// float32x4_t vzip2q_f32(float32x4_t a, float32x4_t b)
- /// A64: ZIP2 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<float> ZipHigh(Vector128<float> left, Vector128<float> right) => ZipHigh(left, right);
-
- /// <summary>
- /// uint16x8_t vzip2q_u16(uint16x8_t a, uint16x8_t b)
- /// A64: ZIP2 Vd.8H, Vn.8H, Vm.8H
- /// </summary>
- public static Vector128<ushort> ZipHigh(Vector128<ushort> left, Vector128<ushort> right) => ZipHigh(left, right);
-
- /// <summary>
- /// uint32x4_t vzip2q_u32(uint32x4_t a, uint32x4_t b)
- /// A64: ZIP2 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<uint> ZipHigh(Vector128<uint> left, Vector128<uint> right) => ZipHigh(left, right);
-
- /// <summary>
- /// uint64x2_t vzip2q_u64(uint64x2_t a, uint64x2_t b)
- /// A64: ZIP2 Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<ulong> ZipHigh(Vector128<ulong> left, Vector128<ulong> right) => ZipHigh(left, right);
-
- /// <summary>
- /// uint8x8_t vzip1_u8(uint8x8_t a, uint8x8_t b)
- /// A64: ZIP1 Vd.8B, Vn.8B, Vm.8B
- /// </summary>
- public static Vector64<byte> ZipLow(Vector64<byte> left, Vector64<byte> right) => ZipLow(left, right);
-
- /// <summary>
- /// int16x4_t vzip1_s16(int16x4_t a, int16x4_t b)
- /// A64: ZIP1 Vd.4H, Vn.4H, Vm.4H
- /// </summary>
- public static Vector64<short> ZipLow(Vector64<short> left, Vector64<short> right) => ZipLow(left, right);
-
- /// <summary>
- /// int32x2_t vzip1_s32(int32x2_t a, int32x2_t b)
- /// A64: ZIP1 Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<int> ZipLow(Vector64<int> left, Vector64<int> right) => ZipLow(left, right);
-
- /// <summary>
- /// int8x8_t vzip1_s8(int8x8_t a, int8x8_t b)
- /// A64: ZIP1 Vd.8B, Vn.8B, Vm.8B
- /// </summary>
- public static Vector64<sbyte> ZipLow(Vector64<sbyte> left, Vector64<sbyte> right) => ZipLow(left, right);
-
- /// <summary>
- /// float32x2_t vzip1_f32(float32x2_t a, float32x2_t b)
- /// A64: ZIP1 Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<float> ZipLow(Vector64<float> left, Vector64<float> right) => ZipLow(left, right);
-
- /// <summary>
- /// uint16x4_t vzip1_u16(uint16x4_t a, uint16x4_t b)
- /// A64: ZIP1 Vd.4H, Vn.4H, Vm.4H
- /// </summary>
- public static Vector64<ushort> ZipLow(Vector64<ushort> left, Vector64<ushort> right) => ZipLow(left, right);
-
- /// <summary>
- /// uint32x2_t vzip1_u32(uint32x2_t a, uint32x2_t b)
- /// A64: ZIP1 Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<uint> ZipLow(Vector64<uint> left, Vector64<uint> right) => ZipLow(left, right);
-
- /// <summary>
- /// uint8x16_t vzip1q_u8(uint8x16_t a, uint8x16_t b)
- /// A64: ZIP1 Vd.16B, Vn.16B, Vm.16B
- /// </summary>
- public static Vector128<byte> ZipLow(Vector128<byte> left, Vector128<byte> right) => ZipLow(left, right);
-
- /// <summary>
- /// float64x2_t vzip1q_f64(float64x2_t a, float64x2_t b)
- /// A64: ZIP1 Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<double> ZipLow(Vector128<double> left, Vector128<double> right) => ZipLow(left, right);
-
- /// <summary>
- /// int16x8_t vzip1q_s16(int16x8_t a, int16x8_t b)
- /// A64: ZIP1 Vd.8H, Vn.8H, Vm.8H
- /// </summary>
- public static Vector128<short> ZipLow(Vector128<short> left, Vector128<short> right) => ZipLow(left, right);
-
- /// <summary>
- /// int32x4_t vzip1q_s32(int32x4_t a, int32x4_t b)
- /// A64: ZIP1 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<int> ZipLow(Vector128<int> left, Vector128<int> right) => ZipLow(left, right);
-
- /// <summary>
- /// int64x2_t vzip1q_s64(int64x2_t a, int64x2_t b)
- /// A64: ZIP1 Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<long> ZipLow(Vector128<long> left, Vector128<long> right) => ZipLow(left, right);
-
- /// <summary>
- /// int8x16_t vzip1q_u8(int8x16_t a, int8x16_t b)
- /// A64: ZIP1 Vd.16B, Vn.16B, Vm.16B
- /// </summary>
- public static Vector128<sbyte> ZipLow(Vector128<sbyte> left, Vector128<sbyte> right) => ZipLow(left, right);
-
- /// <summary>
- /// float32x4_t vzip1q_f32(float32x4_t a, float32x4_t b)
- /// A64: ZIP1 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<float> ZipLow(Vector128<float> left, Vector128<float> right) => ZipLow(left, right);
-
- /// <summary>
- /// uint16x8_t vzip1q_u16(uint16x8_t a, uint16x8_t b)
- /// A64: ZIP1 Vd.8H, Vn.8H, Vm.8H
- /// </summary>
- public static Vector128<ushort> ZipLow(Vector128<ushort> left, Vector128<ushort> right) => ZipLow(left, right);
-
- /// <summary>
- /// uint32x4_t vzip1q_u32(uint32x4_t a, uint32x4_t b)
- /// A64: ZIP1 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<uint> ZipLow(Vector128<uint> left, Vector128<uint> right) => ZipLow(left, right);
-
- /// <summary>
- /// uint64x2_t vzip1q_u64(uint64x2_t a, uint64x2_t b)
- /// A64: ZIP1 Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<ulong> ZipLow(Vector128<ulong> left, Vector128<ulong> right) => ZipLow(left, right);
- }
-
- /// <summary>
- /// int8x8_t vabs_s8 (int8x8_t a)
- /// A32: VABS.S8 Dd, Dm
- /// A64: ABS Vd.8B, Vn.8B
- /// </summary>
- public static Vector64<byte> Abs(Vector64<sbyte> value) => Abs(value);
-
- /// <summary>
- /// int16x4_t vabs_s16 (int16x4_t a)
- /// A32: VABS.S16 Dd, Dm
- /// A64: ABS Vd.4H, Vn.4H
- /// </summary>
- public static Vector64<ushort> Abs(Vector64<short> value) => Abs(value);
-
- /// <summary>
- /// int32x2_t vabs_s32 (int32x2_t a)
- /// A32: VABS.S32 Dd, Dm
- /// A64: ABS Vd.2S, Vn.2S
- /// </summary>
- public static Vector64<uint> Abs(Vector64<int> value) => Abs(value);
-
- /// <summary>
- /// float32x2_t vabs_f32 (float32x2_t a)
- /// A32: VABS.F32 Dd, Dm
- /// A64: FABS Vd.2S, Vn.2S
- /// </summary>
- public static Vector64<float> Abs(Vector64<float> value) => Abs(value);
-
- /// <summary>
- /// int8x16_t vabsq_s8 (int8x16_t a)
- /// A32: VABS.S8 Qd, Qm
- /// A64: ABS Vd.16B, Vn.16B
- /// </summary>
- public static Vector128<byte> Abs(Vector128<sbyte> value) => Abs(value);
-
- /// <summary>
- /// int16x8_t vabsq_s16 (int16x8_t a)
- /// A32: VABS.S16 Qd, Qm
- /// A64: ABS Vd.8H, Vn.8H
- /// </summary>
- public static Vector128<ushort> Abs(Vector128<short> value) => Abs(value);
-
- /// <summary>
- /// int32x4_t vabsq_s32 (int32x4_t a)
- /// A32: VABS.S32 Qd, Qm
- /// A64: ABS Vd.4S, Vn.4S
- /// </summary>
- public static Vector128<uint> Abs(Vector128<int> value) => Abs(value);
-
- /// <summary>
- /// float32x4_t vabsq_f32 (float32x4_t a)
- /// A32: VABS.F32 Qd, Qm
- /// A64: FABS Vd.4S, Vn.4S
- /// </summary>
- public static Vector128<float> Abs(Vector128<float> value) => Abs(value);
-
- // /// <summary>
- // /// float64x1_t vabs_f64 (float64x1_t a)
- // /// A32: VABS.F64 Dd, Dm
- // /// A64: FABS Dd, Dn
- // /// </summary>
- // public static Vector64<double> AbsScalar(Vector64<double> value) => Abs(value);
-
- /// <summary>
- /// A32: VABS.F32 Sd, Sm
- /// A64: FABS Sd, Sn
- /// </summary>
- public static Vector64<float> AbsScalar(Vector64<float> value) => AbsScalar(value);
-
- /// <summary>
- /// uint8x8_t vadd_u8 (uint8x8_t a, uint8x8_t b)
- /// A32: VADD.I8 Dd, Dn, Dm
- /// A64: ADD Vd.8B, Vn.8B, Vm.8B
- /// </summary>
- public static Vector64<byte> Add(Vector64<byte> left, Vector64<byte> right) => Add(left, right);
-
- /// <summary>
- /// int16x4_t vadd_s16 (int16x4_t a, int16x4_t b)
- /// A32: VADD.I16 Dd, Dn, Dm
- /// A64: ADD Vd.4H, Vn.4H, Vm.4H
- /// </summary>
- public static Vector64<short> Add(Vector64<short> left, Vector64<short> right) => Add(left, right);
-
- /// <summary>
- /// int32x2_t vadd_s32 (int32x2_t a, int32x2_t b)
- /// A32: VADD.I32 Dd, Dn, Dm
- /// A64: ADD Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<int> Add(Vector64<int> left, Vector64<int> right) => Add(left, right);
-
- /// <summary>
- /// int8x8_t vadd_s8 (int8x8_t a, int8x8_t b)
- /// A32: VADD.I8 Dd, Dn, Dm
- /// A64: ADD Vd.8B, Vn.8B, Vm.8B
- /// </summary>
- public static Vector64<sbyte> Add(Vector64<sbyte> left, Vector64<sbyte> right) => Add(left, right);
-
- /// <summary>
- /// float32x2_t vadd_f32 (float32x2_t a, float32x2_t b)
- /// A32: VADD.F32 Dd, Dn, Dm
- /// A64: FADD Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<float> Add(Vector64<float> left, Vector64<float> right) => Add(left, right);
-
- /// <summary>
- /// uint16x4_t vadd_u16 (uint16x4_t a, uint16x4_t b)
- /// A32: VADD.I16 Dd, Dn, Dm
- /// A64: ADD Vd.4H, Vn.4H, Vm.4H
- /// </summary>
- public static Vector64<ushort> Add(Vector64<ushort> left, Vector64<ushort> right) => Add(left, right);
-
- /// <summary>
- /// uint32x2_t vadd_u32 (uint32x2_t a, uint32x2_t b)
- /// A32: VADD.I32 Dd, Dn, Dm
- /// A64: ADD Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<uint> Add(Vector64<uint> left, Vector64<uint> right) => Add(left, right);
-
- /// <summary>
- /// uint8x16_t vaddq_u8 (uint8x16_t a, uint8x16_t b)
- /// A32: VADD.I8 Qd, Qn, Qm
- /// A64: ADD Vd.16B, Vn.16B, Vm.16B
- /// </summary>
- public static Vector128<byte> Add(Vector128<byte> left, Vector128<byte> right) => Add(left, right);
-
- /// <summary>
- /// int16x8_t vaddq_s16 (int16x8_t a, int16x8_t b)
- /// A32: VADD.I16 Qd, Qn, Qm
- /// A64: ADD Vd.8H, Vn.8H, Vm.8H
- /// </summary>
- public static Vector128<short> Add(Vector128<short> left, Vector128<short> right) => Add(left, right);
-
- /// <summary>
- /// int32x4_t vaddq_s32 (int32x4_t a, int32x4_t b)
- /// A32: VADD.I32 Qd, Qn, Qm
- /// A64: ADD Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<int> Add(Vector128<int> left, Vector128<int> right) => Add(left, right);
-
- /// <summary>
- /// int64x2_t vaddq_s64 (int64x2_t a, int64x2_t b)
- /// A32: VADD.I64 Qd, Qn, Qm
- /// A64: ADD Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<long> Add(Vector128<long> left, Vector128<long> right) => Add(left, right);
-
- /// <summary>
- /// int8x16_t vaddq_s8 (int8x16_t a, int8x16_t b)
- /// A32: VADD.I8 Qd, Qn, Qm
- /// A64: ADD Vd.16B, Vn.16B, Vm.16B
- /// </summary>
- public static Vector128<sbyte> Add(Vector128<sbyte> left, Vector128<sbyte> right) => Add(left, right);
-
- /// <summary>
- /// float32x4_t vaddq_f32 (float32x4_t a, float32x4_t b)
- /// A32: VADD.F32 Qd, Qn, Qm
- /// A64: FADD Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<float> Add(Vector128<float> left, Vector128<float> right) => Add(left, right);
-
- /// <summary>
- /// uint16x8_t vaddq_u16 (uint16x8_t a, uint16x8_t b)
- /// A32: VADD.I16 Qd, Qn, Qm
- /// A64: ADD Vd.8H, Vn.8H, Vm.8H
- /// </summary>
- public static Vector128<ushort> Add(Vector128<ushort> left, Vector128<ushort> right) => Add(left, right);
-
- /// <summary>
- /// uint32x4_t vaddq_u32 (uint32x4_t a, uint32x4_t b)
- /// A32: VADD.I32 Qd, Qn, Qm
- /// A64: ADD Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<uint> Add(Vector128<uint> left, Vector128<uint> right) => Add(left, right);
-
- /// <summary>
- /// uint64x2_t vaddq_u64 (uint64x2_t a, uint64x2_t b)
- /// A32: VADD.I64 Qd, Qn, Qm
- /// A64: ADD Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<ulong> Add(Vector128<ulong> left, Vector128<ulong> right) => Add(left, right);
-
- // /// <summary>
- // /// float64x1_t vadd_f64 (float64x1_t a, float64x1_t b)
- // /// A32: VADD.F64 Dd, Dn, Dm
- // /// A64: FADD Dd, Dn, Dm
- // /// </summary>
- // public static Vector64<double> AddScalar(Vector64<double> left, Vector64<double> right) => Add(left, right);
-
- // /// <summary>
- // /// int64x1_t vadd_s64 (int64x1_t a, int64x1_t b)
- // /// A32: VADD.I64 Dd, Dn, Dm
- // /// A64: ADD Dd, Dn, Dm
- // /// </summary>
- // public static Vector64<long> AddScalar(Vector64<long> left, Vector64<long> right) => AddScalar(left, right);
-
- // /// <summary>
- // /// uint64x1_t vadd_u64 (uint64x1_t a, uint64x1_t b)
- // /// A32: VADD.I64 Dd, Dn, Dm
- // /// A64: ADD Dd, Dn, Dm
- // /// </summary>
- // public static Vector64<ulong> AddScalar(Vector64<ulong> left, Vector64<ulong> right) => AddScalar(left, right);
-
- /// <summary>
- /// A32: VADD.F32 Sd, Sn, Sm
- /// A64:
- /// </summary>
- public static Vector64<float> AddScalar(Vector64<float> left, Vector64<float> right) => AddScalar(left, right);
-
- /// <summary>
- /// uint8x8_t vand_u8 (uint8x8_t a, uint8x8_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector64<byte> And(Vector64<byte> left, Vector64<byte> right) => And(left, right);
-
- // /// <summary>
- // /// float64x1_t vand_f64 (float64x1_t a, float64x1_t b)
- // /// A32: VAND Dd, Dn, Dm
- // /// A64: AND Vd, Vn, Vm
- // /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- // /// </summary>
- // public static Vector64<double> And(Vector64<double> left, Vector64<double> right) => And(left, right);
-
- /// <summary>
- /// int16x4_t vand_s16 (int16x4_t a, int16x4_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector64<short> And(Vector64<short> left, Vector64<short> right) => And(left, right);
-
- /// <summary>
- /// int32x2_t vand_s32(int32x2_t a, int32x2_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector64<int> And(Vector64<int> left, Vector64<int> right) => And(left, right);
-
- // /// <summary>
- // /// int64x1_t vand_s64 (int64x1_t a, int64x1_t b)
- // /// A32: VAND Dd, Dn, Dm
- // /// A64: AND Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<long> And(Vector64<long> left, Vector64<long> right) => And(left, right);
-
- /// <summary>
- /// int8x8_t vand_s8 (int8x8_t a, int8x8_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector64<sbyte> And(Vector64<sbyte> left, Vector64<sbyte> right) => And(left, right);
-
- /// <summary>
- /// float32x2_t vand_f32 (float32x2_t a, float32x2_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector64<float> And(Vector64<float> left, Vector64<float> right) => And(left, right);
-
- /// <summary>
- /// uint16x4_t vand_u16 (uint16x4_t a, uint16x4_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector64<ushort> And(Vector64<ushort> left, Vector64<ushort> right) => And(left, right);
-
- /// <summary>
- /// uint32x2_t vand_u32 (uint32x2_t a, uint32x2_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector64<uint> And(Vector64<uint> left, Vector64<uint> right) => And(left, right);
-
- // /// <summary>
- // /// uint64x1_t vand_u64 (uint64x1_t a, uint64x1_t b)
- // /// A32: VAND Dd, Dn, Dm
- // /// A64: AND Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<ulong> And(Vector64<ulong> left, Vector64<ulong> right) => And(left, right);
-
- /// <summary>
- /// uint8x16_t vand_u8 (uint8x16_t a, uint8x16_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector128<byte> And(Vector128<byte> left, Vector128<byte> right) => And(left, right);
-
- /// <summary>
- /// float64x2_t vand_f64 (float64x2_t a, float64x2_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<double> And(Vector128<double> left, Vector128<double> right) => And(left, right);
-
- /// <summary>
- /// int16x8_t vand_s16 (int16x8_t a, int16x8_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector128<short> And(Vector128<short> left, Vector128<short> right) => And(left, right);
-
- /// <summary>
- /// int32x4_t vand_s32(int32x4_t a, int32x4_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector128<int> And(Vector128<int> left, Vector128<int> right) => And(left, right);
-
- /// <summary>
- /// int64x2_t vand_s64 (int64x2_t a, int64x2_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector128<long> And(Vector128<long> left, Vector128<long> right) => And(left, right);
-
- /// <summary>
- /// int8x16_t vand_s8 (int8x16_t a, int8x16_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector128<sbyte> And(Vector128<sbyte> left, Vector128<sbyte> right) => And(left, right);
-
- /// <summary>
- /// float32x4_t vand_f32 (float32x4_t a, float32x4_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<float> And(Vector128<float> left, Vector128<float> right) => And(left, right);
-
- /// <summary>
- /// uint16x8_t vand_u16 (uint16x8_t a, uint16x8_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector128<ushort> And(Vector128<ushort> left, Vector128<ushort> right) => And(left, right);
-
- /// <summary>
- /// uint32x4_t vand_u32 (uint32x4_t a, uint32x4_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector128<uint> And(Vector128<uint> left, Vector128<uint> right) => And(left, right);
-
- /// <summary>
- /// uint64x2_t vand_u64 (uint64x2_t a, uint64x2_t b)
- /// A32: VAND Dd, Dn, Dm
- /// A64: AND Vd, Vn, Vm
- /// </summary>
- public static Vector128<ulong> And(Vector128<ulong> left, Vector128<ulong> right) => And(left, right);
-
- /// <summary>
- /// uint8x8_t vbic_u8 (uint8x8_t a, uint8x8_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector64<byte> AndNot(Vector64<byte> left, Vector64<byte> right) => AndNot(left, right);
-
- // /// <summary>
- // /// float64x1_t vbic_f64 (float64x1_t a, float64x1_t b)
- // /// A32: VBIC Dd, Dn, Dm
- // /// A64: BIC Vd, Vn, Vm
- // /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- // /// </summary>
- // public static Vector64<double> AndNot(Vector64<double> left, Vector64<double> right) => AndNot(left, right);
-
- /// <summary>
- /// int16x4_t vbic_s16 (int16x4_t a, int16x4_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector64<short> AndNot(Vector64<short> left, Vector64<short> right) => AndNot(left, right);
-
- /// <summary>
- /// int32x2_t vbic_s32(int32x2_t a, int32x2_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector64<int> AndNot(Vector64<int> left, Vector64<int> right) => AndNot(left, right);
-
- // /// <summary>
- // /// int64x1_t vbic_s64 (int64x1_t a, int64x1_t b)
- // /// A32: VBIC Dd, Dn, Dm
- // /// A64: BIC Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<long> AndNot(Vector64<long> left, Vector64<long> right) => AndNot(left, right);
-
- /// <summary>
- /// int8x8_t vbic_s8 (int8x8_t a, int8x8_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector64<sbyte> AndNot(Vector64<sbyte> left, Vector64<sbyte> right) => AndNot(left, right);
-
- /// <summary>
- /// float32x2_t vbic_f32 (float32x2_t a, float32x2_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector64<float> AndNot(Vector64<float> left, Vector64<float> right) => AndNot(left, right);
-
- /// <summary>
- /// uint16x4_t vbic_u16 (uint16x4_t a, uint16x4_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector64<ushort> AndNot(Vector64<ushort> left, Vector64<ushort> right) => AndNot(left, right);
-
- /// <summary>
- /// uint32x2_t vbic_u32 (uint32x2_t a, uint32x2_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector64<uint> AndNot(Vector64<uint> left, Vector64<uint> right) => AndNot(left, right);
-
- // /// <summary>
- // /// uint64x1_t vbic_u64 (uint64x1_t a, uint64x1_t b)
- // /// A32: VBIC Dd, Dn, Dm
- // /// A64: BIC Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<ulong> AndNot(Vector64<ulong> left, Vector64<ulong> right) => AndNot(left, right);
-
- /// <summary>
- /// uint8x16_t vbic_u8 (uint8x16_t a, uint8x16_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector128<byte> AndNot(Vector128<byte> left, Vector128<byte> right) => AndNot(left, right);
-
- /// <summary>
- /// float64x2_t vbic_f64 (float64x2_t a, float64x2_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<double> AndNot(Vector128<double> left, Vector128<double> right) => AndNot(left, right);
-
- /// <summary>
- /// int16x8_t vbic_s16 (int16x8_t a, int16x8_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector128<short> AndNot(Vector128<short> left, Vector128<short> right) => AndNot(left, right);
-
- /// <summary>
- /// int32x4_t vbic_s32(int32x4_t a, int32x4_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector128<int> AndNot(Vector128<int> left, Vector128<int> right) => AndNot(left, right);
-
- /// <summary>
- /// int64x2_t vbic_s64 (int64x2_t a, int64x2_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector128<long> AndNot(Vector128<long> left, Vector128<long> right) => AndNot(left, right);
-
- /// <summary>
- /// int8x16_t vbic_s8 (int8x16_t a, int8x16_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector128<sbyte> AndNot(Vector128<sbyte> left, Vector128<sbyte> right) => AndNot(left, right);
-
- /// <summary>
- /// float32x4_t vbic_f32 (float32x4_t a, float32x4_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<float> AndNot(Vector128<float> left, Vector128<float> right) => AndNot(left, right);
-
- /// <summary>
- /// uint16x8_t vbic_u16 (uint16x8_t a, uint16x8_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector128<ushort> AndNot(Vector128<ushort> left, Vector128<ushort> right) => AndNot(left, right);
-
- /// <summary>
- /// uint32x4_t vbic_u32 (uint32x4_t a, uint32x4_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector128<uint> AndNot(Vector128<uint> left, Vector128<uint> right) => AndNot(left, right);
-
- /// <summary>
- /// uint64x2_t vbic_u64 (uint64x2_t a, uint64x2_t b)
- /// A32: VBIC Dd, Dn, Dm
- /// A64: BIC Vd, Vn, Vm
- /// </summary>
- public static Vector128<ulong> AndNot(Vector128<ulong> left, Vector128<ulong> right) => AndNot(left, right);
-
- /// <summary>
- /// uint8x8_t vbsl_u8 (uint8x8_t a, uint8x8_t b, uint8x8_t c)
- /// A32: VBSL Dd, Dn, Dm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector64<byte> BitwiseSelect(Vector64<byte> select, Vector64<byte> left, Vector64<byte> right) => BitwiseSelect(select, left, right);
-
- // /// <summary>
- // /// float64x1_t vbsl_f64 (float64x1_t a, float64x1_t b, float64x1_t c)
- // /// A32: VBSL Dd, Dn, Dm
- // /// A64: BSL Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<double> BitwiseSelect(Vector64<double> select, Vector64<double> left, Vector64<double> right) => BitwiseSelect(select, left, right);
-
- /// <summary>
- /// int16x4_t vbsl_s16 (int16x4_t a, int16x4_t b, int16x4_t c)
- /// A32: VBSL Dd, Dn, Dm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector64<short> BitwiseSelect(Vector64<short> select, Vector64<short> left, Vector64<short> right) => BitwiseSelect(select, left, right);
-
- /// <summary>
- /// int32x2_t vbsl_s32 (int32x2_t a, int32x2_t b, int32x2_t c)
- /// A32: VBSL Dd, Dn, Dm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector64<int> BitwiseSelect(Vector64<int> select, Vector64<int> left, Vector64<int> right) => BitwiseSelect(select, left, right);
-
- // /// <summary>
- // /// int64x1_t vbsl_s64 (int64x1_t a, int64x1_t b, int64x1_t c)
- // /// A32: VBSL Dd, Dn, Dm
- // /// A64: BSL Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<long> BitwiseSelect(Vector64<long> select, Vector64<long> left, Vector64<long> right) => BitwiseSelect(select, left, right);
-
- /// <summary>
- /// int8x8_t vbsl_s8 (int8x8_t a, int8x8_t b, int8x8_t c)
- /// A32: VBSL Dd, Dn, Dm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector64<sbyte> BitwiseSelect(Vector64<sbyte> select, Vector64<sbyte> left, Vector64<sbyte> right) => BitwiseSelect(select, left, right);
-
- /// <summary>
- /// float32x2_t vbsl_f32 (float32x2_t a, float32x2_t b, float32x2_t c)
- /// A32: VBSL Dd, Dn, Dm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector64<float> BitwiseSelect(Vector64<float> select, Vector64<float> left, Vector64<float> right) => BitwiseSelect(select, left, right);
-
- /// <summary>
- /// uint16x4_t vbsl_u16 (uint16x4_t a, uint16x4_t b, uint16x4_t c)
- /// A32: VBSL Dd, Dn, Dm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector64<ushort> BitwiseSelect(Vector64<ushort> select, Vector64<ushort> left, Vector64<ushort> right) => BitwiseSelect(select, left, right);
-
- /// <summary>
- /// uint32x2_t vbsl_u32 (uint32x2_t a, uint32x2_t b, uint32x2_t c)
- /// A32: VBSL Dd, Dn, Dm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector64<uint> BitwiseSelect(Vector64<uint> select, Vector64<uint> left, Vector64<uint> right) => BitwiseSelect(select, left, right);
-
- // /// <summary>
- // /// uint64x1_t vbsl_u64 (uint64x1_t a, uint64x1_t b, uint64x1_t c)
- // /// A32: VBSL Dd, Dn, Dm
- // /// A64: BSL Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<ulong> BitwiseSelect(Vector64<ulong> select, Vector64<ulong> left, Vector64<ulong> right) => BitwiseSelect(select, left, right);
-
- /// <summary>
- /// uint8x16_t vbslq_u8 (uint8x16_t a, uint8x16_t b, uint8x16_t c)
- /// A32: VBSL Qd, Qn, Qm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector128<byte> BitwiseSelect(Vector128<byte> select, Vector128<byte> left, Vector128<byte> right) => BitwiseSelect(select, left, right);
-
- /// <summary>
- /// float64x2_t vbslq_f64 (float64x2_t a, float64x2_t b, float64x2_t c)
- /// A32: VBSL Qd, Qn, Qm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector128<double> BitwiseSelect(Vector128<double> select, Vector128<double> left, Vector128<double> right) => BitwiseSelect(select, left, right);
-
- /// <summary>
- /// int16x8_t vbslq_s16 (int16x8_t a, int16x8_t b, int16x8_t c)
- /// A32: VBSL Qd, Qn, Qm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector128<short> BitwiseSelect(Vector128<short> select, Vector128<short> left, Vector128<short> right) => BitwiseSelect(select, left, right);
-
- /// <summary>
- /// int32x4_t vbslq_s32 (int32x4_t a, int32x4_t b, int32x4_t c)
- /// A32: VBSL Qd, Qn, Qm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector128<int> BitwiseSelect(Vector128<int> select, Vector128<int> left, Vector128<int> right) => BitwiseSelect(select, left, right);
-
- /// <summary>
- /// int64x2_t vbslq_s64 (int64x2_t a, int64x2_t b, int64x2_t c)
- /// A32: VBSL Qd, Qn, Qm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector128<long> BitwiseSelect(Vector128<long> select, Vector128<long> left, Vector128<long> right) => BitwiseSelect(select, left, right);
-
- /// <summary>
- /// int8x16_t vbslq_s8 (int8x16_t a, int8x16_t b, int8x16_t c)
- /// A32: VBSL Qd, Qn, Qm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector128<sbyte> BitwiseSelect(Vector128<sbyte> select, Vector128<sbyte> left, Vector128<sbyte> right) => BitwiseSelect(select, left, right);
-
- /// <summary>
- /// float32x4_t vbslq_f32 (float32x4_t a, float32x4_t b, float32x4_t c)
- /// A32: VBSL Qd, Qn, Qm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector128<float> BitwiseSelect(Vector128<float> select, Vector128<float> left, Vector128<float> right) => BitwiseSelect(select, left, right);
-
- /// <summary>
- /// uint16x8_t vbslq_u16 (uint16x8_t a, uint16x8_t b, uint16x8_t c)
- /// A32: VBSL Qd, Qn, Qm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector128<ushort> BitwiseSelect(Vector128<ushort> select, Vector128<ushort> left, Vector128<ushort> right) => BitwiseSelect(select, left, right);
-
- /// <summary>
- /// uint32x4_t vbslq_u32 (uint32x4_t a, uint32x4_t b, uint32x4_t c)
- /// A32: VBSL Qd, Qn, Qm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector128<uint> BitwiseSelect(Vector128<uint> select, Vector128<uint> left, Vector128<uint> right) => BitwiseSelect(select, left, right);
-
- /// <summary>
- /// uint64x2_t vbslq_u64 (uint64x2_t a, uint64x2_t b, uint64x2_t c)
- /// A32: VBSL Qd, Qn, Qm
- /// A64: BSL Vd, Vn, Vm
- /// </summary>
- public static Vector128<ulong> BitwiseSelect(Vector128<ulong> select, Vector128<ulong> left, Vector128<ulong> right) => BitwiseSelect(select, left, right);
-
- /// <summary>
- /// int8x8_t vcls_s8 (int8x8_t a)
- /// A32: VCLS Dd, Dm
- /// A64: CLS Vd, Vn
- /// </summary>
- public static Vector64<sbyte> LeadingSignCount(Vector64<sbyte> value) => LeadingSignCount(value);
-
- /// <summary>
- /// int16x4_t vcls_s16 (int16x4_t a)
- /// A32: VCLS Dd, Dm
- /// A64: CLS Vd, Vn
- /// </summary>
- public static Vector64<short> LeadingSignCount(Vector64<short> value) => LeadingSignCount(value);
-
- /// <summary>
- /// int32x2_t vcls_s32 (int32x2_t a)
- /// A32: VCLS Dd, Dm
- /// A64: CLS Vd, Vn
- /// </summary>
- public static Vector64<int> LeadingSignCount(Vector64<int> value) => LeadingSignCount(value);
-
- /// <summary>
- /// int8x16_t vclsq_s8 (int8x16_t a)
- /// A32: VCLS Qd, Qm
- /// A64: CLS Vd, Vn
- /// </summary>
- public static Vector128<sbyte> LeadingSignCount(Vector128<sbyte> value) => LeadingSignCount(value);
-
- /// <summary>
- /// int16x8_t vclsq_s16 (int16x8_t a)
- /// A32: VCLS Qd, Qm
- /// A64: CLS Vd, Vn
- /// </summary>
- public static Vector128<short> LeadingSignCount(Vector128<short> value) => LeadingSignCount(value);
-
- /// <summary>
- /// int32x4_t vclsq_s32 (int32x4_t a)
- /// A32: VCLS Qd, Qm
- /// A64: CLS Vd, Vn
- /// </summary>
- public static Vector128<int> LeadingSignCount(Vector128<int> value) => LeadingSignCount(value);
-
- /// <summary>
- /// int8x8_t vclz_s8 (int8x8_t a)
- /// A32: VCLZ Dd, Dm
- /// A64: CLZ Vd, Vn
- /// </summary>
- public static Vector64<sbyte> LeadingZeroCount(Vector64<sbyte> value) => LeadingZeroCount(value);
-
- /// <summary>
- /// uint8x8_t vclz_u8 (uint8x8_t a)
- /// A32: VCLZ Dd, Dm
- /// A64: CLZ Vd, Vn
- /// </summary>
- public static Vector64<byte> LeadingZeroCount(Vector64<byte> value) => LeadingZeroCount(value);
-
- /// <summary>
- /// int16x4_t vclz_s16 (int16x4_t a)
- /// A32: VCLZ Dd, Dm
- /// A64: CLZ Vd, Vn
- /// </summary>
- public static Vector64<short> LeadingZeroCount(Vector64<short> value) => LeadingZeroCount(value);
-
- /// <summary>
- /// uint16x4_t vclz_u16 (uint16x4_t a)
- /// A32: VCLZ Dd, Dm
- /// A64: CLZ Vd, Vn
- /// </summary>
- public static Vector64<ushort> LeadingZeroCount(Vector64<ushort> value) => LeadingZeroCount(value);
-
- /// <summary>
- /// int32x2_t vclz_s32 (int32x2_t a)
- /// A32: VCLZ Dd, Dm
- /// A64: CLZ Vd, Vn
- /// </summary>
- public static Vector64<int> LeadingZeroCount(Vector64<int> value) => LeadingZeroCount(value);
-
- /// <summary>
- /// uint32x2_t vclz_u32 (uint32x2_t a)
- /// A32: VCLZ Dd, Dm
- /// A64: CLZ Vd, Vn
- /// </summary>
- public static Vector64<uint> LeadingZeroCount(Vector64<uint> value) => LeadingZeroCount(value);
-
- /// <summary>
- /// int8x16_t vclzq_s8 (int8x16_t a)
- /// A32: VCLZ Qd, Qm
- /// A64: CLZ Vd, Vn
- /// </summary>
- public static Vector128<sbyte> LeadingZeroCount(Vector128<sbyte> value) => LeadingZeroCount(value);
-
- /// <summary>
- /// uint8x16_t vclzq_u8 (uint8x16_t a)
- /// A32: VCLZ Qd, Qm
- /// A64: CLZ Vd, Vn
- /// </summary>
- public static Vector128<byte> LeadingZeroCount(Vector128<byte> value) => LeadingZeroCount(value);
-
- /// <summary>
- /// int16x8_t vclzq_s16 (int16x8_t a)
- /// A32: VCLZ Qd, Qm
- /// A64: CLZ Vd, Vn
- /// </summary>
- public static Vector128<short> LeadingZeroCount(Vector128<short> value) => LeadingZeroCount(value);
-
- /// <summary>
- /// uint16x8_t vclzq_u16 (uint16x8_t a)
- /// A32: VCLZ Qd, Qm
- /// A64: CLZ Vd, Vn
- /// </summary>
- public static Vector128<ushort> LeadingZeroCount(Vector128<ushort> value) => LeadingZeroCount(value);
-
- /// <summary>
- /// int32x4_t vclzq_s32 (int32x4_t a)
- /// A32: VCLZ Qd, Qm
- /// A64: CLZ Vd, Vn
- /// </summary>
- public static Vector128<int> LeadingZeroCount(Vector128<int> value) => LeadingZeroCount(value);
-
- /// <summary>
- /// uint32x4_t vclzq_u32 (uint32x4_t a)
- /// A32: VCLZ Qd, Qm
- /// A64: CLZ Vd, Vn
- /// </summary>
- public static Vector128<uint> LeadingZeroCount(Vector128<uint> value) => LeadingZeroCount(value);
-
- /// <summary>
- /// uint8x8_t vld1_u8 (uint8_t const * ptr)
- /// A32: VLD1.8 Dd, [Rn]
- /// A64: LD1 Vt.8B, [Xn]
- /// </summary>
- public static unsafe Vector64<byte> LoadVector64(byte* address) => LoadVector64(address);
-
- /// <summary>
- /// int16x4_t vld1_s16 (int16_t const * ptr)
- /// A32: VLD1.16 Dd, [Rn]
- /// A64: LD1 Vt.4H, [Xn]
- /// </summary>
- public static unsafe Vector64<short> LoadVector64(short* address) => LoadVector64(address);
-
- /// <summary>
- /// int32x2_t vld1_s32 (int32_t const * ptr)
- /// A32: VLD1.32 Dd, [Rn]
- /// A64: LD1 Vt.2S, [Xn]
- /// </summary>
- public static unsafe Vector64<int> LoadVector64(int* address) => LoadVector64(address);
-
- /// <summary>
- /// int8x8_t vld1_s8 (int8_t const * ptr)
- /// A32: VLD1.8 Dd, [Rn]
- /// A64: LD1 Vt.8B, [Xn]
- /// </summary>
- public static unsafe Vector64<sbyte> LoadVector64(sbyte* address) => LoadVector64(address);
-
- /// <summary>
- /// float32x2_t vld1_f32 (float32_t const * ptr)
- /// A32: VLD1.32 Dd, [Rn]
- /// A64: LD1 Vt.2S, [Xn]
- /// </summary>
- public static unsafe Vector64<float> LoadVector64(float* address) => LoadVector64(address);
-
- /// <summary>
- /// uint16x4_t vld1_u16 (uint16_t const * ptr)
- /// A32: VLD1.16 Dd, [Rn]
- /// A64: LD1 Vt.4H, [Xn]
- /// </summary>
- public static unsafe Vector64<ushort> LoadVector64(ushort* address) => LoadVector64(address);
-
- /// <summary>
- /// uint32x2_t vld1_u32 (uint32_t const * ptr)
- /// A32: VLD1.32 Dd, [Rn]
- /// A64: LD1 Vt.2S, [Xn]
- /// </summary>
- public static unsafe Vector64<uint> LoadVector64(uint* address) => LoadVector64(address);
-
- /// <summary>
- /// uint8x16_t vld1q_u8 (uint8_t const * ptr)
- /// A32: VLD1.8 Dd, Dd+1, [Rn]
- /// A64: LD1 Vt.16B, [Xn]
- /// </summary>
- public static unsafe Vector128<byte> LoadVector128(byte* address) => LoadVector128(address);
-
- /// <summary>
- /// float64x2_t vld1q_f64 (float64_t const * ptr)
- /// A32: VLD1.64 Dd, Dd+1, [Rn]
- /// A64: LD1 Vt.2D, [Xn]
- /// </summary>
- public static unsafe Vector128<double> LoadVector128(double* address) => LoadVector128(address);
-
- /// <summary>
- /// int16x8_t vld1q_s16 (int16_t const * ptr)
- /// A32: VLD1.16 Dd, Dd+1, [Rn]
- /// A64: LD1 Vt.8H, [Xn]
- /// </summary>
- public static unsafe Vector128<short> LoadVector128(short* address) => LoadVector128(address);
-
- /// <summary>
- /// int32x4_t vld1q_s32 (int32_t const * ptr)
- /// A32: VLD1.32 Dd, Dd+1, [Rn]
- /// A64: LD1 Vt.4S, [Xn]
- /// </summary>
- public static unsafe Vector128<int> LoadVector128(int* address) => LoadVector128(address);
-
- /// <summary>
- /// int64x2_t vld1q_s64 (int64_t const * ptr)
- /// A32: VLD1.64 Dd, Dd+1, [Rn]
- /// A64: LD1 Vt.2D, [Xn]
- /// </summary>
- public static unsafe Vector128<long> LoadVector128(long* address) => LoadVector128(address);
-
- /// <summary>
- /// int8x16_t vld1q_s8 (int8_t const * ptr)
- /// A32: VLD1.8 Dd, Dd+1, [Rn]
- /// A64: LD1 Vt.16B, [Xn]
- /// </summary>
- public static unsafe Vector128<sbyte> LoadVector128(sbyte* address) => LoadVector128(address);
-
- /// <summary>
- /// float32x4_t vld1q_f32 (float32_t const * ptr)
- /// A32: VLD1.32 Dd, Dd+1, [Rn]
- /// A64: LD1 Vt.4S, [Xn]
- /// </summary>
- public static unsafe Vector128<float> LoadVector128(float* address) => LoadVector128(address);
-
- /// <summary>
- /// uint16x8_t vld1q_s16 (uint16_t const * ptr)
- /// A32: VLD1.16 Dd, Dd+1, [Rn]
- /// A64: LD1 Vt.8H, [Xn]
- /// </summary>
- public static unsafe Vector128<ushort> LoadVector128(ushort* address) => LoadVector128(address);
-
- /// <summary>
- /// uint32x4_t vld1q_s32 (uint32_t const * ptr)
- /// A32: VLD1.32 Dd, Dd+1, [Rn]
- /// A64: LD1 Vt.4S, [Xn]
- /// </summary>
- public static unsafe Vector128<uint> LoadVector128(uint* address) => LoadVector128(address);
-
- /// <summary>
- /// uint64x2_t vld1q_u64 (uint64_t const * ptr)
- /// A32: VLD1.64 Dd, Dd+1, [Rn]
- /// A64: LD1 Vt.2D, [Xn]
- /// </summary>
- public static unsafe Vector128<ulong> LoadVector128(ulong* address) => LoadVector128(address);
-
- /// <summary>
- /// uint8x8_t vmvn_u8 (uint8x8_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector64<byte> Not(Vector64<byte> value) => Not(value);
-
- // /// <summary>
- // /// float64x1_t vmvn_f64 (float64x1_t a)
- // /// A32: VMVN Dd, Dn, Dm
- // /// A64: MVN Vd, Vn, Vm
- // /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- // /// </summary>
- // public static Vector64<double> Not(Vector64<double> value) => Not(value);
-
- /// <summary>
- /// int16x4_t vmvn_s16 (int16x4_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector64<short> Not(Vector64<short> value) => Not(value);
-
- /// <summary>
- /// int32x2_t vmvn_s32(int32x2_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector64<int> Not(Vector64<int> value) => Not(value);
-
- // /// <summary>
- // /// int64x1_t vmvn_s64 (int64x1_t a)
- // /// A32: VMVN Dd, Dn, Dm
- // /// A64: MVN Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<long> Not(Vector64<long> value) => Not(value);
-
- /// <summary>
- /// int8x8_t vmvn_s8 (int8x8_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector64<sbyte> Not(Vector64<sbyte> value) => Not(value);
-
- /// <summary>
- /// float32x2_t vmvn_f32 (float32x2_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector64<float> Not(Vector64<float> value) => Not(value);
-
- /// <summary>
- /// uint16x4_t vmvn_u16 (uint16x4_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector64<ushort> Not(Vector64<ushort> value) => Not(value);
-
- /// <summary>
- /// uint32x2_t vmvn_u32 (uint32x2_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector64<uint> Not(Vector64<uint> value) => Not(value);
-
- // /// <summary>
- // /// uint64x1_t vmvn_u64 (uint64x1_t a)
- // /// A32: VMVN Dd, Dn, Dm
- // /// A64: MVN Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<ulong> Not(Vector64<ulong> value) => Not(value);
-
- /// <summary>
- /// uint8x16_t vmvn_u8 (uint8x16_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector128<byte> Not(Vector128<byte> value) => Not(value);
-
- /// <summary>
- /// float64x2_t vmvn_f64 (float64x2_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<double> Not(Vector128<double> value) => Not(value);
-
- /// <summary>
- /// int16x8_t vmvn_s16 (int16x8_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector128<short> Not(Vector128<short> value) => Not(value);
-
- /// <summary>
- /// int32x4_t vmvn_s32(int32x4_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector128<int> Not(Vector128<int> value) => Not(value);
-
- /// <summary>
- /// int64x2_t vmvn_s64 (int64x2_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector128<long> Not(Vector128<long> value) => Not(value);
-
- /// <summary>
- /// int8x16_t vmvn_s8 (int8x16_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector128<sbyte> Not(Vector128<sbyte> value) => Not(value);
-
- /// <summary>
- /// float32x4_t vmvn_f32 (float32x4_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<float> Not(Vector128<float> value) => Not(value);
-
- /// <summary>
- /// uint16x8_t vmvn_u16 (uint16x8_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector128<ushort> Not(Vector128<ushort> value) => Not(value);
-
- /// <summary>
- /// uint32x4_t vmvn_u32 (uint32x4_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector128<uint> Not(Vector128<uint> value) => Not(value);
-
- /// <summary>
- /// uint64x2_t vmvn_u64 (uint64x2_t a)
- /// A32: VMVN Dd, Dn, Dm
- /// A64: MVN Vd, Vn, Vm
- /// </summary>
- public static Vector128<ulong> Not(Vector128<ulong> value) => Not(value);
-
- /// <summary>
- /// uint8x8_t vorr_u8 (uint8x8_t a, uint8x8_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector64<byte> Or(Vector64<byte> left, Vector64<byte> right) => Or(left, right);
-
- // /// <summary>
- // /// float64x1_t vorr_f64 (float64x1_t a, float64x1_t b)
- // /// A32: VORR Dd, Dn, Dm
- // /// A64: ORR Vd, Vn, Vm
- // /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- // /// </summary>
- // public static Vector64<double> Or(Vector64<double> left, Vector64<double> right) => Or(left, right);
-
- /// <summary>
- /// int16x4_t vorr_s16 (int16x4_t a, int16x4_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector64<short> Or(Vector64<short> left, Vector64<short> right) => Or(left, right);
-
- /// <summary>
- /// int32x2_t vorr_s32(int32x2_t a, int32x2_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector64<int> Or(Vector64<int> left, Vector64<int> right) => Or(left, right);
-
- // /// <summary>
- // /// int64x1_t vorr_s64 (int64x1_t a, int64x1_t b)
- // /// A32: VORR Dd, Dn, Dm
- // /// A64: ORR Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<long> Or(Vector64<long> left, Vector64<long> right) => Or(left, right);
-
- /// <summary>
- /// int8x8_t vorr_s8 (int8x8_t a, int8x8_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector64<sbyte> Or(Vector64<sbyte> left, Vector64<sbyte> right) => Or(left, right);
-
- /// <summary>
- /// float32x2_t vorr_f32 (float32x2_t a, float32x2_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector64<float> Or(Vector64<float> left, Vector64<float> right) => Or(left, right);
-
- /// <summary>
- /// uint16x4_t vorr_u16 (uint16x4_t a, uint16x4_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector64<ushort> Or(Vector64<ushort> left, Vector64<ushort> right) => Or(left, right);
-
- /// <summary>
- /// uint32x2_t vorr_u32 (uint32x2_t a, uint32x2_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector64<uint> Or(Vector64<uint> left, Vector64<uint> right) => Or(left, right);
-
- // /// <summary>
- // /// uint64x1_t vorr_u64 (uint64x1_t a, uint64x1_t b)
- // /// A32: VORR Dd, Dn, Dm
- // /// A64: ORR Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<ulong> Or(Vector64<ulong> left, Vector64<ulong> right) => Or(left, right);
-
- /// <summary>
- /// uint8x16_t vorr_u8 (uint8x16_t a, uint8x16_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector128<byte> Or(Vector128<byte> left, Vector128<byte> right) => Or(left, right);
-
- /// <summary>
- /// float64x2_t vorr_f64 (float64x2_t a, float64x2_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<double> Or(Vector128<double> left, Vector128<double> right) => Or(left, right);
-
- /// <summary>
- /// int16x8_t vorr_s16 (int16x8_t a, int16x8_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector128<short> Or(Vector128<short> left, Vector128<short> right) => Or(left, right);
-
- /// <summary>
- /// int32x4_t vorr_s32(int32x4_t a, int32x4_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector128<int> Or(Vector128<int> left, Vector128<int> right) => Or(left, right);
-
- /// <summary>
- /// int64x2_t vorr_s64 (int64x2_t a, int64x2_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector128<long> Or(Vector128<long> left, Vector128<long> right) => Or(left, right);
-
- /// <summary>
- /// int8x16_t vorr_s8 (int8x16_t a, int8x16_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector128<sbyte> Or(Vector128<sbyte> left, Vector128<sbyte> right) => Or(left, right);
-
- /// <summary>
- /// float32x4_t vorr_f32 (float32x4_t a, float32x4_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<float> Or(Vector128<float> left, Vector128<float> right) => Or(left, right);
-
- /// <summary>
- /// uint16x8_t vorr_u16 (uint16x8_t a, uint16x8_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector128<ushort> Or(Vector128<ushort> left, Vector128<ushort> right) => Or(left, right);
-
- /// <summary>
- /// uint32x4_t vorr_u32 (uint32x4_t a, uint32x4_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector128<uint> Or(Vector128<uint> left, Vector128<uint> right) => Or(left, right);
-
- /// <summary>
- /// uint64x2_t vorr_u64 (uint64x2_t a, uint64x2_t b)
- /// A32: VORR Dd, Dn, Dm
- /// A64: ORR Vd, Vn, Vm
- /// </summary>
- public static Vector128<ulong> Or(Vector128<ulong> left, Vector128<ulong> right) => Or(left, right);
-
- /// <summary>
- /// uint8x8_t vorn_u8 (uint8x8_t a, uint8x8_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector64<byte> OrNot(Vector64<byte> left, Vector64<byte> right) => OrNot(left, right);
-
- // /// <summary>
- // /// float64x1_t vorn_f64 (float64x1_t a, float64x1_t b)
- // /// A32: VORN Dd, Dn, Dm
- // /// A64: ORN Vd, Vn, Vm
- // /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- // /// </summary>
- // public static Vector64<double> OrNot(Vector64<double> left, Vector64<double> right) => OrNot(left, right);
-
- /// <summary>
- /// int16x4_t vorn_s16 (int16x4_t a, int16x4_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector64<short> OrNot(Vector64<short> left, Vector64<short> right) => OrNot(left, right);
-
- /// <summary>
- /// int32x2_t vorn_s32(int32x2_t a, int32x2_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector64<int> OrNot(Vector64<int> left, Vector64<int> right) => OrNot(left, right);
-
- // /// <summary>
- // /// int64x1_t vorn_s64 (int64x1_t a, int64x1_t b)
- // /// A32: VORN Dd, Dn, Dm
- // /// A64: ORN Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<long> OrNot(Vector64<long> left, Vector64<long> right) => OrNot(left, right);
-
- /// <summary>
- /// int8x8_t vorn_s8 (int8x8_t a, int8x8_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector64<sbyte> OrNot(Vector64<sbyte> left, Vector64<sbyte> right) => OrNot(left, right);
-
- /// <summary>
- /// float32x2_t vorn_f32 (float32x2_t a, float32x2_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector64<float> OrNot(Vector64<float> left, Vector64<float> right) => OrNot(left, right);
-
- /// <summary>
- /// uint16x4_t vorn_u16 (uint16x4_t a, uint16x4_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector64<ushort> OrNot(Vector64<ushort> left, Vector64<ushort> right) => OrNot(left, right);
-
- /// <summary>
- /// uint32x2_t vorn_u32 (uint32x2_t a, uint32x2_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector64<uint> OrNot(Vector64<uint> left, Vector64<uint> right) => OrNot(left, right);
-
- // /// <summary>
- // /// uint64x1_t vorn_u64 (uint64x1_t a, uint64x1_t b)
- // /// A32: VORN Dd, Dn, Dm
- // /// A64: ORN Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<ulong> OrNot(Vector64<ulong> left, Vector64<ulong> right) => OrNot(left, right);
-
- /// <summary>
- /// uint8x16_t vorn_u8 (uint8x16_t a, uint8x16_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector128<byte> OrNot(Vector128<byte> left, Vector128<byte> right) => OrNot(left, right);
-
- /// <summary>
- /// float64x2_t vorn_f64 (float64x2_t a, float64x2_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<double> OrNot(Vector128<double> left, Vector128<double> right) => OrNot(left, right);
-
- /// <summary>
- /// int16x8_t vorn_s16 (int16x8_t a, int16x8_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector128<short> OrNot(Vector128<short> left, Vector128<short> right) => OrNot(left, right);
-
- /// <summary>
- /// int32x4_t vorn_s32(int32x4_t a, int32x4_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector128<int> OrNot(Vector128<int> left, Vector128<int> right) => OrNot(left, right);
-
- /// <summary>
- /// int64x2_t vorn_s64 (int64x2_t a, int64x2_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector128<long> OrNot(Vector128<long> left, Vector128<long> right) => OrNot(left, right);
-
- /// <summary>
- /// int8x16_t vorn_s8 (int8x16_t a, int8x16_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector128<sbyte> OrNot(Vector128<sbyte> left, Vector128<sbyte> right) => OrNot(left, right);
-
- /// <summary>
- /// float32x4_t vorn_f32 (float32x4_t a, float32x4_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<float> OrNot(Vector128<float> left, Vector128<float> right) => OrNot(left, right);
-
- /// <summary>
- /// uint16x8_t vorn_u16 (uint16x8_t a, uint16x8_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector128<ushort> OrNot(Vector128<ushort> left, Vector128<ushort> right) => OrNot(left, right);
-
- /// <summary>
- /// uint32x4_t vorn_u32 (uint32x4_t a, uint32x4_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector128<uint> OrNot(Vector128<uint> left, Vector128<uint> right) => OrNot(left, right);
-
- /// <summary>
- /// uint64x2_t vorn_u64 (uint64x2_t a, uint64x2_t b)
- /// A32: VORN Dd, Dn, Dm
- /// A64: ORN Vd, Vn, Vm
- /// </summary>
- public static Vector128<ulong> OrNot(Vector128<ulong> left, Vector128<ulong> right) => OrNot(left, right);
-
- /// <summary>
- /// int8x8_t vcnt_s8 (int8x8_t a)
- /// A32: VCNT Dd, Dm
- /// A64: CNT Vd, Vn
- /// </summary>
- public static Vector64<sbyte> PopCount(Vector64<sbyte> value) => PopCount(value);
-
- /// <summary>
- /// uint8x8_t vcnt_u8 (uint8x8_t a)
- /// A32: VCNT Dd, Dm
- /// A64: CNT Vd, Vn
- /// </summary>
- public static Vector64<byte> PopCount(Vector64<byte> value) => PopCount(value);
-
- /// <summary>
- /// int8x16_t vcntq_s8 (int8x16_t a)
- /// A32: VCNT Qd, Qm
- /// A64: CNT Vd, Vn
- /// </summary>
- public static Vector128<sbyte> PopCount(Vector128<sbyte> value) => PopCount(value);
-
- /// <summary>
- /// uint8x16_t vcntq_u8 (uint8x16_t a)
- /// A32: VCNT Qd, Qm
- /// A64: CNT Vd, Vn
- /// </summary>
- public static Vector128<byte> PopCount(Vector128<byte> value) => PopCount(value);
-
- /// <summary>
- /// uint8x8_t vsub_u8 (uint8x8_t a, uint8x8_t b)
- /// A32: VSUB.I8 Dd, Dn, Dm
- /// A64: ADD Vd.8B, Vn.8B, Vm.8B
- /// </summary>
- public static Vector64<byte> Subtract(Vector64<byte> left, Vector64<byte> right) => Subtract(left, right);
-
- /// <summary>
- /// int16x4_t vsub_s16 (int16x4_t a, int16x4_t b)
- /// A32: VSUB.I16 Dd, Dn, Dm
- /// A64: ADD Vd.4H, Vn.4H, Vm.4H
- /// </summary>
- public static Vector64<short> Subtract(Vector64<short> left, Vector64<short> right) => Subtract(left, right);
-
- /// <summary>
- /// int32x2_t vsub_s32 (int32x2_t a, int32x2_t b)
- /// A32: VSUB.I32 Dd, Dn, Dm
- /// A64: ADD Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<int> Subtract(Vector64<int> left, Vector64<int> right) => Subtract(left, right);
-
- /// <summary>
- /// int8x8_t vsub_s8 (int8x8_t a, int8x8_t b)
- /// A32: VSUB.I8 Dd, Dn, Dm
- /// A64: ADD Vd.8B, Vn.8B, Vm.8B
- /// </summary>
- public static Vector64<sbyte> Subtract(Vector64<sbyte> left, Vector64<sbyte> right) => Subtract(left, right);
-
- /// <summary>
- /// float32x2_t vsub_f32 (float32x2_t a, float32x2_t b)
- /// A32: VSUB.F32 Dd, Dn, Dm
- /// A64: FSUB Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<float> Subtract(Vector64<float> left, Vector64<float> right) => Subtract(left, right);
-
- /// <summary>
- /// uint16x4_t vsub_u16 (uint16x4_t a, uint16x4_t b)
- /// A32: VSUB.I16 Dd, Dn, Dm
- /// A64: ADD Vd.4H, Vn.4H, Vm.4H
- /// </summary>
- public static Vector64<ushort> Subtract(Vector64<ushort> left, Vector64<ushort> right) => Subtract(left, right);
-
- /// <summary>
- /// uint32x2_t vsub_u32 (uint32x2_t a, uint32x2_t b)
- /// A32: VSUB.I32 Dd, Dn, Dm
- /// A64: ADD Vd.2S, Vn.2S, Vm.2S
- /// </summary>
- public static Vector64<uint> Subtract(Vector64<uint> left, Vector64<uint> right) => Subtract(left, right);
-
- /// <summary>
- /// uint8x16_t vsubq_u8 (uint8x16_t a, uint8x16_t b)
- /// A32: VSUB.I8 Qd, Qn, Qm
- /// A64: ADD Vd.16B, Vn.16B, Vm.16B
- /// </summary>
- public static Vector128<byte> Subtract(Vector128<byte> left, Vector128<byte> right) => Subtract(left, right);
-
- /// <summary>
- /// int16x8_t vsubq_s16 (int16x8_t a, int16x8_t b)
- /// A32: VSUB.I16 Qd, Qn, Qm
- /// A64: ADD Vd.8H, Vn.8H, Vm.8H
- /// </summary>
- public static Vector128<short> Subtract(Vector128<short> left, Vector128<short> right) => Subtract(left, right);
-
- /// <summary>
- /// int32x4_t vsubq_s32 (int32x4_t a, int32x4_t b)
- /// A32: VSUB.I32 Qd, Qn, Qm
- /// A64: ADD Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<int> Subtract(Vector128<int> left, Vector128<int> right) => Subtract(left, right);
-
- /// <summary>
- /// int64x2_t vsubq_s64 (int64x2_t a, int64x2_t b)
- /// A32: VSUB.I64 Qd, Qn, Qm
- /// A64: ADD Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<long> Subtract(Vector128<long> left, Vector128<long> right) => Subtract(left, right);
-
- /// <summary>
- /// int8x16_t vsubq_s8 (int8x16_t a, int8x16_t b)
- /// A32: VSUB.I8 Qd, Qn, Qm
- /// A64: ADD Vd.16B, Vn.16B, Vm.16B
- /// </summary>
- public static Vector128<sbyte> Subtract(Vector128<sbyte> left, Vector128<sbyte> right) => Subtract(left, right);
-
- /// <summary>
- /// float32x4_t vsubq_f32 (float32x4_t a, float32x4_t b)
- /// A32: VSUB.F32 Qd, Qn, Qm
- /// A64: FSUB Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<float> Subtract(Vector128<float> left, Vector128<float> right) => Subtract(left, right);
-
- /// <summary>
- /// uint16x8_t vsubq_u16 (uint16x8_t a, uint16x8_t b)
- /// A32: VSUB.I16 Qd, Qn, Qm
- /// A64: ADD Vd.8H, Vn.8H, Vm.8H
- /// </summary>
- public static Vector128<ushort> Subtract(Vector128<ushort> left, Vector128<ushort> right) => Subtract(left, right);
-
- /// <summary>
- /// uint32x4_t vsubq_u32 (uint32x4_t a, uint32x4_t b)
- /// A32: VSUB.I32 Qd, Qn, Qm
- /// A64: ADD Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<uint> Subtract(Vector128<uint> left, Vector128<uint> right) => Subtract(left, right);
-
- /// <summary>
- /// uint64x2_t vsubq_u64 (uint64x2_t a, uint64x2_t b)
- /// A32: VSUB.I64 Qd, Qn, Qm
- /// A64: ADD Vd.2D, Vn.2D, Vm.2D
- /// </summary>
- public static Vector128<ulong> Subtract(Vector128<ulong> left, Vector128<ulong> right) => Subtract(left, right);
-
- // /// <summary>
- // /// float64x1_t vsub_f64 (float64x1_t a, float64x1_t b)
- // /// A32: VSUB.F64 Dd, Dn, Dm
- // /// A64: FSUB Dd, Dn, Dm
- // /// </summary>
- // public static Vector64<double> SubtractScalar(Vector64<double> left, Vector64<double> right) => Subtract(left, right);
-
- // /// <summary>
- // /// int64x1_t vsub_s64 (int64x1_t a, int64x1_t b)
- // /// A32: VSUB.I64 Dd, Dn, Dm
- // /// A64: ADD Dd, Dn, Dm
- // /// </summary>
- // public static Vector64<long> SubtractScalar(Vector64<long> left, Vector64<long> right) => SubtractScalar(left, right);
-
- // /// <summary>
- // /// uint64x1_t vsub_u64 (uint64x1_t a, uint64x1_t b)
- // /// A32: VSUB.I64 Dd, Dn, Dm
- // /// A64: ADD Dd, Dn, Dm
- // /// </summary>
- // public static Vector64<ulong> SubtractScalar(Vector64<ulong> left, Vector64<ulong> right) => SubtractScalar(left, right);
-
- /// <summary>
- /// A32: VSUB.F32 Sd, Sn, Sm
- /// A64:
- /// </summary>
- public static Vector64<float> SubtractScalar(Vector64<float> left, Vector64<float> right) => SubtractScalar(left, right);
-
- /// <summary>
- /// uint8x8_t veor_u8 (uint8x8_t a, uint8x8_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector64<byte> Xor(Vector64<byte> left, Vector64<byte> right) => Xor(left, right);
-
- // /// <summary>
- // /// float64x1_t veor_f64 (float64x1_t a, float64x1_t b)
- // /// A32: VEOR Dd, Dn, Dm
- // /// A64: EOR Vd, Vn, Vm
- // /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- // /// </summary>
- // public static Vector64<double> Xor(Vector64<double> left, Vector64<double> right) => Xor(left, right);
-
- /// <summary>
- /// int16x4_t veor_s16 (int16x4_t a, int16x4_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector64<short> Xor(Vector64<short> left, Vector64<short> right) => Xor(left, right);
-
- /// <summary>
- /// int32x2_t veor_s32(int32x2_t a, int32x2_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector64<int> Xor(Vector64<int> left, Vector64<int> right) => Xor(left, right);
-
- // /// <summary>
- // /// int64x1_t veor_s64 (int64x1_t a, int64x1_t b)
- // /// A32: VEOR Dd, Dn, Dm
- // /// A64: EOR Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<long> Xor(Vector64<long> left, Vector64<long> right) => Xor(left, right);
-
- /// <summary>
- /// int8x8_t veor_s8 (int8x8_t a, int8x8_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector64<sbyte> Xor(Vector64<sbyte> left, Vector64<sbyte> right) => Xor(left, right);
-
- /// <summary>
- /// float32x2_t veor_f32 (float32x2_t a, float32x2_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector64<float> Xor(Vector64<float> left, Vector64<float> right) => Xor(left, right);
-
- /// <summary>
- /// uint16x4_t veor_u16 (uint16x4_t a, uint16x4_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector64<ushort> Xor(Vector64<ushort> left, Vector64<ushort> right) => Xor(left, right);
-
- /// <summary>
- /// uint32x2_t veor_u32 (uint32x2_t a, uint32x2_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector64<uint> Xor(Vector64<uint> left, Vector64<uint> right) => Xor(left, right);
-
- // /// <summary>
- // /// uint64x1_t veor_u64 (uint64x1_t a, uint64x1_t b)
- // /// A32: VEOR Dd, Dn, Dm
- // /// A64: EOR Vd, Vn, Vm
- // /// </summary>
- // public static Vector64<ulong> Xor(Vector64<ulong> left, Vector64<ulong> right) => Xor(left, right);
-
- /// <summary>
- /// uint8x16_t veor_u8 (uint8x16_t a, uint8x16_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector128<byte> Xor(Vector128<byte> left, Vector128<byte> right) => Xor(left, right);
-
- /// <summary>
- /// float64x2_t veor_f64 (float64x2_t a, float64x2_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<double> Xor(Vector128<double> left, Vector128<double> right) => Xor(left, right);
-
- /// <summary>
- /// int16x8_t veor_s16 (int16x8_t a, int16x8_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector128<short> Xor(Vector128<short> left, Vector128<short> right) => Xor(left, right);
-
- /// <summary>
- /// int32x4_t veor_s32(int32x4_t a, int32x4_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector128<int> Xor(Vector128<int> left, Vector128<int> right) => Xor(left, right);
-
- /// <summary>
- /// int64x2_t veor_s64 (int64x2_t a, int64x2_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector128<long> Xor(Vector128<long> left, Vector128<long> right) => Xor(left, right);
-
- /// <summary>
- /// int8x16_t veor_s8 (int8x16_t a, int8x16_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector128<sbyte> Xor(Vector128<sbyte> left, Vector128<sbyte> right) => Xor(left, right);
-
- /// <summary>
- /// float32x4_t veor_f32 (float32x4_t a, float32x4_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<float> Xor(Vector128<float> left, Vector128<float> right) => Xor(left, right);
-
- /// <summary>
- /// uint16x8_t veor_u16 (uint16x8_t a, uint16x8_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector128<ushort> Xor(Vector128<ushort> left, Vector128<ushort> right) => Xor(left, right);
-
- /// <summary>
- /// uint32x4_t veor_u32 (uint32x4_t a, uint32x4_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector128<uint> Xor(Vector128<uint> left, Vector128<uint> right) => Xor(left, right);
-
- /// <summary>
- /// uint64x2_t veor_u64 (uint64x2_t a, uint64x2_t b)
- /// A32: VEOR Dd, Dn, Dm
- /// A64: EOR Vd, Vn, Vm
- /// </summary>
- public static Vector128<ulong> Xor(Vector128<ulong> left, Vector128<ulong> right) => Xor(left, right);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Aes.PlatformNotSupported.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Aes.PlatformNotSupported.cs
deleted file mode 100644
index 8f62ae5fcbc..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Aes.PlatformNotSupported.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-// 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.
-
-#pragma warning disable IDE0060 // unused parameters
-using System.Runtime.CompilerServices;
-
-namespace System.Runtime.Intrinsics.Arm
-{
- /// <summary>
- /// This class provides access to the ARM AES hardware instructions via intrinsics
- /// </summary>
- [CLSCompliant(false)]
- public abstract class Aes : ArmBase
- {
- internal Aes() { }
-
- public static new bool IsSupported { [Intrinsic] get => false; }
-
- /// <summary>
- /// uint8x16_t vaesdq_u8 (uint8x16_t data, uint8x16_t key)
- /// A32: AESD.8 Qd, Qm
- /// A64: AESD Vd.16B, Vn.16B
- /// </summary>
- public static Vector128<byte> Decrypt(Vector128<byte> value, Vector128<byte> roundKey) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x16_t vaeseq_u8 (uint8x16_t data, uint8x16_t key)
- /// A32: AESE.8 Qd, Qm
- /// A64: AESE Vd.16B, Vn.16B
- /// </summary>
- public static Vector128<byte> Encrypt(Vector128<byte> value, Vector128<byte> roundKey) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x16_t vaesimcq_u8 (uint8x16_t data)
- /// A32: AESIMC.8 Qd, Qm
- /// A64: AESIMC Vd.16B, Vn.16B
- /// </summary>
- public static Vector128<byte> InverseMixColumns(Vector128<byte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint8x16_t vaesmcq_u8 (uint8x16_t data)
- /// A32: AESMC.8 Qd, Qm
- /// A64: AESMC V>.16B, Vn.16B
- /// </summary>
- public static Vector128<byte> MixColumns(Vector128<byte> value) { throw new PlatformNotSupportedException(); }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Aes.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Aes.cs
deleted file mode 100644
index fb0a1c63975..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Aes.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-// 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.Runtime.Intrinsics.Arm
-{
- /// <summary>
- /// This class provides access to the ARM AES hardware instructions via intrinsics
- /// </summary>
- [Intrinsic]
- [CLSCompliant(false)]
- public abstract class Aes : ArmBase
- {
- internal Aes() { }
-
- public static new bool IsSupported { get => IsSupported; }
-
- /// <summary>
- /// uint8x16_t vaesdq_u8 (uint8x16_t data, uint8x16_t key)
- /// A32: AESD.8 Qd, Qm
- /// A64: AESD Vd.16B, Vn.16B
- /// </summary>
- public static Vector128<byte> Decrypt(Vector128<byte> value, Vector128<byte> roundKey) => Decrypt(value, roundKey);
-
- /// <summary>
- /// uint8x16_t vaeseq_u8 (uint8x16_t data, uint8x16_t key)
- /// A32: AESE.8 Qd, Qm
- /// A64: AESE Vd.16B, Vn.16B
- /// </summary>
- public static Vector128<byte> Encrypt(Vector128<byte> value, Vector128<byte> roundKey) => Encrypt(value, roundKey);
-
- /// <summary>
- /// uint8x16_t vaesimcq_u8 (uint8x16_t data)
- /// A32: AESIMC.8 Qd, Qm
- /// A64: AESIMC Vd.16B, Vn.16B
- /// </summary>
- public static Vector128<byte> InverseMixColumns(Vector128<byte> value) => InverseMixColumns(value);
-
- /// <summary>
- /// uint8x16_t vaesmcq_u8 (uint8x16_t data)
- /// A32: AESMC.8 Qd, Qm
- /// A64: AESMC V>.16B, Vn.16B
- /// </summary>
- public static Vector128<byte> MixColumns(Vector128<byte> value) => MixColumns(value);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/ArmBase.PlatformNotSupported.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/ArmBase.PlatformNotSupported.cs
deleted file mode 100644
index 855c41bd9fc..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/ArmBase.PlatformNotSupported.cs
+++ /dev/null
@@ -1,81 +0,0 @@
-// 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.
-
-#pragma warning disable IDE0060 // unused parameters
-using System.Runtime.CompilerServices;
-
-namespace System.Runtime.Intrinsics.Arm
-{
- /// <summary>
- /// This class provides access to the ARM base hardware instructions via intrinsics
- /// </summary>
- [CLSCompliant(false)]
- public abstract class ArmBase
- {
- internal ArmBase() { }
-
- public static bool IsSupported { [Intrinsic] get => false; }
-
- public abstract class Arm64
- {
- internal Arm64() { }
-
- public static bool IsSupported { [Intrinsic] get => false; }
-
- /// <summary>
- /// A64: CLS Wd, Wn
- /// </summary>
- public static int LeadingSignCount(int value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// A64: CLS Xd, Xn
- /// </summary>
- public static int LeadingSignCount(long value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// A64: CLZ Xd, Xn
- /// </summary>
- public static int LeadingZeroCount(long value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// A64: CLZ Xd, Xn
- /// </summary>
- public static int LeadingZeroCount(ulong value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// A64: RBIT Xd, Xn
- /// </summary>
- public static long ReverseElementBits(long value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// A64: RBIT Xd, Xn
- /// </summary>
- public static ulong ReverseElementBits(ulong value) { throw new PlatformNotSupportedException(); }
- }
-
- /// <summary>
- /// A32: CLZ Rd, Rm
- /// A64: CLZ Wd, Wn
- /// </summary>
- public static int LeadingZeroCount(int value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// A32: CLZ Rd, Rm
- /// A64: CLZ Wd, Wn
- /// </summary>
- public static int LeadingZeroCount(uint value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// A32: RBIT Rd, Rm
- /// A64: RBIT Wd, Wn
- /// </summary>
- public static int ReverseElementBits(int value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// A32: RBIT Rd, Rm
- /// A64: RBIT Wd, Wn
- /// </summary>
- public static uint ReverseElementBits(uint value) { throw new PlatformNotSupportedException(); }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/ArmBase.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/ArmBase.cs
deleted file mode 100644
index 11e2221e2a2..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/ArmBase.cs
+++ /dev/null
@@ -1,82 +0,0 @@
-// 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.Runtime.Intrinsics.Arm
-{
- /// <summary>
- /// This class provides access to the ARM base hardware instructions via intrinsics
- /// </summary>
- [Intrinsic]
- [CLSCompliant(false)]
- public abstract class ArmBase
- {
- internal ArmBase() { }
-
- public static bool IsSupported { get => IsSupported; }
-
- [Intrinsic]
- public abstract class Arm64
- {
- internal Arm64() { }
-
- public static bool IsSupported { get => IsSupported; }
-
- /// <summary>
- /// A64: CLS Wd, Wn
- /// </summary>
- public static int LeadingSignCount(int value) => LeadingSignCount(value);
-
- /// <summary>
- /// A64: CLS Xd, Xn
- /// </summary>
- public static int LeadingSignCount(long value) => LeadingSignCount(value);
-
- /// <summary>
- /// A64: CLZ Xd, Xn
- /// </summary>
- public static int LeadingZeroCount(long value) => LeadingZeroCount(value);
-
- /// <summary>
- /// A64: CLZ Xd, Xn
- /// </summary>
- public static int LeadingZeroCount(ulong value) => LeadingZeroCount(value);
-
- /// <summary>
- /// A64: RBIT Xd, Xn
- /// </summary>
- public static long ReverseElementBits(long value) => ReverseElementBits(value);
-
- /// <summary>
- /// A64: RBIT Xd, Xn
- /// </summary>
- public static ulong ReverseElementBits(ulong value) => ReverseElementBits(value);
- }
-
- /// <summary>
- /// A32: CLZ Rd, Rm
- /// A64: CLZ Wd, Wn
- /// </summary>
- public static int LeadingZeroCount(int value) => LeadingZeroCount(value);
-
- /// <summary>
- /// A32: CLZ Rd, Rm
- /// A64: CLZ Wd, Wn
- /// </summary>
- public static int LeadingZeroCount(uint value) => LeadingZeroCount(value);
-
- /// <summary>
- /// A32: RBIT Rd, Rm
- /// A64: RBIT Wd, Wn
- /// </summary>
- public static int ReverseElementBits(int value) => ReverseElementBits(value);
-
- /// <summary>
- /// A32: RBIT Rd, Rm
- /// A64: RBIT Wd, Wn
- /// </summary>
- public static uint ReverseElementBits(uint value) => ReverseElementBits(value);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Crc32.PlatformNotSupported.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Crc32.PlatformNotSupported.cs
deleted file mode 100644
index 36aa42e8160..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Crc32.PlatformNotSupported.cs
+++ /dev/null
@@ -1,82 +0,0 @@
-// 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.Runtime.Intrinsics.Arm
-{
- /// <summary>
- /// This class provides access to the ARM Crc32 hardware instructions via intrinsics
- /// </summary>
- [Intrinsic]
- [CLSCompliant(false)]
- public abstract class Crc32 : ArmBase
- {
- internal Crc32() { }
-
- public static new bool IsSupported { [Intrinsic] get { return false; } }
-
- [Intrinsic]
- public new abstract class Arm64 : ArmBase.Arm64
- {
- internal Arm64() { }
-
- public static new bool IsSupported { [Intrinsic] get { return false; } }
-
- /// <summary>
- /// uint32_t __crc32d (uint32_t a, uint64_t b)
- /// A64: CRC32X Wd, Wn, Xm
- /// </summary>
- public static uint ComputeCrc32(uint crc, ulong data) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32_t __crc32cd (uint32_t a, uint64_t b)
- /// A64: CRC32CX Wd, Wn, Xm
- /// </summary>
- public static uint ComputeCrc32C(uint crc, ulong data) { throw new PlatformNotSupportedException(); }
- }
-
- /// <summary>
- /// uint32_t __crc32b (uint32_t a, uint8_t b)
- /// A32: CRC32B Rd, Rn, Rm
- /// A64: CRC32B Wd, Wn, Wm
- /// </summary>
- public static uint ComputeCrc32(uint crc, byte data) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32_t __crc32h (uint32_t a, uint16_t b)
- /// A32: CRC32H Rd, Rn, Rm
- /// A64: CRC32H Wd, Wn, Wm
- /// </summary>
- public static uint ComputeCrc32(uint crc, ushort data) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32_t __crc32w (uint32_t a, uint32_t b)
- /// A32: CRC32W Rd, Rn, Rm
- /// A64: CRC32W Wd, Wn, Wm
- /// </summary>
- public static uint ComputeCrc32(uint crc, uint data) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32_t __crc32cb (uint32_t a, uint8_t b)
- /// A32: CRC32CB Rd, Rn, Rm
- /// A64: CRC32CB Wd, Wn, Wm
- /// </summary>
- public static uint ComputeCrc32C(uint crc, byte data) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32_t __crc32ch (uint32_t a, uint16_t b)
- /// A32: CRC32CH Rd, Rn, Rm
- /// A64: CRC32CH Wd, Wn, Wm
- /// </summary>
- public static uint ComputeCrc32C(uint crc, ushort data) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32_t __crc32cw (uint32_t a, uint32_t b)
- /// A32: CRC32CW Rd, Rn, Rm
- /// A64: CRC32CW Wd, Wn, Wm
- /// </summary>
- public static uint ComputeCrc32C(uint crc, uint data) { throw new PlatformNotSupportedException(); }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Crc32.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Crc32.cs
deleted file mode 100644
index 8d5684c08cf..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Crc32.cs
+++ /dev/null
@@ -1,82 +0,0 @@
-// 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.Runtime.Intrinsics.Arm
-{
- /// <summary>
- /// This class provides access to the ARM Crc32 hardware instructions via intrinsics
- /// </summary>
- [Intrinsic]
- [CLSCompliant(false)]
- public abstract class Crc32 : ArmBase
- {
- internal Crc32() { }
-
- public static new bool IsSupported { get => IsSupported; }
-
- [Intrinsic]
- public new abstract class Arm64 : ArmBase.Arm64
- {
- internal Arm64() { }
-
- public static new bool IsSupported { get => IsSupported; }
-
- /// <summary>
- /// uint32_t __crc32d (uint32_t a, uint64_t b)
- /// A64: CRC32X Wd, Wn, Xm
- /// </summary>
- public static uint ComputeCrc32(uint crc, ulong data) => ComputeCrc32(crc, data);
-
- /// <summary>
- /// uint32_t __crc32cd (uint32_t a, uint64_t b)
- /// A64: CRC32CX Wd, Wn, Xm
- /// </summary>
- public static uint ComputeCrc32C(uint crc, ulong data) => ComputeCrc32C(crc, data);
- }
-
- /// <summary>
- /// uint32_t __crc32b (uint32_t a, uint8_t b)
- /// A32: CRC32B Rd, Rn, Rm
- /// A64: CRC32B Wd, Wn, Wm
- /// </summary>
- public static uint ComputeCrc32(uint crc, byte data) => ComputeCrc32(crc, data);
-
- /// <summary>
- /// uint32_t __crc32h (uint32_t a, uint16_t b)
- /// A32: CRC32H Rd, Rn, Rm
- /// A64: CRC32H Wd, Wn, Wm
- /// </summary>
- public static uint ComputeCrc32(uint crc, ushort data) => ComputeCrc32(crc, data);
-
- /// <summary>
- /// uint32_t __crc32w (uint32_t a, uint32_t b)
- /// A32: CRC32W Rd, Rn, Rm
- /// A64: CRC32W Wd, Wn, Wm
- /// </summary>
- public static uint ComputeCrc32(uint crc, uint data) => ComputeCrc32(crc, data);
-
- /// <summary>
- /// uint32_t __crc32cb (uint32_t a, uint8_t b)
- /// A32: CRC32CB Rd, Rn, Rm
- /// A64: CRC32CB Wd, Wn, Wm
- /// </summary>
- public static uint ComputeCrc32C(uint crc, byte data) => ComputeCrc32C(crc, data);
-
- /// <summary>
- /// uint32_t __crc32ch (uint32_t a, uint16_t b)
- /// A32: CRC32CH Rd, Rn, Rm
- /// A64: CRC32CH Wd, Wn, Wm
- /// </summary>
- public static uint ComputeCrc32C(uint crc, ushort data) => ComputeCrc32C(crc, data);
-
- /// <summary>
- /// uint32_t __crc32cw (uint32_t a, uint32_t b)
- /// A32: CRC32CW Rd, Rn, Rm
- /// A64: CRC32CW Wd, Wn, Wm
- /// </summary>
- public static uint ComputeCrc32C(uint crc, uint data) => ComputeCrc32C(crc, data);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Sha1.PlatformNotSupported.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Sha1.PlatformNotSupported.cs
deleted file mode 100644
index 685000e4071..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Sha1.PlatformNotSupported.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-// 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.
-
-#pragma warning disable IDE0060 // unused parameters
-using System.Runtime.CompilerServices;
-
-namespace System.Runtime.Intrinsics.Arm
-{
- /// <summary>
- /// This class provides access to the ARM SHA1 hardware instructions via intrinsics
- /// </summary>
- [CLSCompliant(false)]
- public abstract class Sha1 : ArmBase
- {
- internal Sha1() { }
-
- public static new bool IsSupported { [Intrinsic] get => false; }
-
- /// <summary>
- /// uint32_t vsha1h_u32 (uint32_t hash_e)
- /// A32: SHA1H.32 Qd, Qm
- /// A64: SHA1H Sd, Sn
- /// </summary>
- public static uint FixedRotate(uint hash_e) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x4_t vsha1cq_u32 (uint32x4_t hash_abcd, uint32_t hash_e, uint32x4_t wk)
- /// A32: SHA1C.32 Qd, Qn, Qm
- /// A64: SHA1C Qd, Sn, Vm.4S
- /// </summary>
- public static Vector128<uint> HashUpdateChoose(Vector128<uint> hash_abcd, uint hash_e, Vector128<uint> wk) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x4_t vsha1mq_u32 (uint32x4_t hash_abcd, uint32_t hash_e, uint32x4_t wk)
- /// A32: SHA1M.32 Qd, Qn, Qm
- /// A64: SHA1M Qd, Sn, Vm.4S
- /// </summary>
- public static Vector128<uint> HashUpdateMajority(Vector128<uint> hash_abcd, uint hash_e, Vector128<uint> wk) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x4_t vsha1pq_u32 (uint32x4_t hash_abcd, uint32_t hash_e, uint32x4_t wk)
- /// A32: SHA1P.32 Qd, Qn, Qm
- /// A64: SHA1P Qd, Sn, Vm.4S
- /// </summary>
- public static Vector128<uint> HashUpdateParity(Vector128<uint> hash_abcd, uint hash_e, Vector128<uint> wk) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x4_t vsha1su0q_u32 (uint32x4_t w0_3, uint32x4_t w4_7, uint32x4_t w8_11)
- /// A32: SHA1SU0.32 Qd, Qn, Qm
- /// A64: SHA1SU0 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<uint> ScheduleUpdate0(Vector128<uint> w0_3, Vector128<uint> w4_7, Vector128<uint> w8_11) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x4_t vsha1su1q_u32 (uint32x4_t tw0_3, uint32x4_t w12_15)
- /// A32: SHA1SU1.32 Qd, Qm
- /// A64: SHA1SU1 Vd.4S, Vn.4S
- /// </summary>
- public static Vector128<uint> ScheduleUpdate1(Vector128<uint> tw0_3, Vector128<uint> w12_15) { throw new PlatformNotSupportedException(); }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Sha1.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Sha1.cs
deleted file mode 100644
index d4d79a3cb89..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Sha1.cs
+++ /dev/null
@@ -1,62 +0,0 @@
-// 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.Runtime.Intrinsics.Arm
-{
- /// <summary>
- /// This class provides access to the ARM SHA1 hardware instructions via intrinsics
- /// </summary>
- [Intrinsic]
- [CLSCompliant(false)]
- public abstract class Sha1 : ArmBase
- {
- internal Sha1() { }
-
- public static new bool IsSupported { get => IsSupported; }
-
- /// <summary>
- /// uint32_t vsha1h_u32 (uint32_t hash_e)
- /// A32: SHA1H.32 Qd, Qm
- /// A64: SHA1H Sd, Sn
- /// </summary>
- public static uint FixedRotate(uint hash_e) => FixedRotate(hash_e);
-
- /// <summary>
- /// uint32x4_t vsha1cq_u32 (uint32x4_t hash_abcd, uint32_t hash_e, uint32x4_t wk)
- /// A32: SHA1C.32 Qd, Qn, Qm
- /// A64: SHA1C Qd, Sn, Vm.4S
- /// </summary>
- public static Vector128<uint> HashUpdateChoose(Vector128<uint> hash_abcd, uint hash_e, Vector128<uint> wk) => HashUpdateChoose(hash_abcd, hash_e, wk);
-
- /// <summary>
- /// uint32x4_t vsha1mq_u32 (uint32x4_t hash_abcd, uint32_t hash_e, uint32x4_t wk)
- /// A32: SHA1M.32 Qd, Qn, Qm
- /// A64: SHA1M Qd, Sn, Vm.4S
- /// </summary>
- public static Vector128<uint> HashUpdateMajority(Vector128<uint> hash_abcd, uint hash_e, Vector128<uint> wk) => HashUpdateMajority(hash_abcd, hash_e, wk);
-
- /// <summary>
- /// uint32x4_t vsha1pq_u32 (uint32x4_t hash_abcd, uint32_t hash_e, uint32x4_t wk)
- /// A32: SHA1P.32 Qd, Qn, Qm
- /// A64: SHA1P Qd, Sn, Vm.4S
- /// </summary>
- public static Vector128<uint> HashUpdateParity(Vector128<uint> hash_abcd, uint hash_e, Vector128<uint> wk) => HashUpdateParity(hash_abcd, hash_e, wk);
-
- /// <summary>
- /// uint32x4_t vsha1su0q_u32 (uint32x4_t w0_3, uint32x4_t w4_7, uint32x4_t w8_11)
- /// A32: SHA1SU0.32 Qd, Qn, Qm
- /// A64: SHA1SU0 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<uint> ScheduleUpdate0(Vector128<uint> w0_3, Vector128<uint> w4_7, Vector128<uint> w8_11) => ScheduleUpdate0(w0_3, w4_7, w8_11);
-
- /// <summary>
- /// uint32x4_t vsha1su1q_u32 (uint32x4_t tw0_3, uint32x4_t w12_15)
- /// A32: SHA1SU1.32 Qd, Qm
- /// A64: SHA1SU1 Vd.4S, Vn.4S
- /// </summary>
- public static Vector128<uint> ScheduleUpdate1(Vector128<uint> tw0_3, Vector128<uint> w12_15) => ScheduleUpdate1(tw0_3, w12_15);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Sha256.PlatformNotSupported.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Sha256.PlatformNotSupported.cs
deleted file mode 100644
index 7263b568a0b..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Sha256.PlatformNotSupported.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-// 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.
-
-#pragma warning disable IDE0060 // unused parameters
-using System.Runtime.CompilerServices;
-
-namespace System.Runtime.Intrinsics.Arm
-{
- /// <summary>
- /// This class provides access to the ARM SHA256 hardware instructions via intrinsics
- /// </summary>
- [CLSCompliant(false)]
- public abstract class Sha256 : ArmBase
- {
- internal Sha256() { }
-
- public static new bool IsSupported { [Intrinsic] get => false; }
-
- /// <summary>
- /// uint32x4_t vsha256hq_u32 (uint32x4_t hash_abcd, uint32x4_t hash_efgh, uint32x4_t wk)
- /// A32: SHA256H.32 Qd, Qn, Qm
- /// A64: SHA256H Qd, Qn, Vm.4S
- /// </summary>
- public static Vector128<uint> HashUpdate1(Vector128<uint> hash_abcd, Vector128<uint> hash_efgh, Vector128<uint> wk) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x4_t vsha256h2q_u32 (uint32x4_t hash_efgh, uint32x4_t hash_abcd, uint32x4_t wk)
- /// A32: SHA256H2.32 Qd, Qn, Qm
- /// A64: SHA256H2 Qd, Qn, Vm.4S
- /// </summary>
- public static Vector128<uint> HashUpdate2(Vector128<uint> hash_efgh, Vector128<uint> hash_abcd, Vector128<uint> wk) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x4_t vsha256su0q_u32 (uint32x4_t w0_3, uint32x4_t w4_7)
- /// A32: SHA256SU0.32 Qd, Qm
- /// A64: SHA256SU0 Vd.4S, Vn.4S
- /// </summary>
- public static Vector128<uint> ScheduleUpdate0(Vector128<uint> w0_3, Vector128<uint> w4_7) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// uint32x4_t vsha256su1q_u32 (uint32x4_t w0_3, uint32x4_t w8_11, uint32x4_t w12_15)
- /// A32: SHA256SU1.32 Qd, Qn, Qm
- /// A64: SHA256SU1 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<uint> ScheduleUpdate1(Vector128<uint> w0_3, Vector128<uint> w8_11, Vector128<uint> w12_15) { throw new PlatformNotSupportedException(); }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Sha256.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Sha256.cs
deleted file mode 100644
index e57b01cb5db..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Arm/Sha256.cs
+++ /dev/null
@@ -1,48 +0,0 @@
-// 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.Runtime.Intrinsics.Arm
-{
- /// <summary>
- /// This class provides access to the ARM SHA256 hardware instructions via intrinsics
- /// </summary>
- [Intrinsic]
- [CLSCompliant(false)]
- public abstract class Sha256 : ArmBase
- {
- internal Sha256() { }
-
- public static new bool IsSupported { get => IsSupported; }
-
- /// <summary>
- /// uint32x4_t vsha256hq_u32 (uint32x4_t hash_abcd, uint32x4_t hash_efgh, uint32x4_t wk)
- /// A32: SHA256H.32 Qd, Qn, Qm
- /// A64: SHA256H Qd, Qn, Vm.4S
- /// </summary>
- public static Vector128<uint> HashUpdate1(Vector128<uint> hash_abcd, Vector128<uint> hash_efgh, Vector128<uint> wk) => HashUpdate1(hash_abcd, hash_efgh, wk);
-
- /// <summary>
- /// uint32x4_t vsha256h2q_u32 (uint32x4_t hash_efgh, uint32x4_t hash_abcd, uint32x4_t wk)
- /// A32: SHA256H2.32 Qd, Qn, Qm
- /// A64: SHA256H2 Qd, Qn, Vm.4S
- /// </summary>
- public static Vector128<uint> HashUpdate2(Vector128<uint> hash_efgh, Vector128<uint> hash_abcd, Vector128<uint> wk) => HashUpdate2(hash_efgh, hash_abcd, wk);
-
- /// <summary>
- /// uint32x4_t vsha256su0q_u32 (uint32x4_t w0_3, uint32x4_t w4_7)
- /// A32: SHA256SU0.32 Qd, Qm
- /// A64: SHA256SU0 Vd.4S, Vn.4S
- /// </summary>
- public static Vector128<uint> ScheduleUpdate0(Vector128<uint> w0_3, Vector128<uint> w4_7) => ScheduleUpdate0(w0_3, w4_7);
-
- /// <summary>
- /// uint32x4_t vsha256su1q_u32 (uint32x4_t w0_3, uint32x4_t w8_11, uint32x4_t w12_15)
- /// A32: SHA256SU1.32 Qd, Qn, Qm
- /// A64: SHA256SU1 Vd.4S, Vn.4S, Vm.4S
- /// </summary>
- public static Vector128<uint> ScheduleUpdate1(Vector128<uint> w0_3, Vector128<uint> w8_11, Vector128<uint> w12_15) => ScheduleUpdate1(w0_3, w8_11, w12_15);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector128.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector128.cs
deleted file mode 100644
index a3ca363f06a..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector128.cs
+++ /dev/null
@@ -1,1859 +0,0 @@
-// 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.Diagnostics;
-using System.Numerics;
-using System.Runtime.CompilerServices;
-using System.Runtime.Intrinsics.X86;
-using Internal.Runtime.CompilerServices;
-
-namespace System.Runtime.Intrinsics
-{
- // We mark certain methods with AggressiveInlining to ensure that the JIT will
- // inline them. The JIT would otherwise not inline the method since it, at the
- // point it tries to determine inline profability, currently cannot determine
- // that most of the code-paths will be optimized away as "dead code".
- //
- // We then manually inline cases (such as certain intrinsic code-paths) that
- // will generate code small enough to make the AgressiveInlining profitable. The
- // other cases (such as the software fallback) are placed in their own method.
- // This ensures we get good codegen for the "fast-path" and allows the JIT to
- // determine inline profitability of the other paths as it would normally.
-
- // Many of the instance methods were moved to be extension methods as it results
- // in overall better codegen. This is because instance methods require the C# compiler
- // to generate extra locals as the `this` parameter has to be passed by reference.
- // Having them be extension methods means that the `this` parameter can be passed by
- // value instead, thus reducing the number of locals and helping prevent us from hitting
- // the internal inlining limits of the JIT.
-
- public static class Vector128
- {
- internal const int Size = 16;
-
- /// <summary>Reinterprets a <see cref="Vector128{T}" /> as a new <see cref="Vector128{U}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <typeparam name="U">The type of the vector <paramref name="vector" /> should be reinterpreted as.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector128{U}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) or the type of the target (<typeparamref name="U" />) is not supported.</exception>
- [Intrinsic]
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static Vector128<U> As<T, U>(this Vector128<T> vector)
- where T : struct
- where U : struct
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
- ThrowHelper.ThrowForUnsupportedVectorBaseType<U>();
- return Unsafe.As<Vector128<T>, Vector128<U>>(ref vector);
- }
-
- /// <summary>Reinterprets a <see cref="Vector128{T}" /> as a new <see cref="Vector128{Byte}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector128{Byte}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- public static Vector128<byte> AsByte<T>(this Vector128<T> vector)
- where T : struct
- {
- return vector.As<T, byte>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector128{T}" /> as a new <see cref="Vector128{Double}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector128{Double}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- public static Vector128<double> AsDouble<T>(this Vector128<T> vector)
- where T : struct
- {
- return vector.As<T, double>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector128{T}" /> as a new <see cref="Vector128{Int16}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector128{Int16}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- public static Vector128<short> AsInt16<T>(this Vector128<T> vector)
- where T : struct
- {
- return vector.As<T, short>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector128{T}" /> as a new <see cref="Vector128{Int32}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector128{Int32}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- public static Vector128<int> AsInt32<T>(this Vector128<T> vector)
- where T : struct
- {
- return vector.As<T, int>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector128{T}" /> as a new <see cref="Vector128{Int64}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector128{Int64}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- public static Vector128<long> AsInt64<T>(this Vector128<T> vector)
- where T : struct
- {
- return vector.As<T, long>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector128{T}" /> as a new <see cref="Vector128{SByte}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector128{SByte}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- [CLSCompliant(false)]
- public static Vector128<sbyte> AsSByte<T>(this Vector128<T> vector)
- where T : struct
- {
- return vector.As<T, sbyte>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector128{T}" /> as a new <see cref="Vector128{Single}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector128{Single}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- public static Vector128<float> AsSingle<T>(this Vector128<T> vector)
- where T : struct
- {
- return vector.As<T, float>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector128{T}" /> as a new <see cref="Vector128{UInt16}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector128{UInt16}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- [CLSCompliant(false)]
- public static Vector128<ushort> AsUInt16<T>(this Vector128<T> vector)
- where T : struct
- {
- return vector.As<T, ushort>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector128{T}" /> as a new <see cref="Vector128{UInt32}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector128{UInt32}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- [CLSCompliant(false)]
- public static Vector128<uint> AsUInt32<T>(this Vector128<T> vector)
- where T : struct
- {
- return vector.As<T, uint>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector128{T}" /> as a new <see cref="Vector128{UInt64}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector128{UInt64}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- [CLSCompliant(false)]
- public static Vector128<ulong> AsUInt64<T>(this Vector128<T> vector)
- where T : struct
- {
- return vector.As<T, ulong>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector2" /> as a new <see cref="Vector128{Single}" />.</summary>
- /// <param name="value">The vector to reinterpret.</param>
- /// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector128{Single}" />.</returns>
- public static Vector128<float> AsVector128(this Vector2 value)
- {
- return new Vector4(value, 0.0f, 0.0f).AsVector128();
- }
-
- /// <summary>Reinterprets a <see cref="Vector3" /> as a new <see cref="Vector128{Single}" />.</summary>
- /// <param name="value">The vector to reinterpret.</param>
- /// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector128{Single}" />.</returns>
- public static Vector128<float> AsVector128(this Vector3 value)
- {
- return new Vector4(value, 0.0f).AsVector128();
- }
-
- /// <summary>Reinterprets a <see cref="Vector4" /> as a new <see cref="Vector128{Single}" />.</summary>
- /// <param name="value">The vector to reinterpret.</param>
- /// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector128{Single}" />.</returns>
- public static Vector128<float> AsVector128(this Vector4 value)
- {
- return Unsafe.As<Vector4, Vector128<float>>(ref value);
- }
-
- /// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see cref="Vector128{T}" />.</summary>
- /// <typeparam name="T">The type of the vectors.</typeparam>
- /// <param name="value">The vector to reinterpret.</param>
- /// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector128{T}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="value" /> (<typeparamref name="T" />) is not supported.</exception>
- public static Vector128<T> AsVector128<T>(this Vector<T> value)
- where T : struct
- {
- Debug.Assert(Vector<T>.Count >= Vector128<T>.Count);
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
- return Unsafe.As<Vector<T>, Vector128<T>>(ref value);
- }
-
- /// <summary>Reinterprets a <see cref="Vector128{Single}" /> as a new <see cref="Vector2" />.</summary>
- /// <param name="value">The vector to reinterpret.</param>
- /// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector2" />.</returns>
- public static Vector2 AsVector2(this Vector128<float> value)
- {
- return Unsafe.As<Vector128<float>, Vector2>(ref value);
- }
-
- /// <summary>Reinterprets a <see cref="Vector128{Single}" /> as a new <see cref="Vector3" />.</summary>
- /// <param name="value">The vector to reinterpret.</param>
- /// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector3" />.</returns>
- public static Vector3 AsVector3(this Vector128<float> value)
- {
- return Unsafe.As<Vector128<float>, Vector3>(ref value);
- }
-
- /// <summary>Reinterprets a <see cref="Vector128{Single}" /> as a new <see cref="Vector4" />.</summary>
- /// <param name="value">The vector to reinterpret.</param>
- /// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector4" />.</returns>
- public static Vector4 AsVector4(this Vector128<float> value)
- {
- return Unsafe.As<Vector128<float>, Vector4>(ref value);
- }
-
- /// <summary>Reinterprets a <see cref="Vector128{T}" /> as a new <see cref="Vector{T}" />.</summary>
- /// <typeparam name="T">The type of the vectors.</typeparam>
- /// <param name="value">The vector to reinterpret.</param>
- /// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector{T}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="value" /> (<typeparamref name="T" />) is not supported.</exception>
- public static Vector<T> AsVector<T>(this Vector128<T> value)
- where T : struct
- {
- Debug.Assert(Vector<T>.Count >= Vector128<T>.Count);
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- Vector<T> result = default;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector<T>, byte>(ref result), value);
- return result;
- }
-
- /// <summary>Creates a new <see cref="Vector128{Byte}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Byte}" /> with all elements initialized to <paramref name="value" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector128<byte> Create(byte value)
- {
- if (Avx2.IsSupported)
- {
- Vector128<byte> result = CreateScalarUnsafe(value); // < v, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? >
- return Avx2.BroadcastScalarToVector128(result); // < v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v >
- }
-
- if (Ssse3.IsSupported)
- {
- Vector128<byte> result = CreateScalarUnsafe(value); // < v, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? >
- return Ssse3.Shuffle(result, Vector128<byte>.Zero); // < v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v >
- }
-
- if (Sse2.IsSupported)
- {
- // We first unpack as bytes to duplicate value into the lower 2 bytes, then we treat it as a ushort and unpack again to duplicate those
- // bits into the lower 2 words, we can finally treat it as a uint and shuffle the lower dword to duplicate value across the entire result
-
- Vector128<byte> result = CreateScalarUnsafe(value); // < v, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? >
- result = Sse2.UnpackLow(result, result); // < v, v, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? >
- result = Sse2.UnpackLow(result.AsUInt16(), result.AsUInt16()).AsByte(); // < v, v, v, v, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? >
- return Sse2.Shuffle(result.AsUInt32(), 0x00).AsByte(); // < v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v >
- }
-
- return SoftwareFallback(value);
-
- static Vector128<byte> SoftwareFallback(byte value)
- {
- byte* pResult = stackalloc byte[16]
- {
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector128<byte>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{Double}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Double}" /> with all elements initialized to <paramref name="value" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector128<double> Create(double value)
- {
- if (Sse3.IsSupported)
- {
- Vector128<double> result = CreateScalarUnsafe(value); // < v, ? >
- return Sse3.MoveAndDuplicate(result); // < v, v >
- }
-
- if (Sse2.IsSupported)
- {
- // Treating the value as a set of singles and emitting MoveLowToHigh is more efficient than dealing with the elements directly as double
- // However, we still need to check if Sse2 is supported since CreateScalarUnsafe needs it to for movsd, when value is not already in register
-
- Vector128<double> result = CreateScalarUnsafe(value); // < v, ? >
- return Sse.MoveLowToHigh(result.AsSingle(), result.AsSingle()).AsDouble(); // < v, v >
- }
-
- return SoftwareFallback(value);
-
- static Vector128<double> SoftwareFallback(double value)
- {
- double* pResult = stackalloc double[2]
- {
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector128<double>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{Int16}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Int16}" /> with all elements initialized to <paramref name="value" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector128<short> Create(short value)
- {
- if (Avx2.IsSupported)
- {
- Vector128<short> result = CreateScalarUnsafe(value); // < v, ?, ?, ?, ?, ?, ?, ? >
- return Avx2.BroadcastScalarToVector128(result); // < v, v, v, v, v, v, v, v >
- }
-
- if (Sse2.IsSupported)
- {
- // We first unpack as ushort to duplicate value into the lower 2 words, then we can treat it as a uint and shuffle the lower dword to
- // duplicate value across the entire result
-
- Vector128<short> result = CreateScalarUnsafe(value); // < v, ?, ?, ?, ?, ?, ?, ? >
- result = Sse2.UnpackLow(result, result); // < v, v, ?, ?, ?, ?, ?, ? >
- return Sse2.Shuffle(result.AsInt32(), 0x00).AsInt16(); // < v, v, v, v, v, v, v, v >
- }
-
- return SoftwareFallback(value);
-
- static Vector128<short> SoftwareFallback(short value)
- {
- short* pResult = stackalloc short[8]
- {
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector128<short>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{Int32}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Int32}" /> with all elements initialized to <paramref name="value" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector128<int> Create(int value)
- {
- if (Avx2.IsSupported)
- {
- Vector128<int> result = CreateScalarUnsafe(value); // < v, ?, ?, ? >
- return Avx2.BroadcastScalarToVector128(result); // < v, v, v, v >
- }
-
- if (Sse2.IsSupported)
- {
- Vector128<int> result = CreateScalarUnsafe(value); // < v, ?, ?, ? >
- return Sse2.Shuffle(result, 0x00); // < v, v, v, v >
- }
-
- return SoftwareFallback(value);
-
- static Vector128<int> SoftwareFallback(int value)
- {
- int* pResult = stackalloc int[4]
- {
- value,
- value,
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector128<int>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{Int64}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Int64}" /> with all elements initialized to <paramref name="value" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector128<long> Create(long value)
- {
- if (Sse2.X64.IsSupported)
- {
- if (Avx2.IsSupported)
- {
- Vector128<long> result = CreateScalarUnsafe(value); // < v, ? >
- return Avx2.BroadcastScalarToVector128(result); // < v, v >
- }
- else
- {
- Vector128<long> result = CreateScalarUnsafe(value); // < v, ? >
- return Sse2.UnpackLow(result, result); // < v, v >
- }
- }
-
- return SoftwareFallback(value);
-
- static Vector128<long> SoftwareFallback(long value)
- {
- long* pResult = stackalloc long[2]
- {
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector128<long>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{SByte}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{SByte}" /> with all elements initialized to <paramref name="value" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector128<sbyte> Create(sbyte value)
- {
- if (Avx2.IsSupported)
- {
- Vector128<sbyte> result = CreateScalarUnsafe(value); // < v, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? >
- return Avx2.BroadcastScalarToVector128(result); // < v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v >
- }
-
- if (Ssse3.IsSupported)
- {
- Vector128<sbyte> result = CreateScalarUnsafe(value); // < v, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? >
- return Ssse3.Shuffle(result, Vector128<sbyte>.Zero); // < v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v >
- }
-
- if (Sse2.IsSupported)
- {
- // We first unpack as bytes to duplicate value into the lower 2 bytes, then we treat it as a ushort and unpack again to duplicate those
- // bits into the lower 2 words, we can finally treat it as a uint and shuffle the lower dword to duplicate value across the entire result
-
- Vector128<sbyte> result = CreateScalarUnsafe(value); // < v, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? >
- result = Sse2.UnpackLow(result, result); // < v, v, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? >
- result = Sse2.UnpackLow(result.AsInt16(), result.AsInt16()).AsSByte(); // < v, v, v, v, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? >
- return Sse2.Shuffle(result.AsInt32(), 0x00).AsSByte(); // < v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v >
- }
-
- return SoftwareFallback(value);
-
- static Vector128<sbyte> SoftwareFallback(sbyte value)
- {
- sbyte* pResult = stackalloc sbyte[16]
- {
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector128<sbyte>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{Single}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Single}" /> with all elements initialized to <paramref name="value" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector128<float> Create(float value)
- {
- if (Avx2.IsSupported)
- {
- Vector128<float> result = CreateScalarUnsafe(value); // < v, ?, ?, ? >
- return Avx2.BroadcastScalarToVector128(result); // < v, v, v, v >
- }
-
- if (Avx.IsSupported)
- {
- Vector128<float> result = CreateScalarUnsafe(value); // < v, ?, ?, ? >
- return Avx.Permute(result, 0x00); // < v, v, v, v >
- }
-
- if (Sse.IsSupported)
- {
- Vector128<float> result = CreateScalarUnsafe(value); // < v, ?, ?, ? >
- return Sse.Shuffle(result, result, 0x00); // < v, v, v, v >
- }
-
- return SoftwareFallback(value);
-
- static Vector128<float> SoftwareFallback(float value)
- {
- float* pResult = stackalloc float[4]
- {
- value,
- value,
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector128<float>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{UInt16}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{UInt16}" /> with all elements initialized to <paramref name="value" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector128<ushort> Create(ushort value)
- {
- if (Avx2.IsSupported)
- {
- Vector128<ushort> result = CreateScalarUnsafe(value); // < v, ?, ?, ?, ?, ?, ?, ? >
- return Avx2.BroadcastScalarToVector128(result); // < v, v, v, v, v, v, v, v >
- }
-
- if (Sse2.IsSupported)
- {
- // We first unpack as ushort to duplicate value into the lower 2 words, then we can treat it as a uint and shuffle the lower dword to
- // duplicate value across the entire result
-
- Vector128<ushort> result = CreateScalarUnsafe(value); // < v, ?, ?, ?, ?, ?, ?, ? >
- result = Sse2.UnpackLow(result, result); // < v, v, ?, ?, ?, ?, ?, ? >
- return Sse2.Shuffle(result.AsUInt32(), 0x00).AsUInt16(); // < v, v, v, v, v, v, v, v >
- }
-
- return SoftwareFallback(value);
-
- static Vector128<ushort> SoftwareFallback(ushort value)
- {
- ushort* pResult = stackalloc ushort[8]
- {
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector128<ushort>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{UInt32}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{UInt32}" /> with all elements initialized to <paramref name="value" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector128<uint> Create(uint value)
- {
- if (Avx2.IsSupported)
- {
- Vector128<uint> result = CreateScalarUnsafe(value); // < v, ?, ?, ? >
- return Avx2.BroadcastScalarToVector128(result); // < v, v, v, v >
- }
-
- if (Sse2.IsSupported)
- {
- Vector128<uint> result = CreateScalarUnsafe(value); // < v, ?, ?, ? >
- return Sse2.Shuffle(result, 0x00); // < v, v, v, v >
- }
-
- return SoftwareFallback(value);
-
- static Vector128<uint> SoftwareFallback(uint value)
- {
- uint* pResult = stackalloc uint[4]
- {
- value,
- value,
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector128<uint>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{UInt64}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{UInt64}" /> with all elements initialized to <paramref name="value" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector128<ulong> Create(ulong value)
- {
- if (Sse2.X64.IsSupported)
- {
- if (Avx2.IsSupported)
- {
- Vector128<ulong> result = CreateScalarUnsafe(value); // < v, ? >
- return Avx2.BroadcastScalarToVector128(result); // < v, v >
- }
- else
- {
- Vector128<ulong> result = CreateScalarUnsafe(value); // < v, ? >
- return Sse2.UnpackLow(result, result); // < v, v >
- }
- }
-
- return SoftwareFallback(value);
-
- static Vector128<ulong> SoftwareFallback(ulong value)
- {
- ulong* pResult = stackalloc ulong[2]
- {
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector128<ulong>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{Byte}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <param name="e2">The value that element 2 will be initialized to.</param>
- /// <param name="e3">The value that element 3 will be initialized to.</param>
- /// <param name="e4">The value that element 4 will be initialized to.</param>
- /// <param name="e5">The value that element 5 will be initialized to.</param>
- /// <param name="e6">The value that element 6 will be initialized to.</param>
- /// <param name="e7">The value that element 7 will be initialized to.</param>
- /// <param name="e8">The value that element 8 will be initialized to.</param>
- /// <param name="e9">The value that element 9 will be initialized to.</param>
- /// <param name="e10">The value that element 10 will be initialized to.</param>
- /// <param name="e11">The value that element 11 will be initialized to.</param>
- /// <param name="e12">The value that element 12 will be initialized to.</param>
- /// <param name="e13">The value that element 13 will be initialized to.</param>
- /// <param name="e14">The value that element 14 will be initialized to.</param>
- /// <param name="e15">The value that element 15 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Byte}" /> with each element initialized to corresponding specified value.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector128<byte> Create(byte e0, byte e1, byte e2, byte e3, byte e4, byte e5, byte e6, byte e7, byte e8, byte e9, byte e10, byte e11, byte e12, byte e13, byte e14, byte e15)
- {
- if (Sse41.IsSupported)
- {
- Vector128<byte> result = CreateScalarUnsafe(e0); // < 0, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- result = Sse41.Insert(result, e1, 1); // < 0, 1, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- result = Sse41.Insert(result, e2, 2); // < 0, 1, 2, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- result = Sse41.Insert(result, e3, 3); // < 0, 1, 2, 3, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- result = Sse41.Insert(result, e4, 4); // < 0, 1, 2, 3, 4, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- result = Sse41.Insert(result, e5, 5); // < 0, 1, 2, 3, 4, 5, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- result = Sse41.Insert(result, e6, 6); // < 0, 1, 2, 3, 4, 5, 6, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- result = Sse41.Insert(result, e7, 7); // < 0, 1, 2, 3, 4, 5, 6, 7, ??, ??, ??, ??, ??, ??, ??, ?? >
- result = Sse41.Insert(result, e8, 8); // < 0, 1, 2, 3, 4, 5, 6, 7, 8, ??, ??, ??, ??, ??, ??, ?? >
- result = Sse41.Insert(result, e9, 9); // < 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ??, ??, ??, ??, ??, ?? >
- result = Sse41.Insert(result, e10, 10); // < 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ??, ??, ??, ??, ?? >
- result = Sse41.Insert(result, e11, 11); // < 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ??, ??, ??, ?? >
- result = Sse41.Insert(result, e12, 12); // < 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, ??, ??, ?? >
- result = Sse41.Insert(result, e13, 13); // < 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, ??, ?? >
- result = Sse41.Insert(result, e14, 14); // < 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, ?? >
- return Sse41.Insert(result, e15, 15); // < 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 >
- }
-
- if (Sse2.IsSupported)
- {
- // We deal with the elements in order, unpacking the ordered pairs of bytes into vectors. We then treat those vectors as ushort and
- // unpack them again, then again treating those results as uint, and a final time treating them as ulong. This efficiently gets all
- // bytes ordered into the result.
-
- Vector128<ushort> lo16, hi16;
- Vector128<uint> lo32, hi32;
- Vector128<ulong> lo64, hi64;
-
- lo16 = Sse2.UnpackLow(CreateScalarUnsafe(e0), CreateScalarUnsafe(e1)).AsUInt16(); // < 0, 1, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- hi16 = Sse2.UnpackLow(CreateScalarUnsafe(e2), CreateScalarUnsafe(e3)).AsUInt16(); // < 2, 3, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- lo32 = Sse2.UnpackLow(lo16, hi16).AsUInt32(); // < 0, 1, 2, 3, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
-
- lo16 = Sse2.UnpackLow(CreateScalarUnsafe(e4), CreateScalarUnsafe(e5)).AsUInt16(); // < 4, 5, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- hi16 = Sse2.UnpackLow(CreateScalarUnsafe(e6), CreateScalarUnsafe(e7)).AsUInt16(); // < 6, 7, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- hi32 = Sse2.UnpackLow(lo16, hi16).AsUInt32(); // < 4, 5, 6, 7, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
-
- lo64 = Sse2.UnpackLow(lo32, hi32).AsUInt64(); // < 0, 1, 2, 3, 4, 5, 6, 7, ??, ??, ??, ??, ??, ??, ??, ?? >
-
- lo16 = Sse2.UnpackLow(CreateScalarUnsafe(e8), CreateScalarUnsafe(e9)).AsUInt16(); // < 8, 9, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- hi16 = Sse2.UnpackLow(CreateScalarUnsafe(e10), CreateScalarUnsafe(e11)).AsUInt16(); // < 10, 11, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- lo32 = Sse2.UnpackLow(lo16, hi16).AsUInt32(); // < 8, 9, 10, 11, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
-
- lo16 = Sse2.UnpackLow(CreateScalarUnsafe(e12), CreateScalarUnsafe(e13)).AsUInt16(); // < 12, 13, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- hi16 = Sse2.UnpackLow(CreateScalarUnsafe(e14), CreateScalarUnsafe(e15)).AsUInt16(); // < 14, 15, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- hi32 = Sse2.UnpackLow(lo16, hi16).AsUInt32(); // < 12, 13, 14, 15, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
-
- hi64 = Sse2.UnpackLow(lo32, hi32).AsUInt64(); // < 8, 9, 10, 11, 12, 13, 14, 15, ??, ??, ??, ??, ??, ??, ??, ?? >
-
- return Sse2.UnpackLow(lo64, hi64).AsByte(); // < 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 >
- }
-
- return SoftwareFallback(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15);
-
- static Vector128<byte> SoftwareFallback(byte e0, byte e1, byte e2, byte e3, byte e4, byte e5, byte e6, byte e7, byte e8, byte e9, byte e10, byte e11, byte e12, byte e13, byte e14, byte e15)
- {
- byte* pResult = stackalloc byte[16]
- {
- e0,
- e1,
- e2,
- e3,
- e4,
- e5,
- e6,
- e7,
- e8,
- e9,
- e10,
- e11,
- e12,
- e13,
- e14,
- e15,
- };
-
- return Unsafe.AsRef<Vector128<byte>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{Double}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Double}" /> with each element initialized to corresponding specified value.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector128<double> Create(double e0, double e1)
- {
- if (Sse2.IsSupported)
- {
- // Treating the value as a set of singles and emitting MoveLowToHigh is more efficient than dealing with the elements directly as double
- // However, we still need to check if Sse2 is supported since CreateScalarUnsafe needs it to for movsd, when value is not already in register
-
- return Sse.MoveLowToHigh(CreateScalarUnsafe(e0).AsSingle(), CreateScalarUnsafe(e1).AsSingle()).AsDouble();
- }
-
- return SoftwareFallback(e0, e1);
-
- static Vector128<double> SoftwareFallback(double e0, double e1)
- {
- double* pResult = stackalloc double[2]
- {
- e0,
- e1,
- };
-
- return Unsafe.AsRef<Vector128<double>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{Int16}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <param name="e2">The value that element 2 will be initialized to.</param>
- /// <param name="e3">The value that element 3 will be initialized to.</param>
- /// <param name="e4">The value that element 4 will be initialized to.</param>
- /// <param name="e5">The value that element 5 will be initialized to.</param>
- /// <param name="e6">The value that element 6 will be initialized to.</param>
- /// <param name="e7">The value that element 7 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Int16}" /> with each element initialized to corresponding specified value.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector128<short> Create(short e0, short e1, short e2, short e3, short e4, short e5, short e6, short e7)
- {
- if (Sse2.IsSupported)
- {
- Vector128<short> result = CreateScalarUnsafe(e0); // < 0, ?, ?, ?, ?, ?, ?, ? >
- result = Sse2.Insert(result, e1, 1); // < 0, 1, ?, ?, ?, ?, ?, ? >
- result = Sse2.Insert(result, e2, 2); // < 0, 1, 2, ?, ?, ?, ?, ? >
- result = Sse2.Insert(result, e3, 3); // < 0, 1, 2, 3, ?, ?, ?, ? >
- result = Sse2.Insert(result, e4, 4); // < 0, 1, 2, 3, 4, ?, ?, ? >
- result = Sse2.Insert(result, e5, 5); // < 0, 1, 2, 3, 4, 5, ?, ? >
- result = Sse2.Insert(result, e6, 6); // < 0, 1, 2, 3, 4, 5, 6, ? >
- return Sse2.Insert(result, e7, 7); // < 0, 1, 2, 3, 4, 5, 6, 7 >
- }
-
- return SoftwareFallback(e0, e1, e2, e3, e4, e5, e6, e7);
-
- static Vector128<short> SoftwareFallback(short e0, short e1, short e2, short e3, short e4, short e5, short e6, short e7)
- {
- short* pResult = stackalloc short[8]
- {
- e0,
- e1,
- e2,
- e3,
- e4,
- e5,
- e6,
- e7,
- };
-
- return Unsafe.AsRef<Vector128<short>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{Int32}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <param name="e2">The value that element 2 will be initialized to.</param>
- /// <param name="e3">The value that element 3 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Int32}" /> with each element initialized to corresponding specified value.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector128<int> Create(int e0, int e1, int e2, int e3)
- {
- if (Sse41.IsSupported)
- {
- Vector128<int> result = CreateScalarUnsafe(e0); // < 0, ?, ?, ? >
- result = Sse41.Insert(result, e1, 1); // < 0, 1, ?, ? >
- result = Sse41.Insert(result, e2, 2); // < 0, 1, 2, ? >
- return Sse41.Insert(result, e3, 3); // < 0, 1, 2, 3 >
- }
-
- if (Sse2.IsSupported)
- {
- // We deal with the elements in order, unpacking the ordered pairs of int into vectors. We then treat those vectors as ulong and
- // unpack them again. This efficiently gets all ints ordered into the result.
-
- Vector128<long> lo64, hi64;
- lo64 = Sse2.UnpackLow(CreateScalarUnsafe(e0), CreateScalarUnsafe(e1)).AsInt64(); // < 0, 1, ?, ? >
- hi64 = Sse2.UnpackLow(CreateScalarUnsafe(e2), CreateScalarUnsafe(e3)).AsInt64(); // < 2, 3, ?, ? >
- return Sse2.UnpackLow(lo64, hi64).AsInt32(); // < 0, 1, 2, 3 >
- }
-
- return SoftwareFallback(e0, e1, e2, e3);
-
- static Vector128<int> SoftwareFallback(int e0, int e1, int e2, int e3)
- {
- int* pResult = stackalloc int[4]
- {
- e0,
- e1,
- e2,
- e3,
- };
-
- return Unsafe.AsRef<Vector128<int>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{Int64}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Int64}" /> with each element initialized to corresponding specified value.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector128<long> Create(long e0, long e1)
- {
- if (Sse41.X64.IsSupported)
- {
- Vector128<long> result = CreateScalarUnsafe(e0); // < 0, ? >
- return Sse41.X64.Insert(result, e1, 1); // < 0, 1 >
- }
-
- if (Sse2.X64.IsSupported)
- {
- return Sse2.UnpackLow(CreateScalarUnsafe(e0), CreateScalarUnsafe(e1)); // < 0, 1 >
- }
-
- return SoftwareFallback(e0, e1);
-
- static Vector128<long> SoftwareFallback(long e0, long e1)
- {
- long* pResult = stackalloc long[2]
- {
- e0,
- e1,
- };
-
- return Unsafe.AsRef<Vector128<long>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{SByte}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <param name="e2">The value that element 2 will be initialized to.</param>
- /// <param name="e3">The value that element 3 will be initialized to.</param>
- /// <param name="e4">The value that element 4 will be initialized to.</param>
- /// <param name="e5">The value that element 5 will be initialized to.</param>
- /// <param name="e6">The value that element 6 will be initialized to.</param>
- /// <param name="e7">The value that element 7 will be initialized to.</param>
- /// <param name="e8">The value that element 8 will be initialized to.</param>
- /// <param name="e9">The value that element 9 will be initialized to.</param>
- /// <param name="e10">The value that element 10 will be initialized to.</param>
- /// <param name="e11">The value that element 11 will be initialized to.</param>
- /// <param name="e12">The value that element 12 will be initialized to.</param>
- /// <param name="e13">The value that element 13 will be initialized to.</param>
- /// <param name="e14">The value that element 14 will be initialized to.</param>
- /// <param name="e15">The value that element 15 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{SByte}" /> with each element initialized to corresponding specified value.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector128<sbyte> Create(sbyte e0, sbyte e1, sbyte e2, sbyte e3, sbyte e4, sbyte e5, sbyte e6, sbyte e7, sbyte e8, sbyte e9, sbyte e10, sbyte e11, sbyte e12, sbyte e13, sbyte e14, sbyte e15)
- {
- if (Sse41.IsSupported)
- {
- Vector128<sbyte> result = CreateScalarUnsafe(e0); // < 0, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- result = Sse41.Insert(result, e1, 1); // < 0, 1, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- result = Sse41.Insert(result, e2, 2); // < 0, 1, 2, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- result = Sse41.Insert(result, e3, 3); // < 0, 1, 2, 3, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- result = Sse41.Insert(result, e4, 4); // < 0, 1, 2, 3, 4, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- result = Sse41.Insert(result, e5, 5); // < 0, 1, 2, 3, 4, 5, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- result = Sse41.Insert(result, e6, 6); // < 0, 1, 2, 3, 4, 5, 6, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- result = Sse41.Insert(result, e7, 7); // < 0, 1, 2, 3, 4, 5, 6, 7, ??, ??, ??, ??, ??, ??, ??, ?? >
- result = Sse41.Insert(result, e8, 8); // < 0, 1, 2, 3, 4, 5, 6, 7, 8, ??, ??, ??, ??, ??, ??, ?? >
- result = Sse41.Insert(result, e9, 9); // < 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, ??, ??, ??, ??, ??, ?? >
- result = Sse41.Insert(result, e10, 10); // < 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, ??, ??, ??, ??, ?? >
- result = Sse41.Insert(result, e11, 11); // < 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, ??, ??, ??, ?? >
- result = Sse41.Insert(result, e12, 12); // < 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, ??, ??, ?? >
- result = Sse41.Insert(result, e13, 13); // < 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, ??, ?? >
- result = Sse41.Insert(result, e14, 14); // < 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, ?? >
- return Sse41.Insert(result, e15, 15); // < 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 >
- }
-
- if (Sse2.IsSupported)
- {
- // We deal with the elements in order, unpacking the ordered pairs of bytes into vectors. We then treat those vectors as ushort and
- // unpack them again, then again treating those results as uint, and a final time treating them as ulong. This efficiently gets all
- // bytes ordered into the result.
-
- Vector128<short> lo16, hi16;
- Vector128<int> lo32, hi32;
- Vector128<long> lo64, hi64;
-
- lo16 = Sse2.UnpackLow(CreateScalarUnsafe(e0), CreateScalarUnsafe(e1)).AsInt16(); // < 0, 1, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- hi16 = Sse2.UnpackLow(CreateScalarUnsafe(e2), CreateScalarUnsafe(e3)).AsInt16(); // < 2, 3, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- lo32 = Sse2.UnpackLow(lo16, hi16).AsInt32(); // < 0, 1, 2, 3, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
-
- lo16 = Sse2.UnpackLow(CreateScalarUnsafe(e4), CreateScalarUnsafe(e5)).AsInt16(); // < 4, 5, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- hi16 = Sse2.UnpackLow(CreateScalarUnsafe(e6), CreateScalarUnsafe(e7)).AsInt16(); // < 6, 7, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- hi32 = Sse2.UnpackLow(lo16, hi16).AsInt32(); // < 4, 5, 6, 7, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
-
- lo64 = Sse2.UnpackLow(lo32, hi32).AsInt64(); // < 0, 1, 2, 3, 4, 5, 6, 7, ??, ??, ??, ??, ??, ??, ??, ?? >
-
- lo16 = Sse2.UnpackLow(CreateScalarUnsafe(e8), CreateScalarUnsafe(e9)).AsInt16(); // < 8, 9, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- hi16 = Sse2.UnpackLow(CreateScalarUnsafe(e10), CreateScalarUnsafe(e11)).AsInt16(); // < 10, 11, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- lo32 = Sse2.UnpackLow(lo16, hi16).AsInt32(); // < 8, 9, 10, 11, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
-
- lo16 = Sse2.UnpackLow(CreateScalarUnsafe(e12), CreateScalarUnsafe(e13)).AsInt16(); // < 12, 13, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- hi16 = Sse2.UnpackLow(CreateScalarUnsafe(e14), CreateScalarUnsafe(e15)).AsInt16(); // < 14, 15, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
- hi32 = Sse2.UnpackLow(lo16, hi16).AsInt32(); // < 12, 13, 14, 15, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ??, ?? >
-
- hi64 = Sse2.UnpackLow(lo32, hi32).AsInt64(); // < 8, 9, 10, 11, 12, 13, 14, 15, ??, ??, ??, ??, ??, ??, ??, ?? >
-
- return Sse2.UnpackLow(lo64, hi64).AsSByte(); // < 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 >
- }
-
- return SoftwareFallback(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15);
-
- static Vector128<sbyte> SoftwareFallback(sbyte e0, sbyte e1, sbyte e2, sbyte e3, sbyte e4, sbyte e5, sbyte e6, sbyte e7, sbyte e8, sbyte e9, sbyte e10, sbyte e11, sbyte e12, sbyte e13, sbyte e14, sbyte e15)
- {
- sbyte* pResult = stackalloc sbyte[16]
- {
- e0,
- e1,
- e2,
- e3,
- e4,
- e5,
- e6,
- e7,
- e8,
- e9,
- e10,
- e11,
- e12,
- e13,
- e14,
- e15,
- };
-
- return Unsafe.AsRef<Vector128<sbyte>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{Single}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <param name="e2">The value that element 2 will be initialized to.</param>
- /// <param name="e3">The value that element 3 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Single}" /> with each element initialized to corresponding specified value.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector128<float> Create(float e0, float e1, float e2, float e3)
- {
- if (Sse41.IsSupported)
- {
- Vector128<float> result = CreateScalarUnsafe(e0); // < 0, ?, ?, ? >
- result = Sse41.Insert(result, CreateScalarUnsafe(e1), 0x10); // < 0, 1, ?, ? >
- result = Sse41.Insert(result, CreateScalarUnsafe(e2), 0x20); // < 0, 1, 2, ? >
- return Sse41.Insert(result, CreateScalarUnsafe(e3), 0x30); // < 0, 1, 2, 3 >
- }
-
- if (Sse.IsSupported)
- {
- Vector128<float> lo64, hi64;
- lo64 = Sse.UnpackLow(CreateScalarUnsafe(e0), CreateScalarUnsafe(e1)); // < 0, 1, ?, ? >
- hi64 = Sse.UnpackLow(CreateScalarUnsafe(e2), CreateScalarUnsafe(e3)); // < 2, 3, ?, ? >
- return Sse.MoveLowToHigh(lo64, hi64); // < 0, 1, 2, 3 >
- }
-
- return SoftwareFallback(e0, e1, e2, e3);
-
- static Vector128<float> SoftwareFallback(float e0, float e1, float e2, float e3)
- {
- float* pResult = stackalloc float[4]
- {
- e0,
- e1,
- e2,
- e3,
- };
-
- return Unsafe.AsRef<Vector128<float>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{UInt16}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <param name="e2">The value that element 2 will be initialized to.</param>
- /// <param name="e3">The value that element 3 will be initialized to.</param>
- /// <param name="e4">The value that element 4 will be initialized to.</param>
- /// <param name="e5">The value that element 5 will be initialized to.</param>
- /// <param name="e6">The value that element 6 will be initialized to.</param>
- /// <param name="e7">The value that element 7 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{UInt16}" /> with each element initialized to corresponding specified value.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector128<ushort> Create(ushort e0, ushort e1, ushort e2, ushort e3, ushort e4, ushort e5, ushort e6, ushort e7)
- {
- if (Sse2.IsSupported)
- {
- Vector128<ushort> result = CreateScalarUnsafe(e0); // < 0, ?, ?, ?, ?, ?, ?, ? >
- result = Sse2.Insert(result, e1, 1); // < 0, 1, ?, ?, ?, ?, ?, ? >
- result = Sse2.Insert(result, e2, 2); // < 0, 1, 2, ?, ?, ?, ?, ? >
- result = Sse2.Insert(result, e3, 3); // < 0, 1, 2, 3, ?, ?, ?, ? >
- result = Sse2.Insert(result, e4, 4); // < 0, 1, 2, 3, 4, ?, ?, ? >
- result = Sse2.Insert(result, e5, 5); // < 0, 1, 2, 3, 4, 5, ?, ? >
- result = Sse2.Insert(result, e6, 6); // < 0, 1, 2, 3, 4, 5, 6, ? >
- return Sse2.Insert(result, e7, 7); // < 0, 1, 2, 3, 4, 5, 6, 7 >
- }
-
- return SoftwareFallback(e0, e1, e2, e3, e4, e5, e6, e7);
-
- static Vector128<ushort> SoftwareFallback(ushort e0, ushort e1, ushort e2, ushort e3, ushort e4, ushort e5, ushort e6, ushort e7)
- {
- ushort* pResult = stackalloc ushort[8]
- {
- e0,
- e1,
- e2,
- e3,
- e4,
- e5,
- e6,
- e7,
- };
-
- return Unsafe.AsRef<Vector128<ushort>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{UInt32}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <param name="e2">The value that element 2 will be initialized to.</param>
- /// <param name="e3">The value that element 3 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{UInt32}" /> with each element initialized to corresponding specified value.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector128<uint> Create(uint e0, uint e1, uint e2, uint e3)
- {
- if (Sse41.IsSupported)
- {
- Vector128<uint> result = CreateScalarUnsafe(e0); // < 0, ?, ?, ? >
- result = Sse41.Insert(result, e1, 1); // < 0, 1, ?, ? >
- result = Sse41.Insert(result, e2, 2); // < 0, 1, 2, ? >
- return Sse41.Insert(result, e3, 3); // < 0, 1, 2, 3 >
- }
-
- if (Sse2.IsSupported)
- {
- // We deal with the elements in order, unpacking the ordered pairs of int into vectors. We then treat those vectors as ulong and
- // unpack them again. This efficiently gets all ints ordered into the result.
-
- Vector128<ulong> lo64, hi64;
- lo64 = Sse2.UnpackLow(CreateScalarUnsafe(e0), CreateScalarUnsafe(e1)).AsUInt64(); // < 0, 1, ?, ? >
- hi64 = Sse2.UnpackLow(CreateScalarUnsafe(e2), CreateScalarUnsafe(e3)).AsUInt64(); // < 2, 3, ?, ? >
- return Sse2.UnpackLow(lo64, hi64).AsUInt32(); // < 0, 1, 2, 3 >
- }
-
- return SoftwareFallback(e0, e1, e2, e3);
-
- static Vector128<uint> SoftwareFallback(uint e0, uint e1, uint e2, uint e3)
- {
- uint* pResult = stackalloc uint[4]
- {
- e0,
- e1,
- e2,
- e3,
- };
-
- return Unsafe.AsRef<Vector128<uint>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{UInt64}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{UInt64}" /> with each element initialized to corresponding specified value.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector128<ulong> Create(ulong e0, ulong e1)
- {
- if (Sse41.X64.IsSupported)
- {
- Vector128<ulong> result = CreateScalarUnsafe(e0); // < 0, ? >
- return Sse41.X64.Insert(result, e1, 1); // < 0, 1 >
- }
-
- if (Sse2.X64.IsSupported)
- {
- return Sse2.UnpackLow(CreateScalarUnsafe(e0), CreateScalarUnsafe(e1)); // < 0, 1 >
- }
-
- return SoftwareFallback(e0, e1);
-
- static Vector128<ulong> SoftwareFallback(ulong e0, ulong e1)
- {
- ulong* pResult = stackalloc ulong[2]
- {
- e0,
- e1,
- };
-
- return Unsafe.AsRef<Vector128<ulong>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{Byte}" /> instance from two <see cref="Vector64{Byte}" /> instances.</summary>
- /// <param name="lower">The value that the lower 64-bits will be initialized to.</param>
- /// <param name="upper">The value that the upper 64-bits will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Byte}" /> initialized from <paramref name="lower" /> and <paramref name="upper" />.</returns>
- public static unsafe Vector128<byte> Create(Vector64<byte> lower, Vector64<byte> upper)
- {
- Vector128<byte> result128 = Vector128<byte>.Zero;
-
- ref Vector64<byte> result64 = ref Unsafe.As<Vector128<byte>, Vector64<byte>>(ref result128);
- result64 = lower;
- Unsafe.Add(ref result64, 1) = upper;
-
- return result128;
- }
-
- /// <summary>Creates a new <see cref="Vector128{Double}" /> instance from two <see cref="Vector64{Double}" /> instances.</summary>
- /// <param name="lower">The value that the lower 64-bits will be initialized to.</param>
- /// <param name="upper">The value that the upper 64-bits will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Double}" /> initialized from <paramref name="lower" /> and <paramref name="upper" />.</returns>
- public static unsafe Vector128<double> Create(Vector64<double> lower, Vector64<double> upper)
- {
- Vector128<double> result128 = Vector128<double>.Zero;
-
- ref Vector64<double> result64 = ref Unsafe.As<Vector128<double>, Vector64<double>>(ref result128);
- result64 = lower;
- Unsafe.Add(ref result64, 1) = upper;
-
- return result128;
- }
-
- /// <summary>Creates a new <see cref="Vector128{Int16}" /> instance from two <see cref="Vector64{Int16}" /> instances.</summary>
- /// <param name="lower">The value that the lower 64-bits will be initialized to.</param>
- /// <param name="upper">The value that the upper 64-bits will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Int16}" /> initialized from <paramref name="lower" /> and <paramref name="upper" />.</returns>
- public static unsafe Vector128<short> Create(Vector64<short> lower, Vector64<short> upper)
- {
- Vector128<short> result128 = Vector128<short>.Zero;
-
- ref Vector64<short> result64 = ref Unsafe.As<Vector128<short>, Vector64<short>>(ref result128);
- result64 = lower;
- Unsafe.Add(ref result64, 1) = upper;
-
- return result128;
- }
-
- /// <summary>Creates a new <see cref="Vector128{Int32}" /> instance from two <see cref="Vector64{Int32}" /> instances.</summary>
- /// <param name="lower">The value that the lower 64-bits will be initialized to.</param>
- /// <param name="upper">The value that the upper 64-bits will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Int32}" /> initialized from <paramref name="lower" /> and <paramref name="upper" />.</returns>
- public static unsafe Vector128<int> Create(Vector64<int> lower, Vector64<int> upper)
- {
- Vector128<int> result128 = Vector128<int>.Zero;
-
- ref Vector64<int> result64 = ref Unsafe.As<Vector128<int>, Vector64<int>>(ref result128);
- result64 = lower;
- Unsafe.Add(ref result64, 1) = upper;
-
- return result128;
- }
-
- /// <summary>Creates a new <see cref="Vector128{Int64}" /> instance from two <see cref="Vector64{Int64}" /> instances.</summary>
- /// <param name="lower">The value that the lower 64-bits will be initialized to.</param>
- /// <param name="upper">The value that the upper 64-bits will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Int64}" /> initialized from <paramref name="lower" /> and <paramref name="upper" />.</returns>
- public static unsafe Vector128<long> Create(Vector64<long> lower, Vector64<long> upper)
- {
- Vector128<long> result128 = Vector128<long>.Zero;
-
- ref Vector64<long> result64 = ref Unsafe.As<Vector128<long>, Vector64<long>>(ref result128);
- result64 = lower;
- Unsafe.Add(ref result64, 1) = upper;
-
- return result128;
- }
-
- /// <summary>Creates a new <see cref="Vector128{SByte}" /> instance from two <see cref="Vector64{SByte}" /> instances.</summary>
- /// <param name="lower">The value that the lower 64-bits will be initialized to.</param>
- /// <param name="upper">The value that the upper 64-bits will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{SByte}" /> initialized from <paramref name="lower" /> and <paramref name="upper" />.</returns>
- [CLSCompliant(false)]
- public static unsafe Vector128<sbyte> Create(Vector64<sbyte> lower, Vector64<sbyte> upper)
- {
- Vector128<sbyte> result128 = Vector128<sbyte>.Zero;
-
- ref Vector64<sbyte> result64 = ref Unsafe.As<Vector128<sbyte>, Vector64<sbyte>>(ref result128);
- result64 = lower;
- Unsafe.Add(ref result64, 1) = upper;
-
- return result128;
- }
-
- /// <summary>Creates a new <see cref="Vector128{Single}" /> instance from two <see cref="Vector64{Single}" /> instances.</summary>
- /// <param name="lower">The value that the lower 64-bits will be initialized to.</param>
- /// <param name="upper">The value that the upper 64-bits will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Single}" /> initialized from <paramref name="lower" /> and <paramref name="upper" />.</returns>
- public static unsafe Vector128<float> Create(Vector64<float> lower, Vector64<float> upper)
- {
- Vector128<float> result128 = Vector128<float>.Zero;
-
- ref Vector64<float> result64 = ref Unsafe.As<Vector128<float>, Vector64<float>>(ref result128);
- result64 = lower;
- Unsafe.Add(ref result64, 1) = upper;
-
- return result128;
- }
-
- /// <summary>Creates a new <see cref="Vector128{UInt16}" /> instance from two <see cref="Vector64{UInt16}" /> instances.</summary>
- /// <param name="lower">The value that the lower 64-bits will be initialized to.</param>
- /// <param name="upper">The value that the upper 64-bits will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{UInt16}" /> initialized from <paramref name="lower" /> and <paramref name="upper" />.</returns>
- [CLSCompliant(false)]
- public static unsafe Vector128<ushort> Create(Vector64<ushort> lower, Vector64<ushort> upper)
- {
- Vector128<ushort> result128 = Vector128<ushort>.Zero;
-
- ref Vector64<ushort> result64 = ref Unsafe.As<Vector128<ushort>, Vector64<ushort>>(ref result128);
- result64 = lower;
- Unsafe.Add(ref result64, 1) = upper;
-
- return result128;
- }
-
- /// <summary>Creates a new <see cref="Vector128{UInt32}" /> instance from two <see cref="Vector64{UInt32}" /> instances.</summary>
- /// <param name="lower">The value that the lower 64-bits will be initialized to.</param>
- /// <param name="upper">The value that the upper 64-bits will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{UInt32}" /> initialized from <paramref name="lower" /> and <paramref name="upper" />.</returns>
- [CLSCompliant(false)]
- public static unsafe Vector128<uint> Create(Vector64<uint> lower, Vector64<uint> upper)
- {
- Vector128<uint> result128 = Vector128<uint>.Zero;
-
- ref Vector64<uint> result64 = ref Unsafe.As<Vector128<uint>, Vector64<uint>>(ref result128);
- result64 = lower;
- Unsafe.Add(ref result64, 1) = upper;
-
- return result128;
- }
-
- /// <summary>Creates a new <see cref="Vector128{UInt64}" /> instance from two <see cref="Vector64{UInt64}" /> instances.</summary>
- /// <param name="lower">The value that the lower 64-bits will be initialized to.</param>
- /// <param name="upper">The value that the upper 64-bits will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{UInt64}" /> initialized from <paramref name="lower" /> and <paramref name="upper" />.</returns>
- [CLSCompliant(false)]
- public static unsafe Vector128<ulong> Create(Vector64<ulong> lower, Vector64<ulong> upper)
- {
- Vector128<ulong> result128 = Vector128<ulong>.Zero;
-
- ref Vector64<ulong> result64 = ref Unsafe.As<Vector128<ulong>, Vector64<ulong>>(ref result128);
- result64 = lower;
- Unsafe.Add(ref result64, 1) = upper;
-
- return result128;
- }
-
- /// <summary>Creates a new <see cref="Vector128{Byte}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Byte}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements initialized to zero.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector128<byte> CreateScalar(byte value)
- {
- if (Sse2.IsSupported)
- {
- // ConvertScalarToVector128 only deals with 32/64-bit inputs and we need to ensure all upper-bits are zeroed, so we call
- // the UInt32 overload to ensure zero extension. We can then just treat the result as byte and return.
- return Sse2.ConvertScalarToVector128UInt32(value).AsByte();
- }
-
- return SoftwareFallback(value);
-
- static Vector128<byte> SoftwareFallback(byte value)
- {
- var result = Vector128<byte>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector128<byte>, byte>(ref result), value);
- return result;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{Double}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Double}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements initialized to zero.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector128<double> CreateScalar(double value)
- {
- if (Sse2.IsSupported)
- {
- return Sse2.MoveScalar(Vector128<double>.Zero, CreateScalarUnsafe(value));
- }
-
- return SoftwareFallback(value);
-
- static Vector128<double> SoftwareFallback(double value)
- {
- var result = Vector128<double>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector128<double>, byte>(ref result), value);
- return result;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{Int16}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Int16}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements initialized to zero.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector128<short> CreateScalar(short value)
- {
- if (Sse2.IsSupported)
- {
- // ConvertScalarToVector128 only deals with 32/64-bit inputs and we need to ensure all upper-bits are zeroed, so we cast
- // to ushort and call the UInt32 overload to ensure zero extension. We can then just treat the result as short and return.
- return Sse2.ConvertScalarToVector128UInt32((ushort)(value)).AsInt16();
- }
-
- return SoftwareFallback(value);
-
- static Vector128<short> SoftwareFallback(short value)
- {
- var result = Vector128<short>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector128<short>, byte>(ref result), value);
- return result;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{Int32}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Int32}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements initialized to zero.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector128<int> CreateScalar(int value)
- {
- if (Sse2.IsSupported)
- {
- return Sse2.ConvertScalarToVector128Int32(value);
- }
-
- return SoftwareFallback(value);
-
- static Vector128<int> SoftwareFallback(int value)
- {
- var result = Vector128<int>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector128<int>, byte>(ref result), value);
- return result;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{Int64}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Int64}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements initialized to zero.</returns>
- public static unsafe Vector128<long> CreateScalar(long value)
- {
- if (Sse2.X64.IsSupported)
- {
- return Sse2.X64.ConvertScalarToVector128Int64(value);
- }
-
- return SoftwareFallback(value);
-
- static Vector128<long> SoftwareFallback(long value)
- {
- var result = Vector128<long>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector128<long>, byte>(ref result), value);
- return result;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{SByte}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{SByte}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements initialized to zero.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector128<sbyte> CreateScalar(sbyte value)
- {
- if (Sse2.IsSupported)
- {
- // ConvertScalarToVector128 only deals with 32/64-bit inputs and we need to ensure all upper-bits are zeroed, so we cast
- // to byte and call the UInt32 overload to ensure zero extension. We can then just treat the result as sbyte and return.
- return Sse2.ConvertScalarToVector128UInt32((byte)(value)).AsSByte();
- }
-
- return SoftwareFallback(value);
-
- static Vector128<sbyte> SoftwareFallback(sbyte value)
- {
- var result = Vector128<sbyte>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector128<sbyte>, byte>(ref result), value);
- return result;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{Single}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Single}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements initialized to zero.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector128<float> CreateScalar(float value)
- {
- if (Sse.IsSupported)
- {
- return Sse.MoveScalar(Vector128<float>.Zero, CreateScalarUnsafe(value));
- }
-
- return SoftwareFallback(value);
-
- static Vector128<float> SoftwareFallback(float value)
- {
- var result = Vector128<float>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector128<float>, byte>(ref result), value);
- return result;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{UInt16}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{UInt16}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements initialized to zero.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector128<ushort> CreateScalar(ushort value)
- {
- if (Sse2.IsSupported)
- {
- // ConvertScalarToVector128 only deals with 32/64-bit inputs and we need to ensure all upper-bits are zeroed, so we call
- // the UInt32 overload to ensure zero extension. We can then just treat the result as ushort and return.
- return Sse2.ConvertScalarToVector128UInt32(value).AsUInt16();
- }
-
- return SoftwareFallback(value);
-
- static Vector128<ushort> SoftwareFallback(ushort value)
- {
- var result = Vector128<ushort>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector128<ushort>, byte>(ref result), value);
- return result;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{UInt32}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{UInt32}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements initialized to zero.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector128<uint> CreateScalar(uint value)
- {
- if (Sse2.IsSupported)
- {
- return Sse2.ConvertScalarToVector128UInt32(value);
- }
-
- return SoftwareFallback(value);
-
- static Vector128<uint> SoftwareFallback(uint value)
- {
- var result = Vector128<uint>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector128<uint>, byte>(ref result), value);
- return result;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{UInt64}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{UInt64}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements initialized to zero.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector128<ulong> CreateScalar(ulong value)
- {
- if (Sse2.X64.IsSupported)
- {
- return Sse2.X64.ConvertScalarToVector128UInt64(value);
- }
-
- return SoftwareFallback(value);
-
- static Vector128<ulong> SoftwareFallback(ulong value)
- {
- var result = Vector128<ulong>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector128<ulong>, byte>(ref result), value);
- return result;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector128{Byte}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Byte}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements left uninitialized.</returns>
- [Intrinsic]
- public static unsafe Vector128<byte> CreateScalarUnsafe(byte value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- byte* pResult = stackalloc byte[16];
- pResult[0] = value;
- return Unsafe.AsRef<Vector128<byte>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector128{Double}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Double}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements left uninitialized.</returns>
- [Intrinsic]
- public static unsafe Vector128<double> CreateScalarUnsafe(double value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- double* pResult = stackalloc double[2];
- pResult[0] = value;
- return Unsafe.AsRef<Vector128<double>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector128{Int16}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Int16}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements left uninitialized.</returns>
- [Intrinsic]
- public static unsafe Vector128<short> CreateScalarUnsafe(short value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- short* pResult = stackalloc short[8];
- pResult[0] = value;
- return Unsafe.AsRef<Vector128<short>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector128{Int32}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Int32}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements left uninitialized.</returns>
- [Intrinsic]
- public static unsafe Vector128<int> CreateScalarUnsafe(int value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- int* pResult = stackalloc int[4];
- pResult[0] = value;
- return Unsafe.AsRef<Vector128<int>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector128{Int64}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Int64}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements left uninitialized.</returns>
- [Intrinsic]
- public static unsafe Vector128<long> CreateScalarUnsafe(long value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- long* pResult = stackalloc long[2];
- pResult[0] = value;
- return Unsafe.AsRef<Vector128<long>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector128{SByte}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{SByte}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements left uninitialized.</returns>
- [Intrinsic]
- [CLSCompliant(false)]
- public static unsafe Vector128<sbyte> CreateScalarUnsafe(sbyte value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- sbyte* pResult = stackalloc sbyte[16];
- pResult[0] = value;
- return Unsafe.AsRef<Vector128<sbyte>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector128{Single}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{Single}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements left uninitialized.</returns>
- [Intrinsic]
- public static unsafe Vector128<float> CreateScalarUnsafe(float value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- float* pResult = stackalloc float[4];
- pResult[0] = value;
- return Unsafe.AsRef<Vector128<float>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector128{UInt16}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{UInt16}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements left uninitialized.</returns>
- [Intrinsic]
- [CLSCompliant(false)]
- public static unsafe Vector128<ushort> CreateScalarUnsafe(ushort value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- ushort* pResult = stackalloc ushort[8];
- pResult[0] = value;
- return Unsafe.AsRef<Vector128<ushort>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector128{UInt32}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{UInt32}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements left uninitialized.</returns>
- [Intrinsic]
- [CLSCompliant(false)]
- public static unsafe Vector128<uint> CreateScalarUnsafe(uint value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- uint* pResult = stackalloc uint[4];
- pResult[0] = value;
- return Unsafe.AsRef<Vector128<uint>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector128{UInt64}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector128{UInt64}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements left uninitialized.</returns>
- [Intrinsic]
- [CLSCompliant(false)]
- public static unsafe Vector128<ulong> CreateScalarUnsafe(ulong value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- ulong* pResult = stackalloc ulong[2];
- pResult[0] = value;
- return Unsafe.AsRef<Vector128<ulong>>(pResult);
- }
-
- /// <summary>Gets the element at the specified index.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to get the element from.</param>
- /// <param name="index">The index of the element to get.</param>
- /// <returns>The value of the element at <paramref name="index" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- /// <exception cref="ArgumentOutOfRangeException"><paramref name="index" /> was less than zero or greater than the number of elements.</exception>
- [Intrinsic]
- public static T GetElement<T>(this Vector128<T> vector, int index)
- where T : struct
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- if ((uint)(index) >= (uint)(Vector128<T>.Count))
- {
- ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index);
- }
-
- ref T e0 = ref Unsafe.As<Vector128<T>, T>(ref vector);
- return Unsafe.Add(ref e0, index);
- }
-
- /// <summary>Creates a new <see cref="Vector128{T}" /> with the element at the specified index set to the specified value and the remaining elements set to the same value as that in the given vector.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to get the remaining elements from.</param>
- /// <param name="index">The index of the element to set.</param>
- /// <param name="value">The value to set the element to.</param>
- /// <returns>A <see cref="Vector128{T}" /> with the value of the element at <paramref name="index" /> set to <paramref name="value" /> and the remaining elements set to the same value as that in <paramref name="vector" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- /// <exception cref="ArgumentOutOfRangeException"><paramref name="index" /> was less than zero or greater than the number of elements.</exception>
- [Intrinsic]
- public static Vector128<T> WithElement<T>(this Vector128<T> vector, int index, T value)
- where T : struct
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- if ((uint)(index) >= (uint)(Vector128<T>.Count))
- {
- ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index);
- }
-
- Vector128<T> result = vector;
- ref T e0 = ref Unsafe.As<Vector128<T>, T>(ref result);
- Unsafe.Add(ref e0, index) = value;
- return result;
- }
-
- /// <summary>Gets the value of the lower 64-bits as a new <see cref="Vector64{T}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to get the lower 64-bits from.</param>
- /// <returns>The value of the lower 64-bits as a new <see cref="Vector64{T}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- public static Vector64<T> GetLower<T>(this Vector128<T> vector)
- where T : struct
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
- return Unsafe.As<Vector128<T>, Vector64<T>>(ref vector);
- }
-
- /// <summary>Creates a new <see cref="Vector128{T}" /> with the lower 64-bits set to the specified value and the upper 64-bits set to the same value as that in the given vector.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to get the upper 64-bits from.</param>
- /// <param name="value">The value of the lower 64-bits as a <see cref="Vector64{T}" />.</param>
- /// <returns>A new <see cref="Vector128{T}" /> with the lower 64-bits set to <paramref name="value" /> and the upper 64-bits set to the same value as that in <paramref name="vector" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- public static Vector128<T> WithLower<T>(this Vector128<T> vector, Vector64<T> value)
- where T : struct
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- Vector128<T> result = vector;
- Unsafe.As<Vector128<T>, Vector64<T>>(ref result) = value;
- return result;
- }
-
- /// <summary>Gets the value of the upper 64-bits as a new <see cref="Vector64{T}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to get the upper 64-bits from.</param>
- /// <returns>The value of the upper 64-bits as a new <see cref="Vector64{T}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- public static Vector64<T> GetUpper<T>(this Vector128<T> vector)
- where T : struct
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- ref Vector64<T> lower = ref Unsafe.As<Vector128<T>, Vector64<T>>(ref vector);
- return Unsafe.Add(ref lower, 1);
- }
-
- /// <summary>Creates a new <see cref="Vector128{T}" /> with the upper 64-bits set to the specified value and the upper 64-bits set to the same value as that in the given vector.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to get the lower 64-bits from.</param>
- /// <param name="value">The value of the upper 64-bits as a <see cref="Vector64{T}" />.</param>
- /// <returns>A new <see cref="Vector128{T}" /> with the upper 64-bits set to <paramref name="value" /> and the lower 64-bits set to the same value as that in <paramref name="vector" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- public static Vector128<T> WithUpper<T>(this Vector128<T> vector, Vector64<T> value)
- where T : struct
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- Vector128<T> result = vector;
- ref Vector64<T> lower = ref Unsafe.As<Vector128<T>, Vector64<T>>(ref result);
- Unsafe.Add(ref lower, 1) = value;
- return result;
- }
-
- /// <summary>Converts the given vector to a scalar containing the value of the first element.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to get the first element from.</param>
- /// <returns>A scalar <typeparamref name="T" /> containing the value of the first element.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- public static T ToScalar<T>(this Vector128<T> vector)
- where T : struct
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
- return Unsafe.As<Vector128<T>, T>(ref vector);
- }
-
- /// <summary>Converts the given vector to a new <see cref="Vector256{T}" /> with the lower 128-bits set to the value of the given vector and the upper 128-bits initialized to zero.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to extend.</param>
- /// <returns>A new <see cref="Vector256{T}" /> with the lower 128-bits set to the value of <paramref name="vector" /> and the upper 128-bits initialized to zero.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- public static Vector256<T> ToVector256<T>(this Vector128<T> vector)
- where T : struct
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- Vector256<T> result = Vector256<T>.Zero;
- Unsafe.As<Vector256<T>, Vector128<T>>(ref result) = vector;
- return result;
- }
-
- /// <summary>Converts the given vector to a new <see cref="Vector256{T}" /> with the lower 128-bits set to the value of the given vector and the upper 128-bits left uninitialized.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to extend.</param>
- /// <returns>A new <see cref="Vector256{T}" /> with the lower 128-bits set to the value of <paramref name="vector" /> and the upper 128-bits left uninitialized.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- public static unsafe Vector256<T> ToVector256Unsafe<T>(this Vector128<T> vector)
- where T : struct
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- byte* pResult = stackalloc byte[Vector256.Size];
- Unsafe.AsRef<Vector128<T>>(pResult) = vector;
- return Unsafe.AsRef<Vector256<T>>(pResult);
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector128DebugView_1.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector128DebugView_1.cs
deleted file mode 100644
index ccdc655949c..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector128DebugView_1.cs
+++ /dev/null
@@ -1,118 +0,0 @@
-// 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 Internal.Runtime.CompilerServices;
-
-namespace System.Runtime.Intrinsics
-{
- internal readonly struct Vector128DebugView<T> where T : struct
- {
- private readonly Vector128<T> _value;
-
- public Vector128DebugView(Vector128<T> value)
- {
- _value = value;
- }
-
- public byte[] ByteView
- {
- get
- {
- var items = new byte[16];
- Unsafe.WriteUnaligned(ref items[0], _value);
- return items;
- }
- }
-
- public double[] DoubleView
- {
- get
- {
- var items = new double[2];
- Unsafe.WriteUnaligned(ref Unsafe.As<double, byte>(ref items[0]), _value);
- return items;
- }
- }
-
- public short[] Int16View
- {
- get
- {
- var items = new short[8];
- Unsafe.WriteUnaligned(ref Unsafe.As<short, byte>(ref items[0]), _value);
- return items;
- }
- }
-
- public int[] Int32View
- {
- get
- {
- var items = new int[4];
- Unsafe.WriteUnaligned(ref Unsafe.As<int, byte>(ref items[0]), _value);
- return items;
- }
- }
-
- public long[] Int64View
- {
- get
- {
- var items = new long[2];
- Unsafe.WriteUnaligned(ref Unsafe.As<long, byte>(ref items[0]), _value);
- return items;
- }
- }
-
- public sbyte[] SByteView
- {
- get
- {
- var items = new sbyte[16];
- Unsafe.WriteUnaligned(ref Unsafe.As<sbyte, byte>(ref items[0]), _value);
- return items;
- }
- }
-
- public float[] SingleView
- {
- get
- {
- var items = new float[4];
- Unsafe.WriteUnaligned(ref Unsafe.As<float, byte>(ref items[0]), _value);
- return items;
- }
- }
-
- public ushort[] UInt16View
- {
- get
- {
- var items = new ushort[8];
- Unsafe.WriteUnaligned(ref Unsafe.As<ushort, byte>(ref items[0]), _value);
- return items;
- }
- }
-
- public uint[] UInt32View
- {
- get
- {
- var items = new uint[4];
- Unsafe.WriteUnaligned(ref Unsafe.As<uint, byte>(ref items[0]), _value);
- return items;
- }
- }
-
- public ulong[] UInt64View
- {
- get
- {
- var items = new ulong[2];
- Unsafe.WriteUnaligned(ref Unsafe.As<ulong, byte>(ref items[0]), _value);
- return items;
- }
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector128_1.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector128_1.cs
deleted file mode 100644
index 46c93235eeb..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector128_1.cs
+++ /dev/null
@@ -1,192 +0,0 @@
-// 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.Diagnostics;
-using System.Globalization;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.Intrinsics.X86;
-using System.Text;
-using Internal.Runtime.CompilerServices;
-
-namespace System.Runtime.Intrinsics
-{
- // We mark certain methods with AggressiveInlining to ensure that the JIT will
- // inline them. The JIT would otherwise not inline the method since it, at the
- // point it tries to determine inline profability, currently cannot determine
- // that most of the code-paths will be optimized away as "dead code".
- //
- // We then manually inline cases (such as certain intrinsic code-paths) that
- // will generate code small enough to make the AgressiveInlining profitable. The
- // other cases (such as the software fallback) are placed in their own method.
- // This ensures we get good codegen for the "fast-path" and allows the JIT to
- // determine inline profitability of the other paths as it would normally.
-
- [Intrinsic]
- [DebuggerDisplay("{DisplayString,nq}")]
- [DebuggerTypeProxy(typeof(Vector128DebugView<>))]
- [StructLayout(LayoutKind.Sequential, Size = Vector128.Size)]
- public readonly struct Vector128<T> : IEquatable<Vector128<T>>
- where T : struct
- {
- // These fields exist to ensure the alignment is 8, rather than 1.
- // This also allows the debug view to work https://github.com/dotnet/coreclr/issues/15694)
- private readonly ulong _00;
- private readonly ulong _01;
-
- /// <summary>Gets the number of <typeparamref name="T" /> that are in a <see cref="Vector128{T}" />.</summary>
- /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
- public static int Count
- {
- [Intrinsic]
- get
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
- return Vector128.Size / Unsafe.SizeOf<T>();
- }
- }
-
- /// <summary>Gets a new <see cref="Vector128{T}" /> with all elements initialized to zero.</summary>
- /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
- public static Vector128<T> Zero
- {
- [Intrinsic]
- get
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
- return default;
- }
- }
-
- internal unsafe string DisplayString
- {
- get
- {
- if (IsSupported)
- {
- return ToString();
- }
- else
- {
- return SR.NotSupported_Type;
- }
- }
- }
-
- internal static bool IsSupported
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get => (typeof(T) == typeof(byte)) ||
- (typeof(T) == typeof(sbyte)) ||
- (typeof(T) == typeof(short)) ||
- (typeof(T) == typeof(ushort)) ||
- (typeof(T) == typeof(int)) ||
- (typeof(T) == typeof(uint)) ||
- (typeof(T) == typeof(long)) ||
- (typeof(T) == typeof(ulong)) ||
- (typeof(T) == typeof(float)) ||
- (typeof(T) == typeof(double));
- }
-
- /// <summary>Determines whether the specified <see cref="Vector128{T}" /> is equal to the current instance.</summary>
- /// <param name="other">The <see cref="Vector128{T}" /> to compare with the current instance.</param>
- /// <returns><c>true</c> if <paramref name="other" /> is equal to the current instance; otherwise, <c>false</c>.</returns>
- /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public bool Equals(Vector128<T> other)
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- if (Sse.IsSupported && (typeof(T) == typeof(float)))
- {
- Vector128<float> result = Sse.CompareEqual(this.AsSingle(), other.AsSingle());
- return Sse.MoveMask(result) == 0b1111; // We have one bit per element
- }
-
- if (Sse2.IsSupported)
- {
- if (typeof(T) == typeof(double))
- {
- Vector128<double> result = Sse2.CompareEqual(this.AsDouble(), other.AsDouble());
- return Sse2.MoveMask(result) == 0b11; // We have one bit per element
- }
- else
- {
- // Unlike float/double, there are no special values to consider
- // for integral types and we can just do a comparison that all
- // bytes are exactly the same.
-
- Debug.Assert((typeof(T) != typeof(float)) && (typeof(T) != typeof(double)));
- Vector128<byte> result = Sse2.CompareEqual(this.AsByte(), other.AsByte());
- return Sse2.MoveMask(result) == 0b1111_1111_1111_1111; // We have one bit per element
- }
- }
-
- return SoftwareFallback(in this, other);
-
- static bool SoftwareFallback(in Vector128<T> vector, Vector128<T> other)
- {
- for (int i = 0; i < Count; i++)
- {
- if (!((IEquatable<T>)(vector.GetElement(i))).Equals(other.GetElement(i)))
- {
- return false;
- }
- }
-
- return true;
- }
- }
-
- /// <summary>Determines whether the specified object is equal to the current instance.</summary>
- /// <param name="obj">The object to compare with the current instance.</param>
- /// <returns><c>true</c> if <paramref name="obj" /> is a <see cref="Vector128{T}" /> and is equal to the current instance; otherwise, <c>false</c>.</returns>
- /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
- public override bool Equals(object? obj)
- {
- return (obj is Vector128<T>) && Equals((Vector128<T>)(obj));
- }
-
- /// <summary>Gets the hash code for the instance.</summary>
- /// <returns>The hash code for the instance.</returns>
- /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
- public override int GetHashCode()
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- int hashCode = 0;
-
- for (int i = 0; i < Count; i++)
- {
- hashCode = HashCode.Combine(hashCode, this.GetElement(i).GetHashCode());
- }
-
- return hashCode;
- }
-
- /// <summary>Converts the current instance to an equivalent string representation.</summary>
- /// <returns>An equivalent string representation of the current instance.</returns>
- /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
- public override string ToString()
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- int lastElement = Count - 1;
- var sb = new ValueStringBuilder(stackalloc char[64]);
- CultureInfo invariant = CultureInfo.InvariantCulture;
-
- sb.Append('<');
- for (int i = 0; i < lastElement; i++)
- {
- sb.Append(((IFormattable)this.GetElement(i)).ToString("G", invariant));
- sb.Append(',');
- sb.Append(' ');
- }
- sb.Append(((IFormattable)this.GetElement(lastElement)).ToString("G", invariant));
- sb.Append('>');
-
- return sb.ToString();
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector256.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector256.cs
deleted file mode 100644
index 07023b5cc69..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector256.cs
+++ /dev/null
@@ -1,1962 +0,0 @@
-// 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.Diagnostics;
-using System.Numerics;
-using System.Runtime.CompilerServices;
-using System.Runtime.Intrinsics.X86;
-using Internal.Runtime.CompilerServices;
-
-namespace System.Runtime.Intrinsics
-{
- // We mark certain methods with AggressiveInlining to ensure that the JIT will
- // inline them. The JIT would otherwise not inline the method since it, at the
- // point it tries to determine inline profability, currently cannot determine
- // that most of the code-paths will be optimized away as "dead code".
- //
- // We then manually inline cases (such as certain intrinsic code-paths) that
- // will generate code small enough to make the AgressiveInlining profitable. The
- // other cases (such as the software fallback) are placed in their own method.
- // This ensures we get good codegen for the "fast-path" and allows the JIT to
- // determine inline profitability of the other paths as it would normally.
-
- // Many of the instance methods were moved to be extension methods as it results
- // in overall better codegen. This is because instance methods require the C# compiler
- // to generate extra locals as the `this` parameter has to be passed by reference.
- // Having them be extension methods means that the `this` parameter can be passed by
- // value instead, thus reducing the number of locals and helping prevent us from hitting
- // the internal inlining limits of the JIT.
-
- public static class Vector256
- {
- internal const int Size = 32;
-
- /// <summary>Reinterprets a <see cref="Vector256{T}" /> as a new <see cref="Vector256{U}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <typeparam name="U">The type of the vector <paramref name="vector" /> should be reinterpreted as.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector256{U}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) or the type of the target (<typeparamref name="U" />) is not supported.</exception>
- [Intrinsic]
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static Vector256<U> As<T, U>(this Vector256<T> vector)
- where T : struct
- where U : struct
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
- ThrowHelper.ThrowForUnsupportedVectorBaseType<U>();
- return Unsafe.As<Vector256<T>, Vector256<U>>(ref vector);
- }
-
- /// <summary>Reinterprets a <see cref="Vector256{T}" /> as a new <see cref="Vector256{Byte}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector256{Byte}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- public static Vector256<byte> AsByte<T>(this Vector256<T> vector)
- where T : struct
- {
- return vector.As<T, byte>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector256{T}" /> as a new <see cref="Vector256{Double}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector256{Double}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- public static Vector256<double> AsDouble<T>(this Vector256<T> vector)
- where T : struct
- {
- return vector.As<T, double>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector256{T}" /> as a new <see cref="Vector256{Int16}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector256{Int16}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- public static Vector256<short> AsInt16<T>(this Vector256<T> vector)
- where T : struct
- {
- return vector.As<T, short>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector256{T}" /> as a new <see cref="Vector256{Int32}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector256{Int32}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- public static Vector256<int> AsInt32<T>(this Vector256<T> vector)
- where T : struct
- {
- return vector.As<T, int>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector256{T}" /> as a new <see cref="Vector256{Int64}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector256{Int64}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- public static Vector256<long> AsInt64<T>(this Vector256<T> vector)
- where T : struct
- {
- return vector.As<T, long>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector256{T}" /> as a new <see cref="Vector256{SByte}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector256{SByte}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- [CLSCompliant(false)]
- public static Vector256<sbyte> AsSByte<T>(this Vector256<T> vector)
- where T : struct
- {
- return vector.As<T, sbyte>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector256{T}" /> as a new <see cref="Vector256{Single}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector256{Single}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- public static Vector256<float> AsSingle<T>(this Vector256<T> vector)
- where T : struct
- {
- return vector.As<T, float>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector256{T}" /> as a new <see cref="Vector256{UInt16}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector256{UInt16}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- [CLSCompliant(false)]
- public static Vector256<ushort> AsUInt16<T>(this Vector256<T> vector)
- where T : struct
- {
- return vector.As<T, ushort>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector256{T}" /> as a new <see cref="Vector256{UInt32}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector256{UInt32}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- [CLSCompliant(false)]
- public static Vector256<uint> AsUInt32<T>(this Vector256<T> vector)
- where T : struct
- {
- return vector.As<T, uint>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector256{T}" /> as a new <see cref="Vector256{UInt64}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector256{UInt64}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- [CLSCompliant(false)]
- public static Vector256<ulong> AsUInt64<T>(this Vector256<T> vector)
- where T : struct
- {
- return vector.As<T, ulong>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector{T}" /> as a new <see cref="Vector256{T}" />.</summary>
- /// <typeparam name="T">The type of the vectors.</typeparam>
- /// <param name="value">The vector to reinterpret.</param>
- /// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector256{T}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="value" /> (<typeparamref name="T" />) is not supported.</exception>
- public static Vector256<T> AsVector256<T>(this Vector<T> value)
- where T : struct
- {
- Debug.Assert(Vector256<T>.Count >= Vector<T>.Count);
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- Vector256<T> result = default;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector256<T>, byte>(ref result), value);
- return result;
- }
-
- /// <summary>Reinterprets a <see cref="Vector256{T}" /> as a new <see cref="Vector{T}" />.</summary>
- /// <typeparam name="T">The type of the vectors.</typeparam>
- /// <param name="value">The vector to reinterpret.</param>
- /// <returns><paramref name="value" /> reinterpreted as a new <see cref="Vector{T}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="value" /> (<typeparamref name="T" />) is not supported.</exception>
- public static Vector<T> AsVector<T>(this Vector256<T> value)
- where T : struct
- {
- Debug.Assert(Vector256<T>.Count >= Vector<T>.Count);
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
- return Unsafe.As<Vector256<T>, Vector<T>>(ref value);
- }
-
- /// <summary>Creates a new <see cref="Vector256{Byte}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Byte}" /> with all elements initialized to <paramref name="value" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector256<byte> Create(byte value)
- {
- if (Avx2.IsSupported)
- {
- Vector128<byte> result = Vector128.CreateScalarUnsafe(value); // < v, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? >
- return Avx2.BroadcastScalarToVector256(result); // < v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v >
- }
-
- if (Avx.IsSupported)
- {
- Vector128<byte> result = Vector128.Create(value); // < v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? >
- return Avx.InsertVector128(result.ToVector256Unsafe(), result, 1); // < v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v >
- }
-
- return SoftwareFallback(value);
-
- static Vector256<byte> SoftwareFallback(byte value)
- {
- byte* pResult = stackalloc byte[32]
- {
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector256<byte>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{Double}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Double}" /> with all elements initialized to <paramref name="value" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector256<double> Create(double value)
- {
- if (Avx2.IsSupported)
- {
- Vector128<double> result = Vector128.CreateScalarUnsafe(value); // < v, ?, ?, ? >
- return Avx2.BroadcastScalarToVector256(result); // < v, v, v, v >
- }
-
- if (Avx.IsSupported)
- {
- Vector128<double> result = Vector128.Create(value); // < v, v, ?, ? >
- return Avx.InsertVector128(result.ToVector256Unsafe(), result, 1); // < v, v, v, v >
- }
-
- return SoftwareFallback(value);
-
- static Vector256<double> SoftwareFallback(double value)
- {
- double* pResult = stackalloc double[4]
- {
- value,
- value,
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector256<double>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{Int16}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Int16}" /> with all elements initialized to <paramref name="value" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector256<short> Create(short value)
- {
- if (Avx2.IsSupported)
- {
- Vector128<short> result = Vector128.CreateScalarUnsafe(value); // < v, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? >
- return Avx2.BroadcastScalarToVector256(result); // < v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v >
- }
-
- if (Avx.IsSupported)
- {
- Vector128<short> result = Vector128.Create(value); // < v, v, v, v, v, v, v, v, ?, ?, ?, ?, ?, ?, ?, ? >
- return Avx.InsertVector128(result.ToVector256Unsafe(), result, 1); // < v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v >
- }
-
- return SoftwareFallback(value);
-
- static Vector256<short> SoftwareFallback(short value)
- {
- short* pResult = stackalloc short[16]
- {
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector256<short>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{Int32}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Int32}" /> with all elements initialized to <paramref name="value" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector256<int> Create(int value)
- {
- if (Avx2.IsSupported)
- {
- Vector128<int> result = Vector128.CreateScalarUnsafe(value); // < v, ?, ?, ?, ?, ?, ?, ? >
- return Avx2.BroadcastScalarToVector256(result); // < v, v, v, v, v, v, v, v >
- }
-
- if (Avx.IsSupported)
- {
- Vector128<int> result = Vector128.Create(value); // < v, v, v, v, ?, ?, ?, ? >
- return Avx.InsertVector128(result.ToVector256Unsafe(), result, 1); // < v, v, v, v, v, v, v, v >
- }
-
- return SoftwareFallback(value);
-
- static Vector256<int> SoftwareFallback(int value)
- {
- int* pResult = stackalloc int[8]
- {
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector256<int>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{Int64}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Int64}" /> with all elements initialized to <paramref name="value" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector256<long> Create(long value)
- {
- if (Sse2.X64.IsSupported)
- {
- if (Avx2.IsSupported)
- {
- Vector128<long> result = Vector128.CreateScalarUnsafe(value); // < v, ?, ?, ? >
- return Avx2.BroadcastScalarToVector256(result); // < v, v, v, v >
- }
- else if (Avx.IsSupported)
- {
- Vector128<long> result = Vector128.Create(value); // < v, v, ?, ? >
- return Avx.InsertVector128(result.ToVector256Unsafe(), result, 1); // < v, v, v, v >
- }
- }
-
- return SoftwareFallback(value);
-
- static Vector256<long> SoftwareFallback(long value)
- {
- long* pResult = stackalloc long[4]
- {
- value,
- value,
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector256<long>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{SByte}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{SByte}" /> with all elements initialized to <paramref name="value" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector256<sbyte> Create(sbyte value)
- {
- if (Avx2.IsSupported)
- {
- Vector128<sbyte> result = Vector128.CreateScalarUnsafe(value); // < v, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? >
- return Avx2.BroadcastScalarToVector256(result); // < v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v >
- }
-
- if (Avx.IsSupported)
- {
- Vector128<sbyte> result = Vector128.Create(value); // < v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? >
- return Avx.InsertVector128(result.ToVector256Unsafe(), result, 1); // < v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v >
- }
-
- return SoftwareFallback(value);
-
- static Vector256<sbyte> SoftwareFallback(sbyte value)
- {
- sbyte* pResult = stackalloc sbyte[32]
- {
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector256<sbyte>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{Single}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Single}" /> with all elements initialized to <paramref name="value" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector256<float> Create(float value)
- {
- if (Avx2.IsSupported)
- {
- Vector128<float> result = Vector128.CreateScalarUnsafe(value); // < v, ?, ?, ?, ?, ?, ?, ? >
- return Avx2.BroadcastScalarToVector256(result); // < v, v, v, v, v, v, v, v >
- }
-
- if (Avx.IsSupported)
- {
- Vector128<float> result = Vector128.Create(value); // < v, v, v, v, ?, ?, ?, ? >
- return Avx.InsertVector128(result.ToVector256Unsafe(), result, 1); // < v, v, v, v, v, v, v, v >
- }
-
- return SoftwareFallback(value);
-
- static Vector256<float> SoftwareFallback(float value)
- {
- float* pResult = stackalloc float[8]
- {
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector256<float>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{UInt16}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{UInt16}" /> with all elements initialized to <paramref name="value" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector256<ushort> Create(ushort value)
- {
- if (Avx2.IsSupported)
- {
- Vector128<ushort> result = Vector128.CreateScalarUnsafe(value); // < v, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? >
- return Avx2.BroadcastScalarToVector256(result); // < v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v >
- }
-
- if (Avx.IsSupported)
- {
- Vector128<ushort> result = Vector128.Create(value); // < v, v, v, v, v, v, v, v, ?, ?, ?, ?, ?, ?, ?, ? >
- return Avx.InsertVector128(result.ToVector256Unsafe(), result, 1); // < v, v, v, v, v, v, v, v, v, v, v, v, v, v, v, v >
- }
-
- return SoftwareFallback(value);
-
- static Vector256<ushort> SoftwareFallback(ushort value)
- {
- ushort* pResult = stackalloc ushort[16]
- {
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector256<ushort>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{UInt32}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{UInt32}" /> with all elements initialized to <paramref name="value" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector256<uint> Create(uint value)
- {
- if (Avx2.IsSupported)
- {
- Vector128<uint> result = Vector128.CreateScalarUnsafe(value); // < v, ?, ?, ?, ?, ?, ?, ? >
- return Avx2.BroadcastScalarToVector256(result); // < v, v, v, v, v, v, v, v >
- }
-
- if (Avx.IsSupported)
- {
- Vector128<uint> result = Vector128.Create(value); // < v, v, v, v, ?, ?, ?, ? >
- return Avx.InsertVector128(result.ToVector256Unsafe(), result, 1); // < v, v, v, v, v, v, v, v >
- }
-
- return SoftwareFallback(value);
-
- static Vector256<uint> SoftwareFallback(uint value)
- {
- uint* pResult = stackalloc uint[8]
- {
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector256<uint>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{UInt64}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{UInt64}" /> with all elements initialized to <paramref name="value" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector256<ulong> Create(ulong value)
- {
- if (Sse2.X64.IsSupported)
- {
- if (Avx2.IsSupported)
- {
- Vector128<ulong> result = Vector128.CreateScalarUnsafe(value); // < v, ?, ?, ? >
- return Avx2.BroadcastScalarToVector256(result); // < v, v, v, v >
- }
- else if (Avx.IsSupported)
- {
- Vector128<ulong> result = Vector128.Create(value); // < v, v, ?, ? >
- return Avx.InsertVector128(result.ToVector256Unsafe(), result, 1); // < v, v, v, v >
- }
- }
-
- return SoftwareFallback(value);
-
- static Vector256<ulong> SoftwareFallback(ulong value)
- {
- ulong* pResult = stackalloc ulong[4]
- {
- value,
- value,
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector256<ulong>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{Byte}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <param name="e2">The value that element 2 will be initialized to.</param>
- /// <param name="e3">The value that element 3 will be initialized to.</param>
- /// <param name="e4">The value that element 4 will be initialized to.</param>
- /// <param name="e5">The value that element 5 will be initialized to.</param>
- /// <param name="e6">The value that element 6 will be initialized to.</param>
- /// <param name="e7">The value that element 7 will be initialized to.</param>
- /// <param name="e8">The value that element 8 will be initialized to.</param>
- /// <param name="e9">The value that element 9 will be initialized to.</param>
- /// <param name="e10">The value that element 10 will be initialized to.</param>
- /// <param name="e11">The value that element 11 will be initialized to.</param>
- /// <param name="e12">The value that element 12 will be initialized to.</param>
- /// <param name="e13">The value that element 13 will be initialized to.</param>
- /// <param name="e14">The value that element 14 will be initialized to.</param>
- /// <param name="e15">The value that element 15 will be initialized to.</param>
- /// <param name="e16">The value that element 16 will be initialized to.</param>
- /// <param name="e17">The value that element 17 will be initialized to.</param>
- /// <param name="e18">The value that element 18 will be initialized to.</param>
- /// <param name="e19">The value that element 19 will be initialized to.</param>
- /// <param name="e20">The value that element 20 will be initialized to.</param>
- /// <param name="e21">The value that element 21 will be initialized to.</param>
- /// <param name="e22">The value that element 22 will be initialized to.</param>
- /// <param name="e23">The value that element 23 will be initialized to.</param>
- /// <param name="e24">The value that element 24 will be initialized to.</param>
- /// <param name="e25">The value that element 25 will be initialized to.</param>
- /// <param name="e26">The value that element 26 will be initialized to.</param>
- /// <param name="e27">The value that element 27 will be initialized to.</param>
- /// <param name="e28">The value that element 28 will be initialized to.</param>
- /// <param name="e29">The value that element 29 will be initialized to.</param>
- /// <param name="e30">The value that element 30 will be initialized to.</param>
- /// <param name="e31">The value that element 31 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Byte}" /> with each element initialized to corresponding specified value.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector256<byte> Create(byte e0, byte e1, byte e2, byte e3, byte e4, byte e5, byte e6, byte e7, byte e8, byte e9, byte e10, byte e11, byte e12, byte e13, byte e14, byte e15, byte e16, byte e17, byte e18, byte e19, byte e20, byte e21, byte e22, byte e23, byte e24, byte e25, byte e26, byte e27, byte e28, byte e29, byte e30, byte e31)
- {
- if (Avx.IsSupported)
- {
- Vector128<byte> lo128 = Vector128.Create(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15);
- Vector128<byte> hi128 = Vector128.Create(e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31);
- return Create(lo128, hi128);
- }
-
- return SoftwareFallback(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31);
-
- static Vector256<byte> SoftwareFallback(byte e0, byte e1, byte e2, byte e3, byte e4, byte e5, byte e6, byte e7, byte e8, byte e9, byte e10, byte e11, byte e12, byte e13, byte e14, byte e15, byte e16, byte e17, byte e18, byte e19, byte e20, byte e21, byte e22, byte e23, byte e24, byte e25, byte e26, byte e27, byte e28, byte e29, byte e30, byte e31)
- {
- byte* pResult = stackalloc byte[32]
- {
- e0,
- e1,
- e2,
- e3,
- e4,
- e5,
- e6,
- e7,
- e8,
- e9,
- e10,
- e11,
- e12,
- e13,
- e14,
- e15,
- e16,
- e17,
- e18,
- e19,
- e20,
- e21,
- e22,
- e23,
- e24,
- e25,
- e26,
- e27,
- e28,
- e29,
- e30,
- e31,
- };
-
- return Unsafe.AsRef<Vector256<byte>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{Double}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <param name="e2">The value that element 2 will be initialized to.</param>
- /// <param name="e3">The value that element 3 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Double}" /> with each element initialized to corresponding specified value.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector256<double> Create(double e0, double e1, double e2, double e3)
- {
- if (Avx.IsSupported)
- {
- Vector128<double> lo128 = Vector128.Create(e0, e1);
- Vector128<double> hi128 = Vector128.Create(e2, e3);
- return Create(lo128, hi128);
- }
-
- return SoftwareFallback(e0, e1, e2, e3);
-
- static Vector256<double> SoftwareFallback(double e0, double e1, double e2, double e3)
- {
- double* pResult = stackalloc double[4]
- {
- e0,
- e1,
- e2,
- e3,
- };
-
- return Unsafe.AsRef<Vector256<double>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{Int16}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <param name="e2">The value that element 2 will be initialized to.</param>
- /// <param name="e3">The value that element 3 will be initialized to.</param>
- /// <param name="e4">The value that element 4 will be initialized to.</param>
- /// <param name="e5">The value that element 5 will be initialized to.</param>
- /// <param name="e6">The value that element 6 will be initialized to.</param>
- /// <param name="e7">The value that element 7 will be initialized to.</param>
- /// <param name="e8">The value that element 8 will be initialized to.</param>
- /// <param name="e9">The value that element 9 will be initialized to.</param>
- /// <param name="e10">The value that element 10 will be initialized to.</param>
- /// <param name="e11">The value that element 11 will be initialized to.</param>
- /// <param name="e12">The value that element 12 will be initialized to.</param>
- /// <param name="e13">The value that element 13 will be initialized to.</param>
- /// <param name="e14">The value that element 14 will be initialized to.</param>
- /// <param name="e15">The value that element 15 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Int16}" /> with each element initialized to corresponding specified value.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector256<short> Create(short e0, short e1, short e2, short e3, short e4, short e5, short e6, short e7, short e8, short e9, short e10, short e11, short e12, short e13, short e14, short e15)
- {
- if (Avx.IsSupported)
- {
- Vector128<short> lo128 = Vector128.Create(e0, e1, e2, e3, e4, e5, e6, e7);
- Vector128<short> hi128 = Vector128.Create(e8, e9, e10, e11, e12, e13, e14, e15);
- return Create(lo128, hi128);
- }
-
- return SoftwareFallback(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15);
-
- static Vector256<short> SoftwareFallback(short e0, short e1, short e2, short e3, short e4, short e5, short e6, short e7, short e8, short e9, short e10, short e11, short e12, short e13, short e14, short e15)
- {
- short* pResult = stackalloc short[16]
- {
- e0,
- e1,
- e2,
- e3,
- e4,
- e5,
- e6,
- e7,
- e8,
- e9,
- e10,
- e11,
- e12,
- e13,
- e14,
- e15,
- };
-
- return Unsafe.AsRef<Vector256<short>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{Int32}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <param name="e2">The value that element 2 will be initialized to.</param>
- /// <param name="e3">The value that element 3 will be initialized to.</param>
- /// <param name="e4">The value that element 4 will be initialized to.</param>
- /// <param name="e5">The value that element 5 will be initialized to.</param>
- /// <param name="e6">The value that element 6 will be initialized to.</param>
- /// <param name="e7">The value that element 7 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Int32}" /> with each element initialized to corresponding specified value.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector256<int> Create(int e0, int e1, int e2, int e3, int e4, int e5, int e6, int e7)
- {
- if (Avx.IsSupported)
- {
- Vector128<int> lo128 = Vector128.Create(e0, e1, e2, e3);
- Vector128<int> hi128 = Vector128.Create(e4, e5, e6, e7);
- return Create(lo128, hi128);
- }
-
- return SoftwareFallback(e0, e1, e2, e3, e4, e5, e6, e7);
-
- static Vector256<int> SoftwareFallback(int e0, int e1, int e2, int e3, int e4, int e5, int e6, int e7)
- {
- int* pResult = stackalloc int[8]
- {
- e0,
- e1,
- e2,
- e3,
- e4,
- e5,
- e6,
- e7,
- };
-
- return Unsafe.AsRef<Vector256<int>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{Int64}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <param name="e2">The value that element 2 will be initialized to.</param>
- /// <param name="e3">The value that element 3 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Int64}" /> with each element initialized to corresponding specified value.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector256<long> Create(long e0, long e1, long e2, long e3)
- {
- if (Sse2.X64.IsSupported && Avx.IsSupported)
- {
- Vector128<long> lo128 = Vector128.Create(e0, e1);
- Vector128<long> hi128 = Vector128.Create(e2, e3);
- return Create(lo128, hi128);
- }
-
- return SoftwareFallback(e0, e1, e2, e3);
-
- static Vector256<long> SoftwareFallback(long e0, long e1, long e2, long e3)
- {
- long* pResult = stackalloc long[4]
- {
- e0,
- e1,
- e2,
- e3,
- };
-
- return Unsafe.AsRef<Vector256<long>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{SByte}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <param name="e2">The value that element 2 will be initialized to.</param>
- /// <param name="e3">The value that element 3 will be initialized to.</param>
- /// <param name="e4">The value that element 4 will be initialized to.</param>
- /// <param name="e5">The value that element 5 will be initialized to.</param>
- /// <param name="e6">The value that element 6 will be initialized to.</param>
- /// <param name="e7">The value that element 7 will be initialized to.</param>
- /// <param name="e8">The value that element 8 will be initialized to.</param>
- /// <param name="e9">The value that element 9 will be initialized to.</param>
- /// <param name="e10">The value that element 10 will be initialized to.</param>
- /// <param name="e11">The value that element 11 will be initialized to.</param>
- /// <param name="e12">The value that element 12 will be initialized to.</param>
- /// <param name="e13">The value that element 13 will be initialized to.</param>
- /// <param name="e14">The value that element 14 will be initialized to.</param>
- /// <param name="e15">The value that element 15 will be initialized to.</param>
- /// <param name="e16">The value that element 16 will be initialized to.</param>
- /// <param name="e17">The value that element 17 will be initialized to.</param>
- /// <param name="e18">The value that element 18 will be initialized to.</param>
- /// <param name="e19">The value that element 19 will be initialized to.</param>
- /// <param name="e20">The value that element 20 will be initialized to.</param>
- /// <param name="e21">The value that element 21 will be initialized to.</param>
- /// <param name="e22">The value that element 22 will be initialized to.</param>
- /// <param name="e23">The value that element 23 will be initialized to.</param>
- /// <param name="e24">The value that element 24 will be initialized to.</param>
- /// <param name="e25">The value that element 25 will be initialized to.</param>
- /// <param name="e26">The value that element 26 will be initialized to.</param>
- /// <param name="e27">The value that element 27 will be initialized to.</param>
- /// <param name="e28">The value that element 28 will be initialized to.</param>
- /// <param name="e29">The value that element 29 will be initialized to.</param>
- /// <param name="e30">The value that element 30 will be initialized to.</param>
- /// <param name="e31">The value that element 31 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{SByte}" /> with each element initialized to corresponding specified value.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector256<sbyte> Create(sbyte e0, sbyte e1, sbyte e2, sbyte e3, sbyte e4, sbyte e5, sbyte e6, sbyte e7, sbyte e8, sbyte e9, sbyte e10, sbyte e11, sbyte e12, sbyte e13, sbyte e14, sbyte e15, sbyte e16, sbyte e17, sbyte e18, sbyte e19, sbyte e20, sbyte e21, sbyte e22, sbyte e23, sbyte e24, sbyte e25, sbyte e26, sbyte e27, sbyte e28, sbyte e29, sbyte e30, sbyte e31)
- {
- if (Avx.IsSupported)
- {
- Vector128<sbyte> lo128 = Vector128.Create(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15);
- Vector128<sbyte> hi128 = Vector128.Create(e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31);
- return Create(lo128, hi128);
- }
-
- return SoftwareFallback(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31);
-
- static Vector256<sbyte> SoftwareFallback(sbyte e0, sbyte e1, sbyte e2, sbyte e3, sbyte e4, sbyte e5, sbyte e6, sbyte e7, sbyte e8, sbyte e9, sbyte e10, sbyte e11, sbyte e12, sbyte e13, sbyte e14, sbyte e15, sbyte e16, sbyte e17, sbyte e18, sbyte e19, sbyte e20, sbyte e21, sbyte e22, sbyte e23, sbyte e24, sbyte e25, sbyte e26, sbyte e27, sbyte e28, sbyte e29, sbyte e30, sbyte e31)
- {
- sbyte* pResult = stackalloc sbyte[32]
- {
- e0,
- e1,
- e2,
- e3,
- e4,
- e5,
- e6,
- e7,
- e8,
- e9,
- e10,
- e11,
- e12,
- e13,
- e14,
- e15,
- e16,
- e17,
- e18,
- e19,
- e20,
- e21,
- e22,
- e23,
- e24,
- e25,
- e26,
- e27,
- e28,
- e29,
- e30,
- e31,
- };
-
- return Unsafe.AsRef<Vector256<sbyte>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{Single}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <param name="e2">The value that element 2 will be initialized to.</param>
- /// <param name="e3">The value that element 3 will be initialized to.</param>
- /// <param name="e4">The value that element 4 will be initialized to.</param>
- /// <param name="e5">The value that element 5 will be initialized to.</param>
- /// <param name="e6">The value that element 6 will be initialized to.</param>
- /// <param name="e7">The value that element 7 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Single}" /> with each element initialized to corresponding specified value.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector256<float> Create(float e0, float e1, float e2, float e3, float e4, float e5, float e6, float e7)
- {
- if (Avx.IsSupported)
- {
- Vector128<float> lo128 = Vector128.Create(e0, e1, e2, e3);
- Vector128<float> hi128 = Vector128.Create(e4, e5, e6, e7);
- return Create(lo128, hi128);
- }
-
- return SoftwareFallback(e0, e1, e2, e3, e4, e5, e6, e7);
-
- static Vector256<float> SoftwareFallback(float e0, float e1, float e2, float e3, float e4, float e5, float e6, float e7)
- {
- float* pResult = stackalloc float[8]
- {
- e0,
- e1,
- e2,
- e3,
- e4,
- e5,
- e6,
- e7,
- };
-
- return Unsafe.AsRef<Vector256<float>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{UInt16}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <param name="e2">The value that element 2 will be initialized to.</param>
- /// <param name="e3">The value that element 3 will be initialized to.</param>
- /// <param name="e4">The value that element 4 will be initialized to.</param>
- /// <param name="e5">The value that element 5 will be initialized to.</param>
- /// <param name="e6">The value that element 6 will be initialized to.</param>
- /// <param name="e7">The value that element 7 will be initialized to.</param>
- /// <param name="e8">The value that element 8 will be initialized to.</param>
- /// <param name="e9">The value that element 9 will be initialized to.</param>
- /// <param name="e10">The value that element 10 will be initialized to.</param>
- /// <param name="e11">The value that element 11 will be initialized to.</param>
- /// <param name="e12">The value that element 12 will be initialized to.</param>
- /// <param name="e13">The value that element 13 will be initialized to.</param>
- /// <param name="e14">The value that element 14 will be initialized to.</param>
- /// <param name="e15">The value that element 15 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{UInt16}" /> with each element initialized to corresponding specified value.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector256<ushort> Create(ushort e0, ushort e1, ushort e2, ushort e3, ushort e4, ushort e5, ushort e6, ushort e7, ushort e8, ushort e9, ushort e10, ushort e11, ushort e12, ushort e13, ushort e14, ushort e15)
- {
- if (Avx.IsSupported)
- {
- Vector128<ushort> lo128 = Vector128.Create(e0, e1, e2, e3, e4, e5, e6, e7);
- Vector128<ushort> hi128 = Vector128.Create(e8, e9, e10, e11, e12, e13, e14, e15);
- return Create(lo128, hi128);
- }
-
- return SoftwareFallback(e0, e1, e2, e3, e4, e5, e6, e7, e8, e9, e10, e11, e12, e13, e14, e15);
-
- static Vector256<ushort> SoftwareFallback(ushort e0, ushort e1, ushort e2, ushort e3, ushort e4, ushort e5, ushort e6, ushort e7, ushort e8, ushort e9, ushort e10, ushort e11, ushort e12, ushort e13, ushort e14, ushort e15)
- {
- ushort* pResult = stackalloc ushort[16]
- {
- e0,
- e1,
- e2,
- e3,
- e4,
- e5,
- e6,
- e7,
- e8,
- e9,
- e10,
- e11,
- e12,
- e13,
- e14,
- e15,
- };
-
- return Unsafe.AsRef<Vector256<ushort>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{UInt32}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <param name="e2">The value that element 2 will be initialized to.</param>
- /// <param name="e3">The value that element 3 will be initialized to.</param>
- /// <param name="e4">The value that element 4 will be initialized to.</param>
- /// <param name="e5">The value that element 5 will be initialized to.</param>
- /// <param name="e6">The value that element 6 will be initialized to.</param>
- /// <param name="e7">The value that element 7 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{UInt32}" /> with each element initialized to corresponding specified value.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector256<uint> Create(uint e0, uint e1, uint e2, uint e3, uint e4, uint e5, uint e6, uint e7)
- {
- if (Avx.IsSupported)
- {
- Vector128<uint> lo128 = Vector128.Create(e0, e1, e2, e3);
- Vector128<uint> hi128 = Vector128.Create(e4, e5, e6, e7);
- return Create(lo128, hi128);
- }
-
- return SoftwareFallback(e0, e1, e2, e3, e4, e5, e6, e7);
-
- static Vector256<uint> SoftwareFallback(uint e0, uint e1, uint e2, uint e3, uint e4, uint e5, uint e6, uint e7)
- {
- uint* pResult = stackalloc uint[8]
- {
- e0,
- e1,
- e2,
- e3,
- e4,
- e5,
- e6,
- e7,
- };
-
- return Unsafe.AsRef<Vector256<uint>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{UInt64}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <param name="e2">The value that element 2 will be initialized to.</param>
- /// <param name="e3">The value that element 3 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{UInt64}" /> with each element initialized to corresponding specified value.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector256<ulong> Create(ulong e0, ulong e1, ulong e2, ulong e3)
- {
- if (Sse2.X64.IsSupported && Avx.IsSupported)
- {
- Vector128<ulong> lo128 = Vector128.Create(e0, e1);
- Vector128<ulong> hi128 = Vector128.Create(e2, e3);
- return Create(lo128, hi128);
- }
-
- return SoftwareFallback(e0, e1, e2, e3);
-
- static Vector256<ulong> SoftwareFallback(ulong e0, ulong e1, ulong e2, ulong e3)
- {
- ulong* pResult = stackalloc ulong[4]
- {
- e0,
- e1,
- e2,
- e3,
- };
-
- return Unsafe.AsRef<Vector256<ulong>>(pResult);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{Byte}" /> instance from two <see cref="Vector128{Byte}" /> instances.</summary>
- /// <param name="lower">The value that the lower 128-bits will be initialized to.</param>
- /// <param name="upper">The value that the upper 128-bits will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Byte}" /> initialized from <paramref name="lower" /> and <paramref name="upper" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector256<byte> Create(Vector128<byte> lower, Vector128<byte> upper)
- {
- if (Avx.IsSupported)
- {
- Vector256<byte> result = lower.ToVector256Unsafe();
- return result.WithUpper(upper);
- }
-
- return SoftwareFallback(lower, upper);
-
- static Vector256<byte> SoftwareFallback(Vector128<byte> lower, Vector128<byte> upper)
- {
- Vector256<byte> result256 = Vector256<byte>.Zero;
-
- ref Vector128<byte> result128 = ref Unsafe.As<Vector256<byte>, Vector128<byte>>(ref result256);
- result128 = lower;
- Unsafe.Add(ref result128, 1) = upper;
-
- return result256;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{Double}" /> instance from two <see cref="Vector128{Double}" /> instances.</summary>
- /// <param name="lower">The value that the lower 128-bits will be initialized to.</param>
- /// <param name="upper">The value that the upper 128-bits will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Double}" /> initialized from <paramref name="lower" /> and <paramref name="upper" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector256<double> Create(Vector128<double> lower, Vector128<double> upper)
- {
- if (Avx.IsSupported)
- {
- Vector256<double> result = lower.ToVector256Unsafe();
- return result.WithUpper(upper);
- }
-
- return SoftwareFallback(lower, upper);
-
- static Vector256<double> SoftwareFallback(Vector128<double> lower, Vector128<double> upper)
- {
- Vector256<double> result256 = Vector256<double>.Zero;
-
- ref Vector128<double> result128 = ref Unsafe.As<Vector256<double>, Vector128<double>>(ref result256);
- result128 = lower;
- Unsafe.Add(ref result128, 1) = upper;
-
- return result256;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{Int16}" /> instance from two <see cref="Vector128{Int16}" /> instances.</summary>
- /// <param name="lower">The value that the lower 128-bits will be initialized to.</param>
- /// <param name="upper">The value that the upper 128-bits will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Int16}" /> initialized from <paramref name="lower" /> and <paramref name="upper" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector256<short> Create(Vector128<short> lower, Vector128<short> upper)
- {
- if (Avx.IsSupported)
- {
- Vector256<short> result = lower.ToVector256Unsafe();
- return result.WithUpper(upper);
- }
-
- return SoftwareFallback(lower, upper);
-
- static Vector256<short> SoftwareFallback(Vector128<short> lower, Vector128<short> upper)
- {
- Vector256<short> result256 = Vector256<short>.Zero;
-
- ref Vector128<short> result128 = ref Unsafe.As<Vector256<short>, Vector128<short>>(ref result256);
- result128 = lower;
- Unsafe.Add(ref result128, 1) = upper;
-
- return result256;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{Int32}" /> instance from two <see cref="Vector128{Int32}" /> instances.</summary>
- /// <param name="lower">The value that the lower 128-bits will be initialized to.</param>
- /// <param name="upper">The value that the upper 128-bits will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Int32}" /> initialized from <paramref name="lower" /> and <paramref name="upper" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector256<int> Create(Vector128<int> lower, Vector128<int> upper)
- {
- if (Avx.IsSupported)
- {
- Vector256<int> result = lower.ToVector256Unsafe();
- return result.WithUpper(upper);
- }
-
- return SoftwareFallback(lower, upper);
-
- static Vector256<int> SoftwareFallback(Vector128<int> lower, Vector128<int> upper)
- {
- Vector256<int> result256 = Vector256<int>.Zero;
-
- ref Vector128<int> result128 = ref Unsafe.As<Vector256<int>, Vector128<int>>(ref result256);
- result128 = lower;
- Unsafe.Add(ref result128, 1) = upper;
-
- return result256;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{Int64}" /> instance from two <see cref="Vector128{Int64}" /> instances.</summary>
- /// <param name="lower">The value that the lower 128-bits will be initialized to.</param>
- /// <param name="upper">The value that the upper 128-bits will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Int64}" /> initialized from <paramref name="lower" /> and <paramref name="upper" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector256<long> Create(Vector128<long> lower, Vector128<long> upper)
- {
- if (Avx.IsSupported)
- {
- Vector256<long> result = lower.ToVector256Unsafe();
- return result.WithUpper(upper);
- }
-
- return SoftwareFallback(lower, upper);
-
- static Vector256<long> SoftwareFallback(Vector128<long> lower, Vector128<long> upper)
- {
- Vector256<long> result256 = Vector256<long>.Zero;
-
- ref Vector128<long> result128 = ref Unsafe.As<Vector256<long>, Vector128<long>>(ref result256);
- result128 = lower;
- Unsafe.Add(ref result128, 1) = upper;
-
- return result256;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{SByte}" /> instance from two <see cref="Vector128{SByte}" /> instances.</summary>
- /// <param name="lower">The value that the lower 128-bits will be initialized to.</param>
- /// <param name="upper">The value that the upper 128-bits will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{SByte}" /> initialized from <paramref name="lower" /> and <paramref name="upper" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector256<sbyte> Create(Vector128<sbyte> lower, Vector128<sbyte> upper)
- {
- if (Avx.IsSupported)
- {
- Vector256<sbyte> result = lower.ToVector256Unsafe();
- return result.WithUpper(upper);
- }
-
- return SoftwareFallback(lower, upper);
-
- static Vector256<sbyte> SoftwareFallback(Vector128<sbyte> lower, Vector128<sbyte> upper)
- {
- Vector256<sbyte> result256 = Vector256<sbyte>.Zero;
-
- ref Vector128<sbyte> result128 = ref Unsafe.As<Vector256<sbyte>, Vector128<sbyte>>(ref result256);
- result128 = lower;
- Unsafe.Add(ref result128, 1) = upper;
-
- return result256;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{Single}" /> instance from two <see cref="Vector128{Single}" /> instances.</summary>
- /// <param name="lower">The value that the lower 128-bits will be initialized to.</param>
- /// <param name="upper">The value that the upper 128-bits will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Single}" /> initialized from <paramref name="lower" /> and <paramref name="upper" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector256<float> Create(Vector128<float> lower, Vector128<float> upper)
- {
- if (Avx.IsSupported)
- {
- Vector256<float> result = lower.ToVector256Unsafe();
- return result.WithUpper(upper);
- }
-
- return SoftwareFallback(lower, upper);
-
- static Vector256<float> SoftwareFallback(Vector128<float> lower, Vector128<float> upper)
- {
- Vector256<float> result256 = Vector256<float>.Zero;
-
- ref Vector128<float> result128 = ref Unsafe.As<Vector256<float>, Vector128<float>>(ref result256);
- result128 = lower;
- Unsafe.Add(ref result128, 1) = upper;
-
- return result256;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{UInt16}" /> instance from two <see cref="Vector128{UInt16}" /> instances.</summary>
- /// <param name="lower">The value that the lower 128-bits will be initialized to.</param>
- /// <param name="upper">The value that the upper 128-bits will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{UInt16}" /> initialized from <paramref name="lower" /> and <paramref name="upper" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector256<ushort> Create(Vector128<ushort> lower, Vector128<ushort> upper)
- {
- if (Avx.IsSupported)
- {
- Vector256<ushort> result = lower.ToVector256Unsafe();
- return result.WithUpper(upper);
- }
-
- return SoftwareFallback(lower, upper);
-
- static Vector256<ushort> SoftwareFallback(Vector128<ushort> lower, Vector128<ushort> upper)
- {
- Vector256<ushort> result256 = Vector256<ushort>.Zero;
-
- ref Vector128<ushort> result128 = ref Unsafe.As<Vector256<ushort>, Vector128<ushort>>(ref result256);
- result128 = lower;
- Unsafe.Add(ref result128, 1) = upper;
-
- return result256;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{UInt32}" /> instance from two <see cref="Vector128{UInt32}" /> instances.</summary>
- /// <param name="lower">The value that the lower 128-bits will be initialized to.</param>
- /// <param name="upper">The value that the upper 128-bits will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{UInt32}" /> initialized from <paramref name="lower" /> and <paramref name="upper" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector256<uint> Create(Vector128<uint> lower, Vector128<uint> upper)
- {
- if (Avx.IsSupported)
- {
- Vector256<uint> result = lower.ToVector256Unsafe();
- return result.WithUpper(upper);
- }
-
- return SoftwareFallback(lower, upper);
-
- static Vector256<uint> SoftwareFallback(Vector128<uint> lower, Vector128<uint> upper)
- {
- Vector256<uint> result256 = Vector256<uint>.Zero;
-
- ref Vector128<uint> result128 = ref Unsafe.As<Vector256<uint>, Vector128<uint>>(ref result256);
- result128 = lower;
- Unsafe.Add(ref result128, 1) = upper;
-
- return result256;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{UInt64}" /> instance from two <see cref="Vector128{UInt64}" /> instances.</summary>
- /// <param name="lower">The value that the lower 128-bits will be initialized to.</param>
- /// <param name="upper">The value that the upper 128-bits will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{UInt64}" /> initialized from <paramref name="lower" /> and <paramref name="upper" />.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector256<ulong> Create(Vector128<ulong> lower, Vector128<ulong> upper)
- {
- if (Avx.IsSupported)
- {
- Vector256<ulong> result = lower.ToVector256Unsafe();
- return result.WithUpper(upper);
- }
-
- return SoftwareFallback(lower, upper);
-
- static Vector256<ulong> SoftwareFallback(Vector128<ulong> lower, Vector128<ulong> upper)
- {
- Vector256<ulong> result256 = Vector256<ulong>.Zero;
-
- ref Vector128<ulong> result128 = ref Unsafe.As<Vector256<ulong>, Vector128<ulong>>(ref result256);
- result128 = lower;
- Unsafe.Add(ref result128, 1) = upper;
-
- return result256;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{Byte}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Byte}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements initialized to zero.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector256<byte> CreateScalar(byte value)
- {
- if (Avx.IsSupported)
- {
- return Vector128.CreateScalar(value).ToVector256();
- }
-
- return SoftwareFallback(value);
-
- static Vector256<byte> SoftwareFallback(byte value)
- {
- var result = Vector256<byte>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector256<byte>, byte>(ref result), value);
- return result;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{Double}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Double}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements initialized to zero.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector256<double> CreateScalar(double value)
- {
- if (Avx.IsSupported)
- {
- return Vector128.CreateScalar(value).ToVector256();
- }
-
- return SoftwareFallback(value);
-
- static Vector256<double> SoftwareFallback(double value)
- {
- var result = Vector256<double>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector256<double>, byte>(ref result), value);
- return result;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{Int16}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Int16}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements initialized to zero.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector256<short> CreateScalar(short value)
- {
- if (Avx.IsSupported)
- {
- return Vector128.CreateScalar(value).ToVector256();
- }
-
- return SoftwareFallback(value);
-
- static Vector256<short> SoftwareFallback(short value)
- {
- var result = Vector256<short>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector256<short>, byte>(ref result), value);
- return result;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{Int32}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Int32}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements initialized to zero.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector256<int> CreateScalar(int value)
- {
- if (Avx.IsSupported)
- {
- return Vector128.CreateScalar(value).ToVector256();
- }
-
- return SoftwareFallback(value);
-
- static Vector256<int> SoftwareFallback(int value)
- {
- var result = Vector256<int>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector256<int>, byte>(ref result), value);
- return result;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{Int64}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Int64}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements initialized to zero.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector256<long> CreateScalar(long value)
- {
- if (Sse2.X64.IsSupported && Avx.IsSupported)
- {
- return Vector128.CreateScalar(value).ToVector256();
- }
-
- return SoftwareFallback(value);
-
- static Vector256<long> SoftwareFallback(long value)
- {
- var result = Vector256<long>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector256<long>, byte>(ref result), value);
- return result;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{SByte}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{SByte}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements initialized to zero.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector256<sbyte> CreateScalar(sbyte value)
- {
- if (Avx.IsSupported)
- {
- return Vector128.CreateScalar(value).ToVector256();
- }
-
- return SoftwareFallback(value);
-
- static Vector256<sbyte> SoftwareFallback(sbyte value)
- {
- var result = Vector256<sbyte>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector256<sbyte>, byte>(ref result), value);
- return result;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{Single}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Single}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements initialized to zero.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static unsafe Vector256<float> CreateScalar(float value)
- {
- if (Avx.IsSupported)
- {
- return Vector128.CreateScalar(value).ToVector256();
- }
-
- return SoftwareFallback(value);
-
- static Vector256<float> SoftwareFallback(float value)
- {
- var result = Vector256<float>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector256<float>, byte>(ref result), value);
- return result;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{UInt16}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{UInt16}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements initialized to zero.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector256<ushort> CreateScalar(ushort value)
- {
- if (Avx.IsSupported)
- {
- return Vector128.CreateScalar(value).ToVector256();
- }
-
- return SoftwareFallback(value);
-
- static Vector256<ushort> SoftwareFallback(ushort value)
- {
- var result = Vector256<ushort>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector256<ushort>, byte>(ref result), value);
- return result;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{UInt32}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{UInt32}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements initialized to zero.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector256<uint> CreateScalar(uint value)
- {
- if (Avx.IsSupported)
- {
- return Vector128.CreateScalar(value).ToVector256();
- }
-
- return SoftwareFallback(value);
-
- static Vector256<uint> SoftwareFallback(uint value)
- {
- var result = Vector256<uint>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector256<uint>, byte>(ref result), value);
- return result;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{UInt64}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{UInt64}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements initialized to zero.</returns>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- [CLSCompliant(false)]
- public static unsafe Vector256<ulong> CreateScalar(ulong value)
- {
- if (Sse2.X64.IsSupported && Avx.IsSupported)
- {
- return Vector128.CreateScalar(value).ToVector256();
- }
-
- return SoftwareFallback(value);
-
- static Vector256<ulong> SoftwareFallback(ulong value)
- {
- var result = Vector256<ulong>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector256<ulong>, byte>(ref result), value);
- return result;
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{Byte}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Byte}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements left uninitialized.</returns>
- [Intrinsic]
- public static unsafe Vector256<byte> CreateScalarUnsafe(byte value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- byte* pResult = stackalloc byte[32];
- pResult[0] = value;
- return Unsafe.AsRef<Vector256<byte>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector256{Double}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Double}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements left uninitialized.</returns>
- [Intrinsic]
- public static unsafe Vector256<double> CreateScalarUnsafe(double value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- double* pResult = stackalloc double[4];
- pResult[0] = value;
- return Unsafe.AsRef<Vector256<double>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector256{Int16}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Int16}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements left uninitialized.</returns>
- [Intrinsic]
- public static unsafe Vector256<short> CreateScalarUnsafe(short value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- short* pResult = stackalloc short[16];
- pResult[0] = value;
- return Unsafe.AsRef<Vector256<short>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector256{Int32}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Int32}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements left uninitialized.</returns>
- [Intrinsic]
- public static unsafe Vector256<int> CreateScalarUnsafe(int value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- int* pResult = stackalloc int[8];
- pResult[0] = value;
- return Unsafe.AsRef<Vector256<int>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector256{Int64}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Int64}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements left uninitialized.</returns>
- [Intrinsic]
- public static unsafe Vector256<long> CreateScalarUnsafe(long value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- long* pResult = stackalloc long[4];
- pResult[0] = value;
- return Unsafe.AsRef<Vector256<long>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector256{SByte}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{SByte}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements left uninitialized.</returns>
- [Intrinsic]
- [CLSCompliant(false)]
- public static unsafe Vector256<sbyte> CreateScalarUnsafe(sbyte value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- sbyte* pResult = stackalloc sbyte[32];
- pResult[0] = value;
- return Unsafe.AsRef<Vector256<sbyte>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector256{Single}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{Single}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements left uninitialized.</returns>
- [Intrinsic]
- public static unsafe Vector256<float> CreateScalarUnsafe(float value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- float* pResult = stackalloc float[8];
- pResult[0] = value;
- return Unsafe.AsRef<Vector256<float>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector256{UInt16}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{UInt16}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements left uninitialized.</returns>
- [Intrinsic]
- [CLSCompliant(false)]
- public static unsafe Vector256<ushort> CreateScalarUnsafe(ushort value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- ushort* pResult = stackalloc ushort[16];
- pResult[0] = value;
- return Unsafe.AsRef<Vector256<ushort>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector256{UInt32}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{UInt32}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements left uninitialized.</returns>
- [Intrinsic]
- [CLSCompliant(false)]
- public static unsafe Vector256<uint> CreateScalarUnsafe(uint value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- uint* pResult = stackalloc uint[8];
- pResult[0] = value;
- return Unsafe.AsRef<Vector256<uint>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector256{UInt64}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector256{UInt64}" /> instance with the first element initialized to <paramref name="value" /> and the remaining elements left uninitialized.</returns>
- [Intrinsic]
- [CLSCompliant(false)]
- public static unsafe Vector256<ulong> CreateScalarUnsafe(ulong value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- ulong* pResult = stackalloc ulong[4];
- pResult[0] = value;
- return Unsafe.AsRef<Vector256<ulong>>(pResult);
- }
-
- /// <summary>Gets the element at the specified index.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to get the element from.</param>
- /// <param name="index">The index of the element to get.</param>
- /// <returns>The value of the element at <paramref name="index" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- /// <exception cref="ArgumentOutOfRangeException"><paramref name="index" /> was less than zero or greater than the number of elements.</exception>
- [Intrinsic]
- public static T GetElement<T>(this Vector256<T> vector, int index)
- where T : struct
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- if ((uint)(index) >= (uint)(Vector256<T>.Count))
- {
- ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index);
- }
-
- ref T e0 = ref Unsafe.As<Vector256<T>, T>(ref vector);
- return Unsafe.Add(ref e0, index);
- }
-
- /// <summary>Creates a new <see cref="Vector256{T}" /> with the element at the specified index set to the specified value and the remaining elements set to the same value as that in the given vector.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to get the remaining elements from.</param>
- /// <param name="index">The index of the element to set.</param>
- /// <param name="value">The value to set the element to.</param>
- /// <returns>A <see cref="Vector256{T}" /> with the value of the element at <paramref name="index" /> set to <paramref name="value" /> and the remaining elements set to the same value as that in <paramref name="vector" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- /// <exception cref="ArgumentOutOfRangeException"><paramref name="index" /> was less than zero or greater than the number of elements.</exception>
- [Intrinsic]
- public static Vector256<T> WithElement<T>(this Vector256<T> vector, int index, T value)
- where T : struct
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- if ((uint)(index) >= (uint)(Vector256<T>.Count))
- {
- ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index);
- }
-
- Vector256<T> result = vector;
- ref T e0 = ref Unsafe.As<Vector256<T>, T>(ref result);
- Unsafe.Add(ref e0, index) = value;
- return result;
- }
-
- /// <summary>Gets the value of the lower 128-bits as a new <see cref="Vector128{T}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to get the lower 128-bits from.</param>
- /// <returns>The value of the lower 128-bits as a new <see cref="Vector128{T}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- public static Vector128<T> GetLower<T>(this Vector256<T> vector)
- where T : struct
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
- return Unsafe.As<Vector256<T>, Vector128<T>>(ref vector);
- }
-
- /// <summary>Creates a new <see cref="Vector256{T}" /> with the lower 128-bits set to the specified value and the upper 128-bits set to the same value as that in the given vector.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to get the upper 128-bits from.</param>
- /// <param name="value">The value of the lower 128-bits as a <see cref="Vector128{T}" />.</param>
- /// <returns>A new <see cref="Vector256{T}" /> with the lower 128-bits set to <paramref name="value" /> and the upper 128-bits set to the same value as that in <paramref name="vector" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static Vector256<T> WithLower<T>(this Vector256<T> vector, Vector128<T> value)
- where T : struct
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- if (Avx2.IsSupported && ((typeof(T) != typeof(float)) && (typeof(T) != typeof(double))))
- {
- // All integral types generate the same instruction, so just pick one rather than handling each T separately
- return Avx2.InsertVector128(vector.AsByte(), value.AsByte(), 0).As<byte, T>();
- }
-
- if (Avx.IsSupported)
- {
- // All floating-point types generate the same instruction, so just pick one rather than handling each T separately
- // We also just fallback to this for integral types if AVX2 isn't supported, since that is still faster than software
- return Avx.InsertVector128(vector.AsSingle(), value.AsSingle(), 0).As<float, T>();
- }
-
- return SoftwareFallback(vector, value);
-
- static Vector256<T> SoftwareFallback(Vector256<T> vector, Vector128<T> value)
- {
- Vector256<T> result = vector;
- Unsafe.As<Vector256<T>, Vector128<T>>(ref result) = value;
- return result;
- }
- }
-
- /// <summary>Gets the value of the upper 128-bits as a new <see cref="Vector128{T}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to get the upper 128-bits from.</param>
- /// <returns>The value of the upper 128-bits as a new <see cref="Vector128{T}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static Vector128<T> GetUpper<T>(this Vector256<T> vector)
- where T : struct
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- if (Avx2.IsSupported && ((typeof(T) != typeof(float)) && (typeof(T) != typeof(double))))
- {
- // All integral types generate the same instruction, so just pick one rather than handling each T separately
- return Avx2.ExtractVector128(vector.AsByte(), 1).As<byte, T>();
- }
-
- if (Avx.IsSupported)
- {
- // All floating-point types generate the same instruction, so just pick one rather than handling each T separately
- // We also just fallback to this for integral types if AVX2 isn't supported, since that is still faster than software
- return Avx.ExtractVector128(vector.AsSingle(), 1).As<float, T>();
- }
-
- return SoftwareFallback(vector);
-
- static Vector128<T> SoftwareFallback(Vector256<T> vector)
- {
- ref Vector128<T> lower = ref Unsafe.As<Vector256<T>, Vector128<T>>(ref vector);
- return Unsafe.Add(ref lower, 1);
- }
- }
-
- /// <summary>Creates a new <see cref="Vector256{T}" /> with the upper 128-bits set to the specified value and the upper 128-bits set to the same value as that in the given vector.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to get the lower 128-bits from.</param>
- /// <param name="value">The value of the upper 128-bits as a <see cref="Vector128{T}" />.</param>
- /// <returns>A new <see cref="Vector256{T}" /> with the upper 128-bits set to <paramref name="value" /> and the lower 128-bits set to the same value as that in <paramref name="vector" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static Vector256<T> WithUpper<T>(this Vector256<T> vector, Vector128<T> value)
- where T : struct
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- if (Avx2.IsSupported && ((typeof(T) != typeof(float)) && (typeof(T) != typeof(double))))
- {
- // All integral types generate the same instruction, so just pick one rather than handling each T separately
- return Avx2.InsertVector128(vector.AsByte(), value.AsByte(), 1).As<byte, T>();
- }
-
- if (Avx.IsSupported)
- {
- // All floating-point types generate the same instruction, so just pick one rather than handling each T separately
- // We also just fallback to this for integral types if AVX2 isn't supported, since that is still faster than software
- return Avx.InsertVector128(vector.AsSingle(), value.AsSingle(), 1).As<float, T>();
- }
-
- return SoftwareFallback(vector, value);
-
- static Vector256<T> SoftwareFallback(Vector256<T> vector, Vector128<T> value)
- {
- Vector256<T> result = vector;
- ref Vector128<T> lower = ref Unsafe.As<Vector256<T>, Vector128<T>>(ref result);
- Unsafe.Add(ref lower, 1) = value;
- return result;
- }
- }
-
- /// <summary>Converts the given vector to a scalar containing the value of the first element.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to get the first element from.</param>
- /// <returns>A scalar <typeparamref name="T" /> containing the value of the first element.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- public static T ToScalar<T>(this Vector256<T> vector)
- where T : struct
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
- return Unsafe.As<Vector256<T>, T>(ref vector);
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector256DebugView_1.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector256DebugView_1.cs
deleted file mode 100644
index 5131341ad89..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector256DebugView_1.cs
+++ /dev/null
@@ -1,118 +0,0 @@
-// 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 Internal.Runtime.CompilerServices;
-
-namespace System.Runtime.Intrinsics
-{
- internal readonly struct Vector256DebugView<T> where T : struct
- {
- private readonly Vector256<T> _value;
-
- public Vector256DebugView(Vector256<T> value)
- {
- _value = value;
- }
-
- public byte[] ByteView
- {
- get
- {
- var items = new byte[32];
- Unsafe.WriteUnaligned(ref items[0], _value);
- return items;
- }
- }
-
- public double[] DoubleView
- {
- get
- {
- var items = new double[4];
- Unsafe.WriteUnaligned(ref Unsafe.As<double, byte>(ref items[0]), _value);
- return items;
- }
- }
-
- public short[] Int16View
- {
- get
- {
- var items = new short[16];
- Unsafe.WriteUnaligned(ref Unsafe.As<short, byte>(ref items[0]), _value);
- return items;
- }
- }
-
- public int[] Int32View
- {
- get
- {
- var items = new int[8];
- Unsafe.WriteUnaligned(ref Unsafe.As<int, byte>(ref items[0]), _value);
- return items;
- }
- }
-
- public long[] Int64View
- {
- get
- {
- var items = new long[4];
- Unsafe.WriteUnaligned(ref Unsafe.As<long, byte>(ref items[0]), _value);
- return items;
- }
- }
-
- public sbyte[] SByteView
- {
- get
- {
- var items = new sbyte[32];
- Unsafe.WriteUnaligned(ref Unsafe.As<sbyte, byte>(ref items[0]), _value);
- return items;
- }
- }
-
- public float[] SingleView
- {
- get
- {
- var items = new float[8];
- Unsafe.WriteUnaligned(ref Unsafe.As<float, byte>(ref items[0]), _value);
- return items;
- }
- }
-
- public ushort[] UInt16View
- {
- get
- {
- var items = new ushort[16];
- Unsafe.WriteUnaligned(ref Unsafe.As<ushort, byte>(ref items[0]), _value);
- return items;
- }
- }
-
- public uint[] UInt32View
- {
- get
- {
- var items = new uint[8];
- Unsafe.WriteUnaligned(ref Unsafe.As<uint, byte>(ref items[0]), _value);
- return items;
- }
- }
-
- public ulong[] UInt64View
- {
- get
- {
- var items = new ulong[4];
- Unsafe.WriteUnaligned(ref Unsafe.As<ulong, byte>(ref items[0]), _value);
- return items;
- }
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector256_1.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector256_1.cs
deleted file mode 100644
index 09962fc47b6..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector256_1.cs
+++ /dev/null
@@ -1,193 +0,0 @@
-// 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.Diagnostics;
-using System.Globalization;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Runtime.Intrinsics.X86;
-using System.Text;
-using Internal.Runtime.CompilerServices;
-
-namespace System.Runtime.Intrinsics
-{
- // We mark certain methods with AggressiveInlining to ensure that the JIT will
- // inline them. The JIT would otherwise not inline the method since it, at the
- // point it tries to determine inline profability, currently cannot determine
- // that most of the code-paths will be optimized away as "dead code".
- //
- // We then manually inline cases (such as certain intrinsic code-paths) that
- // will generate code small enough to make the AgressiveInlining profitable. The
- // other cases (such as the software fallback) are placed in their own method.
- // This ensures we get good codegen for the "fast-path" and allows the JIT to
- // determine inline profitability of the other paths as it would normally.
-
- [Intrinsic]
- [DebuggerDisplay("{DisplayString,nq}")]
- [DebuggerTypeProxy(typeof(Vector256DebugView<>))]
- [StructLayout(LayoutKind.Sequential, Size = Vector256.Size)]
- public readonly struct Vector256<T> : IEquatable<Vector256<T>>
- where T : struct
- {
- // These fields exist to ensure the alignment is 8, rather than 1.
- // This also allows the debug view to work https://github.com/dotnet/coreclr/issues/15694)
- private readonly ulong _00;
- private readonly ulong _01;
- private readonly ulong _02;
- private readonly ulong _03;
-
- /// <summary>Gets the number of <typeparamref name="T" /> that are in a <see cref="Vector256{T}" />.</summary>
- /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
- public static int Count
- {
- [Intrinsic]
- get
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
- return Vector256.Size / Unsafe.SizeOf<T>();
- }
- }
-
- /// <summary>Gets a new <see cref="Vector256{T}" /> with all elements initialized to zero.</summary>
- /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
- public static Vector256<T> Zero
- {
- [Intrinsic]
- get
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
- return default;
- }
- }
-
- internal unsafe string DisplayString
- {
- get
- {
- if (IsSupported)
- {
- return ToString();
- }
- else
- {
- return SR.NotSupported_Type;
- }
- }
- }
-
- internal static bool IsSupported
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get => (typeof(T) == typeof(byte)) ||
- (typeof(T) == typeof(sbyte)) ||
- (typeof(T) == typeof(short)) ||
- (typeof(T) == typeof(ushort)) ||
- (typeof(T) == typeof(int)) ||
- (typeof(T) == typeof(uint)) ||
- (typeof(T) == typeof(long)) ||
- (typeof(T) == typeof(ulong)) ||
- (typeof(T) == typeof(float)) ||
- (typeof(T) == typeof(double));
- }
-
- /// <summary>Determines whether the specified <see cref="Vector256{T}" /> is equal to the current instance.</summary>
- /// <param name="other">The <see cref="Vector256{T}" /> to compare with the current instance.</param>
- /// <returns><c>true</c> if <paramref name="other" /> is equal to the current instance; otherwise, <c>false</c>.</returns>
- /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public bool Equals(Vector256<T> other)
- {
- if (Avx.IsSupported)
- {
- if (typeof(T) == typeof(float))
- {
- Vector256<float> result = Avx.Compare(this.AsSingle(), other.AsSingle(), FloatComparisonMode.OrderedEqualNonSignaling);
- return Avx.MoveMask(result) == 0b1111_1111; // We have one bit per element
- }
-
- if (typeof(T) == typeof(double))
- {
- Vector256<double> result = Avx.Compare(this.AsDouble(), other.AsDouble(), FloatComparisonMode.OrderedEqualNonSignaling);
- return Avx.MoveMask(result) == 0b1111; // We have one bit per element
- }
- }
-
- if (Avx2.IsSupported)
- {
- // Unlike float/double, there are no special values to consider
- // for integral types and we can just do a comparison that all
- // bytes are exactly the same.
-
- Debug.Assert((typeof(T) != typeof(float)) && (typeof(T) != typeof(double)));
- Vector256<byte> result = Avx2.CompareEqual(this.AsByte(), other.AsByte());
- return Avx2.MoveMask(result) == unchecked((int)(0b1111_1111_1111_1111_1111_1111_1111_1111)); // We have one bit per element
- }
-
- return SoftwareFallback(in this, other);
-
- static bool SoftwareFallback(in Vector256<T> vector, Vector256<T> other)
- {
- for (int i = 0; i < Count; i++)
- {
- if (!((IEquatable<T>)(vector.GetElement(i))).Equals(other.GetElement(i)))
- {
- return false;
- }
- }
-
- return true;
- }
- }
-
- /// <summary>Determines whether the specified object is equal to the current instance.</summary>
- /// <param name="obj">The object to compare with the current instance.</param>
- /// <returns><c>true</c> if <paramref name="obj" /> is a <see cref="Vector256{T}" /> and is equal to the current instance; otherwise, <c>false</c>.</returns>
- /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
- public override bool Equals(object? obj)
- {
- return (obj is Vector256<T>) && Equals((Vector256<T>)(obj));
- }
-
- /// <summary>Gets the hash code for the instance.</summary>
- /// <returns>The hash code for the instance.</returns>
- /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
- public override int GetHashCode()
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- int hashCode = 0;
-
- for (int i = 0; i < Count; i++)
- {
- hashCode = HashCode.Combine(hashCode, this.GetElement(i).GetHashCode());
- }
-
- return hashCode;
- }
-
- /// <summary>Converts the current instance to an equivalent string representation.</summary>
- /// <returns>An equivalent string representation of the current instance.</returns>
- /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
- public override string ToString()
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- int lastElement = Count - 1;
- var sb = new ValueStringBuilder(stackalloc char[64]);
- CultureInfo invariant = CultureInfo.InvariantCulture;
-
- sb.Append('<');
- for (int i = 0; i < lastElement; i++)
- {
- sb.Append(((IFormattable)this.GetElement(i)).ToString("G", invariant));
- sb.Append(',');
- sb.Append(' ');
- }
- sb.Append(((IFormattable)this.GetElement(lastElement)).ToString("G", invariant));
- sb.Append('>');
-
- return sb.ToString();
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector64.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector64.cs
deleted file mode 100644
index a81ff00c156..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector64.cs
+++ /dev/null
@@ -1,694 +0,0 @@
-// 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;
-using Internal.Runtime.CompilerServices;
-
-namespace System.Runtime.Intrinsics
-{
- public static class Vector64
- {
- internal const int Size = 8;
-
- /// <summary>Reinterprets a <see cref="Vector64{T}" /> as a new <see cref="Vector64{U}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <typeparam name="U">The type of the vector <paramref name="vector" /> should be reinterpreted as.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector64{U}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) or the type of the target (<typeparamref name="U" />) is not supported.</exception>
- [Intrinsic]
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- public static Vector64<U> As<T, U>(this Vector64<T> vector)
- where T : struct
- where U : struct
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
- ThrowHelper.ThrowForUnsupportedVectorBaseType<U>();
- return Unsafe.As<Vector64<T>, Vector64<U>>(ref vector);
- }
-
- /// <summary>Reinterprets a <see cref="Vector64{T}" /> as a new <see cref="Vector64{Byte}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector64{Byte}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- public static Vector64<byte> AsByte<T>(this Vector64<T> vector)
- where T : struct
- {
- return vector.As<T, byte>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector64{T}" /> as a new <see cref="Vector64{Double}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector64{Double}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- public static Vector64<double> AsDouble<T>(this Vector64<T> vector)
- where T : struct
- {
- return vector.As<T, double>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector64{T}" /> as a new <see cref="Vector64{Int16}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector64{Int16}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- public static Vector64<short> AsInt16<T>(this Vector64<T> vector)
- where T : struct
- {
- return vector.As<T, short>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector64{T}" /> as a new <see cref="Vector64{Int32}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector64{Int32}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- public static Vector64<int> AsInt32<T>(this Vector64<T> vector)
- where T : struct
- {
- return vector.As<T, int>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector64{T}" /> as a new <see cref="Vector64{Int64}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector64{Int64}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- public static Vector64<long> AsInt64<T>(this Vector64<T> vector)
- where T : struct
- {
- return vector.As<T, long>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector64{T}" /> as a new <see cref="Vector64{SByte}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector64{SByte}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- [CLSCompliant(false)]
- public static Vector64<sbyte> AsSByte<T>(this Vector64<T> vector)
- where T : struct
- {
- return vector.As<T, sbyte>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector64{T}" /> as a new <see cref="Vector64{Single}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector64{Single}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- public static Vector64<float> AsSingle<T>(this Vector64<T> vector)
- where T : struct
- {
- return vector.As<T, float>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector64{T}" /> as a new <see cref="Vector64{UInt16}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector64{UInt16}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- [CLSCompliant(false)]
- public static Vector64<ushort> AsUInt16<T>(this Vector64<T> vector)
- where T : struct
- {
- return vector.As<T, ushort>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector64{T}" /> as a new <see cref="Vector64{UInt32}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector64{UInt32}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- [CLSCompliant(false)]
- public static Vector64<uint> AsUInt32<T>(this Vector64<T> vector)
- where T : struct
- {
- return vector.As<T, uint>();
- }
-
- /// <summary>Reinterprets a <see cref="Vector64{T}" /> as a new <see cref="Vector64{UInt64}" />.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to reinterpret.</param>
- /// <returns><paramref name="vector" /> reinterpreted as a new <see cref="Vector64{UInt64}" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- [Intrinsic]
- [CLSCompliant(false)]
- public static Vector64<ulong> AsUInt64<T>(this Vector64<T> vector)
- where T : struct
- {
- return vector.As<T, ulong>();
- }
-
- /// <summary>Creates a new <see cref="Vector64{Byte}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{Byte}" /> with all elements initialized to <paramref name="value" />.</returns>
- public static unsafe Vector64<byte> Create(byte value)
- {
- byte* pResult = stackalloc byte[8]
- {
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector64<byte>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector64{Double}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{Double}" /> with all elements initialized to <paramref name="value" />.</returns>
- public static unsafe Vector64<double> Create(double value)
- {
- return Unsafe.As<double, Vector64<double>>(ref value);
- }
-
- /// <summary>Creates a new <see cref="Vector64{Int16}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{Int16}" /> with all elements initialized to <paramref name="value" />.</returns>
- public static unsafe Vector64<short> Create(short value)
- {
- short* pResult = stackalloc short[4]
- {
- value,
- value,
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector64<short>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector64{Int32}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{Int32}" /> with all elements initialized to <paramref name="value" />.</returns>
- public static unsafe Vector64<int> Create(int value)
- {
- int* pResult = stackalloc int[2]
- {
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector64<int>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector64{Int64}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{Int64}" /> with all elements initialized to <paramref name="value" />.</returns>
- public static unsafe Vector64<long> Create(long value)
- {
- return Unsafe.As<long, Vector64<long>>(ref value);
- }
-
- /// <summary>Creates a new <see cref="Vector64{SByte}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{SByte}" /> with all elements initialized to <paramref name="value" />.</returns>
- [CLSCompliant(false)]
- public static unsafe Vector64<sbyte> Create(sbyte value)
- {
- sbyte* pResult = stackalloc sbyte[8]
- {
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector64<sbyte>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector64{Single}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{Single}" /> with all elements initialized to <paramref name="value" />.</returns>
- public static unsafe Vector64<float> Create(float value)
- {
- float* pResult = stackalloc float[2]
- {
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector64<float>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector64{UInt16}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{UInt16}" /> with all elements initialized to <paramref name="value" />.</returns>
- [CLSCompliant(false)]
- public static unsafe Vector64<ushort> Create(ushort value)
- {
- ushort* pResult = stackalloc ushort[4]
- {
- value,
- value,
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector64<ushort>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector64{UInt32}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{UInt32}" /> with all elements initialized to <paramref name="value" />.</returns>
- [CLSCompliant(false)]
- public static unsafe Vector64<uint> Create(uint value)
- {
- uint* pResult = stackalloc uint[2]
- {
- value,
- value,
- };
-
- return Unsafe.AsRef<Vector64<uint>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector64{UInt64}" /> instance with all elements initialized to the specified value.</summary>
- /// <param name="value">The value that all elements will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{UInt64}" /> with all elements initialized to <paramref name="value" />.</returns>
- [CLSCompliant(false)]
- public static unsafe Vector64<ulong> Create(ulong value)
- {
- return Unsafe.As<ulong, Vector64<ulong>>(ref value);
- }
-
- /// <summary>Creates a new <see cref="Vector64{Byte}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <param name="e2">The value that element 2 will be initialized to.</param>
- /// <param name="e3">The value that element 3 will be initialized to.</param>
- /// <param name="e4">The value that element 4 will be initialized to.</param>
- /// <param name="e5">The value that element 5 will be initialized to.</param>
- /// <param name="e6">The value that element 6 will be initialized to.</param>
- /// <param name="e7">The value that element 7 will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{Byte}" /> with each element initialized to corresponding specified value.</returns>
- public static unsafe Vector64<byte> Create(byte e0, byte e1, byte e2, byte e3, byte e4, byte e5, byte e6, byte e7)
- {
- byte* pResult = stackalloc byte[8]
- {
- e0,
- e1,
- e2,
- e3,
- e4,
- e5,
- e6,
- e7,
- };
-
- return Unsafe.AsRef<Vector64<byte>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector64{Int16}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <param name="e2">The value that element 2 will be initialized to.</param>
- /// <param name="e3">The value that element 3 will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{Int16}" /> with each element initialized to corresponding specified value.</returns>
- public static unsafe Vector64<short> Create(short e0, short e1, short e2, short e3)
- {
- short* pResult = stackalloc short[4]
- {
- e0,
- e1,
- e2,
- e3,
- };
-
- return Unsafe.AsRef<Vector64<short>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector64{Int32}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{Int32}" /> with each element initialized to corresponding specified value.</returns>
- public static unsafe Vector64<int> Create(int e0, int e1)
- {
- int* pResult = stackalloc int[2]
- {
- e0,
- e1,
- };
-
- return Unsafe.AsRef<Vector64<int>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector64{SByte}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <param name="e2">The value that element 2 will be initialized to.</param>
- /// <param name="e3">The value that element 3 will be initialized to.</param>
- /// <param name="e4">The value that element 4 will be initialized to.</param>
- /// <param name="e5">The value that element 5 will be initialized to.</param>
- /// <param name="e6">The value that element 6 will be initialized to.</param>
- /// <param name="e7">The value that element 7 will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{SByte}" /> with each element initialized to corresponding specified value.</returns>
- [CLSCompliant(false)]
- public static unsafe Vector64<sbyte> Create(sbyte e0, sbyte e1, sbyte e2, sbyte e3, sbyte e4, sbyte e5, sbyte e6, sbyte e7)
- {
- sbyte* pResult = stackalloc sbyte[8]
- {
- e0,
- e1,
- e2,
- e3,
- e4,
- e5,
- e6,
- e7,
- };
-
- return Unsafe.AsRef<Vector64<sbyte>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector64{Single}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{Single}" /> with each element initialized to corresponding specified value.</returns>
- public static unsafe Vector64<float> Create(float e0, float e1)
- {
- float* pResult = stackalloc float[2]
- {
- e0,
- e1,
- };
-
- return Unsafe.AsRef<Vector64<float>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector64{UInt16}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <param name="e2">The value that element 2 will be initialized to.</param>
- /// <param name="e3">The value that element 3 will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{UInt16}" /> with each element initialized to corresponding specified value.</returns>
- [CLSCompliant(false)]
- public static unsafe Vector64<ushort> Create(ushort e0, ushort e1, ushort e2, ushort e3)
- {
- ushort* pResult = stackalloc ushort[4]
- {
- e0,
- e1,
- e2,
- e3,
- };
-
- return Unsafe.AsRef<Vector64<ushort>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector64{UInt32}" /> instance with each element initialized to the corresponding specified value.</summary>
- /// <param name="e0">The value that element 0 will be initialized to.</param>
- /// <param name="e1">The value that element 1 will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{UInt32}" /> with each element initialized to corresponding specified value.</returns>
- [CLSCompliant(false)]
- public static unsafe Vector64<uint> Create(uint e0, uint e1)
- {
- uint* pResult = stackalloc uint[2]
- {
- e0,
- e1,
- };
-
- return Unsafe.AsRef<Vector64<uint>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector64{Byte}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{Byte}" /> instance with the first element initialized to <paramref name="value"/> and the remaining elements initialized to zero.</returns>
- public static unsafe Vector64<byte> CreateScalar(byte value)
- {
- var result = Vector64<byte>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector64<byte>, byte>(ref result), value);
- return result;
- }
-
- /// <summary>Creates a new <see cref="Vector64{Int16}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{Int16}" /> instance with the first element initialized to <paramref name="value"/> and the remaining elements initialized to zero.</returns>
- public static unsafe Vector64<short> CreateScalar(short value)
- {
- var result = Vector64<short>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector64<short>, byte>(ref result), value);
- return result;
- }
-
- /// <summary>Creates a new <see cref="Vector64{Int32}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{Int32}" /> instance with the first element initialized to <paramref name="value"/> and the remaining elements initialized to zero.</returns>
- public static unsafe Vector64<int> CreateScalar(int value)
- {
- var result = Vector64<int>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector64<int>, byte>(ref result), value);
- return result;
- }
-
- /// <summary>Creates a new <see cref="Vector64{SByte}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{SByte}" /> instance with the first element initialized to <paramref name="value"/> and the remaining elements initialized to zero.</returns>
- [CLSCompliant(false)]
- public static unsafe Vector64<sbyte> CreateScalar(sbyte value)
- {
- var result = Vector64<sbyte>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector64<sbyte>, byte>(ref result), value);
- return result;
- }
-
- /// <summary>Creates a new <see cref="Vector64{Single}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{Single}" /> instance with the first element initialized to <paramref name="value"/> and the remaining elements initialized to zero.</returns>
- public static unsafe Vector64<float> CreateScalar(float value)
- {
- var result = Vector64<float>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector64<float>, byte>(ref result), value);
- return result;
- }
-
- /// <summary>Creates a new <see cref="Vector64{UInt16}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{UInt16}" /> instance with the first element initialized to <paramref name="value"/> and the remaining elements initialized to zero.</returns>
- [CLSCompliant(false)]
- public static unsafe Vector64<ushort> CreateScalar(ushort value)
- {
- var result = Vector64<ushort>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector64<ushort>, byte>(ref result), value);
- return result;
- }
-
- /// <summary>Creates a new <see cref="Vector64{UInt32}" /> instance with the first element initialized to the specified value and the remaining elements initialized to zero.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{UInt32}" /> instance with the first element initialized to <paramref name="value"/> and the remaining elements initialized to zero.</returns>
- [CLSCompliant(false)]
- public static unsafe Vector64<uint> CreateScalar(uint value)
- {
- var result = Vector64<uint>.Zero;
- Unsafe.WriteUnaligned(ref Unsafe.As<Vector64<uint>, byte>(ref result), value);
- return result;
- }
-
- /// <summary>Creates a new <see cref="Vector64{Byte}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{Byte}" /> instance with the first element initialized to <paramref name="value"/> and the remaining elements left uninitialized.</returns>
- public static unsafe Vector64<byte> CreateScalarUnsafe(byte value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- byte* pResult = stackalloc byte[8];
- pResult[0] = value;
- return Unsafe.AsRef<Vector64<byte>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector64{Int16}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{Int16}" /> instance with the first element initialized to <paramref name="value"/> and the remaining elements left uninitialized.</returns>
- public static unsafe Vector64<short> CreateScalarUnsafe(short value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- short* pResult = stackalloc short[4];
- pResult[0] = value;
- return Unsafe.AsRef<Vector64<short>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector64{Int32}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{Int32}" /> instance with the first element initialized to <paramref name="value"/> and the remaining elements left uninitialized.</returns>
- public static unsafe Vector64<int> CreateScalarUnsafe(int value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- int* pResult = stackalloc int[2];
- pResult[0] = value;
- return Unsafe.AsRef<Vector64<int>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector64{SByte}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{SByte}" /> instance with the first element initialized to <paramref name="value"/> and the remaining elements left uninitialized.</returns>
- [CLSCompliant(false)]
- public static unsafe Vector64<sbyte> CreateScalarUnsafe(sbyte value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- sbyte* pResult = stackalloc sbyte[8];
- pResult[0] = value;
- return Unsafe.AsRef<Vector64<sbyte>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector64{Single}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{Single}" /> instance with the first element initialized to <paramref name="value"/> and the remaining elements left uninitialized.</returns>
- public static unsafe Vector64<float> CreateScalarUnsafe(float value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- float* pResult = stackalloc float[2];
- pResult[0] = value;
- return Unsafe.AsRef<Vector64<float>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector64{UInt16}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{UInt16}" /> instance with the first element initialized to <paramref name="value"/> and the remaining elements left uninitialized.</returns>
- [CLSCompliant(false)]
- public static unsafe Vector64<ushort> CreateScalarUnsafe(ushort value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- ushort* pResult = stackalloc ushort[4];
- pResult[0] = value;
- return Unsafe.AsRef<Vector64<ushort>>(pResult);
- }
-
- /// <summary>Creates a new <see cref="Vector64{UInt32}" /> instance with the first element initialized to the specified value and the remaining elements left uninitialized.</summary>
- /// <param name="value">The value that element 0 will be initialized to.</param>
- /// <returns>A new <see cref="Vector64{UInt32}" /> instance with the first element initialized to <paramref name="value"/> and the remaining elements left uninitialized.</returns>
- [CLSCompliant(false)]
- public static unsafe Vector64<uint> CreateScalarUnsafe(uint value)
- {
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- uint* pResult = stackalloc uint[2];
- pResult[0] = value;
- return Unsafe.AsRef<Vector64<uint>>(pResult);
- }
-
- /// <summary>Gets the element at the specified index.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to get the element from.</param>
- /// <param name="index">The index of the element to get.</param>
- /// <returns>The value of the element at <paramref name="index" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- /// <exception cref="ArgumentOutOfRangeException"><paramref name="index" /> was less than zero or greater than the number of elements.</exception>
- public static T GetElement<T>(this Vector64<T> vector, int index)
- where T : struct
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- if ((uint)(index) >= (uint)(Vector64<T>.Count))
- {
- ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index);
- }
-
- ref T e0 = ref Unsafe.As<Vector64<T>, T>(ref vector);
- return Unsafe.Add(ref e0, index);
- }
-
- /// <summary>Creates a new <see cref="Vector64{T}" /> with the element at the specified index set to the specified value and the remaining elements set to the same value as that in the given vector.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to get the remaining elements from.</param>
- /// <param name="index">The index of the element to set.</param>
- /// <param name="value">The value to set the element to.</param>
- /// <returns>A <see cref="Vector64{T}" /> with the value of the element at <paramref name="index" /> set to <paramref name="value" /> and the remaining elements set to the same value as that in <paramref name="vector" />.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- /// <exception cref="ArgumentOutOfRangeException"><paramref name="index" /> was less than zero or greater than the number of elements.</exception>
- public static Vector64<T> WithElement<T>(this Vector64<T> vector, int index, T value)
- where T : struct
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- if ((uint)(index) >= (uint)(Vector64<T>.Count))
- {
- ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index);
- }
-
- Vector64<T> result = vector;
- ref T e0 = ref Unsafe.As<Vector64<T>, T>(ref result);
- Unsafe.Add(ref e0, index) = value;
- return result;
- }
-
- /// <summary>Converts the given vector to a scalar containing the value of the first element.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to get the first element from.</param>
- /// <returns>A scalar <typeparamref name="T" /> containing the value of the first element.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- public static T ToScalar<T>(this Vector64<T> vector)
- where T : struct
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
- return Unsafe.As<Vector64<T>, T>(ref vector);
- }
-
- /// <summary>Converts the given vector to a new <see cref="Vector128{T}" /> with the lower 64-bits set to the value of the given vector and the upper 64-bits initialized to zero.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to extend.</param>
- /// <returns>A new <see cref="Vector128{T}" /> with the lower 64-bits set to the value of <paramref name="vector" /> and the upper 64-bits initialized to zero.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- public static Vector128<T> ToVector128<T>(this Vector64<T> vector)
- where T : struct
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- Vector128<T> result = Vector128<T>.Zero;
- Unsafe.As<Vector128<T>, Vector64<T>>(ref result) = vector;
- return result;
- }
-
- /// <summary>Converts the given vector to a new <see cref="Vector128{T}" /> with the lower 64-bits set to the value of the given vector and the upper 64-bits left uninitialized.</summary>
- /// <typeparam name="T">The type of the input vector.</typeparam>
- /// <param name="vector">The vector to extend.</param>
- /// <returns>A new <see cref="Vector128{T}" /> with the lower 64-bits set to the value of <paramref name="vector" /> and the upper 64-bits left uninitialized.</returns>
- /// <exception cref="NotSupportedException">The type of <paramref name="vector" /> (<typeparamref name="T" />) is not supported.</exception>
- public static unsafe Vector128<T> ToVector128Unsafe<T>(this Vector64<T> vector)
- where T : struct
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- // This relies on us stripping the "init" flag from the ".locals"
- // declaration to let the upper bits be uninitialized.
-
- byte* pResult = stackalloc byte[Vector128.Size];
- Unsafe.AsRef<Vector64<T>>(pResult) = vector;
- return Unsafe.AsRef<Vector128<T>>(pResult);
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector64DebugView_1.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector64DebugView_1.cs
deleted file mode 100644
index 878e29949e3..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector64DebugView_1.cs
+++ /dev/null
@@ -1,118 +0,0 @@
-// 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 Internal.Runtime.CompilerServices;
-
-namespace System.Runtime.Intrinsics
-{
- internal readonly struct Vector64DebugView<T> where T : struct
- {
- private readonly Vector64<T> _value;
-
- public Vector64DebugView(Vector64<T> value)
- {
- _value = value;
- }
-
- public byte[] ByteView
- {
- get
- {
- var items = new byte[8];
- Unsafe.WriteUnaligned(ref items[0], _value);
- return items;
- }
- }
-
- public double[] DoubleView
- {
- get
- {
- var items = new double[1];
- Unsafe.WriteUnaligned(ref Unsafe.As<double, byte>(ref items[0]), _value);
- return items;
- }
- }
-
- public short[] Int16View
- {
- get
- {
- var items = new short[4];
- Unsafe.WriteUnaligned(ref Unsafe.As<short, byte>(ref items[0]), _value);
- return items;
- }
- }
-
- public int[] Int32View
- {
- get
- {
- var items = new int[2];
- Unsafe.WriteUnaligned(ref Unsafe.As<int, byte>(ref items[0]), _value);
- return items;
- }
- }
-
- public long[] Int64View
- {
- get
- {
- var items = new long[1];
- Unsafe.WriteUnaligned(ref Unsafe.As<long, byte>(ref items[0]), _value);
- return items;
- }
- }
-
- public sbyte[] SByteView
- {
- get
- {
- var items = new sbyte[8];
- Unsafe.WriteUnaligned(ref Unsafe.As<sbyte, byte>(ref items[0]), _value);
- return items;
- }
- }
-
- public float[] SingleView
- {
- get
- {
- var items = new float[2];
- Unsafe.WriteUnaligned(ref Unsafe.As<float, byte>(ref items[0]), _value);
- return items;
- }
- }
-
- public ushort[] UInt16View
- {
- get
- {
- var items = new ushort[4];
- Unsafe.WriteUnaligned(ref Unsafe.As<ushort, byte>(ref items[0]), _value);
- return items;
- }
- }
-
- public uint[] UInt32View
- {
- get
- {
- var items = new uint[2];
- Unsafe.WriteUnaligned(ref Unsafe.As<uint, byte>(ref items[0]), _value);
- return items;
- }
- }
-
- public ulong[] UInt64View
- {
- get
- {
- var items = new ulong[1];
- Unsafe.WriteUnaligned(ref Unsafe.As<ulong, byte>(ref items[0]), _value);
- return items;
- }
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector64_1.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector64_1.cs
deleted file mode 100644
index 3c35b31097e..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/Vector64_1.cs
+++ /dev/null
@@ -1,146 +0,0 @@
-// 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.Diagnostics;
-using System.Globalization;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-using System.Text;
-using Internal.Runtime.CompilerServices;
-
-namespace System.Runtime.Intrinsics
-{
- [Intrinsic]
- [DebuggerDisplay("{DisplayString,nq}")]
- [DebuggerTypeProxy(typeof(Vector64DebugView<>))]
- [StructLayout(LayoutKind.Sequential, Size = Vector64.Size)]
- public readonly struct Vector64<T> : IEquatable<Vector64<T>>
- where T : struct
- {
- // These fields exist to ensure the alignment is 8, rather than 1.
- // This also allows the debug view to work https://github.com/dotnet/coreclr/issues/15694)
- private readonly ulong _00;
-
- /// <summary>Gets the number of <typeparamref name="T" /> that are in a <see cref="Vector64{T}" />.</summary>
- /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
- public static int Count
- {
- get
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
- return Vector64.Size / Unsafe.SizeOf<T>();
- }
- }
-
- /// <summary>Gets a new <see cref="Vector64{T}" /> with all elements initialized to zero.</summary>
- /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
- public static Vector64<T> Zero
- {
- get
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
- return default;
- }
- }
-
- internal unsafe string DisplayString
- {
- get
- {
- if (IsSupported)
- {
- return ToString();
- }
- else
- {
- return SR.NotSupported_Type;
- }
- }
- }
-
- internal static bool IsSupported
- {
- [MethodImpl(MethodImplOptions.AggressiveInlining)]
- get => (typeof(T) == typeof(byte)) ||
- (typeof(T) == typeof(sbyte)) ||
- (typeof(T) == typeof(short)) ||
- (typeof(T) == typeof(ushort)) ||
- (typeof(T) == typeof(int)) ||
- (typeof(T) == typeof(uint)) ||
- (typeof(T) == typeof(long)) ||
- (typeof(T) == typeof(ulong)) ||
- (typeof(T) == typeof(float)) ||
- (typeof(T) == typeof(double));
- }
-
- /// <summary>Determines whether the specified <see cref="Vector64{T}" /> is equal to the current instance.</summary>
- /// <param name="other">The <see cref="Vector64{T}" /> to compare with the current instance.</param>
- /// <returns><c>true</c> if <paramref name="other" /> is equal to the current instance; otherwise, <c>false</c>.</returns>
- /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
- public bool Equals(Vector64<T> other)
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- for (int i = 0; i < Count; i++)
- {
- if (!((IEquatable<T>)(this.GetElement(i))).Equals(other.GetElement(i)))
- {
- return false;
- }
- }
-
- return true;
- }
-
- /// <summary>Determines whether the specified object is equal to the current instance.</summary>
- /// <param name="obj">The object to compare with the current instance.</param>
- /// <returns><c>true</c> if <paramref name="obj" /> is a <see cref="Vector64{T}" /> and is equal to the current instance; otherwise, <c>false</c>.</returns>
- /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
- public override bool Equals(object? obj)
- {
- return (obj is Vector64<T>) && Equals((Vector64<T>)(obj));
- }
-
- /// <summary>Gets the hash code for the instance.</summary>
- /// <returns>The hash code for the instance.</returns>
- /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
- public override int GetHashCode()
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- int hashCode = 0;
-
- for (int i = 0; i < Count; i++)
- {
- hashCode = HashCode.Combine(hashCode, this.GetElement(i).GetHashCode());
- }
-
- return hashCode;
- }
-
- /// <summary>Converts the current instance to an equivalent string representation.</summary>
- /// <returns>An equivalent string representation of the current instance.</returns>
- /// <exception cref="NotSupportedException">The type of the current instance (<typeparamref name="T" />) is not supported.</exception>
- public override string ToString()
- {
- ThrowHelper.ThrowForUnsupportedVectorBaseType<T>();
-
- int lastElement = Count - 1;
- var sb = new ValueStringBuilder(stackalloc char[64]);
- CultureInfo invariant = CultureInfo.InvariantCulture;
-
- sb.Append('<');
- for (int i = 0; i < lastElement; i++)
- {
- sb.Append(((IFormattable)this.GetElement(i)).ToString("G", invariant));
- sb.Append(',');
- sb.Append(' ');
- }
- sb.Append(((IFormattable)this.GetElement(lastElement)).ToString("G", invariant));
- sb.Append('>');
-
- return sb.ToString();
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Aes.PlatformNotSupported.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Aes.PlatformNotSupported.cs
deleted file mode 100644
index 8d2fb4d3a06..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Aes.PlatformNotSupported.cs
+++ /dev/null
@@ -1,59 +0,0 @@
-// 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;
-using System.Runtime.CompilerServices;
-using System.Runtime.Intrinsics;
-
-namespace System.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel AES hardware instructions via intrinsics
- /// </summary>
- [CLSCompliant(false)]
- public abstract class Aes : Sse2
- {
- internal Aes() { }
-
- public static new bool IsSupported { [Intrinsic] get { return false; } }
-
- /// <summary>
- /// __m128i _mm_aesdec_si128 (__m128i a, __m128i RoundKey)
- /// AESDEC xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> Decrypt(Vector128<byte> value, Vector128<byte> roundKey) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_aesdeclast_si128 (__m128i a, __m128i RoundKey)
- /// AESDECLAST xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> DecryptLast(Vector128<byte> value, Vector128<byte> roundKey) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_aesenc_si128 (__m128i a, __m128i RoundKey)
- /// AESENC xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> Encrypt(Vector128<byte> value, Vector128<byte> roundKey) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_aesenclast_si128 (__m128i a, __m128i RoundKey)
- /// AESENCLAST xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> EncryptLast(Vector128<byte> value, Vector128<byte> roundKey) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_aesimc_si128 (__m128i a)
- /// AESIMC xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> InverseMixColumns(Vector128<byte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_aeskeygenassist_si128 (__m128i a, const int imm8)
- /// AESKEYGENASSIST xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<byte> KeygenAssist(Vector128<byte> value, byte control) { throw new PlatformNotSupportedException(); }
-
- }
-
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Aes.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Aes.cs
deleted file mode 100644
index 41bed912b7b..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Aes.cs
+++ /dev/null
@@ -1,56 +0,0 @@
-// 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.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel AES hardware instructions via intrinsics
- /// </summary>
- [Intrinsic]
- [CLSCompliant(false)]
- public abstract class Aes : Sse2
- {
- internal Aes() { }
-
- public static new bool IsSupported { get => IsSupported; }
-
- /// <summary>
- /// __m128i _mm_aesdec_si128 (__m128i a, __m128i RoundKey)
- /// AESDEC xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> Decrypt(Vector128<byte> value, Vector128<byte> roundKey) => Decrypt(value, roundKey);
-
- /// <summary>
- /// __m128i _mm_aesdeclast_si128 (__m128i a, __m128i RoundKey)
- /// AESDECLAST xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> DecryptLast(Vector128<byte> value, Vector128<byte> roundKey) => DecryptLast(value, roundKey);
-
- /// <summary>
- /// __m128i _mm_aesenc_si128 (__m128i a, __m128i RoundKey)
- /// AESENC xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> Encrypt(Vector128<byte> value, Vector128<byte> roundKey) => Encrypt(value, roundKey);
-
- /// <summary>
- /// __m128i _mm_aesenclast_si128 (__m128i a, __m128i RoundKey)
- /// AESENCLAST xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> EncryptLast(Vector128<byte> value, Vector128<byte> roundKey) => EncryptLast(value, roundKey);
-
- /// <summary>
- /// __m128i _mm_aesimc_si128 (__m128i a)
- /// AESIMC xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> InverseMixColumns(Vector128<byte> value) => InverseMixColumns(value);
-
- /// <summary>
- /// __m128i _mm_aeskeygenassist_si128 (__m128i a, const int imm8)
- /// AESKEYGENASSIST xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<byte> KeygenAssist(Vector128<byte> value, byte control) => KeygenAssist(value, control);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Avx.PlatformNotSupported.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Avx.PlatformNotSupported.cs
deleted file mode 100644
index c855b8db61f..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Avx.PlatformNotSupported.cs
+++ /dev/null
@@ -1,1227 +0,0 @@
-// 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;
-using System.Runtime.CompilerServices;
-using System.Runtime.Intrinsics;
-
-namespace System.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel AVX hardware instructions via intrinsics
- /// </summary>
- [CLSCompliant(false)]
- public abstract class Avx : Sse42
- {
- internal Avx() { }
-
- public static new bool IsSupported { [Intrinsic] get { return false; } }
-
- /// <summary>
- /// __m256 _mm256_add_ps (__m256 a, __m256 b)
- /// VADDPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> Add(Vector256<float> left, Vector256<float> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_add_pd (__m256d a, __m256d b)
- /// VADDPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> Add(Vector256<double> left, Vector256<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_addsub_ps (__m256 a, __m256 b)
- /// VADDSUBPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> AddSubtract(Vector256<float> left, Vector256<float> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_addsub_pd (__m256d a, __m256d b)
- /// VADDSUBPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> AddSubtract(Vector256<double> left, Vector256<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_and_ps (__m256 a, __m256 b)
- /// VANDPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> And(Vector256<float> left, Vector256<float> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_and_pd (__m256d a, __m256d b)
- /// VANDPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> And(Vector256<double> left, Vector256<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_andnot_ps (__m256 a, __m256 b)
- /// VANDNPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> AndNot(Vector256<float> left, Vector256<float> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_andnot_pd (__m256d a, __m256d b)
- /// VANDNPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> AndNot(Vector256<double> left, Vector256<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_blend_ps (__m256 a, __m256 b, const int imm8)
- /// VBLENDPS ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<float> Blend(Vector256<float> left, Vector256<float> right, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_blend_pd (__m256d a, __m256d b, const int imm8)
- /// VBLENDPD ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<double> Blend(Vector256<double> left, Vector256<double> right, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_blendv_ps (__m256 a, __m256 b, __m256 mask)
- /// VBLENDVPS ymm, ymm, ymm/m256, ymm
- /// </summary>
- public static Vector256<float> BlendVariable(Vector256<float> left, Vector256<float> right, Vector256<float> mask) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_blendv_pd (__m256d a, __m256d b, __m256d mask)
- /// VBLENDVPD ymm, ymm, ymm/m256, ymm
- /// </summary>
- public static Vector256<double> BlendVariable(Vector256<double> left, Vector256<double> right, Vector256<double> mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_broadcast_ss (float const * mem_addr)
- /// VBROADCASTSS xmm, m32
- /// </summary>
- public static unsafe Vector128<float> BroadcastScalarToVector128(float* source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_broadcast_ss (float const * mem_addr)
- /// VBROADCASTSS ymm, m32
- /// </summary>
- public static unsafe Vector256<float> BroadcastScalarToVector256(float* source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_broadcast_sd (double const * mem_addr)
- /// VBROADCASTSD ymm, m64
- /// </summary>
- public static unsafe Vector256<double> BroadcastScalarToVector256(double* source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_broadcast_ps (__m128 const * mem_addr)
- /// VBROADCASTF128, ymm, m128
- /// </summary>
- public static unsafe Vector256<float> BroadcastVector128ToVector256(float* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_broadcast_pd (__m128d const * mem_addr)
- /// VBROADCASTF128, ymm, m128
- /// </summary>
- public static unsafe Vector256<double> BroadcastVector128ToVector256(double* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_ceil_ps (__m256 a)
- /// VROUNDPS ymm, ymm/m256, imm8(10)
- /// </summary>
- public static Vector256<float> Ceiling(Vector256<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_ceil_pd (__m256d a)
- /// VROUNDPD ymm, ymm/m256, imm8(10)
- /// </summary>
- public static Vector256<double> Ceiling(Vector256<double> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cmp_ps (__m128 a, __m128 b, const int imm8)
- /// VCMPPS xmm, xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<float> Compare(Vector128<float> left, Vector128<float> right, FloatComparisonMode mode) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_cmp_pd (__m128d a, __m128d b, const int imm8)
- /// VCMPPD xmm, xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<double> Compare(Vector128<double> left, Vector128<double> right, FloatComparisonMode mode) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256 _mm256_cmp_ps (__m256 a, __m256 b, const int imm8)
- /// VCMPPS ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<float> Compare(Vector256<float> left, Vector256<float> right, FloatComparisonMode mode) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_cmp_pd (__m256d a, __m256d b, const int imm8)
- /// VCMPPD ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<double> Compare(Vector256<double> left, Vector256<double> right, FloatComparisonMode mode) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_cmp_sd (__m128d a, __m128d b, const int imm8)
- /// VCMPSS xmm, xmm, xmm/m32, imm8
- /// </summary>
- public static Vector128<double> CompareScalar(Vector128<double> left, Vector128<double> right, FloatComparisonMode mode) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm_cmp_ss (__m128 a, __m128 b, const int imm8)
- /// VCMPSD xmm, xmm, xmm/m64, imm8
- /// </summary>
- public static Vector128<float> CompareScalar(Vector128<float> left, Vector128<float> right, FloatComparisonMode mode) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm256_cvtpd_epi32 (__m256d a)
- /// VCVTPD2DQ xmm, ymm/m256
- /// </summary>
- public static Vector128<int> ConvertToVector128Int32(Vector256<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm256_cvtpd_ps (__m256d a)
- /// VCVTPD2PS xmm, ymm/m256
- /// </summary>
- public static Vector128<float> ConvertToVector128Single(Vector256<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_cvtps_epi32 (__m256 a)
- /// VCVTPS2DQ ymm, ymm/m256
- /// </summary>
- public static Vector256<int> ConvertToVector256Int32(Vector256<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256 _mm256_cvtepi32_ps (__m256i a)
- /// VCVTDQ2PS ymm, ymm/m256
- /// </summary>
- public static Vector256<float> ConvertToVector256Single(Vector256<int> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_cvtps_pd (__m128 a)
- /// VCVTPS2PD ymm, xmm/m128
- /// </summary>
- public static Vector256<double> ConvertToVector256Double(Vector128<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_cvtepi32_pd (__m128i a)
- /// VCVTDQ2PD ymm, xmm/m128
- /// </summary>
- public static Vector256<double> ConvertToVector256Double(Vector128<int> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm256_cvttpd_epi32 (__m256d a)
- /// VCVTTPD2DQ xmm, ymm/m256
- /// </summary>
- public static Vector128<int> ConvertToVector128Int32WithTruncation(Vector256<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_cvttps_epi32 (__m256 a)
- /// VCVTTPS2DQ ymm, ymm/m256
- /// </summary>
- public static Vector256<int> ConvertToVector256Int32WithTruncation(Vector256<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_div_ps (__m256 a, __m256 b)
- /// VDIVPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> Divide(Vector256<float> left, Vector256<float> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_div_pd (__m256d a, __m256d b)
- /// VDIVPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> Divide(Vector256<double> left, Vector256<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_dp_ps (__m256 a, __m256 b, const int imm8)
- /// VDPPS ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<float> DotProduct(Vector256<float> left, Vector256<float> right, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_moveldup_ps (__m256 a)
- /// VMOVSLDUP ymm, ymm/m256
- /// </summary>
- public static Vector256<float> DuplicateEvenIndexed(Vector256<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_movedup_pd (__m256d a)
- /// VMOVDDUP ymm, ymm/m256
- /// </summary>
- public static Vector256<double> DuplicateEvenIndexed(Vector256<double> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_movehdup_ps (__m256 a)
- /// VMOVSHDUP ymm, ymm/m256
- /// </summary>
- public static Vector256<float> DuplicateOddIndexed(Vector256<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm256_extractf128_si256 (__m256i a, const int imm8)
- /// VEXTRACTF128 xmm/m128, ymm, imm8
- /// </summary>
- public static Vector128<byte> ExtractVector128(Vector256<byte> value, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm256_extractf128_si256 (__m256i a, const int imm8)
- /// VEXTRACTF128 xmm/m128, ymm, imm8
- /// </summary>
- public static Vector128<sbyte> ExtractVector128(Vector256<sbyte> value, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm256_extractf128_si256 (__m256i a, const int imm8)
- /// VEXTRACTF128 xmm/m128, ymm, imm8
- /// </summary>
- public static Vector128<short> ExtractVector128(Vector256<short> value, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm256_extractf128_si256 (__m256i a, const int imm8)
- /// VEXTRACTF128 xmm/m128, ymm, imm8
- /// </summary>
- public static Vector128<ushort> ExtractVector128(Vector256<ushort> value, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm256_extractf128_si256 (__m256i a, const int imm8)
- /// VEXTRACTF128 xmm/m128, ymm, imm8
- /// </summary>
- public static Vector128<int> ExtractVector128(Vector256<int> value, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm256_extractf128_si256 (__m256i a, const int imm8)
- /// VEXTRACTF128 xmm/m128, ymm, imm8
- /// </summary>
- public static Vector128<uint> ExtractVector128(Vector256<uint> value, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm256_extractf128_si256 (__m256i a, const int imm8)
- /// VEXTRACTF128 xmm/m128, ymm, imm8
- /// </summary>
- public static Vector128<long> ExtractVector128(Vector256<long> value, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm256_extractf128_si256 (__m256i a, const int imm8)
- /// VEXTRACTF128 xmm/m128, ymm, imm8
- /// </summary>
- public static Vector128<ulong> ExtractVector128(Vector256<ulong> value, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm256_extractf128_ps (__m256 a, const int imm8)
- /// VEXTRACTF128 xmm/m128, ymm, imm8
- /// </summary>
- public static Vector128<float> ExtractVector128(Vector256<float> value, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm256_extractf128_pd (__m256d a, const int imm8)
- /// VEXTRACTF128 xmm/m128, ymm, imm8
- /// </summary>
- public static Vector128<double> ExtractVector128(Vector256<double> value, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_floor_ps (__m256 a)
- /// VROUNDPS ymm, ymm/m256, imm8(9)
- /// </summary>
- public static Vector256<float> Floor(Vector256<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_floor_pd (__m256d a)
- /// VROUNDPS ymm, ymm/m256, imm8(9)
- /// </summary>
- public static Vector256<double> Floor(Vector256<double> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_hadd_ps (__m256 a, __m256 b)
- /// VHADDPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> HorizontalAdd(Vector256<float> left, Vector256<float> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_hadd_pd (__m256d a, __m256d b)
- /// VHADDPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> HorizontalAdd(Vector256<double> left, Vector256<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_hsub_ps (__m256 a, __m256 b)
- /// VHSUBPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> HorizontalSubtract(Vector256<float> left, Vector256<float> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_hsub_pd (__m256d a, __m256d b)
- /// VHSUBPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> HorizontalSubtract(Vector256<double> left, Vector256<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_insertf128_si256 (__m256i a, __m128i b, int imm8)
- /// VINSERTF128 ymm, ymm, xmm/m128, imm8
- /// </summary>
- public static Vector256<byte> InsertVector128(Vector256<byte> value, Vector128<byte> data, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_insertf128_si256 (__m256i a, __m128i b, int imm8)
- /// VINSERTF128 ymm, ymm, xmm/m128, imm8
- /// </summary>
- public static Vector256<sbyte> InsertVector128(Vector256<sbyte> value, Vector128<sbyte> data, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_insertf128_si256 (__m256i a, __m128i b, int imm8)
- /// VINSERTF128 ymm, ymm, xmm/m128, imm8
- /// </summary>
- public static Vector256<short> InsertVector128(Vector256<short> value, Vector128<short> data, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_insertf128_si256 (__m256i a, __m128i b, int imm8)
- /// VINSERTF128 ymm, ymm, xmm/m128, imm8
- /// </summary>
- public static Vector256<ushort> InsertVector128(Vector256<ushort> value, Vector128<ushort> data, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_insertf128_si256 (__m256i a, __m128i b, int imm8)
- /// VINSERTF128 ymm, ymm, xmm/m128, imm8
- /// </summary>
- public static Vector256<int> InsertVector128(Vector256<int> value, Vector128<int> data, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_insertf128_si256 (__m256i a, __m128i b, int imm8)
- /// VINSERTF128 ymm, ymm, xmm/m128, imm8
- /// </summary>
- public static Vector256<uint> InsertVector128(Vector256<uint> value, Vector128<uint> data, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_insertf128_si256 (__m256i a, __m128i b, int imm8)
- /// VINSERTF128 ymm, ymm, xmm/m128, imm8
- /// </summary>
- public static Vector256<long> InsertVector128(Vector256<long> value, Vector128<long> data, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_insertf128_si256 (__m256i a, __m128i b, int imm8)
- /// VINSERTF128 ymm, ymm, xmm/m128, imm8
- /// </summary>
- public static Vector256<ulong> InsertVector128(Vector256<ulong> value, Vector128<ulong> data, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_insertf128_ps (__m256 a, __m128 b, int imm8)
- /// VINSERTF128 ymm, ymm, xmm/m128, imm8
- /// </summary>
- public static Vector256<float> InsertVector128(Vector256<float> value, Vector128<float> data, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256d _mm256_insertf128_pd (__m256d a, __m128d b, int imm8)
- /// VINSERTF128 ymm, ymm, xmm/m128, imm8
- /// </summary>
- public static Vector256<double> InsertVector128(Vector256<double> value, Vector128<double> data, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_loadu_si256 (__m256i const * mem_addr)
- /// VMOVDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<sbyte> LoadVector256(sbyte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_loadu_si256 (__m256i const * mem_addr)
- /// VMOVDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<byte> LoadVector256(byte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_loadu_si256 (__m256i const * mem_addr)
- /// VMOVDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<short> LoadVector256(short* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_loadu_si256 (__m256i const * mem_addr)
- /// VMOVDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<ushort> LoadVector256(ushort* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_loadu_si256 (__m256i const * mem_addr)
- /// VMOVDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<int> LoadVector256(int* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_loadu_si256 (__m256i const * mem_addr)
- /// VMOVDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<uint> LoadVector256(uint* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_loadu_si256 (__m256i const * mem_addr)
- /// VMOVDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<long> LoadVector256(long* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_loadu_si256 (__m256i const * mem_addr)
- /// VMOVDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<ulong> LoadVector256(ulong* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256 _mm256_loadu_ps (float const * mem_addr)
- /// VMOVUPS ymm, ymm/m256
- /// </summary>
- public static unsafe Vector256<float> LoadVector256(float* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_loadu_pd (double const * mem_addr)
- /// VMOVUPD ymm, ymm/m256
- /// </summary>
- public static unsafe Vector256<double> LoadVector256(double* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_load_si256 (__m256i const * mem_addr)
- /// VMOVDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<sbyte> LoadAlignedVector256(sbyte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_load_si256 (__m256i const * mem_addr)
- /// VMOVDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<byte> LoadAlignedVector256(byte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_load_si256 (__m256i const * mem_addr)
- /// VMOVDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<short> LoadAlignedVector256(short* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_load_si256 (__m256i const * mem_addr)
- /// VMOVDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<ushort> LoadAlignedVector256(ushort* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_load_si256 (__m256i const * mem_addr)
- /// VMOVDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<int> LoadAlignedVector256(int* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_load_si256 (__m256i const * mem_addr)
- /// VMOVDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<uint> LoadAlignedVector256(uint* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_load_si256 (__m256i const * mem_addr)
- /// VMOVDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<long> LoadAlignedVector256(long* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_load_si256 (__m256i const * mem_addr)
- /// VMOVDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<ulong> LoadAlignedVector256(ulong* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256 _mm256_load_ps (float const * mem_addr)
- /// VMOVAPS ymm, ymm/m256
- /// </summary>
- public static unsafe Vector256<float> LoadAlignedVector256(float* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_load_pd (double const * mem_addr)
- /// VMOVAPD ymm, ymm/m256
- /// </summary>
- public static unsafe Vector256<double> LoadAlignedVector256(double* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_lddqu_si256 (__m256i const * mem_addr)
- /// VLDDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<sbyte> LoadDquVector256(sbyte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_lddqu_si256 (__m256i const * mem_addr)
- /// VLDDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<byte> LoadDquVector256(byte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_lddqu_si256 (__m256i const * mem_addr)
- /// VLDDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<short> LoadDquVector256(short* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_lddqu_si256 (__m256i const * mem_addr)
- /// VLDDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<ushort> LoadDquVector256(ushort* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_lddqu_si256 (__m256i const * mem_addr)
- /// VLDDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<int> LoadDquVector256(int* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_lddqu_si256 (__m256i const * mem_addr)
- /// VLDDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<uint> LoadDquVector256(uint* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_lddqu_si256 (__m256i const * mem_addr)
- /// VLDDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<long> LoadDquVector256(long* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_lddqu_si256 (__m256i const * mem_addr)
- /// VLDDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<ulong> LoadDquVector256(ulong* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_maskload_ps (float const * mem_addr, __m128i mask)
- /// VMASKMOVPS xmm, xmm, m128
- /// </summary>
- public static unsafe Vector128<float> MaskLoad(float* address, Vector128<float> mask) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_maskload_pd (double const * mem_addr, __m128i mask)
- /// VMASKMOVPD xmm, xmm, m128
- /// </summary>
- public static unsafe Vector128<double> MaskLoad(double* address, Vector128<double> mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_maskload_ps (float const * mem_addr, __m256i mask)
- /// VMASKMOVPS ymm, ymm, m256
- /// </summary>
- public static unsafe Vector256<float> MaskLoad(float* address, Vector256<float> mask) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_maskload_pd (double const * mem_addr, __m256i mask)
- /// VMASKMOVPD ymm, ymm, m256
- /// </summary>
- public static unsafe Vector256<double> MaskLoad(double* address, Vector256<double> mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm_maskstore_ps (float * mem_addr, __m128i mask, __m128 a)
- /// VMASKMOVPS m128, xmm, xmm
- /// </summary>
- public static unsafe void MaskStore(float* address, Vector128<float> mask, Vector128<float> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_maskstore_pd (double * mem_addr, __m128i mask, __m128d a)
- /// VMASKMOVPD m128, xmm, xmm
- /// </summary>
- public static unsafe void MaskStore(double* address, Vector128<double> mask, Vector128<double> source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm256_maskstore_ps (float * mem_addr, __m256i mask, __m256 a)
- /// VMASKMOVPS m256, ymm, ymm
- /// </summary>
- public static unsafe void MaskStore(float* address, Vector256<float> mask, Vector256<float> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_maskstore_pd (double * mem_addr, __m256i mask, __m256d a)
- /// VMASKMOVPD m256, ymm, ymm
- /// </summary>
- public static unsafe void MaskStore(double* address, Vector256<double> mask, Vector256<double> source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_max_ps (__m256 a, __m256 b)
- /// VMAXPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> Max(Vector256<float> left, Vector256<float> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_max_pd (__m256d a, __m256d b)
- /// VMAXPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> Max(Vector256<double> left, Vector256<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_min_ps (__m256 a, __m256 b)
- /// VMINPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> Min(Vector256<float> left, Vector256<float> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_min_pd (__m256d a, __m256d b)
- /// VMINPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> Min(Vector256<double> left, Vector256<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_movemask_ps (__m256 a)
- /// VMOVMSKPS reg, ymm
- /// </summary>
- public static int MoveMask(Vector256<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// int _mm256_movemask_pd (__m256d a)
- /// VMOVMSKPD reg, ymm
- /// </summary>
- public static int MoveMask(Vector256<double> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_mul_ps (__m256 a, __m256 b)
- /// VMULPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> Multiply(Vector256<float> left, Vector256<float> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_mul_pd (__m256d a, __m256d b)
- /// VMULPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> Multiply(Vector256<double> left, Vector256<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_or_ps (__m256 a, __m256 b)
- /// VORPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> Or(Vector256<float> left, Vector256<float> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_or_pd (__m256d a, __m256d b)
- /// VORPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> Or(Vector256<double> left, Vector256<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_permute_ps (__m128 a, int imm8)
- /// VPERMILPS xmm, xmm, imm8
- /// </summary>
- public static Vector128<float> Permute(Vector128<float> value, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_permute_pd (__m128d a, int imm8)
- /// VPERMILPD xmm, xmm, imm8
- /// </summary>
- public static Vector128<double> Permute(Vector128<double> value, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_permute_ps (__m256 a, int imm8)
- /// VPERMILPS ymm, ymm, imm8
- /// </summary>
- public static Vector256<float> Permute(Vector256<float> value, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_permute_pd (__m256d a, int imm8)
- /// VPERMILPD ymm, ymm, imm8
- /// </summary>
- public static Vector256<double> Permute(Vector256<double> value, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_permute2f128_si256 (__m256i a, __m256i b, int imm8)
- /// VPERM2F128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<byte> Permute2x128(Vector256<byte> left, Vector256<byte> right, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_permute2f128_si256 (__m256i a, __m256i b, int imm8)
- /// VPERM2F128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<sbyte> Permute2x128(Vector256<sbyte> left, Vector256<sbyte> right, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_permute2f128_si256 (__m256i a, __m256i b, int imm8)
- /// VPERM2F128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<short> Permute2x128(Vector256<short> left, Vector256<short> right, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_permute2f128_si256 (__m256i a, __m256i b, int imm8)
- /// VPERM2F128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<ushort> Permute2x128(Vector256<ushort> left, Vector256<ushort> right, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_permute2f128_si256 (__m256i a, __m256i b, int imm8)
- /// VPERM2F128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<int> Permute2x128(Vector256<int> left, Vector256<int> right, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_permute2f128_si256 (__m256i a, __m256i b, int imm8)
- /// VPERM2F128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<uint> Permute2x128(Vector256<uint> left, Vector256<uint> right, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_permute2f128_si256 (__m256i a, __m256i b, int imm8)
- /// VPERM2F128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<long> Permute2x128(Vector256<long> left, Vector256<long> right, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_permute2f128_si256 (__m256i a, __m256i b, int imm8)
- /// VPERM2F128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<ulong> Permute2x128(Vector256<ulong> left, Vector256<ulong> right, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256 _mm256_permute2f128_ps (__m256 a, __m256 b, int imm8)
- /// VPERM2F128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<float> Permute2x128(Vector256<float> left, Vector256<float> right, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256d _mm256_permute2f128_pd (__m256d a, __m256d b, int imm8)
- /// VPERM2F128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<double> Permute2x128(Vector256<double> left, Vector256<double> right, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_permutevar_ps (__m128 a, __m128i b)
- /// VPERMILPS xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<float> PermuteVar(Vector128<float> left, Vector128<int> control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_permutevar_pd (__m128d a, __m128i b)
- /// VPERMILPD xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<double> PermuteVar(Vector128<double> left, Vector128<long> control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256 _mm256_permutevar_ps (__m256 a, __m256i b)
- /// VPERMILPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> PermuteVar(Vector256<float> left, Vector256<int> control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_permutevar_pd (__m256d a, __m256i b)
- /// VPERMILPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> PermuteVar(Vector256<double> left, Vector256<long> control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_rcp_ps (__m256 a)
- /// VRCPPS ymm, ymm/m256
- /// </summary>
- public static Vector256<float> Reciprocal(Vector256<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_rsqrt_ps (__m256 a)
- /// VRSQRTPS ymm, ymm/m256
- /// </summary>
- public static Vector256<float> ReciprocalSqrt(Vector256<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_round_ps (__m256 a, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC)
- /// VROUNDPS ymm, ymm/m256, imm8(8)
- /// </summary>
- public static Vector256<float> RoundToNearestInteger(Vector256<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256 _mm256_round_ps (__m256 a, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC)
- /// VROUNDPS ymm, ymm/m256, imm8(9)
- /// </summary>
- public static Vector256<float> RoundToNegativeInfinity(Vector256<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256 _mm256_round_ps (__m256 a, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC)
- /// VROUNDPS ymm, ymm/m256, imm8(10)
- /// </summary>
- public static Vector256<float> RoundToPositiveInfinity(Vector256<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256 _mm256_round_ps (__m256 a, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC)
- /// VROUNDPS ymm, ymm/m256, imm8(11)
- /// </summary>
- public static Vector256<float> RoundToZero(Vector256<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256 _mm256_round_ps (__m256 a, _MM_FROUND_CUR_DIRECTION)
- /// VROUNDPS ymm, ymm/m256, imm8(4)
- /// </summary>
- public static Vector256<float> RoundCurrentDirection(Vector256<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256d _mm256_round_pd (__m256d a, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC)
- /// VROUNDPD ymm, ymm/m256, imm8(8)
- /// </summary>
- public static Vector256<double> RoundToNearestInteger(Vector256<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_round_pd (__m256d a, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC)
- /// VROUNDPD ymm, ymm/m256, imm8(9)
- /// </summary>
- public static Vector256<double> RoundToNegativeInfinity(Vector256<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_round_pd (__m256d a, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC)
- /// VROUNDPD ymm, ymm/m256, imm8(10)
- /// </summary>
- public static Vector256<double> RoundToPositiveInfinity(Vector256<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_round_pd (__m256d a, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC)
- /// VROUNDPD ymm, ymm/m256, imm8(11)
- /// </summary>
- public static Vector256<double> RoundToZero(Vector256<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_round_pd (__m256d a, _MM_FROUND_CUR_DIRECTION)
- /// VROUNDPD ymm, ymm/m256, imm8(4)
- /// </summary>
- public static Vector256<double> RoundCurrentDirection(Vector256<double> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_shuffle_ps (__m256 a, __m256 b, const int imm8)
- /// VSHUFPS ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<float> Shuffle(Vector256<float> value, Vector256<float> right, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_shuffle_pd (__m256d a, __m256d b, const int imm8)
- /// VSHUFPD ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<double> Shuffle(Vector256<double> value, Vector256<double> right, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_sqrt_ps (__m256 a)
- /// VSQRTPS ymm, ymm/m256
- /// </summary>
- public static Vector256<float> Sqrt(Vector256<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_sqrt_pd (__m256d a)
- /// VSQRTPD ymm, ymm/m256
- /// </summary>
- public static Vector256<double> Sqrt(Vector256<double> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm256_store_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQA m256, ymm
- /// </summary>
- public static unsafe void StoreAligned(sbyte* address, Vector256<sbyte> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_store_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQA m256, ymm
- /// </summary>
- public static unsafe void StoreAligned(byte* address, Vector256<byte> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_store_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQA m256, ymm
- /// </summary>
- public static unsafe void StoreAligned(short* address, Vector256<short> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_store_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQA m256, ymm
- /// </summary>
- public static unsafe void StoreAligned(ushort* address, Vector256<ushort> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_store_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQA m256, ymm
- /// </summary>
- public static unsafe void StoreAligned(int* address, Vector256<int> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_store_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQA m256, ymm
- /// </summary>
- public static unsafe void StoreAligned(uint* address, Vector256<uint> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_store_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQA m256, ymm
- /// </summary>
- public static unsafe void StoreAligned(long* address, Vector256<long> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_store_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQA m256, ymm
- /// </summary>
- public static unsafe void StoreAligned(ulong* address, Vector256<ulong> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_store_ps (float * mem_addr, __m256 a)
- /// VMOVAPS m256, ymm
- /// </summary>
- public static unsafe void StoreAligned(float* address, Vector256<float> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_store_pd (double * mem_addr, __m256d a)
- /// VMOVAPD m256, ymm
- /// </summary>
- public static unsafe void StoreAligned(double* address, Vector256<double> source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm256_stream_si256 (__m256i * mem_addr, __m256i a)
- /// VMOVNTDQ m256, ymm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(sbyte* address, Vector256<sbyte> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_stream_si256 (__m256i * mem_addr, __m256i a)
- /// VMOVNTDQ m256, ymm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(byte* address, Vector256<byte> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_stream_si256 (__m256i * mem_addr, __m256i a)
- /// VMOVNTDQ m256, ymm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(short* address, Vector256<short> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_stream_si256 (__m256i * mem_addr, __m256i a)
- /// VMOVNTDQ m256, ymm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(ushort* address, Vector256<ushort> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_stream_si256 (__m256i * mem_addr, __m256i a)
- /// VMOVNTDQ m256, ymm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(int* address, Vector256<int> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_stream_si256 (__m256i * mem_addr, __m256i a)
- /// VMOVNTDQ m256, ymm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(uint* address, Vector256<uint> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_stream_si256 (__m256i * mem_addr, __m256i a)
- /// VMOVNTDQ m256, ymm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(long* address, Vector256<long> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_stream_si256 (__m256i * mem_addr, __m256i a)
- /// VMOVNTDQ m256, ymm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(ulong* address, Vector256<ulong> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_stream_ps (float * mem_addr, __m256 a)
- /// MOVNTPS m256, ymm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(float* address, Vector256<float> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_stream_pd (double * mem_addr, __m256d a)
- /// MOVNTPD m256, ymm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(double* address, Vector256<double> source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm256_storeu_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQU m256, ymm
- /// </summary>
- public static unsafe void Store(sbyte* address, Vector256<sbyte> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_storeu_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQU m256, ymm
- /// </summary>
- public static unsafe void Store(byte* address, Vector256<byte> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_storeu_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQU m256, ymm
- /// </summary>
- public static unsafe void Store(short* address, Vector256<short> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_storeu_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQU m256, ymm
- /// </summary>
- public static unsafe void Store(ushort* address, Vector256<ushort> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_storeu_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQU m256, ymm
- /// </summary>
- public static unsafe void Store(int* address, Vector256<int> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_storeu_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQU m256, ymm
- /// </summary>
- public static unsafe void Store(uint* address, Vector256<uint> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_storeu_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQU m256, ymm
- /// </summary>
- public static unsafe void Store(long* address, Vector256<long> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_storeu_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQU m256, ymm
- /// </summary>
- public static unsafe void Store(ulong* address, Vector256<ulong> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_storeu_ps (float * mem_addr, __m256 a)
- /// MOVUPS m256, ymm
- /// </summary>
- public static unsafe void Store(float* address, Vector256<float> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_storeu_pd (double * mem_addr, __m256d a)
- /// MOVUPD m256, ymm
- /// </summary>
- public static unsafe void Store(double* address, Vector256<double> source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_sub_ps (__m256 a, __m256 b)
- /// VSUBPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> Subtract(Vector256<float> left, Vector256<float> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_sub_pd (__m256d a, __m256d b)
- /// VSUBPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> Subtract(Vector256<double> left, Vector256<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_testc_ps (__m128 a, __m128 b)
- /// VTESTPS xmm, xmm/m128
- /// </summary>
- public static bool TestC(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// int _mm_testc_pd (__m128d a, __m128d b)
- /// VTESTPD xmm, xmm/m128
- /// </summary>
- public static bool TestC(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestC(Vector256<byte> left, Vector256<byte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestC(Vector256<sbyte> left, Vector256<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestC(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestC(Vector256<ushort> left, Vector256<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestC(Vector256<int> left, Vector256<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestC(Vector256<uint> left, Vector256<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestC(Vector256<long> left, Vector256<long> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestC(Vector256<ulong> left, Vector256<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testc_ps (__m256 a, __m256 b)
- /// VTESTPS ymm, ymm/m256
- /// </summary>
- public static bool TestC(Vector256<float> left, Vector256<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testc_pd (__m256d a, __m256d b)
- /// VTESTPS ymm, ymm/m256
- /// </summary>
- public static bool TestC(Vector256<double> left, Vector256<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_testnzc_ps (__m128 a, __m128 b)
- /// VTESTPS xmm, xmm/m128
- /// </summary>
- public static bool TestNotZAndNotC(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// int _mm_testnzc_pd (__m128d a, __m128d b)
- /// VTESTPD xmm, xmm/m128
- /// </summary>
- public static bool TestNotZAndNotC(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testnzc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestNotZAndNotC(Vector256<byte> left, Vector256<byte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testnzc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestNotZAndNotC(Vector256<sbyte> left, Vector256<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testnzc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestNotZAndNotC(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testnzc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestNotZAndNotC(Vector256<ushort> left, Vector256<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testnzc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestNotZAndNotC(Vector256<int> left, Vector256<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testnzc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestNotZAndNotC(Vector256<uint> left, Vector256<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testnzc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestNotZAndNotC(Vector256<long> left, Vector256<long> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testnzc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestNotZAndNotC(Vector256<ulong> left, Vector256<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testnzc_ps (__m256 a, __m256 b)
- /// VTESTPS ymm, ymm/m256
- /// </summary>
- public static bool TestNotZAndNotC(Vector256<float> left, Vector256<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testnzc_pd (__m256d a, __m256d b)
- /// VTESTPD ymm, ymm/m256
- /// </summary>
- public static bool TestNotZAndNotC(Vector256<double> left, Vector256<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_testz_ps (__m128 a, __m128 b)
- /// VTESTPS xmm, xmm/m128
- /// </summary>
- public static bool TestZ(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// int _mm_testz_pd (__m128d a, __m128d b)
- /// VTESTPD xmm, xmm/m128
- /// </summary>
- public static bool TestZ(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testz_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestZ(Vector256<byte> left, Vector256<byte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testz_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestZ(Vector256<sbyte> left, Vector256<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testz_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestZ(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testz_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestZ(Vector256<ushort> left, Vector256<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testz_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestZ(Vector256<int> left, Vector256<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testz_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestZ(Vector256<uint> left, Vector256<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testz_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestZ(Vector256<long> left, Vector256<long> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testz_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestZ(Vector256<ulong> left, Vector256<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testz_ps (__m256 a, __m256 b)
- /// VTESTPS ymm, ymm/m256
- /// </summary>
- public static bool TestZ(Vector256<float> left, Vector256<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_testz_pd (__m256d a, __m256d b)
- /// VTESTPD ymm, ymm/m256
- /// </summary>
- public static bool TestZ(Vector256<double> left, Vector256<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_unpackhi_ps (__m256 a, __m256 b)
- /// VUNPCKHPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> UnpackHigh(Vector256<float> left, Vector256<float> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_unpackhi_pd (__m256d a, __m256d b)
- /// VUNPCKHPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> UnpackHigh(Vector256<double> left, Vector256<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_unpacklo_ps (__m256 a, __m256 b)
- /// VUNPCKLPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> UnpackLow(Vector256<float> left, Vector256<float> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_unpacklo_pd (__m256d a, __m256d b)
- /// VUNPCKLPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> UnpackLow(Vector256<double> left, Vector256<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_xor_ps (__m256 a, __m256 b)
- /// VXORPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> Xor(Vector256<float> left, Vector256<float> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_xor_pd (__m256d a, __m256d b)
- /// VXORPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> Xor(Vector256<double> left, Vector256<double> right) { throw new PlatformNotSupportedException(); }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Avx.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Avx.cs
deleted file mode 100644
index cf12b20bd21..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Avx.cs
+++ /dev/null
@@ -1,1226 +0,0 @@
-// 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.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel AVX hardware instructions via intrinsics
- /// </summary>
- [Intrinsic]
- [CLSCompliant(false)]
- public abstract class Avx : Sse42
- {
- internal Avx() { }
-
- public static new bool IsSupported { get => IsSupported; }
-
- /// <summary>
- /// __m256 _mm256_add_ps (__m256 a, __m256 b)
- /// VADDPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> Add(Vector256<float> left, Vector256<float> right) => Add(left, right);
- /// <summary>
- /// __m256d _mm256_add_pd (__m256d a, __m256d b)
- /// VADDPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> Add(Vector256<double> left, Vector256<double> right) => Add(left, right);
-
- /// <summary>
- /// __m256 _mm256_addsub_ps (__m256 a, __m256 b)
- /// VADDSUBPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> AddSubtract(Vector256<float> left, Vector256<float> right) => AddSubtract(left, right);
- /// <summary>
- /// __m256d _mm256_addsub_pd (__m256d a, __m256d b)
- /// VADDSUBPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> AddSubtract(Vector256<double> left, Vector256<double> right) => AddSubtract(left, right);
-
- /// <summary>
- /// __m256 _mm256_and_ps (__m256 a, __m256 b)
- /// VANDPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> And(Vector256<float> left, Vector256<float> right) => And(left, right);
- /// <summary>
- /// __m256d _mm256_and_pd (__m256d a, __m256d b)
- /// VANDPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> And(Vector256<double> left, Vector256<double> right) => And(left, right);
-
- /// <summary>
- /// __m256 _mm256_andnot_ps (__m256 a, __m256 b)
- /// VANDNPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> AndNot(Vector256<float> left, Vector256<float> right) => AndNot(left, right);
- /// <summary>
- /// __m256d _mm256_andnot_pd (__m256d a, __m256d b)
- /// VANDNPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> AndNot(Vector256<double> left, Vector256<double> right) => AndNot(left, right);
-
- /// <summary>
- /// __m256 _mm256_blend_ps (__m256 a, __m256 b, const int imm8)
- /// VBLENDPS ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<float> Blend(Vector256<float> left, Vector256<float> right, byte control) => Blend(left, right, control);
- /// <summary>
- /// __m256d _mm256_blend_pd (__m256d a, __m256d b, const int imm8)
- /// VBLENDPD ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<double> Blend(Vector256<double> left, Vector256<double> right, byte control) => Blend(left, right, control);
-
- /// <summary>
- /// __m256 _mm256_blendv_ps (__m256 a, __m256 b, __m256 mask)
- /// VBLENDVPS ymm, ymm, ymm/m256, ymm
- /// </summary>
- public static Vector256<float> BlendVariable(Vector256<float> left, Vector256<float> right, Vector256<float> mask) => BlendVariable(left, right, mask);
- /// <summary>
- /// __m256d _mm256_blendv_pd (__m256d a, __m256d b, __m256d mask)
- /// VBLENDVPD ymm, ymm, ymm/m256, ymm
- /// </summary>
- public static Vector256<double> BlendVariable(Vector256<double> left, Vector256<double> right, Vector256<double> mask) => BlendVariable(left, right, mask);
-
- /// <summary>
- /// __m128 _mm_broadcast_ss (float const * mem_addr)
- /// VBROADCASTSS xmm, m32
- /// </summary>
- public static unsafe Vector128<float> BroadcastScalarToVector128(float* source) => BroadcastScalarToVector128(source);
-
- /// <summary>
- /// __m256 _mm256_broadcast_ss (float const * mem_addr)
- /// VBROADCASTSS ymm, m32
- /// </summary>
- public static unsafe Vector256<float> BroadcastScalarToVector256(float* source) => BroadcastScalarToVector256(source);
- /// <summary>
- /// __m256d _mm256_broadcast_sd (double const * mem_addr)
- /// VBROADCASTSD ymm, m64
- /// </summary>
- public static unsafe Vector256<double> BroadcastScalarToVector256(double* source) => BroadcastScalarToVector256(source);
-
- /// <summary>
- /// __m256 _mm256_broadcast_ps (__m128 const * mem_addr)
- /// VBROADCASTF128, ymm, m128
- /// </summary>
- public static unsafe Vector256<float> BroadcastVector128ToVector256(float* address) => BroadcastVector128ToVector256(address);
- /// <summary>
- /// __m256d _mm256_broadcast_pd (__m128d const * mem_addr)
- /// VBROADCASTF128, ymm, m128
- /// </summary>
- public static unsafe Vector256<double> BroadcastVector128ToVector256(double* address) => BroadcastVector128ToVector256(address);
-
- /// <summary>
- /// __m256 _mm256_ceil_ps (__m256 a)
- /// VROUNDPS ymm, ymm/m256, imm8(10)
- /// </summary>
- public static Vector256<float> Ceiling(Vector256<float> value) => Ceiling(value);
- /// <summary>
- /// __m256d _mm256_ceil_pd (__m256d a)
- /// VROUNDPD ymm, ymm/m256, imm8(10)
- /// </summary>
- public static Vector256<double> Ceiling(Vector256<double> value) => Ceiling(value);
-
- /// <summary>
- /// __m128 _mm_cmp_ps (__m128 a, __m128 b, const int imm8)
- /// VCMPPS xmm, xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<float> Compare(Vector128<float> left, Vector128<float> right, FloatComparisonMode mode) => Compare(left, right, mode);
- /// <summary>
- /// __m128d _mm_cmp_pd (__m128d a, __m128d b, const int imm8)
- /// VCMPPD xmm, xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<double> Compare(Vector128<double> left, Vector128<double> right, FloatComparisonMode mode) => Compare(left, right, mode);
- /// <summary>
- /// __m256 _mm256_cmp_ps (__m256 a, __m256 b, const int imm8)
- /// VCMPPS ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<float> Compare(Vector256<float> left, Vector256<float> right, FloatComparisonMode mode) => Compare(left, right, mode);
- /// <summary>
- /// __m256d _mm256_cmp_pd (__m256d a, __m256d b, const int imm8)
- /// VCMPPD ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<double> Compare(Vector256<double> left, Vector256<double> right, FloatComparisonMode mode) => Compare(left, right, mode);
-
- /// <summary>
- /// __m128d _mm_cmp_sd (__m128d a, __m128d b, const int imm8)
- /// VCMPSS xmm, xmm, xmm/m32, imm8
- /// </summary>
- public static Vector128<double> CompareScalar(Vector128<double> left, Vector128<double> right, FloatComparisonMode mode) => CompareScalar(left, right, mode);
- /// <summary>
- /// __m128 _mm_cmp_ss (__m128 a, __m128 b, const int imm8)
- /// VCMPSD xmm, xmm, xmm/m64, imm8
- /// </summary>
- public static Vector128<float> CompareScalar(Vector128<float> left, Vector128<float> right, FloatComparisonMode mode) => CompareScalar(left, right, mode);
-
- /// <summary>
- /// __m128i _mm256_cvtpd_epi32 (__m256d a)
- /// VCVTPD2DQ xmm, ymm/m256
- /// </summary>
- public static Vector128<int> ConvertToVector128Int32(Vector256<double> value) => ConvertToVector128Int32(value);
- /// <summary>
- /// __m128 _mm256_cvtpd_ps (__m256d a)
- /// VCVTPD2PS xmm, ymm/m256
- /// </summary>
- public static Vector128<float> ConvertToVector128Single(Vector256<double> value) => ConvertToVector128Single(value);
- /// <summary>
- /// __m256i _mm256_cvtps_epi32 (__m256 a)
- /// VCVTPS2DQ ymm, ymm/m256
- /// </summary>
- public static Vector256<int> ConvertToVector256Int32(Vector256<float> value) => ConvertToVector256Int32(value);
- /// <summary>
- /// __m256 _mm256_cvtepi32_ps (__m256i a)
- /// VCVTDQ2PS ymm, ymm/m256
- /// </summary>
- public static Vector256<float> ConvertToVector256Single(Vector256<int> value) => ConvertToVector256Single(value);
- /// <summary>
- /// __m256d _mm256_cvtps_pd (__m128 a)
- /// VCVTPS2PD ymm, xmm/m128
- /// </summary>
- public static Vector256<double> ConvertToVector256Double(Vector128<float> value) => ConvertToVector256Double(value);
- /// <summary>
- /// __m256d _mm256_cvtepi32_pd (__m128i a)
- /// VCVTDQ2PD ymm, xmm/m128
- /// </summary>
- public static Vector256<double> ConvertToVector256Double(Vector128<int> value) => ConvertToVector256Double(value);
-
- /// <summary>
- /// __m128i _mm256_cvttpd_epi32 (__m256d a)
- /// VCVTTPD2DQ xmm, ymm/m256
- /// </summary>
- public static Vector128<int> ConvertToVector128Int32WithTruncation(Vector256<double> value) => ConvertToVector128Int32WithTruncation(value);
- /// <summary>
- /// __m256i _mm256_cvttps_epi32 (__m256 a)
- /// VCVTTPS2DQ ymm, ymm/m256
- /// </summary>
- public static Vector256<int> ConvertToVector256Int32WithTruncation(Vector256<float> value) => ConvertToVector256Int32WithTruncation(value);
-
- /// <summary>
- /// __m256 _mm256_div_ps (__m256 a, __m256 b)
- /// VDIVPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> Divide(Vector256<float> left, Vector256<float> right) => Divide(left, right);
- /// <summary>
- /// __m256d _mm256_div_pd (__m256d a, __m256d b)
- /// VDIVPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> Divide(Vector256<double> left, Vector256<double> right) => Divide(left, right);
-
- /// <summary>
- /// __m256 _mm256_dp_ps (__m256 a, __m256 b, const int imm8)
- /// VDPPS ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<float> DotProduct(Vector256<float> left, Vector256<float> right, byte control) => DotProduct(left, right, control);
-
- /// <summary>
- /// __m256 _mm256_moveldup_ps (__m256 a)
- /// VMOVSLDUP ymm, ymm/m256
- /// </summary>
- public static Vector256<float> DuplicateEvenIndexed(Vector256<float> value) => DuplicateEvenIndexed(value);
- /// <summary>
- /// __m256d _mm256_movedup_pd (__m256d a)
- /// VMOVDDUP ymm, ymm/m256
- /// </summary>
- public static Vector256<double> DuplicateEvenIndexed(Vector256<double> value) => DuplicateEvenIndexed(value);
-
- /// <summary>
- /// __m256 _mm256_movehdup_ps (__m256 a)
- /// VMOVSHDUP ymm, ymm/m256
- /// </summary>
- public static Vector256<float> DuplicateOddIndexed(Vector256<float> value) => DuplicateOddIndexed(value);
-
- /// <summary>
- /// __m128i _mm256_extractf128_si256 (__m256i a, const int imm8)
- /// VEXTRACTF128 xmm/m128, ymm, imm8
- /// </summary>
- public static Vector128<byte> ExtractVector128(Vector256<byte> value, byte index) => ExtractVector128(value, index);
-
- /// <summary>
- /// __m128i _mm256_extractf128_si256 (__m256i a, const int imm8)
- /// VEXTRACTF128 xmm/m128, ymm, imm8
- /// </summary>
- public static Vector128<sbyte> ExtractVector128(Vector256<sbyte> value, byte index) => ExtractVector128(value, index);
-
- /// <summary>
- /// __m128i _mm256_extractf128_si256 (__m256i a, const int imm8)
- /// VEXTRACTF128 xmm/m128, ymm, imm8
- /// </summary>
- public static Vector128<short> ExtractVector128(Vector256<short> value, byte index) => ExtractVector128(value, index);
-
- /// <summary>
- /// __m128i _mm256_extractf128_si256 (__m256i a, const int imm8)
- /// VEXTRACTF128 xmm/m128, ymm, imm8
- /// </summary>
- public static Vector128<ushort> ExtractVector128(Vector256<ushort> value, byte index) => ExtractVector128(value, index);
-
- /// <summary>
- /// __m128i _mm256_extractf128_si256 (__m256i a, const int imm8)
- /// VEXTRACTF128 xmm/m128, ymm, imm8
- /// </summary>
- public static Vector128<int> ExtractVector128(Vector256<int> value, byte index) => ExtractVector128(value, index);
-
- /// <summary>
- /// __m128i _mm256_extractf128_si256 (__m256i a, const int imm8)
- /// VEXTRACTF128 xmm/m128, ymm, imm8
- /// </summary>
- public static Vector128<uint> ExtractVector128(Vector256<uint> value, byte index) => ExtractVector128(value, index);
-
- /// <summary>
- /// __m128i _mm256_extractf128_si256 (__m256i a, const int imm8)
- /// VEXTRACTF128 xmm/m128, ymm, imm8
- /// </summary>
- public static Vector128<long> ExtractVector128(Vector256<long> value, byte index) => ExtractVector128(value, index);
-
- /// <summary>
- /// __m128i _mm256_extractf128_si256 (__m256i a, const int imm8)
- /// VEXTRACTF128 xmm/m128, ymm, imm8
- /// </summary>
- public static Vector128<ulong> ExtractVector128(Vector256<ulong> value, byte index) => ExtractVector128(value, index);
-
- /// <summary>
- /// __m128 _mm256_extractf128_ps (__m256 a, const int imm8)
- /// VEXTRACTF128 xmm/m128, ymm, imm8
- /// </summary>
- public static Vector128<float> ExtractVector128(Vector256<float> value, byte index) => ExtractVector128(value, index);
-
- /// <summary>
- /// __m128d _mm256_extractf128_pd (__m256d a, const int imm8)
- /// VEXTRACTF128 xmm/m128, ymm, imm8
- /// </summary>
- public static Vector128<double> ExtractVector128(Vector256<double> value, byte index) => ExtractVector128(value, index);
-
- /// <summary>
- /// __m256 _mm256_floor_ps (__m256 a)
- /// VROUNDPS ymm, ymm/m256, imm8(9)
- /// </summary>
- public static Vector256<float> Floor(Vector256<float> value) => Floor(value);
- /// <summary>
- /// __m256d _mm256_floor_pd (__m256d a)
- /// VROUNDPS ymm, ymm/m256, imm8(9)
- /// </summary>
- public static Vector256<double> Floor(Vector256<double> value) => Floor(value);
-
- /// <summary>
- /// __m256 _mm256_hadd_ps (__m256 a, __m256 b)
- /// VHADDPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> HorizontalAdd(Vector256<float> left, Vector256<float> right) => HorizontalAdd(left, right);
- /// <summary>
- /// __m256d _mm256_hadd_pd (__m256d a, __m256d b)
- /// VHADDPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> HorizontalAdd(Vector256<double> left, Vector256<double> right) => HorizontalAdd(left, right);
-
- /// <summary>
- /// __m256 _mm256_hsub_ps (__m256 a, __m256 b)
- /// VHSUBPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> HorizontalSubtract(Vector256<float> left, Vector256<float> right) => HorizontalSubtract(left, right);
- /// <summary>
- /// __m256d _mm256_hsub_pd (__m256d a, __m256d b)
- /// VHSUBPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> HorizontalSubtract(Vector256<double> left, Vector256<double> right) => HorizontalSubtract(left, right);
-
- /// <summary>
- /// __m256i _mm256_insertf128_si256 (__m256i a, __m128i b, int imm8)
- /// VINSERTF128 ymm, ymm, xmm/m128, imm8
- /// </summary>
- public static Vector256<byte> InsertVector128(Vector256<byte> value, Vector128<byte> data, byte index) => InsertVector128(value, data, index);
-
- /// <summary>
- /// __m256i _mm256_insertf128_si256 (__m256i a, __m128i b, int imm8)
- /// VINSERTF128 ymm, ymm, xmm/m128, imm8
- /// </summary>
- public static Vector256<sbyte> InsertVector128(Vector256<sbyte> value, Vector128<sbyte> data, byte index) => InsertVector128(value, data, index);
-
- /// <summary>
- /// __m256i _mm256_insertf128_si256 (__m256i a, __m128i b, int imm8)
- /// VINSERTF128 ymm, ymm, xmm/m128, imm8
- /// </summary>
- public static Vector256<short> InsertVector128(Vector256<short> value, Vector128<short> data, byte index) => InsertVector128(value, data, index);
-
- /// <summary>
- /// __m256i _mm256_insertf128_si256 (__m256i a, __m128i b, int imm8)
- /// VINSERTF128 ymm, ymm, xmm/m128, imm8
- /// </summary>
- public static Vector256<ushort> InsertVector128(Vector256<ushort> value, Vector128<ushort> data, byte index) => InsertVector128(value, data, index);
-
- /// <summary>
- /// __m256i _mm256_insertf128_si256 (__m256i a, __m128i b, int imm8)
- /// VINSERTF128 ymm, ymm, xmm/m128, imm8
- /// </summary>
- public static Vector256<int> InsertVector128(Vector256<int> value, Vector128<int> data, byte index) => InsertVector128(value, data, index);
-
- /// <summary>
- /// __m256i _mm256_insertf128_si256 (__m256i a, __m128i b, int imm8)
- /// VINSERTF128 ymm, ymm, xmm/m128, imm8
- /// </summary>
- public static Vector256<uint> InsertVector128(Vector256<uint> value, Vector128<uint> data, byte index) => InsertVector128(value, data, index);
-
- /// <summary>
- /// __m256i _mm256_insertf128_si256 (__m256i a, __m128i b, int imm8)
- /// VINSERTF128 ymm, ymm, xmm/m128, imm8
- /// </summary>
- public static Vector256<long> InsertVector128(Vector256<long> value, Vector128<long> data, byte index) => InsertVector128(value, data, index);
-
- /// <summary>
- /// __m256i _mm256_insertf128_si256 (__m256i a, __m128i b, int imm8)
- /// VINSERTF128 ymm, ymm, xmm/m128, imm8
- /// </summary>
- public static Vector256<ulong> InsertVector128(Vector256<ulong> value, Vector128<ulong> data, byte index) => InsertVector128(value, data, index);
-
- /// <summary>
- /// __m256 _mm256_insertf128_ps (__m256 a, __m128 b, int imm8)
- /// VINSERTF128 ymm, ymm, xmm/m128, imm8
- /// </summary>
- public static Vector256<float> InsertVector128(Vector256<float> value, Vector128<float> data, byte index) => InsertVector128(value, data, index);
-
- /// <summary>
- /// __m256d _mm256_insertf128_pd (__m256d a, __m128d b, int imm8)
- /// VINSERTF128 ymm, ymm, xmm/m128, imm8
- /// </summary>
- public static Vector256<double> InsertVector128(Vector256<double> value, Vector128<double> data, byte index) => InsertVector128(value, data, index);
-
- /// <summary>
- /// __m256i _mm256_loadu_si256 (__m256i const * mem_addr)
- /// VMOVDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<sbyte> LoadVector256(sbyte* address) => LoadVector256(address);
- /// <summary>
- /// __m256i _mm256_loadu_si256 (__m256i const * mem_addr)
- /// VMOVDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<byte> LoadVector256(byte* address) => LoadVector256(address);
- /// <summary>
- /// __m256i _mm256_loadu_si256 (__m256i const * mem_addr)
- /// VMOVDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<short> LoadVector256(short* address) => LoadVector256(address);
- /// <summary>
- /// __m256i _mm256_loadu_si256 (__m256i const * mem_addr)
- /// VMOVDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<ushort> LoadVector256(ushort* address) => LoadVector256(address);
- /// <summary>
- /// __m256i _mm256_loadu_si256 (__m256i const * mem_addr)
- /// VMOVDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<int> LoadVector256(int* address) => LoadVector256(address);
- /// <summary>
- /// __m256i _mm256_loadu_si256 (__m256i const * mem_addr)
- /// VMOVDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<uint> LoadVector256(uint* address) => LoadVector256(address);
- /// <summary>
- /// __m256i _mm256_loadu_si256 (__m256i const * mem_addr)
- /// VMOVDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<long> LoadVector256(long* address) => LoadVector256(address);
- /// <summary>
- /// __m256i _mm256_loadu_si256 (__m256i const * mem_addr)
- /// VMOVDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<ulong> LoadVector256(ulong* address) => LoadVector256(address);
- /// <summary>
- /// __m256 _mm256_loadu_ps (float const * mem_addr)
- /// VMOVUPS ymm, ymm/m256
- /// </summary>
- public static unsafe Vector256<float> LoadVector256(float* address) => LoadVector256(address);
- /// <summary>
- /// __m256d _mm256_loadu_pd (double const * mem_addr)
- /// VMOVUPD ymm, ymm/m256
- /// </summary>
- public static unsafe Vector256<double> LoadVector256(double* address) => LoadVector256(address);
-
- /// <summary>
- /// __m256i _mm256_load_si256 (__m256i const * mem_addr)
- /// VMOVDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<sbyte> LoadAlignedVector256(sbyte* address) => LoadAlignedVector256(address);
- /// <summary>
- /// __m256i _mm256_load_si256 (__m256i const * mem_addr)
- /// VMOVDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<byte> LoadAlignedVector256(byte* address) => LoadAlignedVector256(address);
- /// <summary>
- /// __m256i _mm256_load_si256 (__m256i const * mem_addr)
- /// VMOVDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<short> LoadAlignedVector256(short* address) => LoadAlignedVector256(address);
- /// <summary>
- /// __m256i _mm256_load_si256 (__m256i const * mem_addr)
- /// VMOVDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<ushort> LoadAlignedVector256(ushort* address) => LoadAlignedVector256(address);
- /// <summary>
- /// __m256i _mm256_load_si256 (__m256i const * mem_addr)
- /// VMOVDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<int> LoadAlignedVector256(int* address) => LoadAlignedVector256(address);
- /// <summary>
- /// __m256i _mm256_load_si256 (__m256i const * mem_addr)
- /// VMOVDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<uint> LoadAlignedVector256(uint* address) => LoadAlignedVector256(address);
- /// <summary>
- /// __m256i _mm256_load_si256 (__m256i const * mem_addr)
- /// VMOVDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<long> LoadAlignedVector256(long* address) => LoadAlignedVector256(address);
- /// <summary>
- /// __m256i _mm256_load_si256 (__m256i const * mem_addr)
- /// VMOVDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<ulong> LoadAlignedVector256(ulong* address) => LoadAlignedVector256(address);
- /// <summary>
- /// __m256 _mm256_load_ps (float const * mem_addr)
- /// VMOVAPS ymm, ymm/m256
- /// </summary>
- public static unsafe Vector256<float> LoadAlignedVector256(float* address) => LoadAlignedVector256(address);
- /// <summary>
- /// __m256d _mm256_load_pd (double const * mem_addr)
- /// VMOVAPD ymm, ymm/m256
- /// </summary>
- public static unsafe Vector256<double> LoadAlignedVector256(double* address) => LoadAlignedVector256(address);
-
- /// <summary>
- /// __m256i _mm256_lddqu_si256 (__m256i const * mem_addr)
- /// VLDDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<sbyte> LoadDquVector256(sbyte* address) => LoadDquVector256(address);
- /// <summary>
- /// __m256i _mm256_lddqu_si256 (__m256i const * mem_addr)
- /// VLDDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<byte> LoadDquVector256(byte* address) => LoadDquVector256(address);
- /// <summary>
- /// __m256i _mm256_lddqu_si256 (__m256i const * mem_addr)
- /// VLDDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<short> LoadDquVector256(short* address) => LoadDquVector256(address);
- /// <summary>
- /// __m256i _mm256_lddqu_si256 (__m256i const * mem_addr)
- /// VLDDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<ushort> LoadDquVector256(ushort* address) => LoadDquVector256(address);
- /// <summary>
- /// __m256i _mm256_lddqu_si256 (__m256i const * mem_addr)
- /// VLDDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<int> LoadDquVector256(int* address) => LoadDquVector256(address);
- /// <summary>
- /// __m256i _mm256_lddqu_si256 (__m256i const * mem_addr)
- /// VLDDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<uint> LoadDquVector256(uint* address) => LoadDquVector256(address);
- /// <summary>
- /// __m256i _mm256_lddqu_si256 (__m256i const * mem_addr)
- /// VLDDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<long> LoadDquVector256(long* address) => LoadDquVector256(address);
- /// <summary>
- /// __m256i _mm256_lddqu_si256 (__m256i const * mem_addr)
- /// VLDDQU ymm, m256
- /// </summary>
- public static unsafe Vector256<ulong> LoadDquVector256(ulong* address) => LoadDquVector256(address);
-
- /// <summary>
- /// __m128 _mm_maskload_ps (float const * mem_addr, __m128i mask)
- /// VMASKMOVPS xmm, xmm, m128
- /// </summary>
- public static unsafe Vector128<float> MaskLoad(float* address, Vector128<float> mask) => MaskLoad(address, mask);
- /// <summary>
- /// __m128d _mm_maskload_pd (double const * mem_addr, __m128i mask)
- /// VMASKMOVPD xmm, xmm, m128
- /// </summary>
- public static unsafe Vector128<double> MaskLoad(double* address, Vector128<double> mask) => MaskLoad(address, mask);
-
- /// <summary>
- /// __m256 _mm256_maskload_ps (float const * mem_addr, __m256i mask)
- /// VMASKMOVPS ymm, ymm, m256
- /// </summary>
- public static unsafe Vector256<float> MaskLoad(float* address, Vector256<float> mask) => MaskLoad(address, mask);
- /// <summary>
- /// __m256d _mm256_maskload_pd (double const * mem_addr, __m256i mask)
- /// VMASKMOVPD ymm, ymm, m256
- /// </summary>
- public static unsafe Vector256<double> MaskLoad(double* address, Vector256<double> mask) => MaskLoad(address, mask);
-
- /// <summary>
- /// void _mm_maskstore_ps (float * mem_addr, __m128i mask, __m128 a)
- /// VMASKMOVPS m128, xmm, xmm
- /// </summary>
- public static unsafe void MaskStore(float* address, Vector128<float> mask, Vector128<float> source) => MaskStore(address, mask, source);
- /// <summary>
- /// void _mm_maskstore_pd (double * mem_addr, __m128i mask, __m128d a)
- /// VMASKMOVPD m128, xmm, xmm
- /// </summary>
- public static unsafe void MaskStore(double* address, Vector128<double> mask, Vector128<double> source) => MaskStore(address, mask, source);
-
- /// <summary>
- /// void _mm256_maskstore_ps (float * mem_addr, __m256i mask, __m256 a)
- /// VMASKMOVPS m256, ymm, ymm
- /// </summary>
- public static unsafe void MaskStore(float* address, Vector256<float> mask, Vector256<float> source) => MaskStore(address, mask, source);
- /// <summary>
- /// void _mm256_maskstore_pd (double * mem_addr, __m256i mask, __m256d a)
- /// VMASKMOVPD m256, ymm, ymm
- /// </summary>
- public static unsafe void MaskStore(double* address, Vector256<double> mask, Vector256<double> source) => MaskStore(address, mask, source);
-
- /// <summary>
- /// __m256 _mm256_max_ps (__m256 a, __m256 b)
- /// VMAXPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> Max(Vector256<float> left, Vector256<float> right) => Max(left, right);
- /// <summary>
- /// __m256d _mm256_max_pd (__m256d a, __m256d b)
- /// VMAXPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> Max(Vector256<double> left, Vector256<double> right) => Max(left, right);
-
- /// <summary>
- /// __m256 _mm256_min_ps (__m256 a, __m256 b)
- /// VMINPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> Min(Vector256<float> left, Vector256<float> right) => Min(left, right);
- /// <summary>
- /// __m256d _mm256_min_pd (__m256d a, __m256d b)
- /// VMINPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> Min(Vector256<double> left, Vector256<double> right) => Min(left, right);
-
- /// <summary>
- /// int _mm256_movemask_ps (__m256 a)
- /// VMOVMSKPS reg, ymm
- /// </summary>
- public static int MoveMask(Vector256<float> value) => MoveMask(value);
- /// <summary>
- /// int _mm256_movemask_pd (__m256d a)
- /// VMOVMSKPD reg, ymm
- /// </summary>
- public static int MoveMask(Vector256<double> value) => MoveMask(value);
-
- /// <summary>
- /// __m256 _mm256_mul_ps (__m256 a, __m256 b)
- /// VMULPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> Multiply(Vector256<float> left, Vector256<float> right) => Multiply(left, right);
- /// <summary>
- /// __m256d _mm256_mul_pd (__m256d a, __m256d b)
- /// VMULPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> Multiply(Vector256<double> left, Vector256<double> right) => Multiply(left, right);
-
- /// <summary>
- /// __m256 _mm256_or_ps (__m256 a, __m256 b)
- /// VORPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> Or(Vector256<float> left, Vector256<float> right) => Or(left, right);
- /// <summary>
- /// __m256d _mm256_or_pd (__m256d a, __m256d b)
- /// VORPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> Or(Vector256<double> left, Vector256<double> right) => Or(left, right);
-
- /// <summary>
- /// __m128 _mm_permute_ps (__m128 a, int imm8)
- /// VPERMILPS xmm, xmm, imm8
- /// </summary>
- public static Vector128<float> Permute(Vector128<float> value, byte control) => Permute(value, control);
- /// <summary>
- /// __m128d _mm_permute_pd (__m128d a, int imm8)
- /// VPERMILPD xmm, xmm, imm8
- /// </summary>
- public static Vector128<double> Permute(Vector128<double> value, byte control) => Permute(value, control);
-
- /// <summary>
- /// __m256 _mm256_permute_ps (__m256 a, int imm8)
- /// VPERMILPS ymm, ymm, imm8
- /// </summary>
- public static Vector256<float> Permute(Vector256<float> value, byte control) => Permute(value, control);
- /// <summary>
- /// __m256d _mm256_permute_pd (__m256d a, int imm8)
- /// VPERMILPD ymm, ymm, imm8
- /// </summary>
- public static Vector256<double> Permute(Vector256<double> value, byte control) => Permute(value, control);
-
- /// <summary>
- /// __m256i _mm256_permute2f128_si256 (__m256i a, __m256i b, int imm8)
- /// VPERM2F128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<byte> Permute2x128(Vector256<byte> left, Vector256<byte> right, byte control) => Permute2x128(left, right, control);
-
- /// <summary>
- /// __m256i _mm256_permute2f128_si256 (__m256i a, __m256i b, int imm8)
- /// VPERM2F128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<sbyte> Permute2x128(Vector256<sbyte> left, Vector256<sbyte> right, byte control) => Permute2x128(left, right, control);
-
- /// <summary>
- /// __m256i _mm256_permute2f128_si256 (__m256i a, __m256i b, int imm8)
- /// VPERM2F128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<short> Permute2x128(Vector256<short> left, Vector256<short> right, byte control) => Permute2x128(left, right, control);
-
- /// <summary>
- /// __m256i _mm256_permute2f128_si256 (__m256i a, __m256i b, int imm8)
- /// VPERM2F128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<ushort> Permute2x128(Vector256<ushort> left, Vector256<ushort> right, byte control) => Permute2x128(left, right, control);
-
- /// <summary>
- /// __m256i _mm256_permute2f128_si256 (__m256i a, __m256i b, int imm8)
- /// VPERM2F128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<int> Permute2x128(Vector256<int> left, Vector256<int> right, byte control) => Permute2x128(left, right, control);
-
- /// <summary>
- /// __m256i _mm256_permute2f128_si256 (__m256i a, __m256i b, int imm8)
- /// VPERM2F128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<uint> Permute2x128(Vector256<uint> left, Vector256<uint> right, byte control) => Permute2x128(left, right, control);
-
- /// <summary>
- /// __m256i _mm256_permute2f128_si256 (__m256i a, __m256i b, int imm8)
- /// VPERM2F128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<long> Permute2x128(Vector256<long> left, Vector256<long> right, byte control) => Permute2x128(left, right, control);
-
- /// <summary>
- /// __m256i _mm256_permute2f128_si256 (__m256i a, __m256i b, int imm8)
- /// VPERM2F128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<ulong> Permute2x128(Vector256<ulong> left, Vector256<ulong> right, byte control) => Permute2x128(left, right, control);
- /// <summary>
- /// __m256 _mm256_permute2f128_ps (__m256 a, __m256 b, int imm8)
- /// VPERM2F128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<float> Permute2x128(Vector256<float> left, Vector256<float> right, byte control) => Permute2x128(left, right, control);
-
- /// <summary>
- /// __m256d _mm256_permute2f128_pd (__m256d a, __m256d b, int imm8)
- /// VPERM2F128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<double> Permute2x128(Vector256<double> left, Vector256<double> right, byte control) => Permute2x128(left, right, control);
-
- /// <summary>
- /// __m128 _mm_permutevar_ps (__m128 a, __m128i b)
- /// VPERMILPS xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<float> PermuteVar(Vector128<float> left, Vector128<int> control) => PermuteVar(left, control);
- /// <summary>
- /// __m128d _mm_permutevar_pd (__m128d a, __m128i b)
- /// VPERMILPD xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<double> PermuteVar(Vector128<double> left, Vector128<long> control) => PermuteVar(left, control);
- /// <summary>
- /// __m256 _mm256_permutevar_ps (__m256 a, __m256i b)
- /// VPERMILPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> PermuteVar(Vector256<float> left, Vector256<int> control) => PermuteVar(left, control);
- /// <summary>
- /// __m256d _mm256_permutevar_pd (__m256d a, __m256i b)
- /// VPERMILPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> PermuteVar(Vector256<double> left, Vector256<long> control) => PermuteVar(left, control);
-
- /// <summary>
- /// __m256 _mm256_rcp_ps (__m256 a)
- /// VRCPPS ymm, ymm/m256
- /// </summary>
- public static Vector256<float> Reciprocal(Vector256<float> value) => Reciprocal(value);
-
- /// <summary>
- /// __m256 _mm256_rsqrt_ps (__m256 a)
- /// VRSQRTPS ymm, ymm/m256
- /// </summary>
- public static Vector256<float> ReciprocalSqrt(Vector256<float> value) => ReciprocalSqrt(value);
-
- /// <summary>
- /// __m256 _mm256_round_ps (__m256 a, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC)
- /// VROUNDPS ymm, ymm/m256, imm8(8)
- /// </summary>
- public static Vector256<float> RoundToNearestInteger(Vector256<float> value) => RoundToNearestInteger(value);
- /// <summary>
- /// __m256 _mm256_round_ps (__m256 a, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC)
- /// VROUNDPS ymm, ymm/m256, imm8(9)
- /// </summary>
- public static Vector256<float> RoundToNegativeInfinity(Vector256<float> value) => RoundToNegativeInfinity(value);
- /// <summary>
- /// __m256 _mm256_round_ps (__m256 a, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC)
- /// VROUNDPS ymm, ymm/m256, imm8(10)
- /// </summary>
- public static Vector256<float> RoundToPositiveInfinity(Vector256<float> value) => RoundToPositiveInfinity(value);
- /// <summary>
- /// __m256 _mm256_round_ps (__m256 a, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC)
- /// VROUNDPS ymm, ymm/m256, imm8(11)
- /// </summary>
- public static Vector256<float> RoundToZero(Vector256<float> value) => RoundToZero(value);
- /// <summary>
- /// __m256 _mm256_round_ps (__m256 a, _MM_FROUND_CUR_DIRECTION)
- /// VROUNDPS ymm, ymm/m256, imm8(4)
- /// </summary>
- public static Vector256<float> RoundCurrentDirection(Vector256<float> value) => RoundCurrentDirection(value);
-
- /// <summary>
- /// __m256d _mm256_round_pd (__m256d a, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC)
- /// VROUNDPD ymm, ymm/m256, imm8(8)
- /// </summary>
- public static Vector256<double> RoundToNearestInteger(Vector256<double> value) => RoundToNearestInteger(value);
- /// <summary>
- /// __m256d _mm256_round_pd (__m256d a, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC)
- /// VROUNDPD ymm, ymm/m256, imm8(9)
- /// </summary>
- public static Vector256<double> RoundToNegativeInfinity(Vector256<double> value) => RoundToNegativeInfinity(value);
- /// <summary>
- /// __m256d _mm256_round_pd (__m256d a, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC)
- /// VROUNDPD ymm, ymm/m256, imm8(10)
- /// </summary>
- public static Vector256<double> RoundToPositiveInfinity(Vector256<double> value) => RoundToPositiveInfinity(value);
- /// <summary>
- /// __m256d _mm256_round_pd (__m256d a, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC)
- /// VROUNDPD ymm, ymm/m256, imm8(11)
- /// </summary>
- public static Vector256<double> RoundToZero(Vector256<double> value) => RoundToZero(value);
- /// <summary>
- /// __m256d _mm256_round_pd (__m256d a, _MM_FROUND_CUR_DIRECTION)
- /// VROUNDPD ymm, ymm/m256, imm8(4)
- /// </summary>
- public static Vector256<double> RoundCurrentDirection(Vector256<double> value) => RoundCurrentDirection(value);
-
- /// <summary>
- /// __m256 _mm256_shuffle_ps (__m256 a, __m256 b, const int imm8)
- /// VSHUFPS ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<float> Shuffle(Vector256<float> value, Vector256<float> right, byte control) => Shuffle(value, right, control);
- /// <summary>
- /// __m256d _mm256_shuffle_pd (__m256d a, __m256d b, const int imm8)
- /// VSHUFPD ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<double> Shuffle(Vector256<double> value, Vector256<double> right, byte control) => Shuffle(value, right, control);
-
- /// <summary>
- /// __m256 _mm256_sqrt_ps (__m256 a)
- /// VSQRTPS ymm, ymm/m256
- /// </summary>
- public static Vector256<float> Sqrt(Vector256<float> value) => Sqrt(value);
- /// <summary>
- /// __m256d _mm256_sqrt_pd (__m256d a)
- /// VSQRTPD ymm, ymm/m256
- /// </summary>
- public static Vector256<double> Sqrt(Vector256<double> value) => Sqrt(value);
-
- /// <summary>
- /// void _mm256_store_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQA m256, ymm
- /// </summary>
- public static unsafe void StoreAligned(sbyte* address, Vector256<sbyte> source) => StoreAligned(address, source);
- /// <summary>
- /// void _mm256_store_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQA m256, ymm
- /// </summary>
- public static unsafe void StoreAligned(byte* address, Vector256<byte> source) => StoreAligned(address, source);
- /// <summary>
- /// void _mm256_store_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQA m256, ymm
- /// </summary>
- public static unsafe void StoreAligned(short* address, Vector256<short> source) => StoreAligned(address, source);
- /// <summary>
- /// void _mm256_store_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQA m256, ymm
- /// </summary>
- public static unsafe void StoreAligned(ushort* address, Vector256<ushort> source) => StoreAligned(address, source);
- /// <summary>
- /// void _mm256_store_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQA m256, ymm
- /// </summary>
- public static unsafe void StoreAligned(int* address, Vector256<int> source) => StoreAligned(address, source);
- /// <summary>
- /// void _mm256_store_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQA m256, ymm
- /// </summary>
- public static unsafe void StoreAligned(uint* address, Vector256<uint> source) => StoreAligned(address, source);
- /// <summary>
- /// void _mm256_store_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQA m256, ymm
- /// </summary>
- public static unsafe void StoreAligned(long* address, Vector256<long> source) => StoreAligned(address, source);
- /// <summary>
- /// void _mm256_store_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQA m256, ymm
- /// </summary>
- public static unsafe void StoreAligned(ulong* address, Vector256<ulong> source) => StoreAligned(address, source);
- /// <summary>
- /// void _mm256_store_ps (float * mem_addr, __m256 a)
- /// VMOVAPS m256, ymm
- /// </summary>
- public static unsafe void StoreAligned(float* address, Vector256<float> source) => StoreAligned(address, source);
- /// <summary>
- /// void _mm256_store_pd (double * mem_addr, __m256d a)
- /// VMOVAPD m256, ymm
- /// </summary>
- public static unsafe void StoreAligned(double* address, Vector256<double> source) => StoreAligned(address, source);
-
- /// <summary>
- /// void _mm256_stream_si256 (__m256i * mem_addr, __m256i a)
- /// VMOVNTDQ m256, ymm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(sbyte* address, Vector256<sbyte> source) => StoreAlignedNonTemporal(address, source);
- /// <summary>
- /// void _mm256_stream_si256 (__m256i * mem_addr, __m256i a)
- /// VMOVNTDQ m256, ymm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(byte* address, Vector256<byte> source) => StoreAlignedNonTemporal(address, source);
- /// <summary>
- /// void _mm256_stream_si256 (__m256i * mem_addr, __m256i a)
- /// VMOVNTDQ m256, ymm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(short* address, Vector256<short> source) => StoreAlignedNonTemporal(address, source);
- /// <summary>
- /// void _mm256_stream_si256 (__m256i * mem_addr, __m256i a)
- /// VMOVNTDQ m256, ymm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(ushort* address, Vector256<ushort> source) => StoreAlignedNonTemporal(address, source);
- /// <summary>
- /// void _mm256_stream_si256 (__m256i * mem_addr, __m256i a)
- /// VMOVNTDQ m256, ymm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(int* address, Vector256<int> source) => StoreAlignedNonTemporal(address, source);
- /// <summary>
- /// void _mm256_stream_si256 (__m256i * mem_addr, __m256i a)
- /// VMOVNTDQ m256, ymm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(uint* address, Vector256<uint> source) => StoreAlignedNonTemporal(address, source);
- /// <summary>
- /// void _mm256_stream_si256 (__m256i * mem_addr, __m256i a)
- /// VMOVNTDQ m256, ymm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(long* address, Vector256<long> source) => StoreAlignedNonTemporal(address, source);
- /// <summary>
- /// void _mm256_stream_si256 (__m256i * mem_addr, __m256i a)
- /// VMOVNTDQ m256, ymm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(ulong* address, Vector256<ulong> source) => StoreAlignedNonTemporal(address, source);
- /// <summary>
- /// void _mm256_stream_ps (float * mem_addr, __m256 a)
- /// MOVNTPS m256, ymm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(float* address, Vector256<float> source) => StoreAlignedNonTemporal(address, source);
- /// <summary>
- /// void _mm256_stream_pd (double * mem_addr, __m256d a)
- /// MOVNTPD m256, ymm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(double* address, Vector256<double> source) => StoreAlignedNonTemporal(address, source);
-
- /// <summary>
- /// void _mm256_storeu_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQU m256, ymm
- /// </summary>
- public static unsafe void Store(sbyte* address, Vector256<sbyte> source) => Store(address, source);
- /// <summary>
- /// void _mm256_storeu_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQU m256, ymm
- /// </summary>
- public static unsafe void Store(byte* address, Vector256<byte> source) => Store(address, source);
- /// <summary>
- /// void _mm256_storeu_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQU m256, ymm
- /// </summary>
- public static unsafe void Store(short* address, Vector256<short> source) => Store(address, source);
- /// <summary>
- /// void _mm256_storeu_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQU m256, ymm
- /// </summary>
- public static unsafe void Store(ushort* address, Vector256<ushort> source) => Store(address, source);
- /// <summary>
- /// void _mm256_storeu_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQU m256, ymm
- /// </summary>
- public static unsafe void Store(int* address, Vector256<int> source) => Store(address, source);
- /// <summary>
- /// void _mm256_storeu_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQU m256, ymm
- /// </summary>
- public static unsafe void Store(uint* address, Vector256<uint> source) => Store(address, source);
- /// <summary>
- /// void _mm256_storeu_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQU m256, ymm
- /// </summary>
- public static unsafe void Store(long* address, Vector256<long> source) => Store(address, source);
- /// <summary>
- /// void _mm256_storeu_si256 (__m256i * mem_addr, __m256i a)
- /// MOVDQU m256, ymm
- /// </summary>
- public static unsafe void Store(ulong* address, Vector256<ulong> source) => Store(address, source);
- /// <summary>
- /// void _mm256_storeu_ps (float * mem_addr, __m256 a)
- /// MOVUPS m256, ymm
- /// </summary>
- public static unsafe void Store(float* address, Vector256<float> source) => Store(address, source);
- /// <summary>
- /// void _mm256_storeu_pd (double * mem_addr, __m256d a)
- /// MOVUPD m256, ymm
- /// </summary>
- public static unsafe void Store(double* address, Vector256<double> source) => Store(address, source);
-
- /// <summary>
- /// __m256 _mm256_sub_ps (__m256 a, __m256 b)
- /// VSUBPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> Subtract(Vector256<float> left, Vector256<float> right) => Subtract(left, right);
- /// <summary>
- /// __m256d _mm256_sub_pd (__m256d a, __m256d b)
- /// VSUBPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> Subtract(Vector256<double> left, Vector256<double> right) => Subtract(left, right);
-
- /// <summary>
- /// int _mm_testc_ps (__m128 a, __m128 b)
- /// VTESTPS xmm, xmm/m128
- /// </summary>
- public static bool TestC(Vector128<float> left, Vector128<float> right) => TestC(left, right);
- /// <summary>
- /// int _mm_testc_pd (__m128d a, __m128d b)
- /// VTESTPD xmm, xmm/m128
- /// </summary>
- public static bool TestC(Vector128<double> left, Vector128<double> right) => TestC(left, right);
-
- /// <summary>
- /// int _mm256_testc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestC(Vector256<byte> left, Vector256<byte> right) => TestC(left, right);
-
- /// <summary>
- /// int _mm256_testc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestC(Vector256<sbyte> left, Vector256<sbyte> right) => TestC(left, right);
-
- /// <summary>
- /// int _mm256_testc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestC(Vector256<short> left, Vector256<short> right) => TestC(left, right);
-
- /// <summary>
- /// int _mm256_testc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestC(Vector256<ushort> left, Vector256<ushort> right) => TestC(left, right);
-
- /// <summary>
- /// int _mm256_testc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestC(Vector256<int> left, Vector256<int> right) => TestC(left, right);
-
- /// <summary>
- /// int _mm256_testc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestC(Vector256<uint> left, Vector256<uint> right) => TestC(left, right);
-
- /// <summary>
- /// int _mm256_testc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestC(Vector256<long> left, Vector256<long> right) => TestC(left, right);
-
- /// <summary>
- /// int _mm256_testc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestC(Vector256<ulong> left, Vector256<ulong> right) => TestC(left, right);
-
- /// <summary>
- /// int _mm256_testc_ps (__m256 a, __m256 b)
- /// VTESTPS ymm, ymm/m256
- /// </summary>
- public static bool TestC(Vector256<float> left, Vector256<float> right) => TestC(left, right);
-
- /// <summary>
- /// int _mm256_testc_pd (__m256d a, __m256d b)
- /// VTESTPS ymm, ymm/m256
- /// </summary>
- public static bool TestC(Vector256<double> left, Vector256<double> right) => TestC(left, right);
-
- /// <summary>
- /// int _mm_testnzc_ps (__m128 a, __m128 b)
- /// VTESTPS xmm, xmm/m128
- /// </summary>
- public static bool TestNotZAndNotC(Vector128<float> left, Vector128<float> right) => TestNotZAndNotC(left, right);
- /// <summary>
- /// int _mm_testnzc_pd (__m128d a, __m128d b)
- /// VTESTPD xmm, xmm/m128
- /// </summary>
- public static bool TestNotZAndNotC(Vector128<double> left, Vector128<double> right) => TestNotZAndNotC(left, right);
-
- /// <summary>
- /// int _mm256_testnzc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestNotZAndNotC(Vector256<byte> left, Vector256<byte> right) => TestNotZAndNotC(left, right);
-
- /// <summary>
- /// int _mm256_testnzc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestNotZAndNotC(Vector256<sbyte> left, Vector256<sbyte> right) => TestNotZAndNotC(left, right);
-
- /// <summary>
- /// int _mm256_testnzc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestNotZAndNotC(Vector256<short> left, Vector256<short> right) => TestNotZAndNotC(left, right);
-
- /// <summary>
- /// int _mm256_testnzc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestNotZAndNotC(Vector256<ushort> left, Vector256<ushort> right) => TestNotZAndNotC(left, right);
-
- /// <summary>
- /// int _mm256_testnzc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestNotZAndNotC(Vector256<int> left, Vector256<int> right) => TestNotZAndNotC(left, right);
-
- /// <summary>
- /// int _mm256_testnzc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestNotZAndNotC(Vector256<uint> left, Vector256<uint> right) => TestNotZAndNotC(left, right);
-
- /// <summary>
- /// int _mm256_testnzc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestNotZAndNotC(Vector256<long> left, Vector256<long> right) => TestNotZAndNotC(left, right);
-
- /// <summary>
- /// int _mm256_testnzc_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestNotZAndNotC(Vector256<ulong> left, Vector256<ulong> right) => TestNotZAndNotC(left, right);
-
- /// <summary>
- /// int _mm256_testnzc_ps (__m256 a, __m256 b)
- /// VTESTPS ymm, ymm/m256
- /// </summary>
- public static bool TestNotZAndNotC(Vector256<float> left, Vector256<float> right) => TestNotZAndNotC(left, right);
-
- /// <summary>
- /// int _mm256_testnzc_pd (__m256d a, __m256d b)
- /// VTESTPD ymm, ymm/m256
- /// </summary>
- public static bool TestNotZAndNotC(Vector256<double> left, Vector256<double> right) => TestNotZAndNotC(left, right);
-
- /// <summary>
- /// int _mm_testz_ps (__m128 a, __m128 b)
- /// VTESTPS xmm, xmm/m128
- /// </summary>
- public static bool TestZ(Vector128<float> left, Vector128<float> right) => TestZ(left, right);
- /// <summary>
- /// int _mm_testz_pd (__m128d a, __m128d b)
- /// VTESTPD xmm, xmm/m128
- /// </summary>
- public static bool TestZ(Vector128<double> left, Vector128<double> right) => TestZ(left, right);
-
- /// <summary>
- /// int _mm256_testz_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestZ(Vector256<byte> left, Vector256<byte> right) => TestZ(left, right);
-
- /// <summary>
- /// int _mm256_testz_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestZ(Vector256<sbyte> left, Vector256<sbyte> right) => TestZ(left, right);
-
- /// <summary>
- /// int _mm256_testz_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestZ(Vector256<short> left, Vector256<short> right) => TestZ(left, right);
-
- /// <summary>
- /// int _mm256_testz_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestZ(Vector256<ushort> left, Vector256<ushort> right) => TestZ(left, right);
-
- /// <summary>
- /// int _mm256_testz_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestZ(Vector256<int> left, Vector256<int> right) => TestZ(left, right);
-
- /// <summary>
- /// int _mm256_testz_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestZ(Vector256<uint> left, Vector256<uint> right) => TestZ(left, right);
-
- /// <summary>
- /// int _mm256_testz_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestZ(Vector256<long> left, Vector256<long> right) => TestZ(left, right);
-
- /// <summary>
- /// int _mm256_testz_si256 (__m256i a, __m256i b)
- /// VPTEST ymm, ymm/m256
- /// </summary>
- public static bool TestZ(Vector256<ulong> left, Vector256<ulong> right) => TestZ(left, right);
-
- /// <summary>
- /// int _mm256_testz_ps (__m256 a, __m256 b)
- /// VTESTPS ymm, ymm/m256
- /// </summary>
- public static bool TestZ(Vector256<float> left, Vector256<float> right) => TestZ(left, right);
-
- /// <summary>
- /// int _mm256_testz_pd (__m256d a, __m256d b)
- /// VTESTPD ymm, ymm/m256
- /// </summary>
- public static bool TestZ(Vector256<double> left, Vector256<double> right) => TestZ(left, right);
-
- /// <summary>
- /// __m256 _mm256_unpackhi_ps (__m256 a, __m256 b)
- /// VUNPCKHPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> UnpackHigh(Vector256<float> left, Vector256<float> right) => UnpackHigh(left, right);
- /// <summary>
- /// __m256d _mm256_unpackhi_pd (__m256d a, __m256d b)
- /// VUNPCKHPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> UnpackHigh(Vector256<double> left, Vector256<double> right) => UnpackHigh(left, right);
-
- /// <summary>
- /// __m256 _mm256_unpacklo_ps (__m256 a, __m256 b)
- /// VUNPCKLPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> UnpackLow(Vector256<float> left, Vector256<float> right) => UnpackLow(left, right);
- /// <summary>
- /// __m256d _mm256_unpacklo_pd (__m256d a, __m256d b)
- /// VUNPCKLPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> UnpackLow(Vector256<double> left, Vector256<double> right) => UnpackLow(left, right);
-
- /// <summary>
- /// __m256 _mm256_xor_ps (__m256 a, __m256 b)
- /// VXORPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> Xor(Vector256<float> left, Vector256<float> right) => Xor(left, right);
- /// <summary>
- /// __m256d _mm256_xor_pd (__m256d a, __m256d b)
- /// VXORPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> Xor(Vector256<double> left, Vector256<double> right) => Xor(left, right);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Avx2.PlatformNotSupported.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Avx2.PlatformNotSupported.cs
deleted file mode 100644
index f769fbac8c4..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Avx2.PlatformNotSupported.cs
+++ /dev/null
@@ -1,2191 +0,0 @@
-// 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;
-using System.Runtime.CompilerServices;
-using System.Runtime.Intrinsics;
-
-namespace System.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel AVX2 hardware instructions via intrinsics
- /// </summary>
- [CLSCompliant(false)]
- public abstract class Avx2 : Avx
- {
- internal Avx2() { }
-
- public static new bool IsSupported { [Intrinsic] get { return false; } }
-
- /// <summary>
- /// __m256i _mm256_abs_epi8 (__m256i a)
- /// VPABSB ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> Abs(Vector256<sbyte> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_abs_epi16 (__m256i a)
- /// VPABSW ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> Abs(Vector256<short> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_abs_epi32 (__m256i a)
- /// VPABSD ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> Abs(Vector256<int> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_add_epi8 (__m256i a, __m256i b)
- /// VPADDB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> Add(Vector256<sbyte> left, Vector256<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_add_epi8 (__m256i a, __m256i b)
- /// VPADDB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> Add(Vector256<byte> left, Vector256<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_add_epi16 (__m256i a, __m256i b)
- /// VPADDW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> Add(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_add_epi16 (__m256i a, __m256i b)
- /// VPADDW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> Add(Vector256<ushort> left, Vector256<ushort> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_add_epi32 (__m256i a, __m256i b)
- /// VPADDD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> Add(Vector256<int> left, Vector256<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_add_epi32 (__m256i a, __m256i b)
- /// VPADDD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> Add(Vector256<uint> left, Vector256<uint> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_add_epi64 (__m256i a, __m256i b)
- /// VPADDQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> Add(Vector256<long> left, Vector256<long> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_add_epi64 (__m256i a, __m256i b)
- /// VPADDQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ulong> Add(Vector256<ulong> left, Vector256<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_adds_epi8 (__m256i a, __m256i b)
- /// VPADDSB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> AddSaturate(Vector256<sbyte> left, Vector256<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_adds_epu8 (__m256i a, __m256i b)
- /// VPADDUSB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> AddSaturate(Vector256<byte> left, Vector256<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_adds_epi16 (__m256i a, __m256i b)
- /// VPADDSW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> AddSaturate(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_adds_epu16 (__m256i a, __m256i b)
- /// VPADDUSW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> AddSaturate(Vector256<ushort> left, Vector256<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_alignr_epi8 (__m256i a, __m256i b, const int count)
- /// VPALIGNR ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<sbyte> AlignRight(Vector256<sbyte> left, Vector256<sbyte> right, byte mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_alignr_epi8 (__m256i a, __m256i b, const int count)
- /// VPALIGNR ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<byte> AlignRight(Vector256<byte> left, Vector256<byte> right, byte mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_alignr_epi8 (__m256i a, __m256i b, const int count)
- /// VPALIGNR ymm, ymm, ymm/m256, imm8
- /// This intrinsic generates VPALIGNR that operates over bytes rather than elements of the vectors.
- /// </summary>
- public static Vector256<short> AlignRight(Vector256<short> left, Vector256<short> right, byte mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_alignr_epi8 (__m256i a, __m256i b, const int count)
- /// VPALIGNR ymm, ymm, ymm/m256, imm8
- /// This intrinsic generates VPALIGNR that operates over bytes rather than elements of the vectors.
- /// </summary>
- public static Vector256<ushort> AlignRight(Vector256<ushort> left, Vector256<ushort> right, byte mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_alignr_epi8 (__m256i a, __m256i b, const int count)
- /// VPALIGNR ymm, ymm, ymm/m256, imm8
- /// This intrinsic generates VPALIGNR that operates over bytes rather than elements of the vectors.
- /// </summary>
- public static Vector256<int> AlignRight(Vector256<int> left, Vector256<int> right, byte mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_alignr_epi8 (__m256i a, __m256i b, const int count)
- /// VPALIGNR ymm, ymm, ymm/m256, imm8
- /// This intrinsic generates VPALIGNR that operates over bytes rather than elements of the vectors.
- /// </summary>
- public static Vector256<uint> AlignRight(Vector256<uint> left, Vector256<uint> right, byte mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_alignr_epi8 (__m256i a, __m256i b, const int count)
- /// VPALIGNR ymm, ymm, ymm/m256, imm8
- /// This intrinsic generates VPALIGNR that operates over bytes rather than elements of the vectors.
- /// </summary>
- public static Vector256<long> AlignRight(Vector256<long> left, Vector256<long> right, byte mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_alignr_epi8 (__m256i a, __m256i b, const int count)
- /// VPALIGNR ymm, ymm, ymm/m256, imm8
- /// This intrinsic generates VPALIGNR that operates over bytes rather than elements of the vectors.
- /// </summary>
- public static Vector256<ulong> AlignRight(Vector256<ulong> left, Vector256<ulong> right, byte mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_and_si256 (__m256i a, __m256i b)
- /// VPAND ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> And(Vector256<sbyte> left, Vector256<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_and_si256 (__m256i a, __m256i b)
- /// VPAND ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> And(Vector256<byte> left, Vector256<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_and_si256 (__m256i a, __m256i b)
- /// VPAND ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> And(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_and_si256 (__m256i a, __m256i b)
- /// VPAND ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> And(Vector256<ushort> left, Vector256<ushort> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_and_si256 (__m256i a, __m256i b)
- /// VPAND ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> And(Vector256<int> left, Vector256<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_and_si256 (__m256i a, __m256i b)
- /// VPAND ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> And(Vector256<uint> left, Vector256<uint> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_and_si256 (__m256i a, __m256i b)
- /// VPAND ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> And(Vector256<long> left, Vector256<long> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_and_si256 (__m256i a, __m256i b)
- /// VPAND ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ulong> And(Vector256<ulong> left, Vector256<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_andnot_si256 (__m256i a, __m256i b)
- /// VPANDN ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> AndNot(Vector256<sbyte> left, Vector256<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_andnot_si256 (__m256i a, __m256i b)
- /// VPANDN ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> AndNot(Vector256<byte> left, Vector256<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_andnot_si256 (__m256i a, __m256i b)
- /// VPANDN ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> AndNot(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_andnot_si256 (__m256i a, __m256i b)
- /// VPANDN ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> AndNot(Vector256<ushort> left, Vector256<ushort> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_andnot_si256 (__m256i a, __m256i b)
- /// VPANDN ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> AndNot(Vector256<int> left, Vector256<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_andnot_si256 (__m256i a, __m256i b)
- /// VPANDN ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> AndNot(Vector256<uint> left, Vector256<uint> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_andnot_si256 (__m256i a, __m256i b)
- /// VPANDN ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> AndNot(Vector256<long> left, Vector256<long> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_andnot_si256 (__m256i a, __m256i b)
- /// VPANDN ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ulong> AndNot(Vector256<ulong> left, Vector256<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_avg_epu8 (__m256i a, __m256i b)
- /// VPAVGB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> Average(Vector256<byte> left, Vector256<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_avg_epu16 (__m256i a, __m256i b)
- /// VPAVGW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> Average(Vector256<ushort> left, Vector256<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_blend_epi32 (__m128i a, __m128i b, const int imm8)
- /// VPBLENDD xmm, xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<int> Blend(Vector128<int> left, Vector128<int> right, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_blend_epi32 (__m128i a, __m128i b, const int imm8)
- /// VPBLENDD xmm, xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<uint> Blend(Vector128<uint> left, Vector128<uint> right, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_blend_epi16 (__m256i a, __m256i b, const int imm8)
- /// VPBLENDW ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<short> Blend(Vector256<short> left, Vector256<short> right, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_blend_epi16 (__m256i a, __m256i b, const int imm8)
- /// VPBLENDW ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<ushort> Blend(Vector256<ushort> left, Vector256<ushort> right, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_blend_epi32 (__m256i a, __m256i b, const int imm8)
- /// VPBLENDD ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<int> Blend(Vector256<int> left, Vector256<int> right, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_blend_epi32 (__m256i a, __m256i b, const int imm8)
- /// VPBLENDD ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<uint> Blend(Vector256<uint> left, Vector256<uint> right, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
- /// VPBLENDVB ymm, ymm, ymm/m256, ymm
- /// </summary>
- public static Vector256<sbyte> BlendVariable(Vector256<sbyte> left, Vector256<sbyte> right, Vector256<sbyte> mask) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
- /// VPBLENDVB ymm, ymm, ymm/m256, ymm
- /// </summary>
- public static Vector256<byte> BlendVariable(Vector256<byte> left, Vector256<byte> right, Vector256<byte> mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
- /// VPBLENDVB ymm, ymm, ymm/m256, ymm
- /// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
- /// </summary>
- public static Vector256<short> BlendVariable(Vector256<short> left, Vector256<short> right, Vector256<short> mask) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
- /// VPBLENDVB ymm, ymm, ymm/m256, ymm
- /// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
- /// </summary>
- public static Vector256<ushort> BlendVariable(Vector256<ushort> left, Vector256<ushort> right, Vector256<ushort> mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
- /// VPBLENDVB ymm, ymm, ymm/m256, ymm
- /// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
- /// </summary>
- public static Vector256<int> BlendVariable(Vector256<int> left, Vector256<int> right, Vector256<int> mask) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
- /// VPBLENDVB ymm, ymm, ymm/m256, ymm
- /// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
- /// </summary>
- public static Vector256<uint> BlendVariable(Vector256<uint> left, Vector256<uint> right, Vector256<uint> mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
- /// VPBLENDVB ymm, ymm, ymm/m256, ymm
- /// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
- /// </summary>
- public static Vector256<long> BlendVariable(Vector256<long> left, Vector256<long> right, Vector256<long> mask) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
- /// VPBLENDVB ymm, ymm, ymm/m256, ymm
- /// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
- /// </summary>
- public static Vector256<ulong> BlendVariable(Vector256<ulong> left, Vector256<ulong> right, Vector256<ulong> mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_broadcastb_epi8 (__m128i a)
- /// VPBROADCASTB xmm, xmm
- /// </summary>
- public static Vector128<byte> BroadcastScalarToVector128(Vector128<byte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_broadcastb_epi8 (__m128i a)
- /// VPBROADCASTB xmm, xmm
- /// </summary>
- public static Vector128<sbyte> BroadcastScalarToVector128(Vector128<sbyte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_broadcastw_epi16 (__m128i a)
- /// VPBROADCASTW xmm, xmm
- /// </summary>
- public static Vector128<short> BroadcastScalarToVector128(Vector128<short> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_broadcastw_epi16 (__m128i a)
- /// VPBROADCASTW xmm, xmm
- /// </summary>
- public static Vector128<ushort> BroadcastScalarToVector128(Vector128<ushort> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_broadcastd_epi32 (__m128i a)
- /// VPBROADCASTD xmm, xmm
- /// </summary>
- public static Vector128<int> BroadcastScalarToVector128(Vector128<int> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_broadcastd_epi32 (__m128i a)
- /// VPBROADCASTD xmm, xmm
- /// </summary>
- public static Vector128<uint> BroadcastScalarToVector128(Vector128<uint> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_broadcastq_epi64 (__m128i a)
- /// VPBROADCASTQ xmm, xmm
- /// </summary>
- public static Vector128<long> BroadcastScalarToVector128(Vector128<long> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_broadcastq_epi64 (__m128i a)
- /// VPBROADCASTQ xmm, xmm
- /// </summary>
- public static Vector128<ulong> BroadcastScalarToVector128(Vector128<ulong> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_broadcastss_ps (__m128 a)
- /// VBROADCASTSS xmm, xmm
- /// </summary>
- public static Vector128<float> BroadcastScalarToVector128(Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_broadcastsd_pd (__m128d a)
- /// VMOVDDUP xmm, xmm
- /// </summary>
- public static Vector128<double> BroadcastScalarToVector128(Vector128<double> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_broadcastb_epi8 (__m128i a)
- /// VPBROADCASTB xmm, m8
- /// The above native signature does not directly correspond to the managed signature.
- /// We provide this additional overload for the lack of pointers to managed.
- /// </summary>
- public static unsafe Vector128<byte> BroadcastScalarToVector128(byte* source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_broadcastb_epi8 (__m128i a)
- /// VPBROADCASTB xmm, m8
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector128<sbyte> BroadcastScalarToVector128(sbyte* source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_broadcastw_epi16 (__m128i a)
- /// VPBROADCASTW xmm, m16
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector128<short> BroadcastScalarToVector128(short* source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_broadcastw_epi16 (__m128i a)
- /// VPBROADCASTW xmm, m16
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector128<ushort> BroadcastScalarToVector128(ushort* source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_broadcastd_epi32 (__m128i a)
- /// VPBROADCASTD xmm, m32
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector128<int> BroadcastScalarToVector128(int* source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_broadcastd_epi32 (__m128i a)
- /// VPBROADCASTD xmm, m32
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector128<uint> BroadcastScalarToVector128(uint* source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_broadcastq_epi64 (__m128i a)
- /// VPBROADCASTQ xmm, m64
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector128<long> BroadcastScalarToVector128(long* source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_broadcastq_epi64 (__m128i a)
- /// VPBROADCASTQ xmm, m64
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector128<ulong> BroadcastScalarToVector128(ulong* source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_broadcastb_epi8 (__m128i a)
- /// VPBROADCASTB ymm, xmm
- /// </summary>
- public static Vector256<byte> BroadcastScalarToVector256(Vector128<byte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_broadcastb_epi8 (__m128i a)
- /// VPBROADCASTB ymm, xmm
- /// </summary>
- public static Vector256<sbyte> BroadcastScalarToVector256(Vector128<sbyte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_broadcastw_epi16 (__m128i a)
- /// VPBROADCASTW ymm, xmm
- /// </summary>
- public static Vector256<short> BroadcastScalarToVector256(Vector128<short> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_broadcastw_epi16 (__m128i a)
- /// VPBROADCASTW ymm, xmm
- /// </summary>
- public static Vector256<ushort> BroadcastScalarToVector256(Vector128<ushort> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_broadcastd_epi32 (__m128i a)
- /// VPBROADCASTD ymm, xmm
- /// </summary>
- public static Vector256<int> BroadcastScalarToVector256(Vector128<int> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_broadcastd_epi32 (__m128i a)
- /// VPBROADCASTD ymm, xmm
- /// </summary>
- public static Vector256<uint> BroadcastScalarToVector256(Vector128<uint> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_broadcastq_epi64 (__m128i a)
- /// VPBROADCASTQ ymm, xmm
- /// </summary>
- public static Vector256<long> BroadcastScalarToVector256(Vector128<long> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_broadcastq_epi64 (__m128i a)
- /// VPBROADCASTQ ymm, xmm
- /// </summary>
- public static Vector256<ulong> BroadcastScalarToVector256(Vector128<ulong> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256 _mm256_broadcastss_ps (__m128 a)
- /// VBROADCASTSS ymm, xmm
- /// </summary>
- public static Vector256<float> BroadcastScalarToVector256(Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256d _mm256_broadcastsd_pd (__m128d a)
- /// VBROADCASTSD ymm, xmm
- /// </summary>
- public static Vector256<double> BroadcastScalarToVector256(Vector128<double> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_broadcastb_epi8 (__m128i a)
- /// VPBROADCASTB ymm, m8
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<byte> BroadcastScalarToVector256(byte* source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_broadcastb_epi8 (__m128i a)
- /// VPBROADCASTB ymm, m8
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<sbyte> BroadcastScalarToVector256(sbyte* source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_broadcastw_epi16 (__m128i a)
- /// VPBROADCASTW ymm, m16
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<short> BroadcastScalarToVector256(short* source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_broadcastw_epi16 (__m128i a)
- /// VPBROADCASTW ymm, m16
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<ushort> BroadcastScalarToVector256(ushort* source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_broadcastd_epi32 (__m128i a)
- /// VPBROADCASTD ymm, m32
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<int> BroadcastScalarToVector256(int* source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_broadcastd_epi32 (__m128i a)
- /// VPBROADCASTD ymm, m32
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<uint> BroadcastScalarToVector256(uint* source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_broadcastq_epi64 (__m128i a)
- /// VPBROADCASTQ ymm, m64
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<long> BroadcastScalarToVector256(long* source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_broadcastq_epi64 (__m128i a)
- /// VPBROADCASTQ ymm, m64
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<ulong> BroadcastScalarToVector256(ulong* source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_broadcastsi128_si256 (__m128i a)
- /// VBROADCASTI128 ymm, m128
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<sbyte> BroadcastVector128ToVector256(sbyte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_broadcastsi128_si256 (__m128i a)
- /// VBROADCASTI128 ymm, m128
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<byte> BroadcastVector128ToVector256(byte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_broadcastsi128_si256 (__m128i a)
- /// VBROADCASTI128 ymm, m128
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<short> BroadcastVector128ToVector256(short* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_broadcastsi128_si256 (__m128i a)
- /// VBROADCASTI128 ymm, m128
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<ushort> BroadcastVector128ToVector256(ushort* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_broadcastsi128_si256 (__m128i a)
- /// VBROADCASTI128 ymm, m128
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<int> BroadcastVector128ToVector256(int* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_broadcastsi128_si256 (__m128i a)
- /// VBROADCASTI128 ymm, m128
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<uint> BroadcastVector128ToVector256(uint* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_broadcastsi128_si256 (__m128i a)
- /// VBROADCASTI128 ymm, m128
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<long> BroadcastVector128ToVector256(long* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_broadcastsi128_si256 (__m128i a)
- /// VBROADCASTI128 ymm, m128
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<ulong> BroadcastVector128ToVector256(ulong* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_cmpeq_epi8 (__m256i a, __m256i b)
- /// VPCMPEQB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> CompareEqual(Vector256<sbyte> left, Vector256<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_cmpeq_epi8 (__m256i a, __m256i b)
- /// VPCMPEQB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> CompareEqual(Vector256<byte> left, Vector256<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_cmpeq_epi16 (__m256i a, __m256i b)
- /// VPCMPEQW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> CompareEqual(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_cmpeq_epi16 (__m256i a, __m256i b)
- /// VPCMPEQW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> CompareEqual(Vector256<ushort> left, Vector256<ushort> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_cmpeq_epi32 (__m256i a, __m256i b)
- /// VPCMPEQD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> CompareEqual(Vector256<int> left, Vector256<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_cmpeq_epi32 (__m256i a, __m256i b)
- /// VPCMPEQD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> CompareEqual(Vector256<uint> left, Vector256<uint> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_cmpeq_epi64 (__m256i a, __m256i b)
- /// VPCMPEQQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> CompareEqual(Vector256<long> left, Vector256<long> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_cmpeq_epi64 (__m256i a, __m256i b)
- /// VPCMPEQQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ulong> CompareEqual(Vector256<ulong> left, Vector256<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_cmpgt_epi8 (__m256i a, __m256i b)
- /// VPCMPGTB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> CompareGreaterThan(Vector256<sbyte> left, Vector256<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_cmpgt_epi16 (__m256i a, __m256i b)
- /// VPCMPGTW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> CompareGreaterThan(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_cmpgt_epi32 (__m256i a, __m256i b)
- /// VPCMPGTD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> CompareGreaterThan(Vector256<int> left, Vector256<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_cmpgt_epi64 (__m256i a, __m256i b)
- /// VPCMPGTQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> CompareGreaterThan(Vector256<long> left, Vector256<long> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_cvtsi256_si32 (__m256i a)
- /// MOVD reg/m32, xmm
- /// </summary>
- public static int ConvertToInt32(Vector256<int> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// int _mm256_cvtsi256_si32 (__m256i a)
- /// MOVD reg/m32, xmm
- /// </summary>
- public static uint ConvertToUInt32(Vector256<uint> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_cvtepi8_epi16 (__m128i a)
- /// VPMOVSXBW ymm, xmm
- /// </summary>
- public static Vector256<short> ConvertToVector256Int16(Vector128<sbyte> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_cvtepu8_epi16 (__m128i a)
- /// VPMOVZXBW ymm, xmm
- /// </summary>
- public static Vector256<short> ConvertToVector256Int16(Vector128<byte> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_cvtepi8_epi32 (__m128i a)
- /// VPMOVSXBD ymm, xmm
- /// </summary>
- public static Vector256<int> ConvertToVector256Int32(Vector128<sbyte> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_cvtepu8_epi32 (__m128i a)
- /// VPMOVZXBD ymm, xmm
- /// </summary>
- public static Vector256<int> ConvertToVector256Int32(Vector128<byte> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_cvtepi16_epi32 (__m128i a)
- /// VPMOVSXWD ymm, xmm
- /// </summary>
- public static Vector256<int> ConvertToVector256Int32(Vector128<short> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_cvtepu16_epi32 (__m128i a)
- /// VPMOVZXWD ymm, xmm
- /// </summary>
- public static Vector256<int> ConvertToVector256Int32(Vector128<ushort> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_cvtepi8_epi64 (__m128i a)
- /// VPMOVSXBQ ymm, xmm
- /// </summary>
- public static Vector256<long> ConvertToVector256Int64(Vector128<sbyte> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_cvtepu8_epi64 (__m128i a)
- /// VPMOVZXBQ ymm, xmm
- /// </summary>
- public static Vector256<long> ConvertToVector256Int64(Vector128<byte> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_cvtepi16_epi64 (__m128i a)
- /// VPMOVSXWQ ymm, xmm
- /// </summary>
- public static Vector256<long> ConvertToVector256Int64(Vector128<short> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_cvtepu16_epi64 (__m128i a)
- /// VPMOVZXWQ ymm, xmm
- /// </summary>
- public static Vector256<long> ConvertToVector256Int64(Vector128<ushort> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_cvtepi32_epi64 (__m128i a)
- /// VPMOVSXDQ ymm, xmm
- /// </summary>
- public static Vector256<long> ConvertToVector256Int64(Vector128<int> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_cvtepu32_epi64 (__m128i a)
- /// VPMOVZXDQ ymm, xmm
- /// </summary>
- public static Vector256<long> ConvertToVector256Int64(Vector128<uint> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// VPMOVSXBW ymm, m128
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector256<short> ConvertToVector256Int16(sbyte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// VPMOVZXBW ymm, m128
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector256<short> ConvertToVector256Int16(byte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// VPMOVSXBD ymm, m64
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector256<int> ConvertToVector256Int32(sbyte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// VPMOVZXBD ymm, m64
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector256<int> ConvertToVector256Int32(byte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// VPMOVSXWD ymm, m128
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector256<int> ConvertToVector256Int32(short* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// VPMOVZXWD ymm, m128
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector256<int> ConvertToVector256Int32(ushort* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// VPMOVSXBQ ymm, m32
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector256<long> ConvertToVector256Int64(sbyte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// VPMOVZXBQ ymm, m32
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector256<long> ConvertToVector256Int64(byte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// VPMOVSXWQ ymm, m64
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector256<long> ConvertToVector256Int64(short* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// VPMOVZXWQ ymm, m64
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector256<long> ConvertToVector256Int64(ushort* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// VPMOVSXDQ ymm, m128
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector256<long> ConvertToVector256Int64(int* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// VPMOVZXDQ ymm, m128
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector256<long> ConvertToVector256Int64(uint* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm256_extracti128_si256 (__m256i a, const int imm8)
- /// VEXTRACTI128 xmm, ymm, imm8
- /// </summary>
- public static new Vector128<sbyte> ExtractVector128(Vector256<sbyte> value, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm256_extracti128_si256 (__m256i a, const int imm8)
- /// VEXTRACTI128 xmm, ymm, imm8
- /// </summary>
- public static new Vector128<byte> ExtractVector128(Vector256<byte> value, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm256_extracti128_si256 (__m256i a, const int imm8)
- /// VEXTRACTI128 xmm, ymm, imm8
- /// </summary>
- public static new Vector128<short> ExtractVector128(Vector256<short> value, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm256_extracti128_si256 (__m256i a, const int imm8)
- /// VEXTRACTI128 xmm, ymm, imm8
- /// </summary>
- public static new Vector128<ushort> ExtractVector128(Vector256<ushort> value, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm256_extracti128_si256 (__m256i a, const int imm8)
- /// VEXTRACTI128 xmm, ymm, imm8
- /// </summary>
- public static new Vector128<int> ExtractVector128(Vector256<int> value, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm256_extracti128_si256 (__m256i a, const int imm8)
- /// VEXTRACTI128 xmm, ymm, imm8
- /// </summary>
- public static new Vector128<uint> ExtractVector128(Vector256<uint> value, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm256_extracti128_si256 (__m256i a, const int imm8)
- /// VEXTRACTI128 xmm, ymm, imm8
- /// </summary>
- public static new Vector128<long> ExtractVector128(Vector256<long> value, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm256_extracti128_si256 (__m256i a, const int imm8)
- /// VEXTRACTI128 xmm, ymm, imm8
- /// </summary>
- public static new Vector128<ulong> ExtractVector128(Vector256<ulong> value, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_i32gather_epi32 (int const* base_addr, __m128i vindex, const int scale)
- /// VPGATHERDD xmm, vm32x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<int> GatherVector128(int* baseAddress, Vector128<int> index, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_i32gather_epi32 (int const* base_addr, __m128i vindex, const int scale)
- /// VPGATHERDD xmm, vm32x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<uint> GatherVector128(uint* baseAddress, Vector128<int> index, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_i32gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
- /// VPGATHERDQ xmm, vm32x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<long> GatherVector128(long* baseAddress, Vector128<int> index, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_i32gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
- /// VPGATHERDQ xmm, vm32x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<ulong> GatherVector128(ulong* baseAddress, Vector128<int> index, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm_i32gather_ps (float const* base_addr, __m128i vindex, const int scale)
- /// VGATHERDPS xmm, vm32x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<float> GatherVector128(float* baseAddress, Vector128<int> index, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_i32gather_pd (double const* base_addr, __m128i vindex, const int scale)
- /// VGATHERDPD xmm, vm32x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<double> GatherVector128(double* baseAddress, Vector128<int> index, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_i64gather_epi32 (int const* base_addr, __m128i vindex, const int scale)
- /// VPGATHERQD xmm, vm64x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<int> GatherVector128(int* baseAddress, Vector128<long> index, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_i64gather_epi32 (int const* base_addr, __m128i vindex, const int scale)
- /// VPGATHERQD xmm, vm64x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<uint> GatherVector128(uint* baseAddress, Vector128<long> index, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_i64gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
- /// VPGATHERQQ xmm, vm64x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<long> GatherVector128(long* baseAddress, Vector128<long> index, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_i64gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
- /// VPGATHERQQ xmm, vm64x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<ulong> GatherVector128(ulong* baseAddress, Vector128<long> index, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm_i64gather_ps (float const* base_addr, __m128i vindex, const int scale)
- /// VGATHERQPS xmm, vm64x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<float> GatherVector128(float* baseAddress, Vector128<long> index, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_i64gather_pd (double const* base_addr, __m128i vindex, const int scale)
- /// VGATHERQPD xmm, vm64x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<double> GatherVector128(double* baseAddress, Vector128<long> index, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_i32gather_epi32 (int const* base_addr, __m256i vindex, const int scale)
- /// VPGATHERDD ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<int> GatherVector256(int* baseAddress, Vector256<int> index, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_i32gather_epi32 (int const* base_addr, __m256i vindex, const int scale)
- /// VPGATHERDD ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<uint> GatherVector256(uint* baseAddress, Vector256<int> index, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_i32gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
- /// VPGATHERDQ ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<long> GatherVector256(long* baseAddress, Vector128<int> index, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_i32gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
- /// VPGATHERDQ ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<ulong> GatherVector256(ulong* baseAddress, Vector128<int> index, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256 _mm256_i32gather_ps (float const* base_addr, __m256i vindex, const int scale)
- /// VGATHERDPS ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<float> GatherVector256(float* baseAddress, Vector256<int> index, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_i32gather_pd (double const* base_addr, __m128i vindex, const int scale)
- /// VGATHERDPD ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<double> GatherVector256(double* baseAddress, Vector128<int> index, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm256_i64gather_epi32 (int const* base_addr, __m256i vindex, const int scale)
- /// VPGATHERQD xmm, vm64y, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<int> GatherVector128(int* baseAddress, Vector256<long> index, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm256_i64gather_epi32 (int const* base_addr, __m256i vindex, const int scale)
- /// VPGATHERQD xmm, vm64y, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<uint> GatherVector128(uint* baseAddress, Vector256<long> index, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_i64gather_epi64 (__int64 const* base_addr, __m256i vindex, const int scale)
- /// VPGATHERQQ ymm, vm64y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<long> GatherVector256(long* baseAddress, Vector256<long> index, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_i64gather_epi64 (__int64 const* base_addr, __m256i vindex, const int scale)
- /// VPGATHERQQ ymm, vm64y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<ulong> GatherVector256(ulong* baseAddress, Vector256<long> index, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm256_i64gather_ps (float const* base_addr, __m256i vindex, const int scale)
- /// VGATHERQPS xmm, vm64y, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<float> GatherVector128(float* baseAddress, Vector256<long> index, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_i64gather_pd (double const* base_addr, __m256i vindex, const int scale)
- /// VGATHERQPD ymm, vm64y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<double> GatherVector256(double* baseAddress, Vector256<long> index, byte scale) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_mask_i32gather_epi32 (__m128i src, int const* base_addr, __m128i vindex, __m128i mask, const int scale)
- /// VPGATHERDD xmm, vm32x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<int> GatherMaskVector128(Vector128<int> source, int* baseAddress, Vector128<int> index, Vector128<int> mask, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_mask_i32gather_epi32 (__m128i src, int const* base_addr, __m128i vindex, __m128i mask, const int scale)
- /// VPGATHERDD xmm, vm32x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<uint> GatherMaskVector128(Vector128<uint> source, uint* baseAddress, Vector128<int> index, Vector128<uint> mask, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_mask_i32gather_epi64 (__m128i src, __int64 const* base_addr, __m128i vindex, __m128i mask, const int scale)
- /// VPGATHERDQ xmm, vm32x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<long> GatherMaskVector128(Vector128<long> source, long* baseAddress, Vector128<int> index, Vector128<long> mask, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_mask_i32gather_epi64 (__m128i src, __int64 const* base_addr, __m128i vindex, __m128i mask, const int scale)
- /// VPGATHERDQ xmm, vm32x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<ulong> GatherMaskVector128(Vector128<ulong> source, ulong* baseAddress, Vector128<int> index, Vector128<ulong> mask, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm_mask_i32gather_ps (__m128 src, float const* base_addr, __m128i vindex, __m128 mask, const int scale)
- /// VGATHERDPS xmm, vm32x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<float> GatherMaskVector128(Vector128<float> source, float* baseAddress, Vector128<int> index, Vector128<float> mask, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_mask_i32gather_pd (__m128d src, double const* base_addr, __m128i vindex, __m128d mask, const int scale)
- /// VGATHERDPD xmm, vm32x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<double> GatherMaskVector128(Vector128<double> source, double* baseAddress, Vector128<int> index, Vector128<double> mask, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_mask_i64gather_epi32 (__m128i src, int const* base_addr, __m128i vindex, __m128i mask, const int scale)
- /// VPGATHERQD xmm, vm64x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<int> GatherMaskVector128(Vector128<int> source, int* baseAddress, Vector128<long> index, Vector128<int> mask, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_mask_i64gather_epi32 (__m128i src, int const* base_addr, __m128i vindex, __m128i mask, const int scale)
- /// VPGATHERQD xmm, vm64x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<uint> GatherMaskVector128(Vector128<uint> source, uint* baseAddress, Vector128<long> index, Vector128<uint> mask, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_mask_i64gather_epi64 (__m128i src, __int64 const* base_addr, __m128i vindex, __m128i mask, const int scale)
- /// VPGATHERQQ xmm, vm64x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<long> GatherMaskVector128(Vector128<long> source, long* baseAddress, Vector128<long> index, Vector128<long> mask, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_mask_i64gather_epi64 (__m128i src, __int64 const* base_addr, __m128i vindex, __m128i mask, const int scale)
- /// VPGATHERQQ xmm, vm64x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<ulong> GatherMaskVector128(Vector128<ulong> source, ulong* baseAddress, Vector128<long> index, Vector128<ulong> mask, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm_mask_i64gather_ps (__m128 src, float const* base_addr, __m128i vindex, __m128 mask, const int scale)
- /// VGATHERQPS xmm, vm64x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<float> GatherMaskVector128(Vector128<float> source, float* baseAddress, Vector128<long> index, Vector128<float> mask, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_mask_i64gather_pd (__m128d src, double const* base_addr, __m128i vindex, __m128d mask, const int scale)
- /// VGATHERQPD xmm, vm64x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<double> GatherMaskVector128(Vector128<double> source, double* baseAddress, Vector128<long> index, Vector128<double> mask, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_mask_i32gather_epi32 (__m256i src, int const* base_addr, __m256i vindex, __m256i mask, const int scale)
- /// VPGATHERDD ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<int> GatherMaskVector256(Vector256<int> source, int* baseAddress, Vector256<int> index, Vector256<int> mask, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_mask_i32gather_epi32 (__m256i src, int const* base_addr, __m256i vindex, __m256i mask, const int scale)
- /// VPGATHERDD ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<uint> GatherMaskVector256(Vector256<uint> source, uint* baseAddress, Vector256<int> index, Vector256<uint> mask, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_mask_i32gather_epi64 (__m256i src, __int64 const* base_addr, __m128i vindex, __m256i mask, const int scale)
- /// VPGATHERDQ ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<long> GatherMaskVector256(Vector256<long> source, long* baseAddress, Vector128<int> index, Vector256<long> mask, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_mask_i32gather_epi64 (__m256i src, __int64 const* base_addr, __m128i vindex, __m256i mask, const int scale)
- /// VPGATHERDQ ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<ulong> GatherMaskVector256(Vector256<ulong> source, ulong* baseAddress, Vector128<int> index, Vector256<ulong> mask, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256 _mm256_mask_i32gather_ps (__m256 src, float const* base_addr, __m256i vindex, __m256 mask, const int scale)
- /// VPGATHERDPS ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<float> GatherMaskVector256(Vector256<float> source, float* baseAddress, Vector256<int> index, Vector256<float> mask, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_mask_i32gather_pd (__m256d src, double const* base_addr, __m128i vindex, __m256d mask, const int scale)
- /// VPGATHERDPD ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<double> GatherMaskVector256(Vector256<double> source, double* baseAddress, Vector128<int> index, Vector256<double> mask, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm256_mask_i64gather_epi32 (__m128i src, int const* base_addr, __m256i vindex, __m128i mask, const int scale)
- /// VPGATHERQD xmm, vm32y, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<int> GatherMaskVector128(Vector128<int> source, int* baseAddress, Vector256<long> index, Vector128<int> mask, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm256_mask_i64gather_epi32 (__m128i src, int const* base_addr, __m256i vindex, __m128i mask, const int scale)
- /// VPGATHERQD xmm, vm32y, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<uint> GatherMaskVector128(Vector128<uint> source, uint* baseAddress, Vector256<long> index, Vector128<uint> mask, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_mask_i64gather_epi64 (__m256i src, __int64 const* base_addr, __m256i vindex, __m256i mask, const int scale)
- /// VPGATHERQQ ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<long> GatherMaskVector256(Vector256<long> source, long* baseAddress, Vector256<long> index, Vector256<long> mask, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_mask_i64gather_epi64 (__m256i src, __int64 const* base_addr, __m256i vindex, __m256i mask, const int scale)
- /// VPGATHERQQ ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<ulong> GatherMaskVector256(Vector256<ulong> source, ulong* baseAddress, Vector256<long> index, Vector256<ulong> mask, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm256_mask_i64gather_ps (__m128 src, float const* base_addr, __m256i vindex, __m128 mask, const int scale)
- /// VGATHERQPS xmm, vm32y, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<float> GatherMaskVector128(Vector128<float> source, float* baseAddress, Vector256<long> index, Vector128<float> mask, byte scale) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_mask_i64gather_pd (__m256d src, double const* base_addr, __m256i vindex, __m256d mask, const int scale)
- /// VGATHERQPD ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<double> GatherMaskVector256(Vector256<double> source, double* baseAddress, Vector256<long> index, Vector256<double> mask, byte scale) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_hadd_epi16 (__m256i a, __m256i b)
- /// VPHADDW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> HorizontalAdd(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_hadd_epi32 (__m256i a, __m256i b)
- /// VPHADDD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> HorizontalAdd(Vector256<int> left, Vector256<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_hadds_epi16 (__m256i a, __m256i b)
- /// VPHADDSW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> HorizontalAddSaturate(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_hsub_epi16 (__m256i a, __m256i b)
- /// VPHSUBW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> HorizontalSubtract(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_hsub_epi32 (__m256i a, __m256i b)
- /// VPHSUBD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> HorizontalSubtract(Vector256<int> left, Vector256<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_hsubs_epi16 (__m256i a, __m256i b)
- /// VPHSUBSW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> HorizontalSubtractSaturate(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_inserti128_si256 (__m256i a, __m128i b, const int imm8)
- /// VINSERTI128 ymm, ymm, xmm, imm8
- /// </summary>
- public static new Vector256<sbyte> InsertVector128(Vector256<sbyte> value, Vector128<sbyte> data, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_inserti128_si256 (__m256i a, __m128i b, const int imm8)
- /// VINSERTI128 ymm, ymm, xmm, imm8
- /// </summary>
- public static new Vector256<byte> InsertVector128(Vector256<byte> value, Vector128<byte> data, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_inserti128_si256 (__m256i a, __m128i b, const int imm8)
- /// VINSERTI128 ymm, ymm, xmm, imm8
- /// </summary>
- public static new Vector256<short> InsertVector128(Vector256<short> value, Vector128<short> data, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_inserti128_si256 (__m256i a, __m128i b, const int imm8)
- /// VINSERTI128 ymm, ymm, xmm, imm8
- /// </summary>
- public static new Vector256<ushort> InsertVector128(Vector256<ushort> value, Vector128<ushort> data, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_inserti128_si256 (__m256i a, __m128i b, const int imm8)
- /// VINSERTI128 ymm, ymm, xmm, imm8
- /// </summary>
- public static new Vector256<int> InsertVector128(Vector256<int> value, Vector128<int> data, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_inserti128_si256 (__m256i a, __m128i b, const int imm8)
- /// VINSERTI128 ymm, ymm, xmm, imm8
- /// </summary>
- public static new Vector256<uint> InsertVector128(Vector256<uint> value, Vector128<uint> data, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_inserti128_si256 (__m256i a, __m128i b, const int imm8)
- /// VINSERTI128 ymm, ymm, xmm, imm8
- /// </summary>
- public static new Vector256<long> InsertVector128(Vector256<long> value, Vector128<long> data, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_inserti128_si256 (__m256i a, __m128i b, const int imm8)
- /// VINSERTI128 ymm, ymm, xmm, imm8
- /// </summary>
- public static new Vector256<ulong> InsertVector128(Vector256<ulong> value, Vector128<ulong> data, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_stream_load_si256 (__m256i const* mem_addr)
- /// VMOVNTDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<sbyte> LoadAlignedVector256NonTemporal(sbyte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_stream_load_si256 (__m256i const* mem_addr)
- /// VMOVNTDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<byte> LoadAlignedVector256NonTemporal(byte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_stream_load_si256 (__m256i const* mem_addr)
- /// VMOVNTDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<short> LoadAlignedVector256NonTemporal(short* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_stream_load_si256 (__m256i const* mem_addr)
- /// VMOVNTDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<ushort> LoadAlignedVector256NonTemporal(ushort* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_stream_load_si256 (__m256i const* mem_addr)
- /// VMOVNTDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<int> LoadAlignedVector256NonTemporal(int* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_stream_load_si256 (__m256i const* mem_addr)
- /// VMOVNTDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<uint> LoadAlignedVector256NonTemporal(uint* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_stream_load_si256 (__m256i const* mem_addr)
- /// VMOVNTDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<long> LoadAlignedVector256NonTemporal(long* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_stream_load_si256 (__m256i const* mem_addr)
- /// VMOVNTDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<ulong> LoadAlignedVector256NonTemporal(ulong* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_maskload_epi32 (int const* mem_addr, __m128i mask)
- /// VPMASKMOVD xmm, xmm, m128
- /// </summary>
- public static unsafe Vector128<int> MaskLoad(int* address, Vector128<int> mask) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_maskload_epi32 (int const* mem_addr, __m128i mask)
- /// VPMASKMOVD xmm, xmm, m128
- /// </summary>
- public static unsafe Vector128<uint> MaskLoad(uint* address, Vector128<uint> mask) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_maskload_epi64 (__int64 const* mem_addr, __m128i mask)
- /// VPMASKMOVQ xmm, xmm, m128
- /// </summary>
- public static unsafe Vector128<long> MaskLoad(long* address, Vector128<long> mask) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_maskload_epi64 (__int64 const* mem_addr, __m128i mask)
- /// VPMASKMOVQ xmm, xmm, m128
- /// </summary>
- public static unsafe Vector128<ulong> MaskLoad(ulong* address, Vector128<ulong> mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_maskload_epi32 (int const* mem_addr, __m256i mask)
- /// VPMASKMOVD ymm, ymm, m256
- /// </summary>
- public static unsafe Vector256<int> MaskLoad(int* address, Vector256<int> mask) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_maskload_epi32 (int const* mem_addr, __m256i mask)
- /// VPMASKMOVD ymm, ymm, m256
- /// </summary>
- public static unsafe Vector256<uint> MaskLoad(uint* address, Vector256<uint> mask) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_maskload_epi64 (__int64 const* mem_addr, __m256i mask)
- /// VPMASKMOVQ ymm, ymm, m256
- /// </summary>
- public static unsafe Vector256<long> MaskLoad(long* address, Vector256<long> mask) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_maskload_epi64 (__int64 const* mem_addr, __m256i mask)
- /// VPMASKMOVQ ymm, ymm, m256
- /// </summary>
- public static unsafe Vector256<ulong> MaskLoad(ulong* address, Vector256<ulong> mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm_maskstore_epi32 (int* mem_addr, __m128i mask, __m128i a)
- /// VPMASKMOVD m128, xmm, xmm
- /// </summary>
- public static unsafe void MaskStore(int* address, Vector128<int> mask, Vector128<int> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_maskstore_epi32 (int* mem_addr, __m128i mask, __m128i a)
- /// VPMASKMOVD m128, xmm, xmm
- /// </summary>
- public static unsafe void MaskStore(uint* address, Vector128<uint> mask, Vector128<uint> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_maskstore_epi64 (__int64* mem_addr, __m128i mask, __m128i a)
- /// VPMASKMOVQ m128, xmm, xmm
- /// </summary>
- public static unsafe void MaskStore(long* address, Vector128<long> mask, Vector128<long> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_maskstore_epi64 (__int64* mem_addr, __m128i mask, __m128i a)
- /// VPMASKMOVQ m128, xmm, xmm
- /// </summary>
- public static unsafe void MaskStore(ulong* address, Vector128<ulong> mask, Vector128<ulong> source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm256_maskstore_epi32 (int* mem_addr, __m256i mask, __m256i a)
- /// VPMASKMOVD m256, ymm, ymm
- /// </summary>
- public static unsafe void MaskStore(int* address, Vector256<int> mask, Vector256<int> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_maskstore_epi32 (int* mem_addr, __m256i mask, __m256i a)
- /// VPMASKMOVD m256, ymm, ymm
- /// </summary>
- public static unsafe void MaskStore(uint* address, Vector256<uint> mask, Vector256<uint> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_maskstore_epi64 (__int64* mem_addr, __m256i mask, __m256i a)
- /// VPMASKMOVQ m256, ymm, ymm
- /// </summary>
- public static unsafe void MaskStore(long* address, Vector256<long> mask, Vector256<long> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm256_maskstore_epi64 (__int64* mem_addr, __m256i mask, __m256i a)
- /// VPMASKMOVQ m256, ymm, ymm
- /// </summary>
- public static unsafe void MaskStore(ulong* address, Vector256<ulong> mask, Vector256<ulong> source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_madd_epi16 (__m256i a, __m256i b)
- /// VPMADDWD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> MultiplyAddAdjacent(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_maddubs_epi16 (__m256i a, __m256i b)
- /// VPMADDUBSW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> MultiplyAddAdjacent(Vector256<byte> left, Vector256<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_max_epi8 (__m256i a, __m256i b)
- /// VPMAXSB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> Max(Vector256<sbyte> left, Vector256<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_max_epu8 (__m256i a, __m256i b)
- /// VPMAXUB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> Max(Vector256<byte> left, Vector256<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_max_epi16 (__m256i a, __m256i b)
- /// VPMAXSW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> Max(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_max_epu16 (__m256i a, __m256i b)
- /// VPMAXUW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> Max(Vector256<ushort> left, Vector256<ushort> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_max_epi32 (__m256i a, __m256i b)
- /// VPMAXSD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> Max(Vector256<int> left, Vector256<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_max_epu32 (__m256i a, __m256i b)
- /// VPMAXUD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> Max(Vector256<uint> left, Vector256<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_min_epi8 (__m256i a, __m256i b)
- /// VPMINSB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> Min(Vector256<sbyte> left, Vector256<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_min_epu8 (__m256i a, __m256i b)
- /// VPMINUB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> Min(Vector256<byte> left, Vector256<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_min_epi16 (__m256i a, __m256i b)
- /// VPMINSW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> Min(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_min_epu16 (__m256i a, __m256i b)
- /// VPMINUW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> Min(Vector256<ushort> left, Vector256<ushort> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_min_epi32 (__m256i a, __m256i b)
- /// VPMINSD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> Min(Vector256<int> left, Vector256<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_min_epu32 (__m256i a, __m256i b)
- /// VPMINUD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> Min(Vector256<uint> left, Vector256<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm256_movemask_epi8 (__m256i a)
- /// VPMOVMSKB reg, ymm
- /// </summary>
- public static int MoveMask(Vector256<sbyte> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// int _mm256_movemask_epi8 (__m256i a)
- /// VPMOVMSKB reg, ymm
- /// </summary>
- public static int MoveMask(Vector256<byte> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_mpsadbw_epu8 (__m256i a, __m256i b, const int imm8)
- /// VMPSADBW ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<ushort> MultipleSumAbsoluteDifferences(Vector256<byte> left, Vector256<byte> right, byte mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_mul_epi32 (__m256i a, __m256i b)
- /// VPMULDQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> Multiply(Vector256<int> left, Vector256<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_mul_epu32 (__m256i a, __m256i b)
- /// VPMULUDQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ulong> Multiply(Vector256<uint> left, Vector256<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_mulhi_epi16 (__m256i a, __m256i b)
- /// VPMULHW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> MultiplyHigh(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_mulhi_epu16 (__m256i a, __m256i b)
- /// VPMULHUW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> MultiplyHigh(Vector256<ushort> left, Vector256<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_mulhrs_epi16 (__m256i a, __m256i b)
- /// VPMULHRSW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> MultiplyHighRoundScale(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_mullo_epi16 (__m256i a, __m256i b)
- /// VPMULLW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> MultiplyLow(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_mullo_epi16 (__m256i a, __m256i b)
- /// VPMULLW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> MultiplyLow(Vector256<ushort> left, Vector256<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_mullo_epi32 (__m256i a, __m256i b)
- /// VPMULLD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> MultiplyLow(Vector256<int> left, Vector256<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_mullo_epi32 (__m256i a, __m256i b)
- /// VPMULLD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> MultiplyLow(Vector256<uint> left, Vector256<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_or_si256 (__m256i a, __m256i b)
- /// VPOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> Or(Vector256<sbyte> left, Vector256<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_or_si256 (__m256i a, __m256i b)
- /// VPOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> Or(Vector256<byte> left, Vector256<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_or_si256 (__m256i a, __m256i b)
- /// VPOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> Or(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_or_si256 (__m256i a, __m256i b)
- /// VPOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> Or(Vector256<ushort> left, Vector256<ushort> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_or_si256 (__m256i a, __m256i b)
- /// VPOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> Or(Vector256<int> left, Vector256<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_or_si256 (__m256i a, __m256i b)
- /// VPOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> Or(Vector256<uint> left, Vector256<uint> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_or_si256 (__m256i a, __m256i b)
- /// VPOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> Or(Vector256<long> left, Vector256<long> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_or_si256 (__m256i a, __m256i b)
- /// VPOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ulong> Or(Vector256<ulong> left, Vector256<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_packs_epi16 (__m256i a, __m256i b)
- /// VPACKSSWB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> PackSignedSaturate(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_packs_epi32 (__m256i a, __m256i b)
- /// VPACKSSDW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> PackSignedSaturate(Vector256<int> left, Vector256<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_packus_epi16 (__m256i a, __m256i b)
- /// VPACKUSWB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> PackUnsignedSaturate(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_packus_epi32 (__m256i a, __m256i b)
- /// VPACKUSDW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> PackUnsignedSaturate(Vector256<int> left, Vector256<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_permute2x128_si256 (__m256i a, __m256i b, const int imm8)
- /// VPERM2I128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static new Vector256<sbyte> Permute2x128(Vector256<sbyte> left, Vector256<sbyte> right, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_permute2x128_si256 (__m256i a, __m256i b, const int imm8)
- /// VPERM2I128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static new Vector256<byte> Permute2x128(Vector256<byte> left, Vector256<byte> right, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_permute2x128_si256 (__m256i a, __m256i b, const int imm8)
- /// VPERM2I128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static new Vector256<short> Permute2x128(Vector256<short> left, Vector256<short> right, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_permute2x128_si256 (__m256i a, __m256i b, const int imm8)
- /// VPERM2I128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static new Vector256<ushort> Permute2x128(Vector256<ushort> left, Vector256<ushort> right, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_permute2x128_si256 (__m256i a, __m256i b, const int imm8)
- /// VPERM2I128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static new Vector256<int> Permute2x128(Vector256<int> left, Vector256<int> right, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_permute2x128_si256 (__m256i a, __m256i b, const int imm8)
- /// VPERM2I128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static new Vector256<uint> Permute2x128(Vector256<uint> left, Vector256<uint> right, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_permute2x128_si256 (__m256i a, __m256i b, const int imm8)
- /// VPERM2I128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static new Vector256<long> Permute2x128(Vector256<long> left, Vector256<long> right, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_permute2x128_si256 (__m256i a, __m256i b, const int imm8)
- /// VPERM2I128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static new Vector256<ulong> Permute2x128(Vector256<ulong> left, Vector256<ulong> right, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_permute4x64_epi64 (__m256i a, const int imm8)
- /// VPERMQ ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<long> Permute4x64(Vector256<long> value, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_permute4x64_epi64 (__m256i a, const int imm8)
- /// VPERMQ ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<ulong> Permute4x64(Vector256<ulong> value, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_permute4x64_pd (__m256d a, const int imm8)
- /// VPERMPD ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<double> Permute4x64(Vector256<double> value, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_permutevar8x32_epi32 (__m256i a, __m256i idx)
- /// VPERMD ymm, ymm/m256, ymm
- /// </summary>
- public static Vector256<int> PermuteVar8x32(Vector256<int> left, Vector256<int> control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_permutevar8x32_epi32 (__m256i a, __m256i idx)
- /// VPERMD ymm, ymm/m256, ymm
- /// </summary>
- public static Vector256<uint> PermuteVar8x32(Vector256<uint> left, Vector256<uint> control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256 _mm256_permutevar8x32_ps (__m256 a, __m256i idx)
- /// VPERMPS ymm, ymm/m256, ymm
- /// </summary>
- public static Vector256<float> PermuteVar8x32(Vector256<float> left, Vector256<int> control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_sll_epi16 (__m256i a, __m128i count)
- /// VPSLLW ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<short> ShiftLeftLogical(Vector256<short> value, Vector128<short> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_sll_epi16 (__m256i a, __m128i count)
- /// VPSLLW ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<ushort> ShiftLeftLogical(Vector256<ushort> value, Vector128<ushort> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_sll_epi32 (__m256i a, __m128i count)
- /// VPSLLD ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<int> ShiftLeftLogical(Vector256<int> value, Vector128<int> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_sll_epi32 (__m256i a, __m128i count)
- /// VPSLLD ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<uint> ShiftLeftLogical(Vector256<uint> value, Vector128<uint> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_sll_epi64 (__m256i a, __m128i count)
- /// VPSLLQ ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<long> ShiftLeftLogical(Vector256<long> value, Vector128<long> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_sll_epi64 (__m256i a, __m128i count)
- /// VPSLLQ ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<ulong> ShiftLeftLogical(Vector256<ulong> value, Vector128<ulong> count) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_slli_epi16 (__m256i a, int imm8)
- /// VPSLLW ymm, ymm, imm8
- /// </summary>
- public static Vector256<short> ShiftLeftLogical(Vector256<short> value, byte count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_slli_epi16 (__m256i a, int imm8)
- /// VPSLLW ymm, ymm, imm8
- /// </summary>
- public static Vector256<ushort> ShiftLeftLogical(Vector256<ushort> value, byte count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_slli_epi32 (__m256i a, int imm8)
- /// VPSLLD ymm, ymm, imm8
- /// </summary>
- public static Vector256<int> ShiftLeftLogical(Vector256<int> value, byte count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_slli_epi32 (__m256i a, int imm8)
- /// VPSLLD ymm, ymm, imm8
- /// </summary>
- public static Vector256<uint> ShiftLeftLogical(Vector256<uint> value, byte count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_slli_epi64 (__m256i a, int imm8)
- /// VPSLLQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<long> ShiftLeftLogical(Vector256<long> value, byte count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_slli_epi64 (__m256i a, int imm8)
- /// VPSLLQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<ulong> ShiftLeftLogical(Vector256<ulong> value, byte count) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_bslli_epi128 (__m256i a, const int imm8)
- /// VPSLLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<sbyte> ShiftLeftLogical128BitLane(Vector256<sbyte> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_bslli_epi128 (__m256i a, const int imm8)
- /// VPSLLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<byte> ShiftLeftLogical128BitLane(Vector256<byte> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_bslli_epi128 (__m256i a, const int imm8)
- /// VPSLLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<short> ShiftLeftLogical128BitLane(Vector256<short> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_bslli_epi128 (__m256i a, const int imm8)
- /// VPSLLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<ushort> ShiftLeftLogical128BitLane(Vector256<ushort> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_bslli_epi128 (__m256i a, const int imm8)
- /// VPSLLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<int> ShiftLeftLogical128BitLane(Vector256<int> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_bslli_epi128 (__m256i a, const int imm8)
- /// VPSLLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<uint> ShiftLeftLogical128BitLane(Vector256<uint> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_bslli_epi128 (__m256i a, const int imm8)
- /// VPSLLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<long> ShiftLeftLogical128BitLane(Vector256<long> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_bslli_epi128 (__m256i a, const int imm8)
- /// VPSLLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<ulong> ShiftLeftLogical128BitLane(Vector256<ulong> value, byte numBytes) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_sllv_epi32 (__m256i a, __m256i count)
- /// VPSLLVD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> ShiftLeftLogicalVariable(Vector256<int> value, Vector256<uint> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_sllv_epi32 (__m256i a, __m256i count)
- /// VPSLLVD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> ShiftLeftLogicalVariable(Vector256<uint> value, Vector256<uint> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_sllv_epi64 (__m256i a, __m256i count)
- /// VPSLLVQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> ShiftLeftLogicalVariable(Vector256<long> value, Vector256<ulong> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_sllv_epi64 (__m256i a, __m256i count)
- /// VPSLLVQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ulong> ShiftLeftLogicalVariable(Vector256<ulong> value, Vector256<ulong> count) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_sllv_epi32 (__m128i a, __m128i count)
- /// VPSLLVD xmm, ymm, xmm/m128
- /// </summary>
- public static Vector128<int> ShiftLeftLogicalVariable(Vector128<int> value, Vector128<uint> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_sllv_epi32 (__m128i a, __m128i count)
- /// VPSLLVD xmm, ymm, xmm/m128
- /// </summary>
- public static Vector128<uint> ShiftLeftLogicalVariable(Vector128<uint> value, Vector128<uint> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_sllv_epi64 (__m128i a, __m128i count)
- /// VPSLLVQ xmm, ymm, xmm/m128
- /// </summary>
- public static Vector128<long> ShiftLeftLogicalVariable(Vector128<long> value, Vector128<ulong> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_sllv_epi64 (__m128i a, __m128i count)
- /// VPSLLVQ xmm, ymm, xmm/m128
- /// </summary>
- public static Vector128<ulong> ShiftLeftLogicalVariable(Vector128<ulong> value, Vector128<ulong> count) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// _mm256_sra_epi16 (__m256i a, __m128i count)
- /// VPSRAW ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<short> ShiftRightArithmetic(Vector256<short> value, Vector128<short> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// _mm256_sra_epi32 (__m256i a, __m128i count)
- /// VPSRAD ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<int> ShiftRightArithmetic(Vector256<int> value, Vector128<int> count) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_srai_epi16 (__m256i a, int imm8)
- /// VPSRAW ymm, ymm, imm8
- /// </summary>
- public static Vector256<short> ShiftRightArithmetic(Vector256<short> value, byte count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_srai_epi32 (__m256i a, int imm8)
- /// VPSRAD ymm, ymm, imm8
- /// </summary>
- public static Vector256<int> ShiftRightArithmetic(Vector256<int> value, byte count) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_srav_epi32 (__m256i a, __m256i count)
- /// VPSRAVD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> ShiftRightArithmeticVariable(Vector256<int> value, Vector256<uint> count) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_srav_epi32 (__m128i a, __m128i count)
- /// VPSRAVD xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<int> ShiftRightArithmeticVariable(Vector128<int> value, Vector128<uint> count) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_srl_epi16 (__m256i a, __m128i count)
- /// VPSRLW ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<short> ShiftRightLogical(Vector256<short> value, Vector128<short> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_srl_epi16 (__m256i a, __m128i count)
- /// VPSRLW ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<ushort> ShiftRightLogical(Vector256<ushort> value, Vector128<ushort> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_srl_epi32 (__m256i a, __m128i count)
- /// VPSRLD ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<int> ShiftRightLogical(Vector256<int> value, Vector128<int> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_srl_epi32 (__m256i a, __m128i count)
- /// VPSRLD ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<uint> ShiftRightLogical(Vector256<uint> value, Vector128<uint> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_srl_epi64 (__m256i a, __m128i count)
- /// VPSRLQ ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<long> ShiftRightLogical(Vector256<long> value, Vector128<long> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_srl_epi64 (__m256i a, __m128i count)
- /// VPSRLQ ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<ulong> ShiftRightLogical(Vector256<ulong> value, Vector128<ulong> count) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_srli_epi16 (__m256i a, int imm8)
- /// VPSRLW ymm, ymm, imm8
- /// </summary>
- public static Vector256<short> ShiftRightLogical(Vector256<short> value, byte count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_srli_epi16 (__m256i a, int imm8)
- /// VPSRLW ymm, ymm, imm8
- /// </summary>
- public static Vector256<ushort> ShiftRightLogical(Vector256<ushort> value, byte count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_srli_epi32 (__m256i a, int imm8)
- /// VPSRLD ymm, ymm, imm8
- /// </summary>
- public static Vector256<int> ShiftRightLogical(Vector256<int> value, byte count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_srli_epi32 (__m256i a, int imm8)
- /// VPSRLD ymm, ymm, imm8
- /// </summary>
- public static Vector256<uint> ShiftRightLogical(Vector256<uint> value, byte count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_srli_epi64 (__m256i a, int imm8)
- /// VPSRLQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<long> ShiftRightLogical(Vector256<long> value, byte count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_srli_epi64 (__m256i a, int imm8)
- /// VPSRLQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<ulong> ShiftRightLogical(Vector256<ulong> value, byte count) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_bsrli_epi128 (__m256i a, const int imm8)
- /// VPSRLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<sbyte> ShiftRightLogical128BitLane(Vector256<sbyte> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_bsrli_epi128 (__m256i a, const int imm8)
- /// VPSRLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<byte> ShiftRightLogical128BitLane(Vector256<byte> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_bsrli_epi128 (__m256i a, const int imm8)
- /// VPSRLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<short> ShiftRightLogical128BitLane(Vector256<short> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_bsrli_epi128 (__m256i a, const int imm8)
- /// VPSRLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<ushort> ShiftRightLogical128BitLane(Vector256<ushort> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_bsrli_epi128 (__m256i a, const int imm8)
- /// VPSRLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<int> ShiftRightLogical128BitLane(Vector256<int> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_bsrli_epi128 (__m256i a, const int imm8)
- /// VPSRLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<uint> ShiftRightLogical128BitLane(Vector256<uint> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_bsrli_epi128 (__m256i a, const int imm8)
- /// VPSRLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<long> ShiftRightLogical128BitLane(Vector256<long> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_bsrli_epi128 (__m256i a, const int imm8)
- /// VPSRLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<ulong> ShiftRightLogical128BitLane(Vector256<ulong> value, byte numBytes) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_srlv_epi32 (__m256i a, __m256i count)
- /// VPSRLVD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> ShiftRightLogicalVariable(Vector256<int> value, Vector256<uint> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_srlv_epi32 (__m256i a, __m256i count)
- /// VPSRLVD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> ShiftRightLogicalVariable(Vector256<uint> value, Vector256<uint> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_srlv_epi64 (__m256i a, __m256i count)
- /// VPSRLVQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> ShiftRightLogicalVariable(Vector256<long> value, Vector256<ulong> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_srlv_epi64 (__m256i a, __m256i count)
- /// VPSRLVQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ulong> ShiftRightLogicalVariable(Vector256<ulong> value, Vector256<ulong> count) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_srlv_epi32 (__m128i a, __m128i count)
- /// VPSRLVD xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<int> ShiftRightLogicalVariable(Vector128<int> value, Vector128<uint> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_srlv_epi32 (__m128i a, __m128i count)
- /// VPSRLVD xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> ShiftRightLogicalVariable(Vector128<uint> value, Vector128<uint> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_srlv_epi64 (__m128i a, __m128i count)
- /// VPSRLVQ xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<long> ShiftRightLogicalVariable(Vector128<long> value, Vector128<ulong> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_srlv_epi64 (__m128i a, __m128i count)
- /// VPSRLVQ xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> ShiftRightLogicalVariable(Vector128<ulong> value, Vector128<ulong> count) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_shuffle_epi8 (__m256i a, __m256i b)
- /// VPSHUFB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> Shuffle(Vector256<sbyte> value, Vector256<sbyte> mask) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_shuffle_epi8 (__m256i a, __m256i b)
- /// VPSHUFB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> Shuffle(Vector256<byte> value, Vector256<byte> mask) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_shuffle_epi32 (__m256i a, const int imm8)
- /// VPSHUFD ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<int> Shuffle(Vector256<int> value, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_shuffle_epi32 (__m256i a, const int imm8)
- /// VPSHUFD ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<uint> Shuffle(Vector256<uint> value, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_shufflehi_epi16 (__m256i a, const int imm8)
- /// VPSHUFHW ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<short> ShuffleHigh(Vector256<short> value, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_shufflehi_epi16 (__m256i a, const int imm8)
- /// VPSHUFHW ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<ushort> ShuffleHigh(Vector256<ushort> value, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_shufflelo_epi16 (__m256i a, const int imm8)
- /// VPSHUFLW ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<short> ShuffleLow(Vector256<short> value, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_shufflelo_epi16 (__m256i a, const int imm8)
- /// VPSHUFLW ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<ushort> ShuffleLow(Vector256<ushort> value, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_sign_epi8 (__m256i a, __m256i b)
- /// VPSIGNB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> Sign(Vector256<sbyte> left, Vector256<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_sign_epi16 (__m256i a, __m256i b)
- /// VPSIGNW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> Sign(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_sign_epi32 (__m256i a, __m256i b)
- /// VPSIGND ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> Sign(Vector256<int> left, Vector256<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_sub_epi8 (__m256i a, __m256i b)
- /// VPSUBB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> Subtract(Vector256<sbyte> left, Vector256<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_sub_epi8 (__m256i a, __m256i b)
- /// VPSUBB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> Subtract(Vector256<byte> left, Vector256<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_sub_epi16 (__m256i a, __m256i b)
- /// VPSUBW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> Subtract(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_sub_epi16 (__m256i a, __m256i b)
- /// VPSUBW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> Subtract(Vector256<ushort> left, Vector256<ushort> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_sub_epi32 (__m256i a, __m256i b)
- /// VPSUBD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> Subtract(Vector256<int> left, Vector256<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_sub_epi32 (__m256i a, __m256i b)
- /// VPSUBD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> Subtract(Vector256<uint> left, Vector256<uint> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_sub_epi64 (__m256i a, __m256i b)
- /// VPSUBQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> Subtract(Vector256<long> left, Vector256<long> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_sub_epi64 (__m256i a, __m256i b)
- /// VPSUBQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ulong> Subtract(Vector256<ulong> left, Vector256<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_subs_epi8 (__m256i a, __m256i b)
- /// VPSUBSB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> SubtractSaturate(Vector256<sbyte> left, Vector256<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_subs_epi16 (__m256i a, __m256i b)
- /// VPSUBSW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> SubtractSaturate(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_subs_epu8 (__m256i a, __m256i b)
- /// VPSUBUSB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> SubtractSaturate(Vector256<byte> left, Vector256<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_subs_epu16 (__m256i a, __m256i b)
- /// VPSUBUSW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> SubtractSaturate(Vector256<ushort> left, Vector256<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_sad_epu8 (__m256i a, __m256i b)
- /// VPSADBW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> SumAbsoluteDifferences(Vector256<byte> left, Vector256<byte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_unpackhi_epi8 (__m256i a, __m256i b)
- /// VPUNPCKHBW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> UnpackHigh(Vector256<sbyte> left, Vector256<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_unpackhi_epi8 (__m256i a, __m256i b)
- /// VPUNPCKHBW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> UnpackHigh(Vector256<byte> left, Vector256<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_unpackhi_epi16 (__m256i a, __m256i b)
- /// VPUNPCKHWD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> UnpackHigh(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_unpackhi_epi16 (__m256i a, __m256i b)
- /// VPUNPCKHWD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> UnpackHigh(Vector256<ushort> left, Vector256<ushort> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_unpackhi_epi32 (__m256i a, __m256i b)
- /// VPUNPCKHDQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> UnpackHigh(Vector256<int> left, Vector256<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_unpackhi_epi32 (__m256i a, __m256i b)
- /// VPUNPCKHDQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> UnpackHigh(Vector256<uint> left, Vector256<uint> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_unpackhi_epi64 (__m256i a, __m256i b)
- /// VPUNPCKHQDQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> UnpackHigh(Vector256<long> left, Vector256<long> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_unpackhi_epi64 (__m256i a, __m256i b)
- /// VPUNPCKHQDQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ulong> UnpackHigh(Vector256<ulong> left, Vector256<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_unpacklo_epi8 (__m256i a, __m256i b)
- /// VPUNPCKLBW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> UnpackLow(Vector256<sbyte> left, Vector256<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_unpacklo_epi8 (__m256i a, __m256i b)
- /// VPUNPCKLBW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> UnpackLow(Vector256<byte> left, Vector256<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_unpacklo_epi16 (__m256i a, __m256i b)
- /// VPUNPCKLWD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> UnpackLow(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_unpacklo_epi16 (__m256i a, __m256i b)
- /// VPUNPCKLWD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> UnpackLow(Vector256<ushort> left, Vector256<ushort> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_unpacklo_epi32 (__m256i a, __m256i b)
- /// VPUNPCKLDQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> UnpackLow(Vector256<int> left, Vector256<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_unpacklo_epi32 (__m256i a, __m256i b)
- /// VPUNPCKLDQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> UnpackLow(Vector256<uint> left, Vector256<uint> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_unpacklo_epi64 (__m256i a, __m256i b)
- /// VPUNPCKLQDQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> UnpackLow(Vector256<long> left, Vector256<long> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_unpacklo_epi64 (__m256i a, __m256i b)
- /// VPUNPCKLQDQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ulong> UnpackLow(Vector256<ulong> left, Vector256<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m256i _mm256_xor_si256 (__m256i a, __m256i b)
- /// VPXOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> Xor(Vector256<sbyte> left, Vector256<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_xor_si256 (__m256i a, __m256i b)
- /// VPXOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> Xor(Vector256<byte> left, Vector256<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_xor_si256 (__m256i a, __m256i b)
- /// VPXOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> Xor(Vector256<short> left, Vector256<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_xor_si256 (__m256i a, __m256i b)
- /// VPXOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> Xor(Vector256<ushort> left, Vector256<ushort> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_xor_si256 (__m256i a, __m256i b)
- /// VPXOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> Xor(Vector256<int> left, Vector256<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_xor_si256 (__m256i a, __m256i b)
- /// VPXOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> Xor(Vector256<uint> left, Vector256<uint> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_xor_si256 (__m256i a, __m256i b)
- /// VPXOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> Xor(Vector256<long> left, Vector256<long> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256i _mm256_xor_si256 (__m256i a, __m256i b)
- /// VPXOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ulong> Xor(Vector256<ulong> left, Vector256<ulong> right) { throw new PlatformNotSupportedException(); }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Avx2.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Avx2.cs
deleted file mode 100644
index a3ff0add1b8..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Avx2.cs
+++ /dev/null
@@ -1,2669 +0,0 @@
-// 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.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel AVX2 hardware instructions via intrinsics
- /// </summary>
- [Intrinsic]
- [CLSCompliant(false)]
- public abstract class Avx2 : Avx
- {
- internal Avx2() { }
-
- public static new bool IsSupported { get => IsSupported; }
-
- /// <summary>
- /// __m256i _mm256_abs_epi8 (__m256i a)
- /// VPABSB ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> Abs(Vector256<sbyte> value) => Abs(value);
- /// <summary>
- /// __m256i _mm256_abs_epi16 (__m256i a)
- /// VPABSW ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> Abs(Vector256<short> value) => Abs(value);
- /// <summary>
- /// __m256i _mm256_abs_epi32 (__m256i a)
- /// VPABSD ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> Abs(Vector256<int> value) => Abs(value);
-
- /// <summary>
- /// __m256i _mm256_add_epi8 (__m256i a, __m256i b)
- /// VPADDB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> Add(Vector256<sbyte> left, Vector256<sbyte> right) => Add(left, right);
- /// <summary>
- /// __m256i _mm256_add_epi8 (__m256i a, __m256i b)
- /// VPADDB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> Add(Vector256<byte> left, Vector256<byte> right) => Add(left, right);
- /// <summary>
- /// __m256i _mm256_add_epi16 (__m256i a, __m256i b)
- /// VPADDW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> Add(Vector256<short> left, Vector256<short> right) => Add(left, right);
- /// <summary>
- /// __m256i _mm256_add_epi16 (__m256i a, __m256i b)
- /// VPADDW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> Add(Vector256<ushort> left, Vector256<ushort> right) => Add(left, right);
- /// <summary>
- /// __m256i _mm256_add_epi32 (__m256i a, __m256i b)
- /// VPADDD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> Add(Vector256<int> left, Vector256<int> right) => Add(left, right);
- /// <summary>
- /// __m256i _mm256_add_epi32 (__m256i a, __m256i b)
- /// VPADDD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> Add(Vector256<uint> left, Vector256<uint> right) => Add(left, right);
- /// <summary>
- /// __m256i _mm256_add_epi64 (__m256i a, __m256i b)
- /// VPADDQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> Add(Vector256<long> left, Vector256<long> right) => Add(left, right);
- /// <summary>
- /// __m256i _mm256_add_epi64 (__m256i a, __m256i b)
- /// VPADDQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ulong> Add(Vector256<ulong> left, Vector256<ulong> right) => Add(left, right);
-
- /// <summary>
- /// __m256i _mm256_adds_epi8 (__m256i a, __m256i b)
- /// VPADDSB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> AddSaturate(Vector256<sbyte> left, Vector256<sbyte> right) => AddSaturate(left, right);
- /// <summary>
- /// __m256i _mm256_adds_epu8 (__m256i a, __m256i b)
- /// VPADDUSB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> AddSaturate(Vector256<byte> left, Vector256<byte> right) => AddSaturate(left, right);
- /// <summary>
- /// __m256i _mm256_adds_epi16 (__m256i a, __m256i b)
- /// VPADDSW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> AddSaturate(Vector256<short> left, Vector256<short> right) => AddSaturate(left, right);
- /// <summary>
- /// __m256i _mm256_adds_epu16 (__m256i a, __m256i b)
- /// VPADDUSW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> AddSaturate(Vector256<ushort> left, Vector256<ushort> right) => AddSaturate(left, right);
-
- /// <summary>
- /// __m256i _mm256_alignr_epi8 (__m256i a, __m256i b, const int count)
- /// VPALIGNR ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<sbyte> AlignRight(Vector256<sbyte> left, Vector256<sbyte> right, byte mask) => AlignRight(left, right, mask);
-
- /// <summary>
- /// __m256i _mm256_alignr_epi8 (__m256i a, __m256i b, const int count)
- /// VPALIGNR ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<byte> AlignRight(Vector256<byte> left, Vector256<byte> right, byte mask) => AlignRight(left, right, mask);
-
- /// <summary>
- /// __m256i _mm256_alignr_epi8 (__m256i a, __m256i b, const int count)
- /// VPALIGNR ymm, ymm, ymm/m256, imm8
- /// This intrinsic generates VPALIGNR that operates over bytes rather than elements of the vectors.
- /// </summary>
- public static Vector256<short> AlignRight(Vector256<short> left, Vector256<short> right, byte mask) => AlignRight(left, right, mask);
-
- /// <summary>
- /// __m256i _mm256_alignr_epi8 (__m256i a, __m256i b, const int count)
- /// VPALIGNR ymm, ymm, ymm/m256, imm8
- /// This intrinsic generates VPALIGNR that operates over bytes rather than elements of the vectors.
- /// </summary>
- public static Vector256<ushort> AlignRight(Vector256<ushort> left, Vector256<ushort> right, byte mask) => AlignRight(left, right, mask);
-
- /// <summary>
- /// __m256i _mm256_alignr_epi8 (__m256i a, __m256i b, const int count)
- /// VPALIGNR ymm, ymm, ymm/m256, imm8
- /// This intrinsic generates VPALIGNR that operates over bytes rather than elements of the vectors.
- /// </summary>
- public static Vector256<int> AlignRight(Vector256<int> left, Vector256<int> right, byte mask) => AlignRight(left, right, mask);
-
- /// <summary>
- /// __m256i _mm256_alignr_epi8 (__m256i a, __m256i b, const int count)
- /// VPALIGNR ymm, ymm, ymm/m256, imm8
- /// This intrinsic generates VPALIGNR that operates over bytes rather than elements of the vectors.
- /// </summary>
- public static Vector256<uint> AlignRight(Vector256<uint> left, Vector256<uint> right, byte mask) => AlignRight(left, right, mask);
-
- /// <summary>
- /// __m256i _mm256_alignr_epi8 (__m256i a, __m256i b, const int count)
- /// VPALIGNR ymm, ymm, ymm/m256, imm8
- /// This intrinsic generates VPALIGNR that operates over bytes rather than elements of the vectors.
- /// </summary>
- public static Vector256<long> AlignRight(Vector256<long> left, Vector256<long> right, byte mask) => AlignRight(left, right, mask);
-
- /// <summary>
- /// __m256i _mm256_alignr_epi8 (__m256i a, __m256i b, const int count)
- /// VPALIGNR ymm, ymm, ymm/m256, imm8
- /// This intrinsic generates VPALIGNR that operates over bytes rather than elements of the vectors.
- /// </summary>
- public static Vector256<ulong> AlignRight(Vector256<ulong> left, Vector256<ulong> right, byte mask) => AlignRight(left, right, mask);
-
- /// <summary>
- /// __m256i _mm256_and_si256 (__m256i a, __m256i b)
- /// VPAND ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> And(Vector256<sbyte> left, Vector256<sbyte> right) => And(left, right);
- /// <summary>
- /// __m256i _mm256_and_si256 (__m256i a, __m256i b)
- /// VPAND ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> And(Vector256<byte> left, Vector256<byte> right) => And(left, right);
- /// <summary>
- /// __m256i _mm256_and_si256 (__m256i a, __m256i b)
- /// VPAND ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> And(Vector256<short> left, Vector256<short> right) => And(left, right);
- /// <summary>
- /// __m256i _mm256_and_si256 (__m256i a, __m256i b)
- /// VPAND ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> And(Vector256<ushort> left, Vector256<ushort> right) => And(left, right);
- /// <summary>
- /// __m256i _mm256_and_si256 (__m256i a, __m256i b)
- /// VPAND ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> And(Vector256<int> left, Vector256<int> right) => And(left, right);
- /// <summary>
- /// __m256i _mm256_and_si256 (__m256i a, __m256i b)
- /// VPAND ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> And(Vector256<uint> left, Vector256<uint> right) => And(left, right);
- /// <summary>
- /// __m256i _mm256_and_si256 (__m256i a, __m256i b)
- /// VPAND ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> And(Vector256<long> left, Vector256<long> right) => And(left, right);
- /// <summary>
- /// __m256i _mm256_and_si256 (__m256i a, __m256i b)
- /// VPAND ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ulong> And(Vector256<ulong> left, Vector256<ulong> right) => And(left, right);
-
- /// <summary>
- /// __m256i _mm256_andnot_si256 (__m256i a, __m256i b)
- /// VPANDN ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> AndNot(Vector256<sbyte> left, Vector256<sbyte> right) => AndNot(left, right);
- /// <summary>
- /// __m256i _mm256_andnot_si256 (__m256i a, __m256i b)
- /// VPANDN ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> AndNot(Vector256<byte> left, Vector256<byte> right) => AndNot(left, right);
- /// <summary>
- /// __m256i _mm256_andnot_si256 (__m256i a, __m256i b)
- /// VPANDN ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> AndNot(Vector256<short> left, Vector256<short> right) => AndNot(left, right);
- /// <summary>
- /// __m256i _mm256_andnot_si256 (__m256i a, __m256i b)
- /// VPANDN ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> AndNot(Vector256<ushort> left, Vector256<ushort> right) => AndNot(left, right);
- /// <summary>
- /// __m256i _mm256_andnot_si256 (__m256i a, __m256i b)
- /// VPANDN ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> AndNot(Vector256<int> left, Vector256<int> right) => AndNot(left, right);
- /// <summary>
- /// __m256i _mm256_andnot_si256 (__m256i a, __m256i b)
- /// VPANDN ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> AndNot(Vector256<uint> left, Vector256<uint> right) => AndNot(left, right);
- /// <summary>
- /// __m256i _mm256_andnot_si256 (__m256i a, __m256i b)
- /// VPANDN ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> AndNot(Vector256<long> left, Vector256<long> right) => AndNot(left, right);
- /// <summary>
- /// __m256i _mm256_andnot_si256 (__m256i a, __m256i b)
- /// VPANDN ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ulong> AndNot(Vector256<ulong> left, Vector256<ulong> right) => AndNot(left, right);
-
- /// <summary>
- /// __m256i _mm256_avg_epu8 (__m256i a, __m256i b)
- /// VPAVGB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> Average(Vector256<byte> left, Vector256<byte> right) => Average(left, right);
- /// <summary>
- /// __m256i _mm256_avg_epu16 (__m256i a, __m256i b)
- /// VPAVGW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> Average(Vector256<ushort> left, Vector256<ushort> right) => Average(left, right);
-
- /// <summary>
- /// __m128i _mm_blend_epi32 (__m128i a, __m128i b, const int imm8)
- /// VPBLENDD xmm, xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<int> Blend(Vector128<int> left, Vector128<int> right, byte control) => Blend(left, right, control);
- /// <summary>
- /// __m128i _mm_blend_epi32 (__m128i a, __m128i b, const int imm8)
- /// VPBLENDD xmm, xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<uint> Blend(Vector128<uint> left, Vector128<uint> right, byte control) => Blend(left, right, control);
- /// <summary>
- /// __m256i _mm256_blend_epi16 (__m256i a, __m256i b, const int imm8)
- /// VPBLENDW ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<short> Blend(Vector256<short> left, Vector256<short> right, byte control) => Blend(left, right, control);
- /// <summary>
- /// __m256i _mm256_blend_epi16 (__m256i a, __m256i b, const int imm8)
- /// VPBLENDW ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<ushort> Blend(Vector256<ushort> left, Vector256<ushort> right, byte control) => Blend(left, right, control);
- /// <summary>
- /// __m256i _mm256_blend_epi32 (__m256i a, __m256i b, const int imm8)
- /// VPBLENDD ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<int> Blend(Vector256<int> left, Vector256<int> right, byte control) => Blend(left, right, control);
- /// <summary>
- /// __m256i _mm256_blend_epi32 (__m256i a, __m256i b, const int imm8)
- /// VPBLENDD ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<uint> Blend(Vector256<uint> left, Vector256<uint> right, byte control) => Blend(left, right, control);
-
- /// <summary>
- /// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
- /// VPBLENDVB ymm, ymm, ymm/m256, ymm
- /// </summary>
- public static Vector256<sbyte> BlendVariable(Vector256<sbyte> left, Vector256<sbyte> right, Vector256<sbyte> mask) => BlendVariable(left, right, mask);
- /// <summary>
- /// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
- /// VPBLENDVB ymm, ymm, ymm/m256, ymm
- /// </summary>
- public static Vector256<byte> BlendVariable(Vector256<byte> left, Vector256<byte> right, Vector256<byte> mask) => BlendVariable(left, right, mask);
-
- /// <summary>
- /// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
- /// VPBLENDVB ymm, ymm, ymm/m256, ymm
- /// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
- /// </summary>
- public static Vector256<short> BlendVariable(Vector256<short> left, Vector256<short> right, Vector256<short> mask) => BlendVariable(left, right, mask);
- /// <summary>
- /// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
- /// VPBLENDVB ymm, ymm, ymm/m256, ymm
- /// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
- /// </summary>
- public static Vector256<ushort> BlendVariable(Vector256<ushort> left, Vector256<ushort> right, Vector256<ushort> mask) => BlendVariable(left, right, mask);
-
- /// <summary>
- /// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
- /// VPBLENDVB ymm, ymm, ymm/m256, ymm
- /// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
- /// </summary>
- public static Vector256<int> BlendVariable(Vector256<int> left, Vector256<int> right, Vector256<int> mask) => BlendVariable(left, right, mask);
- /// <summary>
- /// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
- /// VPBLENDVB ymm, ymm, ymm/m256, ymm
- /// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
- /// </summary>
- public static Vector256<uint> BlendVariable(Vector256<uint> left, Vector256<uint> right, Vector256<uint> mask) => BlendVariable(left, right, mask);
-
- /// <summary>
- /// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
- /// VPBLENDVB ymm, ymm, ymm/m256, ymm
- /// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
- /// </summary>
- public static Vector256<long> BlendVariable(Vector256<long> left, Vector256<long> right, Vector256<long> mask) => BlendVariable(left, right, mask);
- /// <summary>
- /// __m256i _mm256_blendv_epi8 (__m256i a, __m256i b, __m256i mask)
- /// VPBLENDVB ymm, ymm, ymm/m256, ymm
- /// This intrinsic generates VPBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
- /// </summary>
- public static Vector256<ulong> BlendVariable(Vector256<ulong> left, Vector256<ulong> right, Vector256<ulong> mask) => BlendVariable(left, right, mask);
-
- /// <summary>
- /// __m128i _mm_broadcastb_epi8 (__m128i a)
- /// VPBROADCASTB xmm, xmm
- /// </summary>
- public static Vector128<byte> BroadcastScalarToVector128(Vector128<byte> value) => BroadcastScalarToVector128(value);
-
- /// <summary>
- /// __m128i _mm_broadcastb_epi8 (__m128i a)
- /// VPBROADCASTB xmm, xmm
- /// </summary>
- public static Vector128<sbyte> BroadcastScalarToVector128(Vector128<sbyte> value) => BroadcastScalarToVector128(value);
-
- /// <summary>
- /// __m128i _mm_broadcastw_epi16 (__m128i a)
- /// VPBROADCASTW xmm, xmm
- /// </summary>
- public static Vector128<short> BroadcastScalarToVector128(Vector128<short> value) => BroadcastScalarToVector128(value);
-
- /// <summary>
- /// __m128i _mm_broadcastw_epi16 (__m128i a)
- /// VPBROADCASTW xmm, xmm
- /// </summary>
- public static Vector128<ushort> BroadcastScalarToVector128(Vector128<ushort> value) => BroadcastScalarToVector128(value);
-
- /// <summary>
- /// __m128i _mm_broadcastd_epi32 (__m128i a)
- /// VPBROADCASTD xmm, xmm
- /// </summary>
- public static Vector128<int> BroadcastScalarToVector128(Vector128<int> value) => BroadcastScalarToVector128(value);
-
- /// <summary>
- /// __m128i _mm_broadcastd_epi32 (__m128i a)
- /// VPBROADCASTD xmm, xmm
- /// </summary>
- public static Vector128<uint> BroadcastScalarToVector128(Vector128<uint> value) => BroadcastScalarToVector128(value);
-
- /// <summary>
- /// __m128i _mm_broadcastq_epi64 (__m128i a)
- /// VPBROADCASTQ xmm, xmm
- /// </summary>
- public static Vector128<long> BroadcastScalarToVector128(Vector128<long> value) => BroadcastScalarToVector128(value);
-
- /// <summary>
- /// __m128i _mm_broadcastq_epi64 (__m128i a)
- /// VPBROADCASTQ xmm, xmm
- /// </summary>
- public static Vector128<ulong> BroadcastScalarToVector128(Vector128<ulong> value) => BroadcastScalarToVector128(value);
-
- /// <summary>
- /// __m128 _mm_broadcastss_ps (__m128 a)
- /// VBROADCASTSS xmm, xmm
- /// </summary>
- public static Vector128<float> BroadcastScalarToVector128(Vector128<float> value) => BroadcastScalarToVector128(value);
-
- /// <summary>
- /// __m128d _mm_broadcastsd_pd (__m128d a)
- /// VMOVDDUP xmm, xmm
- /// </summary>
- public static Vector128<double> BroadcastScalarToVector128(Vector128<double> value) => BroadcastScalarToVector128(value);
-
- /// <summary>
- /// __m128i _mm_broadcastb_epi8 (__m128i a)
- /// VPBROADCASTB xmm, m8
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector128<byte> BroadcastScalarToVector128(byte* source) => BroadcastScalarToVector128(source);
- /// <summary>
- /// __m128i _mm_broadcastb_epi8 (__m128i a)
- /// VPBROADCASTB xmm, m8
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector128<sbyte> BroadcastScalarToVector128(sbyte* source) => BroadcastScalarToVector128(source);
-
- /// <summary>
- /// __m128i _mm_broadcastw_epi16 (__m128i a)
- /// VPBROADCASTW xmm, m16
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector128<short> BroadcastScalarToVector128(short* source) => BroadcastScalarToVector128(source);
- /// <summary>
- /// __m128i _mm_broadcastw_epi16 (__m128i a)
- /// VPBROADCASTW xmm, m16
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector128<ushort> BroadcastScalarToVector128(ushort* source) => BroadcastScalarToVector128(source);
-
- /// <summary>
- /// __m128i _mm_broadcastd_epi32 (__m128i a)
- /// VPBROADCASTD xmm, m32
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector128<int> BroadcastScalarToVector128(int* source) => BroadcastScalarToVector128(source);
- /// <summary>
- /// __m128i _mm_broadcastd_epi32 (__m128i a)
- /// VPBROADCASTD xmm, m32
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector128<uint> BroadcastScalarToVector128(uint* source) => BroadcastScalarToVector128(source);
-
- /// <summary>
- /// __m128i _mm_broadcastq_epi64 (__m128i a)
- /// VPBROADCASTQ xmm, m64
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector128<long> BroadcastScalarToVector128(long* source) => BroadcastScalarToVector128(source);
- /// <summary>
- /// __m128i _mm_broadcastq_epi64 (__m128i a)
- /// VPBROADCASTQ xmm, m64
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector128<ulong> BroadcastScalarToVector128(ulong* source) => BroadcastScalarToVector128(source);
-
- /// <summary>
- /// __m256i _mm256_broadcastb_epi8 (__m128i a)
- /// VPBROADCASTB ymm, xmm
- /// </summary>
- public static Vector256<byte> BroadcastScalarToVector256(Vector128<byte> value) => BroadcastScalarToVector256(value);
-
- /// <summary>
- /// __m256i _mm256_broadcastb_epi8 (__m128i a)
- /// VPBROADCASTB ymm, xmm
- /// </summary>
- public static Vector256<sbyte> BroadcastScalarToVector256(Vector128<sbyte> value) => BroadcastScalarToVector256(value);
-
- /// <summary>
- /// __m256i _mm256_broadcastw_epi16 (__m128i a)
- /// VPBROADCASTW ymm, xmm
- /// </summary>
- public static Vector256<short> BroadcastScalarToVector256(Vector128<short> value) => BroadcastScalarToVector256(value);
-
- /// <summary>
- /// __m256i _mm256_broadcastw_epi16 (__m128i a)
- /// VPBROADCASTW ymm, xmm
- /// </summary>
- public static Vector256<ushort> BroadcastScalarToVector256(Vector128<ushort> value) => BroadcastScalarToVector256(value);
-
- /// <summary>
- /// __m256i _mm256_broadcastd_epi32 (__m128i a)
- /// VPBROADCASTD ymm, xmm
- /// </summary>
- public static Vector256<int> BroadcastScalarToVector256(Vector128<int> value) => BroadcastScalarToVector256(value);
-
- /// <summary>
- /// __m256i _mm256_broadcastd_epi32 (__m128i a)
- /// VPBROADCASTD ymm, xmm
- /// </summary>
- public static Vector256<uint> BroadcastScalarToVector256(Vector128<uint> value) => BroadcastScalarToVector256(value);
-
- /// <summary>
- /// __m256i _mm256_broadcastq_epi64 (__m128i a)
- /// VPBROADCASTQ ymm, xmm
- /// </summary>
- public static Vector256<long> BroadcastScalarToVector256(Vector128<long> value) => BroadcastScalarToVector256(value);
-
- /// <summary>
- /// __m256i _mm256_broadcastq_epi64 (__m128i a)
- /// VPBROADCASTQ ymm, xmm
- /// </summary>
- public static Vector256<ulong> BroadcastScalarToVector256(Vector128<ulong> value) => BroadcastScalarToVector256(value);
-
- /// <summary>
- /// __m256 _mm256_broadcastss_ps (__m128 a)
- /// VBROADCASTSS ymm, xmm
- /// </summary>
- public static Vector256<float> BroadcastScalarToVector256(Vector128<float> value) => BroadcastScalarToVector256(value);
-
- /// <summary>
- /// __m256d _mm256_broadcastsd_pd (__m128d a)
- /// VBROADCASTSD ymm, xmm
- /// </summary>
- public static Vector256<double> BroadcastScalarToVector256(Vector128<double> value) => BroadcastScalarToVector256(value);
-
- /// <summary>
- /// __m256i _mm256_broadcastb_epi8 (__m128i a)
- /// VPBROADCASTB ymm, m8
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<byte> BroadcastScalarToVector256(byte* source) => BroadcastScalarToVector256(source);
- /// <summary>
- /// __m256i _mm256_broadcastb_epi8 (__m128i a)
- /// VPBROADCASTB ymm, m8
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<sbyte> BroadcastScalarToVector256(sbyte* source) => BroadcastScalarToVector256(source);
-
- /// <summary>
- /// __m256i _mm256_broadcastw_epi16 (__m128i a)
- /// VPBROADCASTW ymm, m16
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<short> BroadcastScalarToVector256(short* source) => BroadcastScalarToVector256(source);
- /// <summary>
- /// __m256i _mm256_broadcastw_epi16 (__m128i a)
- /// VPBROADCASTW ymm, m16
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<ushort> BroadcastScalarToVector256(ushort* source) => BroadcastScalarToVector256(source);
-
- /// <summary>
- /// __m256i _mm256_broadcastd_epi32 (__m128i a)
- /// VPBROADCASTD ymm, m32
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<int> BroadcastScalarToVector256(int* source) => BroadcastScalarToVector256(source);
- /// <summary>
- /// __m256i _mm256_broadcastd_epi32 (__m128i a)
- /// VPBROADCASTD ymm, m32
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<uint> BroadcastScalarToVector256(uint* source) => BroadcastScalarToVector256(source);
-
- /// <summary>
- /// __m256i _mm256_broadcastq_epi64 (__m128i a)
- /// VPBROADCASTQ ymm, m64
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<long> BroadcastScalarToVector256(long* source) => BroadcastScalarToVector256(source);
- /// <summary>
- /// __m256i _mm256_broadcastq_epi64 (__m128i a)
- /// VPBROADCASTQ ymm, m64
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<ulong> BroadcastScalarToVector256(ulong* source) => BroadcastScalarToVector256(source);
-
- /// <summary>
- /// __m256i _mm256_broadcastsi128_si256 (__m128i a)
- /// VBROADCASTI128 ymm, m128
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<sbyte> BroadcastVector128ToVector256(sbyte* address) => BroadcastVector128ToVector256(address);
- /// <summary>
- /// __m256i _mm256_broadcastsi128_si256 (__m128i a)
- /// VBROADCASTI128 ymm, m128
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<byte> BroadcastVector128ToVector256(byte* address) => BroadcastVector128ToVector256(address);
- /// <summary>
- /// __m256i _mm256_broadcastsi128_si256 (__m128i a)
- /// VBROADCASTI128 ymm, m128
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<short> BroadcastVector128ToVector256(short* address) => BroadcastVector128ToVector256(address);
- /// <summary>
- /// __m256i _mm256_broadcastsi128_si256 (__m128i a)
- /// VBROADCASTI128 ymm, m128
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<ushort> BroadcastVector128ToVector256(ushort* address) => BroadcastVector128ToVector256(address);
- /// <summary>
- /// __m256i _mm256_broadcastsi128_si256 (__m128i a)
- /// VBROADCASTI128 ymm, m128
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<int> BroadcastVector128ToVector256(int* address) => BroadcastVector128ToVector256(address);
- /// <summary>
- /// __m256i _mm256_broadcastsi128_si256 (__m128i a)
- /// VBROADCASTI128 ymm, m128
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<uint> BroadcastVector128ToVector256(uint* address) => BroadcastVector128ToVector256(address);
- /// <summary>
- /// __m256i _mm256_broadcastsi128_si256 (__m128i a)
- /// VBROADCASTI128 ymm, m128
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<long> BroadcastVector128ToVector256(long* address) => BroadcastVector128ToVector256(address);
- /// <summary>
- /// __m256i _mm256_broadcastsi128_si256 (__m128i a)
- /// VBROADCASTI128 ymm, m128
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe Vector256<ulong> BroadcastVector128ToVector256(ulong* address) => BroadcastVector128ToVector256(address);
-
- /// <summary>
- /// __m256i _mm256_cmpeq_epi8 (__m256i a, __m256i b)
- /// VPCMPEQB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> CompareEqual(Vector256<sbyte> left, Vector256<sbyte> right) => CompareEqual(left, right);
- /// <summary>
- /// __m256i _mm256_cmpeq_epi8 (__m256i a, __m256i b)
- /// VPCMPEQB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> CompareEqual(Vector256<byte> left, Vector256<byte> right) => CompareEqual(left, right);
- /// <summary>
- /// __m256i _mm256_cmpeq_epi16 (__m256i a, __m256i b)
- /// VPCMPEQW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> CompareEqual(Vector256<short> left, Vector256<short> right) => CompareEqual(left, right);
- /// <summary>
- /// __m256i _mm256_cmpeq_epi16 (__m256i a, __m256i b)
- /// VPCMPEQW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> CompareEqual(Vector256<ushort> left, Vector256<ushort> right) => CompareEqual(left, right);
- /// <summary>
- /// __m256i _mm256_cmpeq_epi32 (__m256i a, __m256i b)
- /// VPCMPEQD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> CompareEqual(Vector256<int> left, Vector256<int> right) => CompareEqual(left, right);
- /// <summary>
- /// __m256i _mm256_cmpeq_epi32 (__m256i a, __m256i b)
- /// VPCMPEQD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> CompareEqual(Vector256<uint> left, Vector256<uint> right) => CompareEqual(left, right);
- /// <summary>
- /// __m256i _mm256_cmpeq_epi64 (__m256i a, __m256i b)
- /// VPCMPEQQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> CompareEqual(Vector256<long> left, Vector256<long> right) => CompareEqual(left, right);
- /// <summary>
- /// __m256i _mm256_cmpeq_epi64 (__m256i a, __m256i b)
- /// VPCMPEQQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ulong> CompareEqual(Vector256<ulong> left, Vector256<ulong> right) => CompareEqual(left, right);
-
- /// <summary>
- /// __m256i _mm256_cmpgt_epi8 (__m256i a, __m256i b)
- /// VPCMPGTB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> CompareGreaterThan(Vector256<sbyte> left, Vector256<sbyte> right) => CompareGreaterThan(left, right);
- /// <summary>
- /// __m256i _mm256_cmpgt_epi16 (__m256i a, __m256i b)
- /// VPCMPGTW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> CompareGreaterThan(Vector256<short> left, Vector256<short> right) => CompareGreaterThan(left, right);
- /// <summary>
- /// __m256i _mm256_cmpgt_epi32 (__m256i a, __m256i b)
- /// VPCMPGTD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> CompareGreaterThan(Vector256<int> left, Vector256<int> right) => CompareGreaterThan(left, right);
- /// <summary>
- /// __m256i _mm256_cmpgt_epi64 (__m256i a, __m256i b)
- /// VPCMPGTQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> CompareGreaterThan(Vector256<long> left, Vector256<long> right) => CompareGreaterThan(left, right);
-
- /// <summary>
- /// int _mm256_cvtsi256_si32 (__m256i a)
- /// MOVD reg/m32, xmm
- /// </summary>
- public static int ConvertToInt32(Vector256<int> value) => ConvertToInt32(value);
- /// <summary>
- /// int _mm256_cvtsi256_si32 (__m256i a)
- /// MOVD reg/m32, xmm
- /// </summary>
- public static uint ConvertToUInt32(Vector256<uint> value) => ConvertToUInt32(value);
-
- /// <summary>
- /// __m256i _mm256_cvtepi8_epi16 (__m128i a)
- /// VPMOVSXBW ymm, xmm
- /// </summary>
- public static Vector256<short> ConvertToVector256Int16(Vector128<sbyte> value) => ConvertToVector256Int16(value);
- /// <summary>
- /// __m256i _mm256_cvtepu8_epi16 (__m128i a)
- /// VPMOVZXBW ymm, xmm
- /// </summary>
- public static Vector256<short> ConvertToVector256Int16(Vector128<byte> value) => ConvertToVector256Int16(value);
- /// <summary>
- /// __m256i _mm256_cvtepi8_epi32 (__m128i a)
- /// VPMOVSXBD ymm, xmm
- /// </summary>
- public static Vector256<int> ConvertToVector256Int32(Vector128<sbyte> value) => ConvertToVector256Int32(value);
- /// <summary>
- /// __m256i _mm256_cvtepu8_epi32 (__m128i a)
- /// VPMOVZXBD ymm, xmm
- /// </summary>
- public static Vector256<int> ConvertToVector256Int32(Vector128<byte> value) => ConvertToVector256Int32(value);
- /// <summary>
- /// __m256i _mm256_cvtepi16_epi32 (__m128i a)
- /// VPMOVSXWD ymm, xmm
- /// </summary>
- public static Vector256<int> ConvertToVector256Int32(Vector128<short> value) => ConvertToVector256Int32(value);
- /// <summary>
- /// __m256i _mm256_cvtepu16_epi32 (__m128i a)
- /// VPMOVZXWD ymm, xmm
- /// </summary>
- public static Vector256<int> ConvertToVector256Int32(Vector128<ushort> value) => ConvertToVector256Int32(value);
- /// <summary>
- /// __m256i _mm256_cvtepi8_epi64 (__m128i a)
- /// VPMOVSXBQ ymm, xmm
- /// </summary>
- public static Vector256<long> ConvertToVector256Int64(Vector128<sbyte> value) => ConvertToVector256Int64(value);
- /// <summary>
- /// __m256i _mm256_cvtepu8_epi64 (__m128i a)
- /// VPMOVZXBQ ymm, xmm
- /// </summary>
- public static Vector256<long> ConvertToVector256Int64(Vector128<byte> value) => ConvertToVector256Int64(value);
- /// <summary>
- /// __m256i _mm256_cvtepi16_epi64 (__m128i a)
- /// VPMOVSXWQ ymm, xmm
- /// </summary>
- public static Vector256<long> ConvertToVector256Int64(Vector128<short> value) => ConvertToVector256Int64(value);
- /// <summary>
- /// __m256i _mm256_cvtepu16_epi64 (__m128i a)
- /// VPMOVZXWQ ymm, xmm
- /// </summary>
- public static Vector256<long> ConvertToVector256Int64(Vector128<ushort> value) => ConvertToVector256Int64(value);
- /// <summary>
- /// __m256i _mm256_cvtepi32_epi64 (__m128i a)
- /// VPMOVSXDQ ymm, xmm
- /// </summary>
- public static Vector256<long> ConvertToVector256Int64(Vector128<int> value) => ConvertToVector256Int64(value);
- /// <summary>
- /// __m256i _mm256_cvtepu32_epi64 (__m128i a)
- /// VPMOVZXDQ ymm, xmm
- /// </summary>
- public static Vector256<long> ConvertToVector256Int64(Vector128<uint> value) => ConvertToVector256Int64(value);
-
- /// <summary>
- /// VPMOVSXBW ymm, m128
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector256<short> ConvertToVector256Int16(sbyte* address) => ConvertToVector256Int16(address);
- /// <summary>
- /// VPMOVZXBW ymm, m128
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector256<short> ConvertToVector256Int16(byte* address) => ConvertToVector256Int16(address);
- /// <summary>
- /// VPMOVSXBD ymm, m64
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector256<int> ConvertToVector256Int32(sbyte* address) => ConvertToVector256Int32(address);
- /// <summary>
- /// VPMOVZXBD ymm, m64
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector256<int> ConvertToVector256Int32(byte* address) => ConvertToVector256Int32(address);
- /// <summary>
- /// VPMOVSXWD ymm, m128
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector256<int> ConvertToVector256Int32(short* address) => ConvertToVector256Int32(address);
- /// <summary>
- /// VPMOVZXWD ymm, m128
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector256<int> ConvertToVector256Int32(ushort* address) => ConvertToVector256Int32(address);
- /// <summary>
- /// VPMOVSXBQ ymm, m32
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector256<long> ConvertToVector256Int64(sbyte* address) => ConvertToVector256Int64(address);
- /// <summary>
- /// VPMOVZXBQ ymm, m32
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector256<long> ConvertToVector256Int64(byte* address) => ConvertToVector256Int64(address);
- /// <summary>
- /// VPMOVSXWQ ymm, m64
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector256<long> ConvertToVector256Int64(short* address) => ConvertToVector256Int64(address);
- /// <summary>
- /// VPMOVZXWQ ymm, m64
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector256<long> ConvertToVector256Int64(ushort* address) => ConvertToVector256Int64(address);
- /// <summary>
- /// VPMOVSXDQ ymm, m128
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector256<long> ConvertToVector256Int64(int* address) => ConvertToVector256Int64(address);
- /// <summary>
- /// VPMOVZXDQ ymm, m128
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector256<long> ConvertToVector256Int64(uint* address) => ConvertToVector256Int64(address);
-
- /// <summary>
- /// __m128i _mm256_extracti128_si256 (__m256i a, const int imm8)
- /// VEXTRACTI128 xmm, ymm, imm8
- /// </summary>
- public static new Vector128<sbyte> ExtractVector128(Vector256<sbyte> value, byte index) => ExtractVector128(value, index);
-
- /// <summary>
- /// __m128i _mm256_extracti128_si256 (__m256i a, const int imm8)
- /// VEXTRACTI128 xmm, ymm, imm8
- /// </summary>
- public static new Vector128<byte> ExtractVector128(Vector256<byte> value, byte index) => ExtractVector128(value, index);
-
- /// <summary>
- /// __m128i _mm256_extracti128_si256 (__m256i a, const int imm8)
- /// VEXTRACTI128 xmm, ymm, imm8
- /// </summary>
- public static new Vector128<short> ExtractVector128(Vector256<short> value, byte index) => ExtractVector128(value, index);
-
- /// <summary>
- /// __m128i _mm256_extracti128_si256 (__m256i a, const int imm8)
- /// VEXTRACTI128 xmm, ymm, imm8
- /// </summary>
- public static new Vector128<ushort> ExtractVector128(Vector256<ushort> value, byte index) => ExtractVector128(value, index);
-
- /// <summary>
- /// __m128i _mm256_extracti128_si256 (__m256i a, const int imm8)
- /// VEXTRACTI128 xmm, ymm, imm8
- /// </summary>
- public static new Vector128<int> ExtractVector128(Vector256<int> value, byte index) => ExtractVector128(value, index);
-
- /// <summary>
- /// __m128i _mm256_extracti128_si256 (__m256i a, const int imm8)
- /// VEXTRACTI128 xmm, ymm, imm8
- /// </summary>
- public static new Vector128<uint> ExtractVector128(Vector256<uint> value, byte index) => ExtractVector128(value, index);
-
- /// <summary>
- /// __m128i _mm256_extracti128_si256 (__m256i a, const int imm8)
- /// VEXTRACTI128 xmm, ymm, imm8
- /// </summary>
- public static new Vector128<long> ExtractVector128(Vector256<long> value, byte index) => ExtractVector128(value, index);
-
- /// <summary>
- /// __m128i _mm256_extracti128_si256 (__m256i a, const int imm8)
- /// VEXTRACTI128 xmm, ymm, imm8
- /// </summary>
- public static new Vector128<ulong> ExtractVector128(Vector256<ulong> value, byte index) => ExtractVector128(value, index);
-
- /// <summary>
- /// __m128i _mm_i32gather_epi32 (int const* base_addr, __m128i vindex, const int scale)
- /// VPGATHERDD xmm, vm32x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<int> GatherVector128(int* baseAddress, Vector128<int> index, byte scale)
- {
- return scale switch
- {
- 1 => GatherVector128(baseAddress, index, 1),
- 2 => GatherVector128(baseAddress, index, 2),
- 4 => GatherVector128(baseAddress, index, 4),
- 8 => GatherVector128(baseAddress, index, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128i _mm_i32gather_epi32 (int const* base_addr, __m128i vindex, const int scale)
- /// VPGATHERDD xmm, vm32x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<uint> GatherVector128(uint* baseAddress, Vector128<int> index, byte scale)
- {
- return scale switch
- {
- 1 => GatherVector128(baseAddress, index, 1),
- 2 => GatherVector128(baseAddress, index, 2),
- 4 => GatherVector128(baseAddress, index, 4),
- 8 => GatherVector128(baseAddress, index, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128i _mm_i32gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
- /// VPGATHERDQ xmm, vm32x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<long> GatherVector128(long* baseAddress, Vector128<int> index, byte scale)
- {
- return scale switch
- {
- 1 => GatherVector128(baseAddress, index, 1),
- 2 => GatherVector128(baseAddress, index, 2),
- 4 => GatherVector128(baseAddress, index, 4),
- 8 => GatherVector128(baseAddress, index, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128i _mm_i32gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
- /// VPGATHERDQ xmm, vm32x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<ulong> GatherVector128(ulong* baseAddress, Vector128<int> index, byte scale)
- {
- return scale switch
- {
- 1 => GatherVector128(baseAddress, index, 1),
- 2 => GatherVector128(baseAddress, index, 2),
- 4 => GatherVector128(baseAddress, index, 4),
- 8 => GatherVector128(baseAddress, index, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128 _mm_i32gather_ps (float const* base_addr, __m128i vindex, const int scale)
- /// VGATHERDPS xmm, vm32x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<float> GatherVector128(float* baseAddress, Vector128<int> index, byte scale)
- {
- return scale switch
- {
- 1 => GatherVector128(baseAddress, index, 1),
- 2 => GatherVector128(baseAddress, index, 2),
- 4 => GatherVector128(baseAddress, index, 4),
- 8 => GatherVector128(baseAddress, index, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128d _mm_i32gather_pd (double const* base_addr, __m128i vindex, const int scale)
- /// VGATHERDPD xmm, vm32x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<double> GatherVector128(double* baseAddress, Vector128<int> index, byte scale)
- {
- return scale switch
- {
- 1 => GatherVector128(baseAddress, index, 1),
- 2 => GatherVector128(baseAddress, index, 2),
- 4 => GatherVector128(baseAddress, index, 4),
- 8 => GatherVector128(baseAddress, index, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128i _mm_i64gather_epi32 (int const* base_addr, __m128i vindex, const int scale)
- /// VPGATHERQD xmm, vm64x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<int> GatherVector128(int* baseAddress, Vector128<long> index, byte scale)
- {
- return scale switch
- {
- 1 => GatherVector128(baseAddress, index, 1),
- 2 => GatherVector128(baseAddress, index, 2),
- 4 => GatherVector128(baseAddress, index, 4),
- 8 => GatherVector128(baseAddress, index, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128i _mm_i64gather_epi32 (int const* base_addr, __m128i vindex, const int scale)
- /// VPGATHERQD xmm, vm64x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<uint> GatherVector128(uint* baseAddress, Vector128<long> index, byte scale)
- {
- return scale switch
- {
- 1 => GatherVector128(baseAddress, index, 1),
- 2 => GatherVector128(baseAddress, index, 2),
- 4 => GatherVector128(baseAddress, index, 4),
- 8 => GatherVector128(baseAddress, index, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128i _mm_i64gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
- /// VPGATHERQQ xmm, vm64x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<long> GatherVector128(long* baseAddress, Vector128<long> index, byte scale)
- {
- return scale switch
- {
- 1 => GatherVector128(baseAddress, index, 1),
- 2 => GatherVector128(baseAddress, index, 2),
- 4 => GatherVector128(baseAddress, index, 4),
- 8 => GatherVector128(baseAddress, index, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128i _mm_i64gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
- /// VPGATHERQQ xmm, vm64x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<ulong> GatherVector128(ulong* baseAddress, Vector128<long> index, byte scale)
- {
- return scale switch
- {
- 1 => GatherVector128(baseAddress, index, 1),
- 2 => GatherVector128(baseAddress, index, 2),
- 4 => GatherVector128(baseAddress, index, 4),
- 8 => GatherVector128(baseAddress, index, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128 _mm_i64gather_ps (float const* base_addr, __m128i vindex, const int scale)
- /// VGATHERQPS xmm, vm64x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<float> GatherVector128(float* baseAddress, Vector128<long> index, byte scale)
- {
- return scale switch
- {
- 1 => GatherVector128(baseAddress, index, 1),
- 2 => GatherVector128(baseAddress, index, 2),
- 4 => GatherVector128(baseAddress, index, 4),
- 8 => GatherVector128(baseAddress, index, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128d _mm_i64gather_pd (double const* base_addr, __m128i vindex, const int scale)
- /// VGATHERQPD xmm, vm64x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<double> GatherVector128(double* baseAddress, Vector128<long> index, byte scale)
- {
- return scale switch
- {
- 1 => GatherVector128(baseAddress, index, 1),
- 2 => GatherVector128(baseAddress, index, 2),
- 4 => GatherVector128(baseAddress, index, 4),
- 8 => GatherVector128(baseAddress, index, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m256i _mm256_i32gather_epi32 (int const* base_addr, __m256i vindex, const int scale)
- /// VPGATHERDD ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<int> GatherVector256(int* baseAddress, Vector256<int> index, byte scale)
- {
- return scale switch
- {
- 1 => GatherVector256(baseAddress, index, 1),
- 2 => GatherVector256(baseAddress, index, 2),
- 4 => GatherVector256(baseAddress, index, 4),
- 8 => GatherVector256(baseAddress, index, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m256i _mm256_i32gather_epi32 (int const* base_addr, __m256i vindex, const int scale)
- /// VPGATHERDD ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<uint> GatherVector256(uint* baseAddress, Vector256<int> index, byte scale)
- {
- return scale switch
- {
- 1 => GatherVector256(baseAddress, index, 1),
- 2 => GatherVector256(baseAddress, index, 2),
- 4 => GatherVector256(baseAddress, index, 4),
- 8 => GatherVector256(baseAddress, index, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m256i _mm256_i32gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
- /// VPGATHERDQ ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<long> GatherVector256(long* baseAddress, Vector128<int> index, byte scale)
- {
- return scale switch
- {
- 1 => GatherVector256(baseAddress, index, 1),
- 2 => GatherVector256(baseAddress, index, 2),
- 4 => GatherVector256(baseAddress, index, 4),
- 8 => GatherVector256(baseAddress, index, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m256i _mm256_i32gather_epi64 (__int64 const* base_addr, __m128i vindex, const int scale)
- /// VPGATHERDQ ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<ulong> GatherVector256(ulong* baseAddress, Vector128<int> index, byte scale)
- {
- return scale switch
- {
- 1 => GatherVector256(baseAddress, index, 1),
- 2 => GatherVector256(baseAddress, index, 2),
- 4 => GatherVector256(baseAddress, index, 4),
- 8 => GatherVector256(baseAddress, index, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m256 _mm256_i32gather_ps (float const* base_addr, __m256i vindex, const int scale)
- /// VGATHERDPS ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<float> GatherVector256(float* baseAddress, Vector256<int> index, byte scale)
- {
- return scale switch
- {
- 1 => GatherVector256(baseAddress, index, 1),
- 2 => GatherVector256(baseAddress, index, 2),
- 4 => GatherVector256(baseAddress, index, 4),
- 8 => GatherVector256(baseAddress, index, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m256d _mm256_i32gather_pd (double const* base_addr, __m128i vindex, const int scale)
- /// VGATHERDPD ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<double> GatherVector256(double* baseAddress, Vector128<int> index, byte scale)
- {
- return scale switch
- {
- 1 => GatherVector256(baseAddress, index, 1),
- 2 => GatherVector256(baseAddress, index, 2),
- 4 => GatherVector256(baseAddress, index, 4),
- 8 => GatherVector256(baseAddress, index, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128i _mm256_i64gather_epi32 (int const* base_addr, __m256i vindex, const int scale)
- /// VPGATHERQD xmm, vm64y, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<int> GatherVector128(int* baseAddress, Vector256<long> index, byte scale)
- {
- return scale switch
- {
- 1 => GatherVector128(baseAddress, index, 1),
- 2 => GatherVector128(baseAddress, index, 2),
- 4 => GatherVector128(baseAddress, index, 4),
- 8 => GatherVector128(baseAddress, index, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128i _mm256_i64gather_epi32 (int const* base_addr, __m256i vindex, const int scale)
- /// VPGATHERQD xmm, vm64y, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<uint> GatherVector128(uint* baseAddress, Vector256<long> index, byte scale)
- {
- return scale switch
- {
- 1 => GatherVector128(baseAddress, index, 1),
- 2 => GatherVector128(baseAddress, index, 2),
- 4 => GatherVector128(baseAddress, index, 4),
- 8 => GatherVector128(baseAddress, index, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m256i _mm256_i64gather_epi64 (__int64 const* base_addr, __m256i vindex, const int scale)
- /// VPGATHERQQ ymm, vm64y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<long> GatherVector256(long* baseAddress, Vector256<long> index, byte scale)
- {
- return scale switch
- {
- 1 => GatherVector256(baseAddress, index, 1),
- 2 => GatherVector256(baseAddress, index, 2),
- 4 => GatherVector256(baseAddress, index, 4),
- 8 => GatherVector256(baseAddress, index, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m256i _mm256_i64gather_epi64 (__int64 const* base_addr, __m256i vindex, const int scale)
- /// VPGATHERQQ ymm, vm64y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<ulong> GatherVector256(ulong* baseAddress, Vector256<long> index, byte scale)
- {
- return scale switch
- {
- 1 => GatherVector256(baseAddress, index, 1),
- 2 => GatherVector256(baseAddress, index, 2),
- 4 => GatherVector256(baseAddress, index, 4),
- 8 => GatherVector256(baseAddress, index, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128 _mm256_i64gather_ps (float const* base_addr, __m256i vindex, const int scale)
- /// VGATHERQPS xmm, vm64y, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<float> GatherVector128(float* baseAddress, Vector256<long> index, byte scale)
- {
- return scale switch
- {
- 1 => GatherVector128(baseAddress, index, 1),
- 2 => GatherVector128(baseAddress, index, 2),
- 4 => GatherVector128(baseAddress, index, 4),
- 8 => GatherVector128(baseAddress, index, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m256d _mm256_i64gather_pd (double const* base_addr, __m256i vindex, const int scale)
- /// VGATHERQPD ymm, vm64y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<double> GatherVector256(double* baseAddress, Vector256<long> index, byte scale)
- {
- return scale switch
- {
- 1 => GatherVector256(baseAddress, index, 1),
- 2 => GatherVector256(baseAddress, index, 2),
- 4 => GatherVector256(baseAddress, index, 4),
- 8 => GatherVector256(baseAddress, index, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
-
- /// <summary>
- /// __m128i _mm_mask_i32gather_epi32 (__m128i src, int const* base_addr, __m128i vindex, __m128i mask, const int scale)
- /// VPGATHERDD xmm, vm32x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<int> GatherMaskVector128(Vector128<int> source, int* baseAddress, Vector128<int> index, Vector128<int> mask, byte scale)
- {
- return scale switch
- {
- 1 => GatherMaskVector128(source, baseAddress, index, mask, 1),
- 2 => GatherMaskVector128(source, baseAddress, index, mask, 2),
- 4 => GatherMaskVector128(source, baseAddress, index, mask, 4),
- 8 => GatherMaskVector128(source, baseAddress, index, mask, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128i _mm_mask_i32gather_epi32 (__m128i src, int const* base_addr, __m128i vindex, __m128i mask, const int scale)
- /// VPGATHERDD xmm, vm32x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<uint> GatherMaskVector128(Vector128<uint> source, uint* baseAddress, Vector128<int> index, Vector128<uint> mask, byte scale)
- {
- return scale switch
- {
- 1 => GatherMaskVector128(source, baseAddress, index, mask, 1),
- 2 => GatherMaskVector128(source, baseAddress, index, mask, 2),
- 4 => GatherMaskVector128(source, baseAddress, index, mask, 4),
- 8 => GatherMaskVector128(source, baseAddress, index, mask, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128i _mm_mask_i32gather_epi64 (__m128i src, __int64 const* base_addr, __m128i vindex, __m128i mask, const int scale)
- /// VPGATHERDQ xmm, vm32x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<long> GatherMaskVector128(Vector128<long> source, long* baseAddress, Vector128<int> index, Vector128<long> mask, byte scale)
- {
- return scale switch
- {
- 1 => GatherMaskVector128(source, baseAddress, index, mask, 1),
- 2 => GatherMaskVector128(source, baseAddress, index, mask, 2),
- 4 => GatherMaskVector128(source, baseAddress, index, mask, 4),
- 8 => GatherMaskVector128(source, baseAddress, index, mask, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128i _mm_mask_i32gather_epi64 (__m128i src, __int64 const* base_addr, __m128i vindex, __m128i mask, const int scale)
- /// VPGATHERDQ xmm, vm32x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<ulong> GatherMaskVector128(Vector128<ulong> source, ulong* baseAddress, Vector128<int> index, Vector128<ulong> mask, byte scale)
- {
- return scale switch
- {
- 1 => GatherMaskVector128(source, baseAddress, index, mask, 1),
- 2 => GatherMaskVector128(source, baseAddress, index, mask, 2),
- 4 => GatherMaskVector128(source, baseAddress, index, mask, 4),
- 8 => GatherMaskVector128(source, baseAddress, index, mask, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128 _mm_mask_i32gather_ps (__m128 src, float const* base_addr, __m128i vindex, __m128 mask, const int scale)
- /// VGATHERDPS xmm, vm32x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<float> GatherMaskVector128(Vector128<float> source, float* baseAddress, Vector128<int> index, Vector128<float> mask, byte scale)
- {
- return scale switch
- {
- 1 => GatherMaskVector128(source, baseAddress, index, mask, 1),
- 2 => GatherMaskVector128(source, baseAddress, index, mask, 2),
- 4 => GatherMaskVector128(source, baseAddress, index, mask, 4),
- 8 => GatherMaskVector128(source, baseAddress, index, mask, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128d _mm_mask_i32gather_pd (__m128d src, double const* base_addr, __m128i vindex, __m128d mask, const int scale)
- /// VGATHERDPD xmm, vm32x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<double> GatherMaskVector128(Vector128<double> source, double* baseAddress, Vector128<int> index, Vector128<double> mask, byte scale)
- {
- return scale switch
- {
- 1 => GatherMaskVector128(source, baseAddress, index, mask, 1),
- 2 => GatherMaskVector128(source, baseAddress, index, mask, 2),
- 4 => GatherMaskVector128(source, baseAddress, index, mask, 4),
- 8 => GatherMaskVector128(source, baseAddress, index, mask, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128i _mm_mask_i64gather_epi32 (__m128i src, int const* base_addr, __m128i vindex, __m128i mask, const int scale)
- /// VPGATHERQD xmm, vm64x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<int> GatherMaskVector128(Vector128<int> source, int* baseAddress, Vector128<long> index, Vector128<int> mask, byte scale)
- {
- return scale switch
- {
- 1 => GatherMaskVector128(source, baseAddress, index, mask, 1),
- 2 => GatherMaskVector128(source, baseAddress, index, mask, 2),
- 4 => GatherMaskVector128(source, baseAddress, index, mask, 4),
- 8 => GatherMaskVector128(source, baseAddress, index, mask, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128i _mm_mask_i64gather_epi32 (__m128i src, int const* base_addr, __m128i vindex, __m128i mask, const int scale)
- /// VPGATHERQD xmm, vm64x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<uint> GatherMaskVector128(Vector128<uint> source, uint* baseAddress, Vector128<long> index, Vector128<uint> mask, byte scale)
- {
- return scale switch
- {
- 1 => GatherMaskVector128(source, baseAddress, index, mask, 1),
- 2 => GatherMaskVector128(source, baseAddress, index, mask, 2),
- 4 => GatherMaskVector128(source, baseAddress, index, mask, 4),
- 8 => GatherMaskVector128(source, baseAddress, index, mask, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128i _mm_mask_i64gather_epi64 (__m128i src, __int64 const* base_addr, __m128i vindex, __m128i mask, const int scale)
- /// VPGATHERQQ xmm, vm64x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<long> GatherMaskVector128(Vector128<long> source, long* baseAddress, Vector128<long> index, Vector128<long> mask, byte scale)
- {
- return scale switch
- {
- 1 => GatherMaskVector128(source, baseAddress, index, mask, 1),
- 2 => GatherMaskVector128(source, baseAddress, index, mask, 2),
- 4 => GatherMaskVector128(source, baseAddress, index, mask, 4),
- 8 => GatherMaskVector128(source, baseAddress, index, mask, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128i _mm_mask_i64gather_epi64 (__m128i src, __int64 const* base_addr, __m128i vindex, __m128i mask, const int scale)
- /// VPGATHERQQ xmm, vm64x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<ulong> GatherMaskVector128(Vector128<ulong> source, ulong* baseAddress, Vector128<long> index, Vector128<ulong> mask, byte scale)
- {
- return scale switch
- {
- 1 => GatherMaskVector128(source, baseAddress, index, mask, 1),
- 2 => GatherMaskVector128(source, baseAddress, index, mask, 2),
- 4 => GatherMaskVector128(source, baseAddress, index, mask, 4),
- 8 => GatherMaskVector128(source, baseAddress, index, mask, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128 _mm_mask_i64gather_ps (__m128 src, float const* base_addr, __m128i vindex, __m128 mask, const int scale)
- /// VGATHERQPS xmm, vm64x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<float> GatherMaskVector128(Vector128<float> source, float* baseAddress, Vector128<long> index, Vector128<float> mask, byte scale)
- {
- return scale switch
- {
- 1 => GatherMaskVector128(source, baseAddress, index, mask, 1),
- 2 => GatherMaskVector128(source, baseAddress, index, mask, 2),
- 4 => GatherMaskVector128(source, baseAddress, index, mask, 4),
- 8 => GatherMaskVector128(source, baseAddress, index, mask, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128d _mm_mask_i64gather_pd (__m128d src, double const* base_addr, __m128i vindex, __m128d mask, const int scale)
- /// VGATHERQPD xmm, vm64x, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<double> GatherMaskVector128(Vector128<double> source, double* baseAddress, Vector128<long> index, Vector128<double> mask, byte scale)
- {
- return scale switch
- {
- 1 => GatherMaskVector128(source, baseAddress, index, mask, 1),
- 2 => GatherMaskVector128(source, baseAddress, index, mask, 2),
- 4 => GatherMaskVector128(source, baseAddress, index, mask, 4),
- 8 => GatherMaskVector128(source, baseAddress, index, mask, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m256i _mm256_mask_i32gather_epi32 (__m256i src, int const* base_addr, __m256i vindex, __m256i mask, const int scale)
- /// VPGATHERDD ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<int> GatherMaskVector256(Vector256<int> source, int* baseAddress, Vector256<int> index, Vector256<int> mask, byte scale)
- {
- return scale switch
- {
- 1 => GatherMaskVector256(source, baseAddress, index, mask, 1),
- 2 => GatherMaskVector256(source, baseAddress, index, mask, 2),
- 4 => GatherMaskVector256(source, baseAddress, index, mask, 4),
- 8 => GatherMaskVector256(source, baseAddress, index, mask, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m256i _mm256_mask_i32gather_epi32 (__m256i src, int const* base_addr, __m256i vindex, __m256i mask, const int scale)
- /// VPGATHERDD ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<uint> GatherMaskVector256(Vector256<uint> source, uint* baseAddress, Vector256<int> index, Vector256<uint> mask, byte scale)
- {
- return scale switch
- {
- 1 => GatherMaskVector256(source, baseAddress, index, mask, 1),
- 2 => GatherMaskVector256(source, baseAddress, index, mask, 2),
- 4 => GatherMaskVector256(source, baseAddress, index, mask, 4),
- 8 => GatherMaskVector256(source, baseAddress, index, mask, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m256i _mm256_mask_i32gather_epi64 (__m256i src, __int64 const* base_addr, __m128i vindex, __m256i mask, const int scale)
- /// VPGATHERDQ ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<long> GatherMaskVector256(Vector256<long> source, long* baseAddress, Vector128<int> index, Vector256<long> mask, byte scale)
- {
- return scale switch
- {
- 1 => GatherMaskVector256(source, baseAddress, index, mask, 1),
- 2 => GatherMaskVector256(source, baseAddress, index, mask, 2),
- 4 => GatherMaskVector256(source, baseAddress, index, mask, 4),
- 8 => GatherMaskVector256(source, baseAddress, index, mask, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m256i _mm256_mask_i32gather_epi64 (__m256i src, __int64 const* base_addr, __m128i vindex, __m256i mask, const int scale)
- /// VPGATHERDQ ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<ulong> GatherMaskVector256(Vector256<ulong> source, ulong* baseAddress, Vector128<int> index, Vector256<ulong> mask, byte scale)
- {
- return scale switch
- {
- 1 => GatherMaskVector256(source, baseAddress, index, mask, 1),
- 2 => GatherMaskVector256(source, baseAddress, index, mask, 2),
- 4 => GatherMaskVector256(source, baseAddress, index, mask, 4),
- 8 => GatherMaskVector256(source, baseAddress, index, mask, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m256 _mm256_mask_i32gather_ps (__m256 src, float const* base_addr, __m256i vindex, __m256 mask, const int scale)
- /// VPGATHERDPS ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<float> GatherMaskVector256(Vector256<float> source, float* baseAddress, Vector256<int> index, Vector256<float> mask, byte scale)
- {
- return scale switch
- {
- 1 => GatherMaskVector256(source, baseAddress, index, mask, 1),
- 2 => GatherMaskVector256(source, baseAddress, index, mask, 2),
- 4 => GatherMaskVector256(source, baseAddress, index, mask, 4),
- 8 => GatherMaskVector256(source, baseAddress, index, mask, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m256d _mm256_mask_i32gather_pd (__m256d src, double const* base_addr, __m128i vindex, __m256d mask, const int scale)
- /// VPGATHERDPD ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<double> GatherMaskVector256(Vector256<double> source, double* baseAddress, Vector128<int> index, Vector256<double> mask, byte scale)
- {
- return scale switch
- {
- 1 => GatherMaskVector256(source, baseAddress, index, mask, 1),
- 2 => GatherMaskVector256(source, baseAddress, index, mask, 2),
- 4 => GatherMaskVector256(source, baseAddress, index, mask, 4),
- 8 => GatherMaskVector256(source, baseAddress, index, mask, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128i _mm256_mask_i64gather_epi32 (__m128i src, int const* base_addr, __m256i vindex, __m128i mask, const int scale)
- /// VPGATHERQD xmm, vm32y, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<int> GatherMaskVector128(Vector128<int> source, int* baseAddress, Vector256<long> index, Vector128<int> mask, byte scale)
- {
- return scale switch
- {
- 1 => GatherMaskVector128(source, baseAddress, index, mask, 1),
- 2 => GatherMaskVector128(source, baseAddress, index, mask, 2),
- 4 => GatherMaskVector128(source, baseAddress, index, mask, 4),
- 8 => GatherMaskVector128(source, baseAddress, index, mask, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128i _mm256_mask_i64gather_epi32 (__m128i src, int const* base_addr, __m256i vindex, __m128i mask, const int scale)
- /// VPGATHERQD xmm, vm32y, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<uint> GatherMaskVector128(Vector128<uint> source, uint* baseAddress, Vector256<long> index, Vector128<uint> mask, byte scale)
- {
- return scale switch
- {
- 1 => GatherMaskVector128(source, baseAddress, index, mask, 1),
- 2 => GatherMaskVector128(source, baseAddress, index, mask, 2),
- 4 => GatherMaskVector128(source, baseAddress, index, mask, 4),
- 8 => GatherMaskVector128(source, baseAddress, index, mask, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m256i _mm256_mask_i64gather_epi64 (__m256i src, __int64 const* base_addr, __m256i vindex, __m256i mask, const int scale)
- /// VPGATHERQQ ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<long> GatherMaskVector256(Vector256<long> source, long* baseAddress, Vector256<long> index, Vector256<long> mask, byte scale)
- {
- return scale switch
- {
- 1 => GatherMaskVector256(source, baseAddress, index, mask, 1),
- 2 => GatherMaskVector256(source, baseAddress, index, mask, 2),
- 4 => GatherMaskVector256(source, baseAddress, index, mask, 4),
- 8 => GatherMaskVector256(source, baseAddress, index, mask, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m256i _mm256_mask_i64gather_epi64 (__m256i src, __int64 const* base_addr, __m256i vindex, __m256i mask, const int scale)
- /// VPGATHERQQ ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<ulong> GatherMaskVector256(Vector256<ulong> source, ulong* baseAddress, Vector256<long> index, Vector256<ulong> mask, byte scale)
- {
- return scale switch
- {
- 1 => GatherMaskVector256(source, baseAddress, index, mask, 1),
- 2 => GatherMaskVector256(source, baseAddress, index, mask, 2),
- 4 => GatherMaskVector256(source, baseAddress, index, mask, 4),
- 8 => GatherMaskVector256(source, baseAddress, index, mask, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m128 _mm256_mask_i64gather_ps (__m128 src, float const* base_addr, __m256i vindex, __m128 mask, const int scale)
- /// VGATHERQPS xmm, vm32y, xmm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector128<float> GatherMaskVector128(Vector128<float> source, float* baseAddress, Vector256<long> index, Vector128<float> mask, byte scale)
- {
- return scale switch
- {
- 1 => GatherMaskVector128(source, baseAddress, index, mask, 1),
- 2 => GatherMaskVector128(source, baseAddress, index, mask, 2),
- 4 => GatherMaskVector128(source, baseAddress, index, mask, 4),
- 8 => GatherMaskVector128(source, baseAddress, index, mask, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
- /// <summary>
- /// __m256d _mm256_mask_i64gather_pd (__m256d src, double const* base_addr, __m256i vindex, __m256d mask, const int scale)
- /// VGATHERQPD ymm, vm32y, ymm
- /// The scale parameter should be 1, 2, 4 or 8, otherwise, ArgumentOutOfRangeException will be thrown.
- /// </summary>
- public static unsafe Vector256<double> GatherMaskVector256(Vector256<double> source, double* baseAddress, Vector256<long> index, Vector256<double> mask, byte scale)
- {
- return scale switch
- {
- 1 => GatherMaskVector256(source, baseAddress, index, mask, 1),
- 2 => GatherMaskVector256(source, baseAddress, index, mask, 2),
- 4 => GatherMaskVector256(source, baseAddress, index, mask, 4),
- 8 => GatherMaskVector256(source, baseAddress, index, mask, 8),
- _ => throw new ArgumentOutOfRangeException(nameof(scale)),
- };
- }
-
- /// <summary>
- /// __m256i _mm256_hadd_epi16 (__m256i a, __m256i b)
- /// VPHADDW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> HorizontalAdd(Vector256<short> left, Vector256<short> right) => HorizontalAdd(left, right);
- /// <summary>
- /// __m256i _mm256_hadd_epi32 (__m256i a, __m256i b)
- /// VPHADDD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> HorizontalAdd(Vector256<int> left, Vector256<int> right) => HorizontalAdd(left, right);
-
- /// <summary>
- /// __m256i _mm256_hadds_epi16 (__m256i a, __m256i b)
- /// VPHADDSW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> HorizontalAddSaturate(Vector256<short> left, Vector256<short> right) => HorizontalAddSaturate(left, right);
-
- /// <summary>
- /// __m256i _mm256_hsub_epi16 (__m256i a, __m256i b)
- /// VPHSUBW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> HorizontalSubtract(Vector256<short> left, Vector256<short> right) => HorizontalSubtract(left, right);
- /// <summary>
- /// __m256i _mm256_hsub_epi32 (__m256i a, __m256i b)
- /// VPHSUBD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> HorizontalSubtract(Vector256<int> left, Vector256<int> right) => HorizontalSubtract(left, right);
-
- /// <summary>
- /// __m256i _mm256_hsubs_epi16 (__m256i a, __m256i b)
- /// VPHSUBSW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> HorizontalSubtractSaturate(Vector256<short> left, Vector256<short> right) => HorizontalSubtractSaturate(left, right);
-
- /// <summary>
- /// __m256i _mm256_inserti128_si256 (__m256i a, __m128i b, const int imm8)
- /// VINSERTI128 ymm, ymm, xmm, imm8
- /// </summary>
- public static new Vector256<sbyte> InsertVector128(Vector256<sbyte> value, Vector128<sbyte> data, byte index) => InsertVector128(value, data, index);
-
- /// <summary>
- /// __m256i _mm256_inserti128_si256 (__m256i a, __m128i b, const int imm8)
- /// VINSERTI128 ymm, ymm, xmm, imm8
- /// </summary>
- public static new Vector256<byte> InsertVector128(Vector256<byte> value, Vector128<byte> data, byte index) => InsertVector128(value, data, index);
-
- /// <summary>
- /// __m256i _mm256_inserti128_si256 (__m256i a, __m128i b, const int imm8)
- /// VINSERTI128 ymm, ymm, xmm, imm8
- /// </summary>
- public static new Vector256<short> InsertVector128(Vector256<short> value, Vector128<short> data, byte index) => InsertVector128(value, data, index);
-
- /// <summary>
- /// __m256i _mm256_inserti128_si256 (__m256i a, __m128i b, const int imm8)
- /// VINSERTI128 ymm, ymm, xmm, imm8
- /// </summary>
- public static new Vector256<ushort> InsertVector128(Vector256<ushort> value, Vector128<ushort> data, byte index) => InsertVector128(value, data, index);
-
- /// <summary>
- /// __m256i _mm256_inserti128_si256 (__m256i a, __m128i b, const int imm8)
- /// VINSERTI128 ymm, ymm, xmm, imm8
- /// </summary>
- public static new Vector256<int> InsertVector128(Vector256<int> value, Vector128<int> data, byte index) => InsertVector128(value, data, index);
-
- /// <summary>
- /// __m256i _mm256_inserti128_si256 (__m256i a, __m128i b, const int imm8)
- /// VINSERTI128 ymm, ymm, xmm, imm8
- /// </summary>
- public static new Vector256<uint> InsertVector128(Vector256<uint> value, Vector128<uint> data, byte index) => InsertVector128(value, data, index);
-
- /// <summary>
- /// __m256i _mm256_inserti128_si256 (__m256i a, __m128i b, const int imm8)
- /// VINSERTI128 ymm, ymm, xmm, imm8
- /// </summary>
- public static new Vector256<long> InsertVector128(Vector256<long> value, Vector128<long> data, byte index) => InsertVector128(value, data, index);
-
- /// <summary>
- /// __m256i _mm256_inserti128_si256 (__m256i a, __m128i b, const int imm8)
- /// VINSERTI128 ymm, ymm, xmm, imm8
- /// </summary>
- public static new Vector256<ulong> InsertVector128(Vector256<ulong> value, Vector128<ulong> data, byte index) => InsertVector128(value, data, index);
-
- /// <summary>
- /// __m256i _mm256_stream_load_si256 (__m256i const* mem_addr)
- /// VMOVNTDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<sbyte> LoadAlignedVector256NonTemporal(sbyte* address) => LoadAlignedVector256NonTemporal(address);
- /// <summary>
- /// __m256i _mm256_stream_load_si256 (__m256i const* mem_addr)
- /// VMOVNTDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<byte> LoadAlignedVector256NonTemporal(byte* address) => LoadAlignedVector256NonTemporal(address);
- /// <summary>
- /// __m256i _mm256_stream_load_si256 (__m256i const* mem_addr)
- /// VMOVNTDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<short> LoadAlignedVector256NonTemporal(short* address) => LoadAlignedVector256NonTemporal(address);
- /// <summary>
- /// __m256i _mm256_stream_load_si256 (__m256i const* mem_addr)
- /// VMOVNTDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<ushort> LoadAlignedVector256NonTemporal(ushort* address) => LoadAlignedVector256NonTemporal(address);
- /// <summary>
- /// __m256i _mm256_stream_load_si256 (__m256i const* mem_addr)
- /// VMOVNTDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<int> LoadAlignedVector256NonTemporal(int* address) => LoadAlignedVector256NonTemporal(address);
- /// <summary>
- /// __m256i _mm256_stream_load_si256 (__m256i const* mem_addr)
- /// VMOVNTDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<uint> LoadAlignedVector256NonTemporal(uint* address) => LoadAlignedVector256NonTemporal(address);
- /// <summary>
- /// __m256i _mm256_stream_load_si256 (__m256i const* mem_addr)
- /// VMOVNTDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<long> LoadAlignedVector256NonTemporal(long* address) => LoadAlignedVector256NonTemporal(address);
- /// <summary>
- /// __m256i _mm256_stream_load_si256 (__m256i const* mem_addr)
- /// VMOVNTDQA ymm, m256
- /// </summary>
- public static unsafe Vector256<ulong> LoadAlignedVector256NonTemporal(ulong* address) => LoadAlignedVector256NonTemporal(address);
-
- /// <summary>
- /// __m128i _mm_maskload_epi32 (int const* mem_addr, __m128i mask)
- /// VPMASKMOVD xmm, xmm, m128
- /// </summary>
- public static unsafe Vector128<int> MaskLoad(int* address, Vector128<int> mask) => MaskLoad(address, mask);
- /// <summary>
- /// __m128i _mm_maskload_epi32 (int const* mem_addr, __m128i mask)
- /// VPMASKMOVD xmm, xmm, m128
- /// </summary>
- public static unsafe Vector128<uint> MaskLoad(uint* address, Vector128<uint> mask) => MaskLoad(address, mask);
- /// <summary>
- /// __m128i _mm_maskload_epi64 (__int64 const* mem_addr, __m128i mask)
- /// VPMASKMOVQ xmm, xmm, m128
- /// </summary>
- public static unsafe Vector128<long> MaskLoad(long* address, Vector128<long> mask) => MaskLoad(address, mask);
- /// <summary>
- /// __m128i _mm_maskload_epi64 (__int64 const* mem_addr, __m128i mask)
- /// VPMASKMOVQ xmm, xmm, m128
- /// </summary>
- public static unsafe Vector128<ulong> MaskLoad(ulong* address, Vector128<ulong> mask) => MaskLoad(address, mask);
-
- /// <summary>
- /// __m256i _mm256_maskload_epi32 (int const* mem_addr, __m256i mask)
- /// VPMASKMOVD ymm, ymm, m256
- /// </summary>
- public static unsafe Vector256<int> MaskLoad(int* address, Vector256<int> mask) => MaskLoad(address, mask);
- /// <summary>
- /// __m256i _mm256_maskload_epi32 (int const* mem_addr, __m256i mask)
- /// VPMASKMOVD ymm, ymm, m256
- /// </summary>
- public static unsafe Vector256<uint> MaskLoad(uint* address, Vector256<uint> mask) => MaskLoad(address, mask);
- /// <summary>
- /// __m256i _mm256_maskload_epi64 (__int64 const* mem_addr, __m256i mask)
- /// VPMASKMOVQ ymm, ymm, m256
- /// </summary>
- public static unsafe Vector256<long> MaskLoad(long* address, Vector256<long> mask) => MaskLoad(address, mask);
- /// <summary>
- /// __m256i _mm256_maskload_epi64 (__int64 const* mem_addr, __m256i mask)
- /// VPMASKMOVQ ymm, ymm, m256
- /// </summary>
- public static unsafe Vector256<ulong> MaskLoad(ulong* address, Vector256<ulong> mask) => MaskLoad(address, mask);
-
- /// <summary>
- /// void _mm_maskstore_epi32 (int* mem_addr, __m128i mask, __m128i a)
- /// VPMASKMOVD m128, xmm, xmm
- /// </summary>
- public static unsafe void MaskStore(int* address, Vector128<int> mask, Vector128<int> source) => MaskStore(address, mask, source);
- /// <summary>
- /// void _mm_maskstore_epi32 (int* mem_addr, __m128i mask, __m128i a)
- /// VPMASKMOVD m128, xmm, xmm
- /// </summary>
- public static unsafe void MaskStore(uint* address, Vector128<uint> mask, Vector128<uint> source) => MaskStore(address, mask, source);
- /// <summary>
- /// void _mm_maskstore_epi64 (__int64* mem_addr, __m128i mask, __m128i a)
- /// VPMASKMOVQ m128, xmm, xmm
- /// </summary>
- public static unsafe void MaskStore(long* address, Vector128<long> mask, Vector128<long> source) => MaskStore(address, mask, source);
- /// <summary>
- /// void _mm_maskstore_epi64 (__int64* mem_addr, __m128i mask, __m128i a)
- /// VPMASKMOVQ m128, xmm, xmm
- /// </summary>
- public static unsafe void MaskStore(ulong* address, Vector128<ulong> mask, Vector128<ulong> source) => MaskStore(address, mask, source);
-
- /// <summary>
- /// void _mm256_maskstore_epi32 (int* mem_addr, __m256i mask, __m256i a)
- /// VPMASKMOVD m256, ymm, ymm
- /// </summary>
- public static unsafe void MaskStore(int* address, Vector256<int> mask, Vector256<int> source) => MaskStore(address, mask, source);
- /// <summary>
- /// void _mm256_maskstore_epi32 (int* mem_addr, __m256i mask, __m256i a)
- /// VPMASKMOVD m256, ymm, ymm
- /// </summary>
- public static unsafe void MaskStore(uint* address, Vector256<uint> mask, Vector256<uint> source) => MaskStore(address, mask, source);
- /// <summary>
- /// void _mm256_maskstore_epi64 (__int64* mem_addr, __m256i mask, __m256i a)
- /// VPMASKMOVQ m256, ymm, ymm
- /// </summary>
- public static unsafe void MaskStore(long* address, Vector256<long> mask, Vector256<long> source) => MaskStore(address, mask, source);
- /// <summary>
- /// void _mm256_maskstore_epi64 (__int64* mem_addr, __m256i mask, __m256i a)
- /// VPMASKMOVQ m256, ymm, ymm
- /// </summary>
- public static unsafe void MaskStore(ulong* address, Vector256<ulong> mask, Vector256<ulong> source) => MaskStore(address, mask, source);
-
- /// <summary>
- /// __m256i _mm256_madd_epi16 (__m256i a, __m256i b)
- /// VPMADDWD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> MultiplyAddAdjacent(Vector256<short> left, Vector256<short> right) => MultiplyAddAdjacent(left, right);
-
- /// <summary>
- /// __m256i _mm256_maddubs_epi16 (__m256i a, __m256i b)
- /// VPMADDUBSW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> MultiplyAddAdjacent(Vector256<byte> left, Vector256<sbyte> right) => MultiplyAddAdjacent(left, right);
-
- /// <summary>
- /// __m256i _mm256_max_epi8 (__m256i a, __m256i b)
- /// VPMAXSB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> Max(Vector256<sbyte> left, Vector256<sbyte> right) => Max(left, right);
- /// <summary>
- /// __m256i _mm256_max_epu8 (__m256i a, __m256i b)
- /// VPMAXUB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> Max(Vector256<byte> left, Vector256<byte> right) => Max(left, right);
- /// <summary>
- /// __m256i _mm256_max_epi16 (__m256i a, __m256i b)
- /// VPMAXSW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> Max(Vector256<short> left, Vector256<short> right) => Max(left, right);
- /// <summary>
- /// __m256i _mm256_max_epu16 (__m256i a, __m256i b)
- /// VPMAXUW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> Max(Vector256<ushort> left, Vector256<ushort> right) => Max(left, right);
- /// <summary>
- /// __m256i _mm256_max_epi32 (__m256i a, __m256i b)
- /// VPMAXSD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> Max(Vector256<int> left, Vector256<int> right) => Max(left, right);
- /// <summary>
- /// __m256i _mm256_max_epu32 (__m256i a, __m256i b)
- /// VPMAXUD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> Max(Vector256<uint> left, Vector256<uint> right) => Max(left, right);
-
- /// <summary>
- /// __m256i _mm256_min_epi8 (__m256i a, __m256i b)
- /// VPMINSB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> Min(Vector256<sbyte> left, Vector256<sbyte> right) => Min(left, right);
- /// <summary>
- /// __m256i _mm256_min_epu8 (__m256i a, __m256i b)
- /// VPMINUB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> Min(Vector256<byte> left, Vector256<byte> right) => Min(left, right);
- /// <summary>
- /// __m256i _mm256_min_epi16 (__m256i a, __m256i b)
- /// VPMINSW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> Min(Vector256<short> left, Vector256<short> right) => Min(left, right);
- /// <summary>
- /// __m256i _mm256_min_epu16 (__m256i a, __m256i b)
- /// VPMINUW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> Min(Vector256<ushort> left, Vector256<ushort> right) => Min(left, right);
- /// <summary>
- /// __m256i _mm256_min_epi32 (__m256i a, __m256i b)
- /// VPMINSD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> Min(Vector256<int> left, Vector256<int> right) => Min(left, right);
- /// <summary>
- /// __m256i _mm256_min_epu32 (__m256i a, __m256i b)
- /// VPMINUD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> Min(Vector256<uint> left, Vector256<uint> right) => Min(left, right);
-
- /// <summary>
- /// int _mm256_movemask_epi8 (__m256i a)
- /// VPMOVMSKB reg, ymm
- /// </summary>
- public static int MoveMask(Vector256<sbyte> value) => MoveMask(value);
- /// <summary>
- /// int _mm256_movemask_epi8 (__m256i a)
- /// VPMOVMSKB reg, ymm
- /// </summary>
- public static int MoveMask(Vector256<byte> value) => MoveMask(value);
-
- /// <summary>
- /// __m256i _mm256_mpsadbw_epu8 (__m256i a, __m256i b, const int imm8)
- /// VMPSADBW ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<ushort> MultipleSumAbsoluteDifferences(Vector256<byte> left, Vector256<byte> right, byte mask) => MultipleSumAbsoluteDifferences(left, right, mask);
-
- /// <summary>
- /// __m256i _mm256_mul_epi32 (__m256i a, __m256i b)
- /// VPMULDQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> Multiply(Vector256<int> left, Vector256<int> right) => Multiply(left, right);
- /// <summary>
- /// __m256i _mm256_mul_epu32 (__m256i a, __m256i b)
- /// VPMULUDQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ulong> Multiply(Vector256<uint> left, Vector256<uint> right) => Multiply(left, right);
-
- /// <summary>
- /// __m256i _mm256_mulhi_epi16 (__m256i a, __m256i b)
- /// VPMULHW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> MultiplyHigh(Vector256<short> left, Vector256<short> right) => MultiplyHigh(left, right);
- /// <summary>
- /// __m256i _mm256_mulhi_epu16 (__m256i a, __m256i b)
- /// VPMULHUW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> MultiplyHigh(Vector256<ushort> left, Vector256<ushort> right) => MultiplyHigh(left, right);
-
- /// <summary>
- /// __m256i _mm256_mulhrs_epi16 (__m256i a, __m256i b)
- /// VPMULHRSW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> MultiplyHighRoundScale(Vector256<short> left, Vector256<short> right) => MultiplyHighRoundScale(left, right);
-
- /// <summary>
- /// __m256i _mm256_mullo_epi16 (__m256i a, __m256i b)
- /// VPMULLW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> MultiplyLow(Vector256<short> left, Vector256<short> right) => MultiplyLow(left, right);
- /// <summary>
- /// __m256i _mm256_mullo_epi16 (__m256i a, __m256i b)
- /// VPMULLW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> MultiplyLow(Vector256<ushort> left, Vector256<ushort> right) => MultiplyLow(left, right);
-
- /// <summary>
- /// __m256i _mm256_mullo_epi32 (__m256i a, __m256i b)
- /// VPMULLD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> MultiplyLow(Vector256<int> left, Vector256<int> right) => MultiplyLow(left, right);
- /// <summary>
- /// __m256i _mm256_mullo_epi32 (__m256i a, __m256i b)
- /// VPMULLD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> MultiplyLow(Vector256<uint> left, Vector256<uint> right) => MultiplyLow(left, right);
-
- /// <summary>
- /// __m256i _mm256_or_si256 (__m256i a, __m256i b)
- /// VPOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> Or(Vector256<sbyte> left, Vector256<sbyte> right) => Or(left, right);
- /// <summary>
- /// __m256i _mm256_or_si256 (__m256i a, __m256i b)
- /// VPOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> Or(Vector256<byte> left, Vector256<byte> right) => Or(left, right);
- /// <summary>
- /// __m256i _mm256_or_si256 (__m256i a, __m256i b)
- /// VPOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> Or(Vector256<short> left, Vector256<short> right) => Or(left, right);
- /// <summary>
- /// __m256i _mm256_or_si256 (__m256i a, __m256i b)
- /// VPOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> Or(Vector256<ushort> left, Vector256<ushort> right) => Or(left, right);
- /// <summary>
- /// __m256i _mm256_or_si256 (__m256i a, __m256i b)
- /// VPOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> Or(Vector256<int> left, Vector256<int> right) => Or(left, right);
- /// <summary>
- /// __m256i _mm256_or_si256 (__m256i a, __m256i b)
- /// VPOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> Or(Vector256<uint> left, Vector256<uint> right) => Or(left, right);
- /// <summary>
- /// __m256i _mm256_or_si256 (__m256i a, __m256i b)
- /// VPOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> Or(Vector256<long> left, Vector256<long> right) => Or(left, right);
- /// <summary>
- /// __m256i _mm256_or_si256 (__m256i a, __m256i b)
- /// VPOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ulong> Or(Vector256<ulong> left, Vector256<ulong> right) => Or(left, right);
-
- /// <summary>
- /// __m256i _mm256_packs_epi16 (__m256i a, __m256i b)
- /// VPACKSSWB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> PackSignedSaturate(Vector256<short> left, Vector256<short> right) => PackSignedSaturate(left, right);
- /// <summary>
- /// __m256i _mm256_packs_epi32 (__m256i a, __m256i b)
- /// VPACKSSDW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> PackSignedSaturate(Vector256<int> left, Vector256<int> right) => PackSignedSaturate(left, right);
- /// <summary>
- /// __m256i _mm256_packus_epi16 (__m256i a, __m256i b)
- /// VPACKUSWB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> PackUnsignedSaturate(Vector256<short> left, Vector256<short> right) => PackUnsignedSaturate(left, right);
- /// <summary>
- /// __m256i _mm256_packus_epi32 (__m256i a, __m256i b)
- /// VPACKUSDW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> PackUnsignedSaturate(Vector256<int> left, Vector256<int> right) => PackUnsignedSaturate(left, right);
-
- /// <summary>
- /// __m256i _mm256_permute2x128_si256 (__m256i a, __m256i b, const int imm8)
- /// VPERM2I128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static new Vector256<sbyte> Permute2x128(Vector256<sbyte> left, Vector256<sbyte> right, byte control) => Permute2x128(left, right, control);
- /// <summary>
- /// __m256i _mm256_permute2x128_si256 (__m256i a, __m256i b, const int imm8)
- /// VPERM2I128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static new Vector256<byte> Permute2x128(Vector256<byte> left, Vector256<byte> right, byte control) => Permute2x128(left, right, control);
- /// <summary>
- /// __m256i _mm256_permute2x128_si256 (__m256i a, __m256i b, const int imm8)
- /// VPERM2I128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static new Vector256<short> Permute2x128(Vector256<short> left, Vector256<short> right, byte control) => Permute2x128(left, right, control);
- /// <summary>
- /// __m256i _mm256_permute2x128_si256 (__m256i a, __m256i b, const int imm8)
- /// VPERM2I128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static new Vector256<ushort> Permute2x128(Vector256<ushort> left, Vector256<ushort> right, byte control) => Permute2x128(left, right, control);
- /// <summary>
- /// __m256i _mm256_permute2x128_si256 (__m256i a, __m256i b, const int imm8)
- /// VPERM2I128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static new Vector256<int> Permute2x128(Vector256<int> left, Vector256<int> right, byte control) => Permute2x128(left, right, control);
- /// <summary>
- /// __m256i _mm256_permute2x128_si256 (__m256i a, __m256i b, const int imm8)
- /// VPERM2I128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static new Vector256<uint> Permute2x128(Vector256<uint> left, Vector256<uint> right, byte control) => Permute2x128(left, right, control);
- /// <summary>
- /// __m256i _mm256_permute2x128_si256 (__m256i a, __m256i b, const int imm8)
- /// VPERM2I128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static new Vector256<long> Permute2x128(Vector256<long> left, Vector256<long> right, byte control) => Permute2x128(left, right, control);
- /// <summary>
- /// __m256i _mm256_permute2x128_si256 (__m256i a, __m256i b, const int imm8)
- /// VPERM2I128 ymm, ymm, ymm/m256, imm8
- /// </summary>
- public static new Vector256<ulong> Permute2x128(Vector256<ulong> left, Vector256<ulong> right, byte control) => Permute2x128(left, right, control);
-
- /// <summary>
- /// __m256i _mm256_permute4x64_epi64 (__m256i a, const int imm8)
- /// VPERMQ ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<long> Permute4x64(Vector256<long> value, byte control) => Permute4x64(value, control);
- /// <summary>
- /// __m256i _mm256_permute4x64_epi64 (__m256i a, const int imm8)
- /// VPERMQ ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<ulong> Permute4x64(Vector256<ulong> value, byte control) => Permute4x64(value, control);
- /// <summary>
- /// __m256d _mm256_permute4x64_pd (__m256d a, const int imm8)
- /// VPERMPD ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<double> Permute4x64(Vector256<double> value, byte control) => Permute4x64(value, control);
-
- /// <summary>
- /// __m256i _mm256_permutevar8x32_epi32 (__m256i a, __m256i idx)
- /// VPERMD ymm, ymm/m256, ymm
- /// </summary>
- public static Vector256<int> PermuteVar8x32(Vector256<int> left, Vector256<int> control) => PermuteVar8x32(left, control);
- /// <summary>
- /// __m256i _mm256_permutevar8x32_epi32 (__m256i a, __m256i idx)
- /// VPERMD ymm, ymm/m256, ymm
- /// </summary>
- public static Vector256<uint> PermuteVar8x32(Vector256<uint> left, Vector256<uint> control) => PermuteVar8x32(left, control);
- /// <summary>
- /// __m256 _mm256_permutevar8x32_ps (__m256 a, __m256i idx)
- /// VPERMPS ymm, ymm/m256, ymm
- /// </summary>
- public static Vector256<float> PermuteVar8x32(Vector256<float> left, Vector256<int> control) => PermuteVar8x32(left, control);
-
- /// <summary>
- /// __m256i _mm256_sll_epi16 (__m256i a, __m128i count)
- /// VPSLLW ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<short> ShiftLeftLogical(Vector256<short> value, Vector128<short> count) => ShiftLeftLogical(value, count);
- /// <summary>
- /// __m256i _mm256_sll_epi16 (__m256i a, __m128i count)
- /// VPSLLW ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<ushort> ShiftLeftLogical(Vector256<ushort> value, Vector128<ushort> count) => ShiftLeftLogical(value, count);
- /// <summary>
- /// __m256i _mm256_sll_epi32 (__m256i a, __m128i count)
- /// VPSLLD ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<int> ShiftLeftLogical(Vector256<int> value, Vector128<int> count) => ShiftLeftLogical(value, count);
- /// <summary>
- /// __m256i _mm256_sll_epi32 (__m256i a, __m128i count)
- /// VPSLLD ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<uint> ShiftLeftLogical(Vector256<uint> value, Vector128<uint> count) => ShiftLeftLogical(value, count);
- /// <summary>
- /// __m256i _mm256_sll_epi64 (__m256i a, __m128i count)
- /// VPSLLQ ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<long> ShiftLeftLogical(Vector256<long> value, Vector128<long> count) => ShiftLeftLogical(value, count);
- /// <summary>
- /// __m256i _mm256_sll_epi64 (__m256i a, __m128i count)
- /// VPSLLQ ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<ulong> ShiftLeftLogical(Vector256<ulong> value, Vector128<ulong> count) => ShiftLeftLogical(value, count);
-
- /// <summary>
- /// __m256i _mm256_slli_epi16 (__m256i a, int imm8)
- /// VPSLLW ymm, ymm, imm8
- /// </summary>
- public static Vector256<short> ShiftLeftLogical(Vector256<short> value, byte count) => ShiftLeftLogical(value, count);
- /// <summary>
- /// __m256i _mm256_slli_epi16 (__m256i a, int imm8)
- /// VPSLLW ymm, ymm, imm8
- /// </summary>
- public static Vector256<ushort> ShiftLeftLogical(Vector256<ushort> value, byte count) => ShiftLeftLogical(value, count);
- /// <summary>
- /// __m256i _mm256_slli_epi32 (__m256i a, int imm8)
- /// VPSLLD ymm, ymm, imm8
- /// </summary>
- public static Vector256<int> ShiftLeftLogical(Vector256<int> value, byte count) => ShiftLeftLogical(value, count);
- /// <summary>
- /// __m256i _mm256_slli_epi32 (__m256i a, int imm8)
- /// VPSLLD ymm, ymm, imm8
- /// </summary>
- public static Vector256<uint> ShiftLeftLogical(Vector256<uint> value, byte count) => ShiftLeftLogical(value, count);
- /// <summary>
- /// __m256i _mm256_slli_epi64 (__m256i a, int imm8)
- /// VPSLLQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<long> ShiftLeftLogical(Vector256<long> value, byte count) => ShiftLeftLogical(value, count);
- /// <summary>
- /// __m256i _mm256_slli_epi64 (__m256i a, int imm8)
- /// VPSLLQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<ulong> ShiftLeftLogical(Vector256<ulong> value, byte count) => ShiftLeftLogical(value, count);
-
- /// <summary>
- /// __m256i _mm256_bslli_epi128 (__m256i a, const int imm8)
- /// VPSLLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<sbyte> ShiftLeftLogical128BitLane(Vector256<sbyte> value, byte numBytes) => ShiftLeftLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m256i _mm256_bslli_epi128 (__m256i a, const int imm8)
- /// VPSLLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<byte> ShiftLeftLogical128BitLane(Vector256<byte> value, byte numBytes) => ShiftLeftLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m256i _mm256_bslli_epi128 (__m256i a, const int imm8)
- /// VPSLLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<short> ShiftLeftLogical128BitLane(Vector256<short> value, byte numBytes) => ShiftLeftLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m256i _mm256_bslli_epi128 (__m256i a, const int imm8)
- /// VPSLLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<ushort> ShiftLeftLogical128BitLane(Vector256<ushort> value, byte numBytes) => ShiftLeftLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m256i _mm256_bslli_epi128 (__m256i a, const int imm8)
- /// VPSLLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<int> ShiftLeftLogical128BitLane(Vector256<int> value, byte numBytes) => ShiftLeftLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m256i _mm256_bslli_epi128 (__m256i a, const int imm8)
- /// VPSLLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<uint> ShiftLeftLogical128BitLane(Vector256<uint> value, byte numBytes) => ShiftLeftLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m256i _mm256_bslli_epi128 (__m256i a, const int imm8)
- /// VPSLLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<long> ShiftLeftLogical128BitLane(Vector256<long> value, byte numBytes) => ShiftLeftLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m256i _mm256_bslli_epi128 (__m256i a, const int imm8)
- /// VPSLLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<ulong> ShiftLeftLogical128BitLane(Vector256<ulong> value, byte numBytes) => ShiftLeftLogical128BitLane(value, numBytes);
-
- /// <summary>
- /// __m256i _mm256_sllv_epi32 (__m256i a, __m256i count)
- /// VPSLLVD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> ShiftLeftLogicalVariable(Vector256<int> value, Vector256<uint> count) => ShiftLeftLogicalVariable(value, count);
- /// <summary>
- /// __m256i _mm256_sllv_epi32 (__m256i a, __m256i count)
- /// VPSLLVD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> ShiftLeftLogicalVariable(Vector256<uint> value, Vector256<uint> count) => ShiftLeftLogicalVariable(value, count);
- /// <summary>
- /// __m256i _mm256_sllv_epi64 (__m256i a, __m256i count)
- /// VPSLLVQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> ShiftLeftLogicalVariable(Vector256<long> value, Vector256<ulong> count) => ShiftLeftLogicalVariable(value, count);
- /// <summary>
- /// __m256i _mm256_sllv_epi64 (__m256i a, __m256i count)
- /// VPSLLVQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ulong> ShiftLeftLogicalVariable(Vector256<ulong> value, Vector256<ulong> count) => ShiftLeftLogicalVariable(value, count);
-
- /// <summary>
- /// __m128i _mm_sllv_epi32 (__m128i a, __m128i count)
- /// VPSLLVD xmm, ymm, xmm/m128
- /// </summary>
- public static Vector128<int> ShiftLeftLogicalVariable(Vector128<int> value, Vector128<uint> count) => ShiftLeftLogicalVariable(value, count);
- /// <summary>
- /// __m128i _mm_sllv_epi32 (__m128i a, __m128i count)
- /// VPSLLVD xmm, ymm, xmm/m128
- /// </summary>
- public static Vector128<uint> ShiftLeftLogicalVariable(Vector128<uint> value, Vector128<uint> count) => ShiftLeftLogicalVariable(value, count);
- /// <summary>
- /// __m128i _mm_sllv_epi64 (__m128i a, __m128i count)
- /// VPSLLVQ xmm, ymm, xmm/m128
- /// </summary>
- public static Vector128<long> ShiftLeftLogicalVariable(Vector128<long> value, Vector128<ulong> count) => ShiftLeftLogicalVariable(value, count);
- /// <summary>
- /// __m128i _mm_sllv_epi64 (__m128i a, __m128i count)
- /// VPSLLVQ xmm, ymm, xmm/m128
- /// </summary>
- public static Vector128<ulong> ShiftLeftLogicalVariable(Vector128<ulong> value, Vector128<ulong> count) => ShiftLeftLogicalVariable(value, count);
-
- /// <summary>
- /// _mm256_sra_epi16 (__m256i a, __m128i count)
- /// VPSRAW ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<short> ShiftRightArithmetic(Vector256<short> value, Vector128<short> count) => ShiftRightArithmetic(value, count);
- /// <summary>
- /// _mm256_sra_epi32 (__m256i a, __m128i count)
- /// VPSRAD ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<int> ShiftRightArithmetic(Vector256<int> value, Vector128<int> count) => ShiftRightArithmetic(value, count);
-
- /// <summary>
- /// __m256i _mm256_srai_epi16 (__m256i a, int imm8)
- /// VPSRAW ymm, ymm, imm8
- /// </summary>
- public static Vector256<short> ShiftRightArithmetic(Vector256<short> value, byte count) => ShiftRightArithmetic(value, count);
- /// <summary>
- /// __m256i _mm256_srai_epi32 (__m256i a, int imm8)
- /// VPSRAD ymm, ymm, imm8
- /// </summary>
- public static Vector256<int> ShiftRightArithmetic(Vector256<int> value, byte count) => ShiftRightArithmetic(value, count);
-
- /// <summary>
- /// __m256i _mm256_srav_epi32 (__m256i a, __m256i count)
- /// VPSRAVD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> ShiftRightArithmeticVariable(Vector256<int> value, Vector256<uint> count) => ShiftRightArithmeticVariable(value, count);
-
- /// <summary>
- /// __m128i _mm_srav_epi32 (__m128i a, __m128i count)
- /// VPSRAVD xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<int> ShiftRightArithmeticVariable(Vector128<int> value, Vector128<uint> count) => ShiftRightArithmeticVariable(value, count);
-
- /// <summary>
- /// __m256i _mm256_srl_epi16 (__m256i a, __m128i count)
- /// VPSRLW ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<short> ShiftRightLogical(Vector256<short> value, Vector128<short> count) => ShiftRightLogical(value, count);
- /// <summary>
- /// __m256i _mm256_srl_epi16 (__m256i a, __m128i count)
- /// VPSRLW ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<ushort> ShiftRightLogical(Vector256<ushort> value, Vector128<ushort> count) => ShiftRightLogical(value, count);
- /// <summary>
- /// __m256i _mm256_srl_epi32 (__m256i a, __m128i count)
- /// VPSRLD ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<int> ShiftRightLogical(Vector256<int> value, Vector128<int> count) => ShiftRightLogical(value, count);
- /// <summary>
- /// __m256i _mm256_srl_epi32 (__m256i a, __m128i count)
- /// VPSRLD ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<uint> ShiftRightLogical(Vector256<uint> value, Vector128<uint> count) => ShiftRightLogical(value, count);
- /// <summary>
- /// __m256i _mm256_srl_epi64 (__m256i a, __m128i count)
- /// VPSRLQ ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<long> ShiftRightLogical(Vector256<long> value, Vector128<long> count) => ShiftRightLogical(value, count);
- /// <summary>
- /// __m256i _mm256_srl_epi64 (__m256i a, __m128i count)
- /// VPSRLQ ymm, ymm, xmm/m128
- /// </summary>
- public static Vector256<ulong> ShiftRightLogical(Vector256<ulong> value, Vector128<ulong> count) => ShiftRightLogical(value, count);
-
- /// <summary>
- /// __m256i _mm256_srli_epi16 (__m256i a, int imm8)
- /// VPSRLW ymm, ymm, imm8
- /// </summary>
- public static Vector256<short> ShiftRightLogical(Vector256<short> value, byte count) => ShiftRightLogical(value, count);
- /// <summary>
- /// __m256i _mm256_srli_epi16 (__m256i a, int imm8)
- /// VPSRLW ymm, ymm, imm8
- /// </summary>
- public static Vector256<ushort> ShiftRightLogical(Vector256<ushort> value, byte count) => ShiftRightLogical(value, count);
- /// <summary>
- /// __m256i _mm256_srli_epi32 (__m256i a, int imm8)
- /// VPSRLD ymm, ymm, imm8
- /// </summary>
- public static Vector256<int> ShiftRightLogical(Vector256<int> value, byte count) => ShiftRightLogical(value, count);
- /// <summary>
- /// __m256i _mm256_srli_epi32 (__m256i a, int imm8)
- /// VPSRLD ymm, ymm, imm8
- /// </summary>
- public static Vector256<uint> ShiftRightLogical(Vector256<uint> value, byte count) => ShiftRightLogical(value, count);
- /// <summary>
- /// __m256i _mm256_srli_epi64 (__m256i a, int imm8)
- /// VPSRLQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<long> ShiftRightLogical(Vector256<long> value, byte count) => ShiftRightLogical(value, count);
- /// <summary>
- /// __m256i _mm256_srli_epi64 (__m256i a, int imm8)
- /// VPSRLQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<ulong> ShiftRightLogical(Vector256<ulong> value, byte count) => ShiftRightLogical(value, count);
-
- /// <summary>
- /// __m256i _mm256_bsrli_epi128 (__m256i a, const int imm8)
- /// VPSRLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<sbyte> ShiftRightLogical128BitLane(Vector256<sbyte> value, byte numBytes) => ShiftRightLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m256i _mm256_bsrli_epi128 (__m256i a, const int imm8)
- /// VPSRLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<byte> ShiftRightLogical128BitLane(Vector256<byte> value, byte numBytes) => ShiftRightLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m256i _mm256_bsrli_epi128 (__m256i a, const int imm8)
- /// VPSRLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<short> ShiftRightLogical128BitLane(Vector256<short> value, byte numBytes) => ShiftRightLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m256i _mm256_bsrli_epi128 (__m256i a, const int imm8)
- /// VPSRLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<ushort> ShiftRightLogical128BitLane(Vector256<ushort> value, byte numBytes) => ShiftRightLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m256i _mm256_bsrli_epi128 (__m256i a, const int imm8)
- /// VPSRLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<int> ShiftRightLogical128BitLane(Vector256<int> value, byte numBytes) => ShiftRightLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m256i _mm256_bsrli_epi128 (__m256i a, const int imm8)
- /// VPSRLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<uint> ShiftRightLogical128BitLane(Vector256<uint> value, byte numBytes) => ShiftRightLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m256i _mm256_bsrli_epi128 (__m256i a, const int imm8)
- /// VPSRLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<long> ShiftRightLogical128BitLane(Vector256<long> value, byte numBytes) => ShiftRightLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m256i _mm256_bsrli_epi128 (__m256i a, const int imm8)
- /// VPSRLDQ ymm, ymm, imm8
- /// </summary>
- public static Vector256<ulong> ShiftRightLogical128BitLane(Vector256<ulong> value, byte numBytes) => ShiftRightLogical128BitLane(value, numBytes);
-
- /// <summary>
- /// __m256i _mm256_srlv_epi32 (__m256i a, __m256i count)
- /// VPSRLVD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> ShiftRightLogicalVariable(Vector256<int> value, Vector256<uint> count) => ShiftRightLogicalVariable(value, count);
- /// <summary>
- /// __m256i _mm256_srlv_epi32 (__m256i a, __m256i count)
- /// VPSRLVD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> ShiftRightLogicalVariable(Vector256<uint> value, Vector256<uint> count) => ShiftRightLogicalVariable(value, count);
- /// <summary>
- /// __m256i _mm256_srlv_epi64 (__m256i a, __m256i count)
- /// VPSRLVQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> ShiftRightLogicalVariable(Vector256<long> value, Vector256<ulong> count) => ShiftRightLogicalVariable(value, count);
- /// <summary>
- /// __m256i _mm256_srlv_epi64 (__m256i a, __m256i count)
- /// VPSRLVQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ulong> ShiftRightLogicalVariable(Vector256<ulong> value, Vector256<ulong> count) => ShiftRightLogicalVariable(value, count);
-
- /// <summary>
- /// __m128i _mm_srlv_epi32 (__m128i a, __m128i count)
- /// VPSRLVD xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<int> ShiftRightLogicalVariable(Vector128<int> value, Vector128<uint> count) => ShiftRightLogicalVariable(value, count);
- /// <summary>
- /// __m128i _mm_srlv_epi32 (__m128i a, __m128i count)
- /// VPSRLVD xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> ShiftRightLogicalVariable(Vector128<uint> value, Vector128<uint> count) => ShiftRightLogicalVariable(value, count);
- /// <summary>
- /// __m128i _mm_srlv_epi64 (__m128i a, __m128i count)
- /// VPSRLVQ xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<long> ShiftRightLogicalVariable(Vector128<long> value, Vector128<ulong> count) => ShiftRightLogicalVariable(value, count);
- /// <summary>
- /// __m128i _mm_srlv_epi64 (__m128i a, __m128i count)
- /// VPSRLVQ xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> ShiftRightLogicalVariable(Vector128<ulong> value, Vector128<ulong> count) => ShiftRightLogicalVariable(value, count);
-
- /// <summary>
- /// __m256i _mm256_shuffle_epi8 (__m256i a, __m256i b)
- /// VPSHUFB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> Shuffle(Vector256<sbyte> value, Vector256<sbyte> mask) => Shuffle(value, mask);
- /// <summary>
- /// __m256i _mm256_shuffle_epi8 (__m256i a, __m256i b)
- /// VPSHUFB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> Shuffle(Vector256<byte> value, Vector256<byte> mask) => Shuffle(value, mask);
- /// <summary>
- /// __m256i _mm256_shuffle_epi32 (__m256i a, const int imm8)
- /// VPSHUFD ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<int> Shuffle(Vector256<int> value, byte control) => Shuffle(value, control);
- /// <summary>
- /// __m256i _mm256_shuffle_epi32 (__m256i a, const int imm8)
- /// VPSHUFD ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<uint> Shuffle(Vector256<uint> value, byte control) => Shuffle(value, control);
-
- /// <summary>
- /// __m256i _mm256_shufflehi_epi16 (__m256i a, const int imm8)
- /// VPSHUFHW ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<short> ShuffleHigh(Vector256<short> value, byte control) => ShuffleHigh(value, control);
- /// <summary>
- /// __m256i _mm256_shufflehi_epi16 (__m256i a, const int imm8)
- /// VPSHUFHW ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<ushort> ShuffleHigh(Vector256<ushort> value, byte control) => ShuffleHigh(value, control);
-
- /// <summary>
- /// __m256i _mm256_shufflelo_epi16 (__m256i a, const int imm8)
- /// VPSHUFLW ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<short> ShuffleLow(Vector256<short> value, byte control) => ShuffleLow(value, control);
- /// <summary>
- /// __m256i _mm256_shufflelo_epi16 (__m256i a, const int imm8)
- /// VPSHUFLW ymm, ymm/m256, imm8
- /// </summary>
- public static Vector256<ushort> ShuffleLow(Vector256<ushort> value, byte control) => ShuffleLow(value, control);
-
- /// <summary>
- /// __m256i _mm256_sign_epi8 (__m256i a, __m256i b)
- /// VPSIGNB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> Sign(Vector256<sbyte> left, Vector256<sbyte> right) => Sign(left, right);
- /// <summary>
- /// __m256i _mm256_sign_epi16 (__m256i a, __m256i b)
- /// VPSIGNW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> Sign(Vector256<short> left, Vector256<short> right) => Sign(left, right);
- /// <summary>
- /// __m256i _mm256_sign_epi32 (__m256i a, __m256i b)
- /// VPSIGND ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> Sign(Vector256<int> left, Vector256<int> right) => Sign(left, right);
-
- /// <summary>
- /// __m256i _mm256_sub_epi8 (__m256i a, __m256i b)
- /// VPSUBB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> Subtract(Vector256<sbyte> left, Vector256<sbyte> right) => Subtract(left, right);
- /// <summary>
- /// __m256i _mm256_sub_epi8 (__m256i a, __m256i b)
- /// VPSUBB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> Subtract(Vector256<byte> left, Vector256<byte> right) => Subtract(left, right);
- /// <summary>
- /// __m256i _mm256_sub_epi16 (__m256i a, __m256i b)
- /// VPSUBW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> Subtract(Vector256<short> left, Vector256<short> right) => Subtract(left, right);
- /// <summary>
- /// __m256i _mm256_sub_epi16 (__m256i a, __m256i b)
- /// VPSUBW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> Subtract(Vector256<ushort> left, Vector256<ushort> right) => Subtract(left, right);
- /// <summary>
- /// __m256i _mm256_sub_epi32 (__m256i a, __m256i b)
- /// VPSUBD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> Subtract(Vector256<int> left, Vector256<int> right) => Subtract(left, right);
- /// <summary>
- /// __m256i _mm256_sub_epi32 (__m256i a, __m256i b)
- /// VPSUBD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> Subtract(Vector256<uint> left, Vector256<uint> right) => Subtract(left, right);
- /// <summary>
- /// __m256i _mm256_sub_epi64 (__m256i a, __m256i b)
- /// VPSUBQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> Subtract(Vector256<long> left, Vector256<long> right) => Subtract(left, right);
- /// <summary>
- /// __m256i _mm256_sub_epi64 (__m256i a, __m256i b)
- /// VPSUBQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ulong> Subtract(Vector256<ulong> left, Vector256<ulong> right) => Subtract(left, right);
-
- /// <summary>
- /// __m256i _mm256_subs_epi8 (__m256i a, __m256i b)
- /// VPSUBSB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> SubtractSaturate(Vector256<sbyte> left, Vector256<sbyte> right) => SubtractSaturate(left, right);
- /// <summary>
- /// __m256i _mm256_subs_epi16 (__m256i a, __m256i b)
- /// VPSUBSW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> SubtractSaturate(Vector256<short> left, Vector256<short> right) => SubtractSaturate(left, right);
- /// <summary>
- /// __m256i _mm256_subs_epu8 (__m256i a, __m256i b)
- /// VPSUBUSB ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> SubtractSaturate(Vector256<byte> left, Vector256<byte> right) => SubtractSaturate(left, right);
- /// <summary>
- /// __m256i _mm256_subs_epu16 (__m256i a, __m256i b)
- /// VPSUBUSW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> SubtractSaturate(Vector256<ushort> left, Vector256<ushort> right) => SubtractSaturate(left, right);
-
- /// <summary>
- /// __m256i _mm256_sad_epu8 (__m256i a, __m256i b)
- /// VPSADBW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> SumAbsoluteDifferences(Vector256<byte> left, Vector256<byte> right) => SumAbsoluteDifferences(left, right);
-
- /// <summary>
- /// __m256i _mm256_unpackhi_epi8 (__m256i a, __m256i b)
- /// VPUNPCKHBW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> UnpackHigh(Vector256<sbyte> left, Vector256<sbyte> right) => UnpackHigh(left, right);
- /// <summary>
- /// __m256i _mm256_unpackhi_epi8 (__m256i a, __m256i b)
- /// VPUNPCKHBW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> UnpackHigh(Vector256<byte> left, Vector256<byte> right) => UnpackHigh(left, right);
- /// <summary>
- /// __m256i _mm256_unpackhi_epi16 (__m256i a, __m256i b)
- /// VPUNPCKHWD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> UnpackHigh(Vector256<short> left, Vector256<short> right) => UnpackHigh(left, right);
- /// <summary>
- /// __m256i _mm256_unpackhi_epi16 (__m256i a, __m256i b)
- /// VPUNPCKHWD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> UnpackHigh(Vector256<ushort> left, Vector256<ushort> right) => UnpackHigh(left, right);
- /// <summary>
- /// __m256i _mm256_unpackhi_epi32 (__m256i a, __m256i b)
- /// VPUNPCKHDQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> UnpackHigh(Vector256<int> left, Vector256<int> right) => UnpackHigh(left, right);
- /// <summary>
- /// __m256i _mm256_unpackhi_epi32 (__m256i a, __m256i b)
- /// VPUNPCKHDQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> UnpackHigh(Vector256<uint> left, Vector256<uint> right) => UnpackHigh(left, right);
- /// <summary>
- /// __m256i _mm256_unpackhi_epi64 (__m256i a, __m256i b)
- /// VPUNPCKHQDQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> UnpackHigh(Vector256<long> left, Vector256<long> right) => UnpackHigh(left, right);
- /// <summary>
- /// __m256i _mm256_unpackhi_epi64 (__m256i a, __m256i b)
- /// VPUNPCKHQDQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ulong> UnpackHigh(Vector256<ulong> left, Vector256<ulong> right) => UnpackHigh(left, right);
-
- /// <summary>
- /// __m256i _mm256_unpacklo_epi8 (__m256i a, __m256i b)
- /// VPUNPCKLBW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> UnpackLow(Vector256<sbyte> left, Vector256<sbyte> right) => UnpackLow(left, right);
- /// <summary>
- /// __m256i _mm256_unpacklo_epi8 (__m256i a, __m256i b)
- /// VPUNPCKLBW ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> UnpackLow(Vector256<byte> left, Vector256<byte> right) => UnpackLow(left, right);
- /// <summary>
- /// __m256i _mm256_unpacklo_epi16 (__m256i a, __m256i b)
- /// VPUNPCKLWD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> UnpackLow(Vector256<short> left, Vector256<short> right) => UnpackLow(left, right);
- /// <summary>
- /// __m256i _mm256_unpacklo_epi16 (__m256i a, __m256i b)
- /// VPUNPCKLWD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> UnpackLow(Vector256<ushort> left, Vector256<ushort> right) => UnpackLow(left, right);
- /// <summary>
- /// __m256i _mm256_unpacklo_epi32 (__m256i a, __m256i b)
- /// VPUNPCKLDQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> UnpackLow(Vector256<int> left, Vector256<int> right) => UnpackLow(left, right);
- /// <summary>
- /// __m256i _mm256_unpacklo_epi32 (__m256i a, __m256i b)
- /// VPUNPCKLDQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> UnpackLow(Vector256<uint> left, Vector256<uint> right) => UnpackLow(left, right);
- /// <summary>
- /// __m256i _mm256_unpacklo_epi64 (__m256i a, __m256i b)
- /// VPUNPCKLQDQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> UnpackLow(Vector256<long> left, Vector256<long> right) => UnpackLow(left, right);
- /// <summary>
- /// __m256i _mm256_unpacklo_epi64 (__m256i a, __m256i b)
- /// VPUNPCKLQDQ ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ulong> UnpackLow(Vector256<ulong> left, Vector256<ulong> right) => UnpackLow(left, right);
-
- /// <summary>
- /// __m256i _mm256_xor_si256 (__m256i a, __m256i b)
- /// VPXOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<sbyte> Xor(Vector256<sbyte> left, Vector256<sbyte> right) => Xor(left, right);
- /// <summary>
- /// __m256i _mm256_xor_si256 (__m256i a, __m256i b)
- /// VPXOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<byte> Xor(Vector256<byte> left, Vector256<byte> right) => Xor(left, right);
- /// <summary>
- /// __m256i _mm256_xor_si256 (__m256i a, __m256i b)
- /// VPXOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<short> Xor(Vector256<short> left, Vector256<short> right) => Xor(left, right);
- /// <summary>
- /// __m256i _mm256_xor_si256 (__m256i a, __m256i b)
- /// VPXOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ushort> Xor(Vector256<ushort> left, Vector256<ushort> right) => Xor(left, right);
- /// <summary>
- /// __m256i _mm256_xor_si256 (__m256i a, __m256i b)
- /// VPXOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<int> Xor(Vector256<int> left, Vector256<int> right) => Xor(left, right);
- /// <summary>
- /// __m256i _mm256_xor_si256 (__m256i a, __m256i b)
- /// VPXOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<uint> Xor(Vector256<uint> left, Vector256<uint> right) => Xor(left, right);
- /// <summary>
- /// __m256i _mm256_xor_si256 (__m256i a, __m256i b)
- /// VPXOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<long> Xor(Vector256<long> left, Vector256<long> right) => Xor(left, right);
- /// <summary>
- /// __m256i _mm256_xor_si256 (__m256i a, __m256i b)
- /// VPXOR ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<ulong> Xor(Vector256<ulong> left, Vector256<ulong> right) => Xor(left, right);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Bmi1.PlatformNotSupported.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Bmi1.PlatformNotSupported.cs
deleted file mode 100644
index 204932af229..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Bmi1.PlatformNotSupported.cs
+++ /dev/null
@@ -1,119 +0,0 @@
-// 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;
-using System.Runtime.CompilerServices;
-using System.Runtime.Intrinsics;
-
-namespace System.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel BMI1 hardware instructions via intrinsics
- /// </summary>
- [CLSCompliant(false)]
- public abstract class Bmi1
- {
- internal Bmi1() { }
-
- public static bool IsSupported { [Intrinsic] get { return false; } }
-
- public abstract class X64
- {
- internal X64() { }
-
- public static bool IsSupported { [Intrinsic] get { return false; } }
-
- /// <summary>
- /// unsigned __int64 _andn_u64 (unsigned __int64 a, unsigned __int64 b)
- /// ANDN r64a, r64b, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong AndNot(ulong left, ulong right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// unsigned __int64 _bextr_u64 (unsigned __int64 a, unsigned int start, unsigned int len)
- /// BEXTR r64a, reg/m64, r64b
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong BitFieldExtract(ulong value, byte start, byte length) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// unsigned __int64 _bextr2_u64 (unsigned __int64 a, unsigned __int64 control)
- /// BEXTR r64a, reg/m64, r64b
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong BitFieldExtract(ulong value, ushort control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// unsigned __int64 _blsi_u64 (unsigned __int64 a)
- /// BLSI reg, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong ExtractLowestSetBit(ulong value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// unsigned __int64 _blsmsk_u64 (unsigned __int64 a)
- /// BLSMSK reg, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong GetMaskUpToLowestSetBit(ulong value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// unsigned __int64 _blsr_u64 (unsigned __int64 a)
- /// BLSR reg, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong ResetLowestSetBit(ulong value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __int64 _mm_tzcnt_64 (unsigned __int64 a)
- /// TZCNT reg, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong TrailingZeroCount(ulong value) { throw new PlatformNotSupportedException(); }
- }
-
- /// <summary>
- /// unsigned int _andn_u32 (unsigned int a, unsigned int b)
- /// ANDN r32a, r32b, reg/m32
- /// </summary>
- public static uint AndNot(uint left, uint right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// unsigned int _bextr_u32 (unsigned int a, unsigned int start, unsigned int len)
- /// BEXTR r32a, reg/m32, r32b
- /// </summary>
- public static uint BitFieldExtract(uint value, byte start, byte length) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// unsigned int _bextr2_u32 (unsigned int a, unsigned int control)
- /// BEXTR r32a, reg/m32, r32b
- /// </summary>
- public static uint BitFieldExtract(uint value, ushort control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// unsigned int _blsi_u32 (unsigned int a)
- /// BLSI reg, reg/m32
- /// </summary>
- public static uint ExtractLowestSetBit(uint value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// unsigned int _blsmsk_u32 (unsigned int a)
- /// BLSMSK reg, reg/m32
- /// </summary>
- public static uint GetMaskUpToLowestSetBit(uint value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// unsigned int _blsr_u32 (unsigned int a)
- /// BLSR reg, reg/m32
- /// </summary>
- public static uint ResetLowestSetBit(uint value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_tzcnt_32 (unsigned int a)
- /// TZCNT reg, reg/m32
- /// </summary>
- public static uint TrailingZeroCount(uint value) { throw new PlatformNotSupportedException(); }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Bmi1.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Bmi1.cs
deleted file mode 100644
index 32e72af9ebe..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Bmi1.cs
+++ /dev/null
@@ -1,119 +0,0 @@
-// 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.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel BMI1 hardware instructions via intrinsics
- /// </summary>
- [Intrinsic]
- [CLSCompliant(false)]
- public abstract class Bmi1
- {
- internal Bmi1() { }
-
- public static bool IsSupported { get => IsSupported; }
-
- [Intrinsic]
- public abstract class X64
- {
- internal X64() { }
-
- public static bool IsSupported { get => IsSupported; }
-
- /// <summary>
- /// unsigned __int64 _andn_u64 (unsigned __int64 a, unsigned __int64 b)
- /// ANDN r64a, r64b, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong AndNot(ulong left, ulong right) => AndNot(left, right);
-
- /// <summary>
- /// unsigned __int64 _bextr_u64 (unsigned __int64 a, unsigned int start, unsigned int len)
- /// BEXTR r64a, reg/m64, r64b
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong BitFieldExtract(ulong value, byte start, byte length) => BitFieldExtract(value, (ushort)(start | (length << 8)));
-
- /// <summary>
- /// unsigned __int64 _bextr2_u64 (unsigned __int64 a, unsigned __int64 control)
- /// BEXTR r64a, reg/m64, r64b
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong BitFieldExtract(ulong value, ushort control) => BitFieldExtract(value, control);
-
- /// <summary>
- /// unsigned __int64 _blsi_u64 (unsigned __int64 a)
- /// BLSI reg, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong ExtractLowestSetBit(ulong value) => ExtractLowestSetBit(value);
-
- /// <summary>
- /// unsigned __int64 _blsmsk_u64 (unsigned __int64 a)
- /// BLSMSK reg, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong GetMaskUpToLowestSetBit(ulong value) => GetMaskUpToLowestSetBit(value);
-
- /// <summary>
- /// unsigned __int64 _blsr_u64 (unsigned __int64 a)
- /// BLSR reg, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong ResetLowestSetBit(ulong value) => ResetLowestSetBit(value);
-
- /// <summary>
- /// __int64 _mm_tzcnt_64 (unsigned __int64 a)
- /// TZCNT reg, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong TrailingZeroCount(ulong value) => TrailingZeroCount(value);
- }
-
- /// <summary>
- /// unsigned int _andn_u32 (unsigned int a, unsigned int b)
- /// ANDN r32a, r32b, reg/m32
- /// </summary>
- public static uint AndNot(uint left, uint right) => AndNot(left, right);
-
- /// <summary>
- /// unsigned int _bextr_u32 (unsigned int a, unsigned int start, unsigned int len)
- /// BEXTR r32a, reg/m32, r32b
- /// </summary>
- public static uint BitFieldExtract(uint value, byte start, byte length) => BitFieldExtract(value, (ushort)(start | (length << 8)));
-
- /// <summary>
- /// unsigned int _bextr2_u32 (unsigned int a, unsigned int control)
- /// BEXTR r32a, reg/m32, r32b
- /// </summary>
- public static uint BitFieldExtract(uint value, ushort control) => BitFieldExtract(value, control);
-
- /// <summary>
- /// unsigned int _blsi_u32 (unsigned int a)
- /// BLSI reg, reg/m32
- /// </summary>
- public static uint ExtractLowestSetBit(uint value) => ExtractLowestSetBit(value);
-
- /// <summary>
- /// unsigned int _blsmsk_u32 (unsigned int a)
- /// BLSMSK reg, reg/m32
- /// </summary>
- public static uint GetMaskUpToLowestSetBit(uint value) => GetMaskUpToLowestSetBit(value);
-
- /// <summary>
- /// unsigned int _blsr_u32 (unsigned int a)
- /// BLSR reg, reg/m32
- /// </summary>
- public static uint ResetLowestSetBit(uint value) => ResetLowestSetBit(value);
-
- /// <summary>
- /// int _mm_tzcnt_32 (unsigned int a)
- /// TZCNT reg, reg/m32
- /// </summary>
- public static uint TrailingZeroCount(uint value) => TrailingZeroCount(value);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Bmi2.PlatformNotSupported.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Bmi2.PlatformNotSupported.cs
deleted file mode 100644
index 053ea708425..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Bmi2.PlatformNotSupported.cs
+++ /dev/null
@@ -1,97 +0,0 @@
-// 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;
-using System.Runtime.CompilerServices;
-using System.Runtime.Intrinsics;
-
-namespace System.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel BMI2 hardware instructions via intrinsics
- /// </summary>
- [CLSCompliant(false)]
- public abstract class Bmi2
- {
- internal Bmi2() { }
-
- public static bool IsSupported { [Intrinsic] get { return false; } }
-
- public abstract class X64
- {
- internal X64() { }
-
- public static bool IsSupported { [Intrinsic] get { return false; } }
-
- /// <summary>
- /// unsigned __int64 _bzhi_u64 (unsigned __int64 a, unsigned int index)
- /// BZHI r64a, reg/m32, r64b
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong ZeroHighBits(ulong value, ulong index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// unsigned __int64 _mulx_u64 (unsigned __int64 a, unsigned __int64 b, unsigned __int64* hi)
- /// MULX r64a, r64b, reg/m64
- /// The above native signature does not directly correspond to the managed signature.
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong MultiplyNoFlags(ulong left, ulong right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// unsigned __int64 _mulx_u64 (unsigned __int64 a, unsigned __int64 b, unsigned __int64* hi)
- /// MULX r64a, r64b, reg/m64
- /// The above native signature does not directly correspond to the managed signature.
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static unsafe ulong MultiplyNoFlags(ulong left, ulong right, ulong* low) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// unsigned __int64 _pdep_u64 (unsigned __int64 a, unsigned __int64 mask)
- /// PDEP r64a, r64b, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong ParallelBitDeposit(ulong value, ulong mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// unsigned __int64 _pext_u64 (unsigned __int64 a, unsigned __int64 mask)
- /// PEXT r64a, r64b, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong ParallelBitExtract(ulong value, ulong mask) { throw new PlatformNotSupportedException(); }
- }
-
- /// <summary>
- /// unsigned int _bzhi_u32 (unsigned int a, unsigned int index)
- /// BZHI r32a, reg/m32, r32b
- /// </summary>
- public static uint ZeroHighBits(uint value, uint index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// unsigned int _mulx_u32 (unsigned int a, unsigned int b, unsigned int* hi)
- /// MULX r32a, r32b, reg/m32
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static uint MultiplyNoFlags(uint left, uint right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// unsigned int _mulx_u32 (unsigned int a, unsigned int b, unsigned int* hi)
- /// MULX r32a, r32b, reg/m32
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe uint MultiplyNoFlags(uint left, uint right, uint* low) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// unsigned int _pdep_u32 (unsigned int a, unsigned int mask)
- /// PDEP r32a, r32b, reg/m32
- /// </summary>
- public static uint ParallelBitDeposit(uint value, uint mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// unsigned int _pext_u32 (unsigned int a, unsigned int mask)
- /// PEXT r32a, r32b, reg/m32
- /// </summary>
- public static uint ParallelBitExtract(uint value, uint mask) { throw new PlatformNotSupportedException(); }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Bmi2.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Bmi2.cs
deleted file mode 100644
index 3c692e19bfc..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Bmi2.cs
+++ /dev/null
@@ -1,97 +0,0 @@
-// 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.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel BMI2 hardware instructions via intrinsics
- /// </summary>
- [Intrinsic]
- [CLSCompliant(false)]
- public abstract class Bmi2
- {
- internal Bmi2() { }
-
- public static bool IsSupported { get => IsSupported; }
-
- [Intrinsic]
- public abstract class X64
- {
- internal X64() { }
-
- public static bool IsSupported { get => IsSupported; }
-
- /// <summary>
- /// unsigned __int64 _bzhi_u64 (unsigned __int64 a, unsigned int index)
- /// BZHI r64a, reg/m32, r64b
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong ZeroHighBits(ulong value, ulong index) => ZeroHighBits(value, index);
-
- /// <summary>
- /// unsigned __int64 _mulx_u64 (unsigned __int64 a, unsigned __int64 b, unsigned __int64* hi)
- /// MULX r64a, r64b, reg/m64
- /// The above native signature does not directly correspond to the managed signature.
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong MultiplyNoFlags(ulong left, ulong right) => MultiplyNoFlags(left, right);
-
- /// <summary>
- /// unsigned __int64 _mulx_u64 (unsigned __int64 a, unsigned __int64 b, unsigned __int64* hi)
- /// MULX r64a, r64b, reg/m64
- /// The above native signature does not directly correspond to the managed signature.
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static unsafe ulong MultiplyNoFlags(ulong left, ulong right, ulong* low) => MultiplyNoFlags(left, right, low);
-
- /// <summary>
- /// unsigned __int64 _pdep_u64 (unsigned __int64 a, unsigned __int64 mask)
- /// PDEP r64a, r64b, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong ParallelBitDeposit(ulong value, ulong mask) => ParallelBitDeposit(value, mask);
-
- /// <summary>
- /// unsigned __int64 _pext_u64 (unsigned __int64 a, unsigned __int64 mask)
- /// PEXT r64a, r64b, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong ParallelBitExtract(ulong value, ulong mask) => ParallelBitExtract(value, mask);
- }
-
- /// <summary>
- /// unsigned int _bzhi_u32 (unsigned int a, unsigned int index)
- /// BZHI r32a, reg/m32, r32b
- /// </summary>
- public static uint ZeroHighBits(uint value, uint index) => ZeroHighBits(value, index);
-
- /// <summary>
- /// unsigned int _mulx_u32 (unsigned int a, unsigned int b, unsigned int* hi)
- /// MULX r32a, r32b, reg/m32
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static uint MultiplyNoFlags(uint left, uint right) => MultiplyNoFlags(left, right);
-
- /// <summary>
- /// unsigned int _mulx_u32 (unsigned int a, unsigned int b, unsigned int* hi)
- /// MULX r32a, r32b, reg/m32
- /// The above native signature does not directly correspond to the managed signature.
- /// </summary>
- public static unsafe uint MultiplyNoFlags(uint left, uint right, uint* low) => MultiplyNoFlags(left, right, low);
-
- /// <summary>
- /// unsigned int _pdep_u32 (unsigned int a, unsigned int mask)
- /// PDEP r32a, r32b, reg/m32
- /// </summary>
- public static uint ParallelBitDeposit(uint value, uint mask) => ParallelBitDeposit(value, mask);
-
- /// <summary>
- /// unsigned int _pext_u32 (unsigned int a, unsigned int mask)
- /// PEXT r32a, r32b, reg/m32
- /// </summary>
- public static uint ParallelBitExtract(uint value, uint mask) => ParallelBitExtract(value, mask);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Enums.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Enums.cs
deleted file mode 100644
index 7098f813ff7..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Enums.cs
+++ /dev/null
@@ -1,169 +0,0 @@
-// 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.Runtime.Intrinsics.X86
-{
- public enum FloatComparisonMode : byte
- {
- /// <summary>
- /// _CMP_EQ_OQ
- /// </summary>
- OrderedEqualNonSignaling = 0,
-
- /// <summary>
- /// _CMP_LT_OS
- /// </summary>
- OrderedLessThanSignaling = 1,
-
- /// <summary>
- /// _CMP_LE_OS
- /// </summary>
- OrderedLessThanOrEqualSignaling = 2,
-
- /// <summary>
- /// _CMP_UNORD_Q
- /// </summary>
- UnorderedNonSignaling = 3,
-
- /// <summary>
- /// _CMP_NEQ_UQ
- /// </summary>
- UnorderedNotEqualNonSignaling = 4,
-
- /// <summary>
- /// _CMP_NLT_US
- /// </summary>
- UnorderedNotLessThanSignaling = 5,
-
- /// <summary>
- /// _CMP_NLE_US
- /// </summary>
- UnorderedNotLessThanOrEqualSignaling = 6,
-
- /// <summary>
- /// _CMP_ORD_Q
- /// </summary>
- OrderedNonSignaling = 7,
-
- /// <summary>
- /// _CMP_EQ_UQ
- /// </summary>
- UnorderedEqualNonSignaling = 8,
-
- /// <summary>
- /// _CMP_NGE_US
- /// </summary>
- UnorderedNotGreaterThanOrEqualSignaling = 9,
-
- /// <summary>
- /// _CMP_NGT_US
- /// </summary>
- UnorderedNotGreaterThanSignaling = 10,
-
- /// <summary>
- /// _CMP_FALSE_OQ
- /// </summary>
- OrderedFalseNonSignaling = 11,
-
- /// <summary>
- /// _CMP_NEQ_OQ
- /// </summary>
- OrderedNotEqualNonSignaling = 12,
-
- /// <summary>
- /// _CMP_GE_OS
- /// </summary>
- OrderedGreaterThanOrEqualSignaling = 13,
-
- /// <summary>
- /// _CMP_GT_OS
- /// </summary>
- OrderedGreaterThanSignaling = 14,
-
- /// <summary>
- /// _CMP_TRUE_UQ
- /// </summary>
- UnorderedTrueNonSignaling = 15,
-
- /// <summary>
- /// _CMP_EQ_OS
- /// </summary>
- OrderedEqualSignaling = 16,
-
- /// <summary>
- /// _CMP_LT_OQ
- /// </summary>
- OrderedLessThanNonSignaling = 17,
-
- /// <summary>
- /// _CMP_LE_OQ
- /// </summary>
- OrderedLessThanOrEqualNonSignaling = 18,
-
- /// <summary>
- /// _CMP_UNORD_S
- /// </summary>
- UnorderedSignaling = 19,
-
- /// <summary>
- /// _CMP_NEQ_US
- /// </summary>
- UnorderedNotEqualSignaling = 20,
-
- /// <summary>
- /// _CMP_NLT_UQ
- /// </summary>
- UnorderedNotLessThanNonSignaling = 21,
-
- /// <summary>
- /// _CMP_NLE_UQ
- /// </summary>
- UnorderedNotLessThanOrEqualNonSignaling = 22,
-
- /// <summary>
- /// _CMP_ORD_S
- /// </summary>
- OrderedSignaling = 23,
-
- /// <summary>
- /// _CMP_EQ_US
- /// </summary>
- UnorderedEqualSignaling = 24,
-
- /// <summary>
- /// _CMP_NGE_UQ
- /// </summary>
- UnorderedNotGreaterThanOrEqualNonSignaling = 25,
-
- /// <summary>
- /// _CMP_NGT_UQ
- /// </summary>
- UnorderedNotGreaterThanNonSignaling = 26,
-
- /// <summary>
- /// _CMP_FALSE_OS
- /// </summary>
- OrderedFalseSignaling = 27,
-
- /// <summary>
- /// _CMP_NEQ_OS
- /// </summary>
- OrderedNotEqualSignaling = 28,
-
- /// <summary>
- /// _CMP_GE_OQ
- /// </summary>
- OrderedGreaterThanOrEqualNonSignaling = 29,
-
- /// <summary>
- /// _CMP_GT_OQ
- /// </summary>
- OrderedGreaterThanNonSignaling = 30,
-
- /// <summary>
- /// _CMP_TRUE_US
- /// </summary>
- UnorderedTrueSignaling = 31,
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Fma.PlatformNotSupported.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Fma.PlatformNotSupported.cs
deleted file mode 100644
index 1899b6b530c..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Fma.PlatformNotSupported.cs
+++ /dev/null
@@ -1,191 +0,0 @@
-// 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;
-using System.Runtime.CompilerServices;
-using System.Runtime.Intrinsics;
-
-namespace System.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel FMA hardware instructions via intrinsics
- /// </summary>
- [CLSCompliant(false)]
- public abstract class Fma : Avx
- {
- internal Fma() { }
-
- public static new bool IsSupported { [Intrinsic] get { return false; } }
-
- /// <summary>
- /// __m128 _mm_fmadd_ps (__m128 a, __m128 b, __m128 c)
- /// VFMADDPS xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<float> MultiplyAdd(Vector128<float> a, Vector128<float> b, Vector128<float> c) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_fmadd_pd (__m128d a, __m128d b, __m128d c)
- /// VFMADDPD xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<double> MultiplyAdd(Vector128<double> a, Vector128<double> b, Vector128<double> c) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256 _mm256_fmadd_ps (__m256 a, __m256 b, __m256 c)
- /// VFMADDPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> MultiplyAdd(Vector256<float> a, Vector256<float> b, Vector256<float> c) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_fmadd_pd (__m256d a, __m256d b, __m256d c)
- /// VFMADDPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> MultiplyAdd(Vector256<double> a, Vector256<double> b, Vector256<double> c) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_fmadd_ss (__m128 a, __m128 b, __m128 c)
- /// VFMADDSS xmm, xmm, xmm/m32
- /// </summary>
- public static Vector128<float> MultiplyAddScalar(Vector128<float> a, Vector128<float> b, Vector128<float> c) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_fmadd_sd (__m128d a, __m128d b, __m128d c)
- /// VFMADDSS xmm, xmm, xmm/m64
- /// </summary>
- public static Vector128<double> MultiplyAddScalar(Vector128<double> a, Vector128<double> b, Vector128<double> c) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_fmaddsub_ps (__m128 a, __m128 b, __m128 c)
- /// VFMADDSUBPS xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<float> MultiplyAddSubtract(Vector128<float> a, Vector128<float> b, Vector128<float> c) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_fmaddsub_pd (__m128d a, __m128d b, __m128d c)
- /// VFMADDSUBPD xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<double> MultiplyAddSubtract(Vector128<double> a, Vector128<double> b, Vector128<double> c) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256 _mm256_fmaddsub_ps (__m256 a, __m256 b, __m256 c)
- /// VFMADDSUBPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> MultiplyAddSubtract(Vector256<float> a, Vector256<float> b, Vector256<float> c) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_fmaddsub_pd (__m256d a, __m256d b, __m256d c)
- /// VFMADDSUBPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> MultiplyAddSubtract(Vector256<double> a, Vector256<double> b, Vector256<double> c) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_fmsub_ps (__m128 a, __m128 b, __m128 c)
- /// VFMSUBPS xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<float> MultiplySubtract(Vector128<float> a, Vector128<float> b, Vector128<float> c) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_fmsub_pd (__m128d a, __m128d b, __m128d c)
- /// VFMSUBPS xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<double> MultiplySubtract(Vector128<double> a, Vector128<double> b, Vector128<double> c) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256 _mm256_fmsub_ps (__m256 a, __m256 b, __m256 c)
- /// VFMSUBPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> MultiplySubtract(Vector256<float> a, Vector256<float> b, Vector256<float> c) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_fmsub_pd (__m256d a, __m256d b, __m256d c)
- /// VFMSUBPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> MultiplySubtract(Vector256<double> a, Vector256<double> b, Vector256<double> c) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_fmsub_ss (__m128 a, __m128 b, __m128 c)
- /// VFMSUBSS xmm, xmm, xmm/m32
- /// </summary>
- public static Vector128<float> MultiplySubtractScalar(Vector128<float> a, Vector128<float> b, Vector128<float> c) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_fmsub_sd (__m128d a, __m128d b, __m128d c)
- /// VFMSUBSD xmm, xmm, xmm/m64
- /// </summary>
- public static Vector128<double> MultiplySubtractScalar(Vector128<double> a, Vector128<double> b, Vector128<double> c) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_fmsubadd_ps (__m128 a, __m128 b, __m128 c)
- /// VFMSUBADDPS xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<float> MultiplySubtractAdd(Vector128<float> a, Vector128<float> b, Vector128<float> c) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_fmsubadd_pd (__m128d a, __m128d b, __m128d c)
- /// VFMSUBADDPD xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<double> MultiplySubtractAdd(Vector128<double> a, Vector128<double> b, Vector128<double> c) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256 _mm256_fmsubadd_ps (__m256 a, __m256 b, __m256 c)
- /// VFMSUBADDPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> MultiplySubtractAdd(Vector256<float> a, Vector256<float> b, Vector256<float> c) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_fmsubadd_pd (__m256d a, __m256d b, __m256d c)
- /// VFMSUBADDPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> MultiplySubtractAdd(Vector256<double> a, Vector256<double> b, Vector256<double> c) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_fnmadd_ps (__m128 a, __m128 b, __m128 c)
- /// VFNMADDPS xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<float> MultiplyAddNegated(Vector128<float> a, Vector128<float> b, Vector128<float> c) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_fnmadd_pd (__m128d a, __m128d b, __m128d c)
- /// VFNMADDPD xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<double> MultiplyAddNegated(Vector128<double> a, Vector128<double> b, Vector128<double> c) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256 _mm256_fnmadd_ps (__m256 a, __m256 b, __m256 c)
- /// VFNMADDPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> MultiplyAddNegated(Vector256<float> a, Vector256<float> b, Vector256<float> c) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_fnmadd_pd (__m256d a, __m256d b, __m256d c)
- /// VFNMADDPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> MultiplyAddNegated(Vector256<double> a, Vector256<double> b, Vector256<double> c) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_fnmadd_ss (__m128 a, __m128 b, __m128 c)
- /// VFNMADDSS xmm, xmm, xmm/m32
- /// </summary>
- public static Vector128<float> MultiplyAddNegatedScalar(Vector128<float> a, Vector128<float> b, Vector128<float> c) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_fnmadd_sd (__m128d a, __m128d b, __m128d c)
- /// VFNMADDSD xmm, xmm, xmm/m64
- /// </summary>
- public static Vector128<double> MultiplyAddNegatedScalar(Vector128<double> a, Vector128<double> b, Vector128<double> c) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_fnmsub_ps (__m128 a, __m128 b, __m128 c)
- /// VFNMSUBPS xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<float> MultiplySubtractNegated(Vector128<float> a, Vector128<float> b, Vector128<float> c) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_fnmsub_pd (__m128d a, __m128d b, __m128d c)
- /// VFNMSUBPD xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<double> MultiplySubtractNegated(Vector128<double> a, Vector128<double> b, Vector128<double> c) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256 _mm256_fnmsub_ps (__m256 a, __m256 b, __m256 c)
- /// VFNMSUBPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> MultiplySubtractNegated(Vector256<float> a, Vector256<float> b, Vector256<float> c) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m256d _mm256_fnmsub_pd (__m256d a, __m256d b, __m256d c)
- /// VFNMSUBPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> MultiplySubtractNegated(Vector256<double> a, Vector256<double> b, Vector256<double> c) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_fnmsub_ss (__m128 a, __m128 b, __m128 c)
- /// VFNMSUBSS xmm, xmm, xmm/m32
- /// </summary>
- public static Vector128<float> MultiplySubtractNegatedScalar(Vector128<float> a, Vector128<float> b, Vector128<float> c) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_fnmsub_sd (__m128d a, __m128d b, __m128d c)
- /// VFNMSUBSD xmm, xmm, xmm/m64
- /// </summary>
- public static Vector128<double> MultiplySubtractNegatedScalar(Vector128<double> a, Vector128<double> b, Vector128<double> c) { throw new PlatformNotSupportedException(); }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Fma.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Fma.cs
deleted file mode 100644
index 2e096613bea..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Fma.cs
+++ /dev/null
@@ -1,190 +0,0 @@
-// 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.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel FMA hardware instructions via intrinsics
- /// </summary>
- [Intrinsic]
- [CLSCompliant(false)]
- public abstract class Fma : Avx
- {
- internal Fma() { }
-
- public static new bool IsSupported { get => IsSupported; }
-
- /// <summary>
- /// __m128 _mm_fmadd_ps (__m128 a, __m128 b, __m128 c)
- /// VFMADDPS xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<float> MultiplyAdd(Vector128<float> a, Vector128<float> b, Vector128<float> c) => MultiplyAdd(a, b, c);
- /// <summary>
- /// __m128d _mm_fmadd_pd (__m128d a, __m128d b, __m128d c)
- /// VFMADDPD xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<double> MultiplyAdd(Vector128<double> a, Vector128<double> b, Vector128<double> c) => MultiplyAdd(a, b, c);
- /// <summary>
- /// __m256 _mm256_fmadd_ps (__m256 a, __m256 b, __m256 c)
- /// VFMADDPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> MultiplyAdd(Vector256<float> a, Vector256<float> b, Vector256<float> c) => MultiplyAdd(a, b, c);
- /// <summary>
- /// __m256d _mm256_fmadd_pd (__m256d a, __m256d b, __m256d c)
- /// VFMADDPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> MultiplyAdd(Vector256<double> a, Vector256<double> b, Vector256<double> c) => MultiplyAdd(a, b, c);
-
- /// <summary>
- /// __m128 _mm_fmadd_ss (__m128 a, __m128 b, __m128 c)
- /// VFMADDSS xmm, xmm, xmm/m32
- /// </summary>
- public static Vector128<float> MultiplyAddScalar(Vector128<float> a, Vector128<float> b, Vector128<float> c) => MultiplyAddScalar(a, b, c);
- /// <summary>
- /// __m128d _mm_fmadd_sd (__m128d a, __m128d b, __m128d c)
- /// VFMADDSS xmm, xmm, xmm/m64
- /// </summary>
- public static Vector128<double> MultiplyAddScalar(Vector128<double> a, Vector128<double> b, Vector128<double> c) => MultiplyAddScalar(a, b, c);
-
- /// <summary>
- /// __m128 _mm_fmaddsub_ps (__m128 a, __m128 b, __m128 c)
- /// VFMADDSUBPS xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<float> MultiplyAddSubtract(Vector128<float> a, Vector128<float> b, Vector128<float> c) => MultiplyAddSubtract(a, b, c);
- /// <summary>
- /// __m128d _mm_fmaddsub_pd (__m128d a, __m128d b, __m128d c)
- /// VFMADDSUBPD xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<double> MultiplyAddSubtract(Vector128<double> a, Vector128<double> b, Vector128<double> c) => MultiplyAddSubtract(a, b, c);
- /// <summary>
- /// __m256 _mm256_fmaddsub_ps (__m256 a, __m256 b, __m256 c)
- /// VFMADDSUBPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> MultiplyAddSubtract(Vector256<float> a, Vector256<float> b, Vector256<float> c) => MultiplyAddSubtract(a, b, c);
- /// <summary>
- /// __m256d _mm256_fmaddsub_pd (__m256d a, __m256d b, __m256d c)
- /// VFMADDSUBPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> MultiplyAddSubtract(Vector256<double> a, Vector256<double> b, Vector256<double> c) => MultiplyAddSubtract(a, b, c);
-
- /// <summary>
- /// __m128 _mm_fmsub_ps (__m128 a, __m128 b, __m128 c)
- /// VFMSUBPS xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<float> MultiplySubtract(Vector128<float> a, Vector128<float> b, Vector128<float> c) => MultiplySubtract(a, b, c);
- /// <summary>
- /// __m128d _mm_fmsub_pd (__m128d a, __m128d b, __m128d c)
- /// VFMSUBPS xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<double> MultiplySubtract(Vector128<double> a, Vector128<double> b, Vector128<double> c) => MultiplySubtract(a, b, c);
- /// <summary>
- /// __m256 _mm256_fmsub_ps (__m256 a, __m256 b, __m256 c)
- /// VFMSUBPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> MultiplySubtract(Vector256<float> a, Vector256<float> b, Vector256<float> c) => MultiplySubtract(a, b, c);
- /// <summary>
- /// __m256d _mm256_fmsub_pd (__m256d a, __m256d b, __m256d c)
- /// VFMSUBPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> MultiplySubtract(Vector256<double> a, Vector256<double> b, Vector256<double> c) => MultiplySubtract(a, b, c);
-
- /// <summary>
- /// __m128 _mm_fmsub_ss (__m128 a, __m128 b, __m128 c)
- /// VFMSUBSS xmm, xmm, xmm/m32
- /// </summary>
- public static Vector128<float> MultiplySubtractScalar(Vector128<float> a, Vector128<float> b, Vector128<float> c) => MultiplySubtractScalar(a, b, c);
- /// <summary>
- /// __m128d _mm_fmsub_sd (__m128d a, __m128d b, __m128d c)
- /// VFMSUBSD xmm, xmm, xmm/m64
- /// </summary>
- public static Vector128<double> MultiplySubtractScalar(Vector128<double> a, Vector128<double> b, Vector128<double> c) => MultiplySubtractScalar(a, b, c);
-
- /// <summary>
- /// __m128 _mm_fmsubadd_ps (__m128 a, __m128 b, __m128 c)
- /// VFMSUBADDPS xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<float> MultiplySubtractAdd(Vector128<float> a, Vector128<float> b, Vector128<float> c) => MultiplySubtractAdd(a, b, c);
- /// <summary>
- /// __m128d _mm_fmsubadd_pd (__m128d a, __m128d b, __m128d c)
- /// VFMSUBADDPD xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<double> MultiplySubtractAdd(Vector128<double> a, Vector128<double> b, Vector128<double> c) => MultiplySubtractAdd(a, b, c);
- /// <summary>
- /// __m256 _mm256_fmsubadd_ps (__m256 a, __m256 b, __m256 c)
- /// VFMSUBADDPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> MultiplySubtractAdd(Vector256<float> a, Vector256<float> b, Vector256<float> c) => MultiplySubtractAdd(a, b, c);
- /// <summary>
- /// __m256d _mm256_fmsubadd_pd (__m256d a, __m256d b, __m256d c)
- /// VFMSUBADDPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> MultiplySubtractAdd(Vector256<double> a, Vector256<double> b, Vector256<double> c) => MultiplySubtractAdd(a, b, c);
-
- /// <summary>
- /// __m128 _mm_fnmadd_ps (__m128 a, __m128 b, __m128 c)
- /// VFNMADDPS xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<float> MultiplyAddNegated(Vector128<float> a, Vector128<float> b, Vector128<float> c) => MultiplyAddNegated(a, b, c);
- /// <summary>
- /// __m128d _mm_fnmadd_pd (__m128d a, __m128d b, __m128d c)
- /// VFNMADDPD xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<double> MultiplyAddNegated(Vector128<double> a, Vector128<double> b, Vector128<double> c) => MultiplyAddNegated(a, b, c);
- /// <summary>
- /// __m256 _mm256_fnmadd_ps (__m256 a, __m256 b, __m256 c)
- /// VFNMADDPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> MultiplyAddNegated(Vector256<float> a, Vector256<float> b, Vector256<float> c) => MultiplyAddNegated(a, b, c);
- /// <summary>
- /// __m256d _mm256_fnmadd_pd (__m256d a, __m256d b, __m256d c)
- /// VFNMADDPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> MultiplyAddNegated(Vector256<double> a, Vector256<double> b, Vector256<double> c) => MultiplyAddNegated(a, b, c);
-
- /// <summary>
- /// __m128 _mm_fnmadd_ss (__m128 a, __m128 b, __m128 c)
- /// VFNMADDSS xmm, xmm, xmm/m32
- /// </summary>
- public static Vector128<float> MultiplyAddNegatedScalar(Vector128<float> a, Vector128<float> b, Vector128<float> c) => MultiplyAddNegatedScalar(a, b, c);
- /// <summary>
- /// __m128d _mm_fnmadd_sd (__m128d a, __m128d b, __m128d c)
- /// VFNMADDSD xmm, xmm, xmm/m64
- /// </summary>
- public static Vector128<double> MultiplyAddNegatedScalar(Vector128<double> a, Vector128<double> b, Vector128<double> c) => MultiplyAddNegatedScalar(a, b, c);
-
- /// <summary>
- /// __m128 _mm_fnmsub_ps (__m128 a, __m128 b, __m128 c)
- /// VFNMSUBPS xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<float> MultiplySubtractNegated(Vector128<float> a, Vector128<float> b, Vector128<float> c) => MultiplySubtractNegated(a, b, c);
- /// <summary>
- /// __m128d _mm_fnmsub_pd (__m128d a, __m128d b, __m128d c)
- /// VFNMSUBPD xmm, xmm, xmm/m128
- /// </summary>
- public static Vector128<double> MultiplySubtractNegated(Vector128<double> a, Vector128<double> b, Vector128<double> c) => MultiplySubtractNegated(a, b, c);
- /// <summary>
- /// __m256 _mm256_fnmsub_ps (__m256 a, __m256 b, __m256 c)
- /// VFNMSUBPS ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<float> MultiplySubtractNegated(Vector256<float> a, Vector256<float> b, Vector256<float> c) => MultiplySubtractNegated(a, b, c);
- /// <summary>
- /// __m256d _mm256_fnmsub_pd (__m256d a, __m256d b, __m256d c)
- /// VFNMSUBPD ymm, ymm, ymm/m256
- /// </summary>
- public static Vector256<double> MultiplySubtractNegated(Vector256<double> a, Vector256<double> b, Vector256<double> c) => MultiplySubtractNegated(a, b, c);
-
- /// <summary>
- /// __m128 _mm_fnmsub_ss (__m128 a, __m128 b, __m128 c)
- /// VFNMSUBSS xmm, xmm, xmm/m32
- /// </summary>
- public static Vector128<float> MultiplySubtractNegatedScalar(Vector128<float> a, Vector128<float> b, Vector128<float> c) => MultiplySubtractNegatedScalar(a, b, c);
- /// <summary>
- /// __m128d _mm_fnmsub_sd (__m128d a, __m128d b, __m128d c)
- /// VFNMSUBSD xmm, xmm, xmm/m64
- /// </summary>
- public static Vector128<double> MultiplySubtractNegatedScalar(Vector128<double> a, Vector128<double> b, Vector128<double> c) => MultiplySubtractNegatedScalar(a, b, c);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Lzcnt.PlatformNotSupported.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Lzcnt.PlatformNotSupported.cs
deleted file mode 100644
index 43b6712970a..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Lzcnt.PlatformNotSupported.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-// 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;
-using System.Runtime.CompilerServices;
-
-namespace System.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel LZCNT hardware instructions via intrinsics
- /// </summary>
- [CLSCompliant(false)]
- public abstract class Lzcnt
- {
- internal Lzcnt() { }
-
- public static bool IsSupported { [Intrinsic] get { return false; } }
-
- public abstract class X64
- {
- internal X64() { }
-
- public static bool IsSupported { [Intrinsic] get { return false; } }
-
- /// <summary>
- /// unsigned __int64 _lzcnt_u64 (unsigned __int64 a)
- /// LZCNT reg, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong LeadingZeroCount(ulong value) { throw new PlatformNotSupportedException(); }
- }
-
- /// <summary>
- /// unsigned int _lzcnt_u32 (unsigned int a)
- /// LZCNT reg, reg/m32
- /// </summary>
- public static uint LeadingZeroCount(uint value) { throw new PlatformNotSupportedException(); }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Lzcnt.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Lzcnt.cs
deleted file mode 100644
index 63c2bb865f8..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Lzcnt.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-// 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.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel LZCNT hardware instructions via intrinsics
- /// </summary>
- [Intrinsic]
- [CLSCompliant(false)]
- public abstract class Lzcnt
- {
- internal Lzcnt() { }
-
- public static bool IsSupported { get => IsSupported; }
-
- [Intrinsic]
- public abstract class X64
- {
- internal X64() { }
-
- public static bool IsSupported { get => IsSupported; }
-
- /// <summary>
- /// unsigned __int64 _lzcnt_u64 (unsigned __int64 a)
- /// LZCNT reg, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong LeadingZeroCount(ulong value) => LeadingZeroCount(value);
- }
-
- /// <summary>
- /// unsigned int _lzcnt_u32 (unsigned int a)
- /// LZCNT reg, reg/m32
- /// </summary>
- public static uint LeadingZeroCount(uint value) => LeadingZeroCount(value);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Pclmulqdq.PlatformNotSupported.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Pclmulqdq.PlatformNotSupported.cs
deleted file mode 100644
index 53ae9d09cd9..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Pclmulqdq.PlatformNotSupported.cs
+++ /dev/null
@@ -1,32 +0,0 @@
-// 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;
-using System.Runtime.CompilerServices;
-using System.Runtime.Intrinsics;
-
-namespace System.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel PCLMULQDQ hardware instructions via intrinsics
- /// </summary>
- [CLSCompliant(false)]
- public abstract class Pclmulqdq : Sse2
- {
- internal Pclmulqdq() { }
-
- public static new bool IsSupported { [Intrinsic] get { return false; } }
-
- /// <summary>
- /// __m128i _mm_clmulepi64_si128 (__m128i a, __m128i b, const int imm8)
- /// PCLMULQDQ xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<long> CarrylessMultiply(Vector128<long> left, Vector128<long> right, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_clmulepi64_si128 (__m128i a, __m128i b, const int imm8)
- /// PCLMULQDQ xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<ulong> CarrylessMultiply(Vector128<ulong> left, Vector128<ulong> right, byte control) { throw new PlatformNotSupportedException(); }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Pclmulqdq.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Pclmulqdq.cs
deleted file mode 100644
index f9f53d51966..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Pclmulqdq.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-// 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.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel PCLMULQDQ hardware instructions via intrinsics
- /// </summary>
- [Intrinsic]
- [CLSCompliant(false)]
- public abstract class Pclmulqdq : Sse2
- {
- internal Pclmulqdq() { }
-
- public static new bool IsSupported { get => IsSupported; }
-
- /// <summary>
- /// __m128i _mm_clmulepi64_si128 (__m128i a, __m128i b, const int imm8)
- /// PCLMULQDQ xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<long> CarrylessMultiply(Vector128<long> left, Vector128<long> right, byte control) => CarrylessMultiply(left, right, control);
- /// <summary>
- /// __m128i _mm_clmulepi64_si128 (__m128i a, __m128i b, const int imm8)
- /// PCLMULQDQ xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<ulong> CarrylessMultiply(Vector128<ulong> left, Vector128<ulong> right, byte control) => CarrylessMultiply(left, right, control);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Popcnt.PlatformNotSupported.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Popcnt.PlatformNotSupported.cs
deleted file mode 100644
index d85ee3877c4..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Popcnt.PlatformNotSupported.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-// 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;
-using System.Runtime.CompilerServices;
-
-namespace System.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel POPCNT hardware instructions via intrinsics
- /// </summary>
- [CLSCompliant(false)]
- public abstract class Popcnt : Sse42
- {
- internal Popcnt() { }
-
- public static new bool IsSupported { [Intrinsic] get { return false; } }
-
- public new abstract class X64 : Sse41.X64
- {
- internal X64() { }
-
- public static new bool IsSupported { [Intrinsic] get { return false; } }
-
- /// <summary>
- /// __int64 _mm_popcnt_u64 (unsigned __int64 a)
- /// POPCNT reg64, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong PopCount(ulong value) { throw new PlatformNotSupportedException(); }
- }
-
- /// <summary>
- /// int _mm_popcnt_u32 (unsigned int a)
- /// POPCNT reg, reg/m32
- /// </summary>
- public static uint PopCount(uint value) { throw new PlatformNotSupportedException(); }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Popcnt.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Popcnt.cs
deleted file mode 100644
index 6b5a71973a7..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Popcnt.cs
+++ /dev/null
@@ -1,39 +0,0 @@
-// 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.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel POPCNT hardware instructions via intrinsics
- /// </summary>
- [Intrinsic]
- [CLSCompliant(false)]
- public abstract class Popcnt : Sse42
- {
- internal Popcnt() { }
-
- public static new bool IsSupported { get => IsSupported; }
-
- [Intrinsic]
- public new abstract class X64 : Sse41.X64
- {
- internal X64() { }
- public static new bool IsSupported { get => IsSupported; }
- /// <summary>
- /// __int64 _mm_popcnt_u64 (unsigned __int64 a)
- /// POPCNT reg64, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong PopCount(ulong value) => PopCount(value);
- }
-
- /// <summary>
- /// int _mm_popcnt_u32 (unsigned int a)
- /// POPCNT reg, reg/m32
- /// </summary>
- public static uint PopCount(uint value) => PopCount(value);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse.PlatformNotSupported.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse.PlatformNotSupported.cs
deleted file mode 100644
index 23532b45297..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse.PlatformNotSupported.cs
+++ /dev/null
@@ -1,574 +0,0 @@
-// 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;
-using System.Runtime.CompilerServices;
-using System.Runtime.Intrinsics;
-
-namespace System.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel SSE hardware instructions via intrinsics
- /// </summary>
- [CLSCompliant(false)]
- public abstract class Sse
- {
- internal Sse() { }
-
- public static bool IsSupported { [Intrinsic] get { return false; } }
-
- public abstract class X64
- {
- internal X64() { }
-
- public static bool IsSupported { [Intrinsic] get { return false; } }
-
- /// <summary>
- /// __int64 _mm_cvtss_si64 (__m128 a)
- /// CVTSS2SI r64, xmm/m32
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static long ConvertToInt64(Vector128<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm_cvtsi64_ss (__m128 a, __int64 b)
- /// CVTSI2SS xmm, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static Vector128<float> ConvertScalarToVector128Single(Vector128<float> upper, long value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __int64 _mm_cvttss_si64 (__m128 a)
- /// CVTTSS2SI r64, xmm/m32
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static long ConvertToInt64WithTruncation(Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- }
-
- /// <summary>
- /// __m128 _mm_add_ps (__m128 a, __m128 b)
- /// ADDPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> Add(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_add_ss (__m128 a, __m128 b)
- /// ADDSS xmm, xmm/m32
- /// </summary>
- public static Vector128<float> AddScalar(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_and_ps (__m128 a, __m128 b)
- /// ANDPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> And(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_andnot_ps (__m128 a, __m128 b)
- /// ANDNPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> AndNot(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cmpeq_ps (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m128, imm8(0)
- /// </summary>
- public static Vector128<float> CompareEqual(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_comieq_ss (__m128 a, __m128 b)
- /// COMISS xmm, xmm/m32
- /// </summary>
- public static bool CompareScalarOrderedEqual(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_ucomieq_ss (__m128 a, __m128 b)
- /// UCOMISS xmm, xmm/m32
- /// </summary>
- public static bool CompareScalarUnorderedEqual(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cmpeq_ss (__m128 a, __m128 b)
- /// CMPSS xmm, xmm/m32, imm8(0)
- /// </summary>
- public static Vector128<float> CompareScalarEqual(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cmpgt_ps (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m128, imm8(6)
- /// </summary>
- public static Vector128<float> CompareGreaterThan(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_comigt_ss (__m128 a, __m128 b)
- /// COMISS xmm, xmm/m32
- /// </summary>
- public static bool CompareScalarOrderedGreaterThan(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_ucomigt_ss (__m128 a, __m128 b)
- /// UCOMISS xmm, xmm/m32
- /// </summary>
- public static bool CompareScalarUnorderedGreaterThan(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cmpgt_ss (__m128 a, __m128 b)
- /// CMPSS xmm, xmm/m32, imm8(6)
- /// </summary>
- public static Vector128<float> CompareScalarGreaterThan(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cmpge_ps (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m128, imm8(5)
- /// </summary>
- public static Vector128<float> CompareGreaterThanOrEqual(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_comige_ss (__m128 a, __m128 b)
- /// COMISS xmm, xmm/m32
- /// </summary>
- public static bool CompareScalarOrderedGreaterThanOrEqual(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_ucomige_ss (__m128 a, __m128 b)
- /// UCOMISS xmm, xmm/m32
- /// </summary>
- public static bool CompareScalarUnorderedGreaterThanOrEqual(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cmpge_ss (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m32, imm8(5)
- /// </summary>
- public static Vector128<float> CompareScalarGreaterThanOrEqual(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cmplt_ps (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m128, imm8(1)
- /// </summary>
- public static Vector128<float> CompareLessThan(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_comilt_ss (__m128 a, __m128 b)
- /// COMISS xmm, xmm/m32
- /// </summary>
- public static bool CompareScalarOrderedLessThan(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_ucomilt_ss (__m128 a, __m128 b)
- /// UCOMISS xmm, xmm/m32
- /// </summary>
- public static bool CompareScalarUnorderedLessThan(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cmplt_ss (__m128 a, __m128 b)
- /// CMPSS xmm, xmm/m32, imm8(1)
- /// </summary>
- public static Vector128<float> CompareScalarLessThan(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cmple_ps (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m128, imm8(2)
- /// </summary>
- public static Vector128<float> CompareLessThanOrEqual(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_comile_ss (__m128 a, __m128 b)
- /// COMISS xmm, xmm/m32
- /// </summary>
- public static bool CompareScalarOrderedLessThanOrEqual(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_ucomile_ss (__m128 a, __m128 b)
- /// UCOMISS xmm, xmm/m32
- /// </summary>
- public static bool CompareScalarUnorderedLessThanOrEqual(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cmple_ss (__m128 a, __m128 b)
- /// CMPSS xmm, xmm/m32, imm8(2)
- /// </summary>
- public static Vector128<float> CompareScalarLessThanOrEqual(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cmpneq_ps (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m128, imm8(4)
- /// </summary>
- public static Vector128<float> CompareNotEqual(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_comineq_ss (__m128 a, __m128 b)
- /// COMISS xmm, xmm/m32
- /// </summary>
- public static bool CompareScalarOrderedNotEqual(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_ucomineq_ss (__m128 a, __m128 b)
- /// UCOMISS xmm, xmm/m32
- /// </summary>
- public static bool CompareScalarUnorderedNotEqual(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cmpneq_ss (__m128 a, __m128 b)
- /// CMPSS xmm, xmm/m32, imm8(4)
- /// </summary>
- public static Vector128<float> CompareScalarNotEqual(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cmpngt_ps (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m128, imm8(2)
- /// </summary>
- public static Vector128<float> CompareNotGreaterThan(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cmpngt_ss (__m128 a, __m128 b)
- /// CMPSS xmm, xmm/m32, imm8(2)
- /// </summary>
- public static Vector128<float> CompareScalarNotGreaterThan(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cmpnge_ps (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m128, imm8(1)
- /// </summary>
- public static Vector128<float> CompareNotGreaterThanOrEqual(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cmpnge_ss (__m128 a, __m128 b)
- /// CMPSS xmm, xmm/m32, imm8(1)
- /// </summary>
- public static Vector128<float> CompareScalarNotGreaterThanOrEqual(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cmpnlt_ps (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m128, imm8(5)
- /// </summary>
- public static Vector128<float> CompareNotLessThan(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cmpnlt_ss (__m128 a, __m128 b)
- /// CMPSS xmm, xmm/m32, imm8(5)
- /// </summary>
- public static Vector128<float> CompareScalarNotLessThan(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cmpnle_ps (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m128, imm8(6)
- /// </summary>
- public static Vector128<float> CompareNotLessThanOrEqual(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cmpnle_ss (__m128 a, __m128 b)
- /// CMPSS xmm, xmm/m32, imm8(6)
- /// </summary>
- public static Vector128<float> CompareScalarNotLessThanOrEqual(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cmpord_ps (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m128, imm8(7)
- /// </summary>
- public static Vector128<float> CompareOrdered(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cmpord_ss (__m128 a, __m128 b)
- /// CMPSS xmm, xmm/m32, imm8(7)
- /// </summary>
- public static Vector128<float> CompareScalarOrdered(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cmpunord_ps (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m128, imm8(3)
- /// </summary>
- public static Vector128<float> CompareUnordered(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cmpunord_ss (__m128 a, __m128 b)
- /// CMPSS xmm, xmm/m32, imm8(3)
- /// </summary>
- public static Vector128<float> CompareScalarUnordered(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_cvtss_si32 (__m128 a)
- /// CVTSS2SI r32, xmm/m32
- /// </summary>
- public static int ConvertToInt32(Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_cvtsi32_ss (__m128 a, int b)
- /// CVTSI2SS xmm, reg/m32
- /// </summary>
- public static Vector128<float> ConvertScalarToVector128Single(Vector128<float> upper, int value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_cvttss_si32 (__m128 a)
- /// CVTTSS2SI r32, xmm/m32
- /// </summary>
- public static int ConvertToInt32WithTruncation(Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_div_ps (__m128 a, __m128 b)
- /// DIVPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> Divide(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_div_ss (__m128 a, __m128 b)
- /// DIVSS xmm, xmm/m32
- /// </summary>
- public static Vector128<float> DivideScalar(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_loadu_ps (float const* mem_address)
- /// MOVUPS xmm, m128
- /// </summary>
- public static unsafe Vector128<float> LoadVector128(float* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_load_ss (float const* mem_address)
- /// MOVSS xmm, m32
- /// </summary>
- public static unsafe Vector128<float> LoadScalarVector128(float* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_load_ps (float const* mem_address)
- /// MOVAPS xmm, m128
- /// </summary>
- public static unsafe Vector128<float> LoadAlignedVector128(float* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_loadh_pi (__m128 a, __m64 const* mem_addr)
- /// MOVHPS xmm, m64
- /// </summary>
- public static unsafe Vector128<float> LoadHigh(Vector128<float> lower, float* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_loadl_pi (__m128 a, __m64 const* mem_addr)
- /// MOVLPS xmm, m64
- /// </summary>
- public static unsafe Vector128<float> LoadLow(Vector128<float> upper, float* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_max_ps (__m128 a, __m128 b)
- /// MAXPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> Max(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_max_ss (__m128 a, __m128 b)
- /// MAXSS xmm, xmm/m32
- /// </summary>
- public static Vector128<float> MaxScalar(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_min_ps (__m128 a, __m128 b)
- /// MINPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> Min(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_min_ss (__m128 a, __m128 b)
- /// MINSS xmm, xmm/m32
- /// </summary>
- public static Vector128<float> MinScalar(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_move_ss (__m128 a, __m128 b)
- /// MOVSS xmm, xmm
- /// </summary>
- public static Vector128<float> MoveScalar(Vector128<float> upper, Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_movehl_ps (__m128 a, __m128 b)
- /// MOVHLPS xmm, xmm
- /// </summary>
- public static Vector128<float> MoveHighToLow(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_movelh_ps (__m128 a, __m128 b)
- /// MOVLHPS xmm, xmm
- /// </summary>
- public static Vector128<float> MoveLowToHigh(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_movemask_ps (__m128 a)
- /// MOVMSKPS reg, xmm
- /// </summary>
- public static int MoveMask(Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_mul_ps (__m128 a, __m128 b)
- /// MULPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> Multiply(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_mul_ss (__m128 a, __m128 b)
- /// MULPS xmm, xmm/m32
- /// </summary>
- public static Vector128<float> MultiplyScalar(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm_prefetch(char* p, int i)
- /// PREFETCHT0 m8
- /// </summary>
- public static unsafe void Prefetch0(void* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm_prefetch(char* p, int i)
- /// PREFETCHT1 m8
- /// </summary>
- public static unsafe void Prefetch1(void* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm_prefetch(char* p, int i)
- /// PREFETCHT2 m8
- /// </summary>
- public static unsafe void Prefetch2(void* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm_prefetch(char* p, int i)
- /// PREFETCHNTA m8
- /// </summary>
- public static unsafe void PrefetchNonTemporal(void* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_or_ps (__m128 a, __m128 b)
- /// ORPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> Or(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_rcp_ps (__m128 a)
- /// RCPPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> Reciprocal(Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_rcp_ss (__m128 a)
- /// RCPSS xmm, xmm/m32
- /// </summary>
- public static Vector128<float> ReciprocalScalar(Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_rcp_ss (__m128 a, __m128 b)
- /// RCPSS xmm, xmm/m32
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<float> ReciprocalScalar(Vector128<float> upper, Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_rsqrt_ps (__m128 a)
- /// RSQRTPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> ReciprocalSqrt(Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_rsqrt_ss (__m128 a)
- /// RSQRTSS xmm, xmm/m32
- /// </summary>
- public static Vector128<float> ReciprocalSqrtScalar(Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_rsqrt_ss (__m128 a, __m128 b)
- /// RSQRTSS xmm, xmm/m32
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<float> ReciprocalSqrtScalar(Vector128<float> upper, Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_shuffle_ps (__m128 a, __m128 b, unsigned int control)
- /// SHUFPS xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<float> Shuffle(Vector128<float> left, Vector128<float> right, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_sqrt_ps (__m128 a)
- /// SQRTPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> Sqrt(Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_sqrt_ss (__m128 a)
- /// SQRTSS xmm, xmm/m32
- /// </summary>
- public static Vector128<float> SqrtScalar(Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_sqrt_ss (__m128 a, __m128 b)
- /// SQRTSS xmm, xmm/m32
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<float> SqrtScalar(Vector128<float> upper, Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm_store_ps (float* mem_addr, __m128 a)
- /// MOVAPS m128, xmm
- /// </summary>
- public static unsafe void StoreAligned(float* address, Vector128<float> source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm_stream_ps (float* mem_addr, __m128 a)
- /// MOVNTPS m128, xmm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(float* address, Vector128<float> source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm_storeu_ps (float* mem_addr, __m128 a)
- /// MOVUPS m128, xmm
- /// </summary>
- public static unsafe void Store(float* address, Vector128<float> source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm_sfence(void)
- /// SFENCE
- /// </summary>
- public static void StoreFence() { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm_store_ss (float* mem_addr, __m128 a)
- /// MOVSS m32, xmm
- /// </summary>
- public static unsafe void StoreScalar(float* address, Vector128<float> source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm_storeh_pi (__m64* mem_addr, __m128 a)
- /// MOVHPS m64, xmm
- /// </summary>
- public static unsafe void StoreHigh(float* address, Vector128<float> source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm_storel_pi (__m64* mem_addr, __m128 a)
- /// MOVLPS m64, xmm
- /// </summary>
- public static unsafe void StoreLow(float* address, Vector128<float> source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_sub_ps (__m128d a, __m128d b)
- /// SUBPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> Subtract(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_sub_ss (__m128 a, __m128 b)
- /// SUBSS xmm, xmm/m32
- /// </summary>
- public static Vector128<float> SubtractScalar(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_unpackhi_ps (__m128 a, __m128 b)
- /// UNPCKHPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> UnpackHigh(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_unpacklo_ps (__m128 a, __m128 b)
- /// UNPCKLPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> UnpackLow(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_xor_ps (__m128 a, __m128 b)
- /// XORPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> Xor(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse.cs
deleted file mode 100644
index f5cf132e4bc..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse.cs
+++ /dev/null
@@ -1,573 +0,0 @@
-// 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.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel SSE hardware instructions via intrinsics
- /// </summary>
- [Intrinsic]
- [CLSCompliant(false)]
- public abstract class Sse
- {
- internal Sse() { }
-
- public static bool IsSupported { get => IsSupported; }
-
- [Intrinsic]
- public abstract class X64
- {
- internal X64() { }
-
- public static bool IsSupported { get => IsSupported; }
-
- /// <summary>
- /// __int64 _mm_cvtss_si64 (__m128 a)
- /// CVTSS2SI r64, xmm/m32
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static long ConvertToInt64(Vector128<float> value) => ConvertToInt64(value);
- /// <summary>
- /// __m128 _mm_cvtsi64_ss (__m128 a, __int64 b)
- /// CVTSI2SS xmm, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static Vector128<float> ConvertScalarToVector128Single(Vector128<float> upper, long value) => ConvertScalarToVector128Single(upper, value);
-
- /// <summary>
- /// __int64 _mm_cvttss_si64 (__m128 a)
- /// CVTTSS2SI r64, xmm/m32
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static long ConvertToInt64WithTruncation(Vector128<float> value) => ConvertToInt64WithTruncation(value);
- }
-
- /// <summary>
- /// __m128 _mm_add_ps (__m128 a, __m128 b)
- /// ADDPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> Add(Vector128<float> left, Vector128<float> right) => Add(left, right);
-
- /// <summary>
- /// __m128 _mm_add_ss (__m128 a, __m128 b)
- /// ADDSS xmm, xmm/m32
- /// </summary>
- public static Vector128<float> AddScalar(Vector128<float> left, Vector128<float> right) => AddScalar(left, right);
-
- /// <summary>
- /// __m128 _mm_and_ps (__m128 a, __m128 b)
- /// ANDPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> And(Vector128<float> left, Vector128<float> right) => And(left, right);
-
- /// <summary>
- /// __m128 _mm_andnot_ps (__m128 a, __m128 b)
- /// ANDNPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> AndNot(Vector128<float> left, Vector128<float> right) => AndNot(left, right);
-
- /// <summary>
- /// __m128 _mm_cmpeq_ps (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m128, imm8(0)
- /// </summary>
- public static Vector128<float> CompareEqual(Vector128<float> left, Vector128<float> right) => CompareEqual(left, right);
-
- /// <summary>
- /// int _mm_comieq_ss (__m128 a, __m128 b)
- /// COMISS xmm, xmm/m32
- /// </summary>
- public static bool CompareScalarOrderedEqual(Vector128<float> left, Vector128<float> right) => CompareScalarOrderedEqual(left, right);
-
- /// <summary>
- /// int _mm_ucomieq_ss (__m128 a, __m128 b)
- /// UCOMISS xmm, xmm/m32
- /// </summary>
- public static bool CompareScalarUnorderedEqual(Vector128<float> left, Vector128<float> right) => CompareScalarUnorderedEqual(left, right);
-
- /// <summary>
- /// __m128 _mm_cmpeq_ss (__m128 a, __m128 b)
- /// CMPSS xmm, xmm/m32, imm8(0)
- /// </summary>
- public static Vector128<float> CompareScalarEqual(Vector128<float> left, Vector128<float> right) => CompareScalarEqual(left, right);
-
- /// <summary>
- /// __m128 _mm_cmpgt_ps (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m128, imm8(6)
- /// </summary>
- public static Vector128<float> CompareGreaterThan(Vector128<float> left, Vector128<float> right) => CompareGreaterThan(left, right);
-
- /// <summary>
- /// int _mm_comigt_ss (__m128 a, __m128 b)
- /// COMISS xmm, xmm/m32
- /// </summary>
- public static bool CompareScalarOrderedGreaterThan(Vector128<float> left, Vector128<float> right) => CompareScalarOrderedGreaterThan(left, right);
-
- /// <summary>
- /// int _mm_ucomigt_ss (__m128 a, __m128 b)
- /// UCOMISS xmm, xmm/m32
- /// </summary>
- public static bool CompareScalarUnorderedGreaterThan(Vector128<float> left, Vector128<float> right) => CompareScalarUnorderedGreaterThan(left, right);
-
- /// <summary>
- /// __m128 _mm_cmpgt_ss (__m128 a, __m128 b)
- /// CMPSS xmm, xmm/m32, imm8(6)
- /// </summary>
- public static Vector128<float> CompareScalarGreaterThan(Vector128<float> left, Vector128<float> right) => CompareScalarGreaterThan(left, right);
-
- /// <summary>
- /// __m128 _mm_cmpge_ps (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m128, imm8(5)
- /// </summary>
- public static Vector128<float> CompareGreaterThanOrEqual(Vector128<float> left, Vector128<float> right) => CompareGreaterThanOrEqual(left, right);
-
- /// <summary>
- /// int _mm_comige_ss (__m128 a, __m128 b)
- /// COMISS xmm, xmm/m32
- /// </summary>
- public static bool CompareScalarOrderedGreaterThanOrEqual(Vector128<float> left, Vector128<float> right) => CompareScalarOrderedGreaterThanOrEqual(left, right);
-
- /// <summary>
- /// int _mm_ucomige_ss (__m128 a, __m128 b)
- /// UCOMISS xmm, xmm/m32
- /// </summary>
- public static bool CompareScalarUnorderedGreaterThanOrEqual(Vector128<float> left, Vector128<float> right) => CompareScalarUnorderedGreaterThanOrEqual(left, right);
-
- /// <summary>
- /// __m128 _mm_cmpge_ss (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m32, imm8(5)
- /// </summary>
- public static Vector128<float> CompareScalarGreaterThanOrEqual(Vector128<float> left, Vector128<float> right) => CompareScalarGreaterThanOrEqual(left, right);
-
- /// <summary>
- /// __m128 _mm_cmplt_ps (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m128, imm8(1)
- /// </summary>
- public static Vector128<float> CompareLessThan(Vector128<float> left, Vector128<float> right) => CompareLessThan(left, right);
-
- /// <summary>
- /// int _mm_comilt_ss (__m128 a, __m128 b)
- /// COMISS xmm, xmm/m32
- /// </summary>
- public static bool CompareScalarOrderedLessThan(Vector128<float> left, Vector128<float> right) => CompareScalarOrderedLessThan(left, right);
-
- /// <summary>
- /// int _mm_ucomilt_ss (__m128 a, __m128 b)
- /// UCOMISS xmm, xmm/m32
- /// </summary>
- public static bool CompareScalarUnorderedLessThan(Vector128<float> left, Vector128<float> right) => CompareScalarUnorderedLessThan(left, right);
-
- /// <summary>
- /// __m128 _mm_cmplt_ss (__m128 a, __m128 b)
- /// CMPSS xmm, xmm/m32, imm8(1)
- /// </summary>
- public static Vector128<float> CompareScalarLessThan(Vector128<float> left, Vector128<float> right) => CompareScalarLessThan(left, right);
-
- /// <summary>
- /// __m128 _mm_cmple_ps (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m128, imm8(2)
- /// </summary>
- public static Vector128<float> CompareLessThanOrEqual(Vector128<float> left, Vector128<float> right) => CompareLessThanOrEqual(left, right);
-
- /// <summary>
- /// int _mm_comile_ss (__m128 a, __m128 b)
- /// COMISS xmm, xmm/m32
- /// </summary>
- public static bool CompareScalarOrderedLessThanOrEqual(Vector128<float> left, Vector128<float> right) => CompareScalarOrderedLessThanOrEqual(left, right);
-
- /// <summary>
- /// int _mm_ucomile_ss (__m128 a, __m128 b)
- /// UCOMISS xmm, xmm/m32
- /// </summary>
- public static bool CompareScalarUnorderedLessThanOrEqual(Vector128<float> left, Vector128<float> right) => CompareScalarUnorderedLessThanOrEqual(left, right);
-
- /// <summary>
- /// __m128 _mm_cmple_ss (__m128 a, __m128 b)
- /// CMPSS xmm, xmm/m32, imm8(2)
- /// </summary>
- public static Vector128<float> CompareScalarLessThanOrEqual(Vector128<float> left, Vector128<float> right) => CompareScalarLessThanOrEqual(left, right);
-
- /// <summary>
- /// __m128 _mm_cmpneq_ps (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m128, imm8(4)
- /// </summary>
- public static Vector128<float> CompareNotEqual(Vector128<float> left, Vector128<float> right) => CompareNotEqual(left, right);
-
- /// <summary>
- /// int _mm_comineq_ss (__m128 a, __m128 b)
- /// COMISS xmm, xmm/m32
- /// </summary>
- public static bool CompareScalarOrderedNotEqual(Vector128<float> left, Vector128<float> right) => CompareScalarOrderedNotEqual(left, right);
-
- /// <summary>
- /// int _mm_ucomineq_ss (__m128 a, __m128 b)
- /// UCOMISS xmm, xmm/m32
- /// </summary>
- public static bool CompareScalarUnorderedNotEqual(Vector128<float> left, Vector128<float> right) => CompareScalarUnorderedNotEqual(left, right);
-
- /// <summary>
- /// __m128 _mm_cmpneq_ss (__m128 a, __m128 b)
- /// CMPSS xmm, xmm/m32, imm8(4)
- /// </summary>
- public static Vector128<float> CompareScalarNotEqual(Vector128<float> left, Vector128<float> right) => CompareScalarNotEqual(left, right);
-
- /// <summary>
- /// __m128 _mm_cmpngt_ps (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m128, imm8(2)
- /// </summary>
- public static Vector128<float> CompareNotGreaterThan(Vector128<float> left, Vector128<float> right) => CompareNotGreaterThan(left, right);
-
- /// <summary>
- /// __m128 _mm_cmpngt_ss (__m128 a, __m128 b)
- /// CMPSS xmm, xmm/m32, imm8(2)
- /// </summary>
- public static Vector128<float> CompareScalarNotGreaterThan(Vector128<float> left, Vector128<float> right) => CompareScalarNotGreaterThan(left, right);
-
- /// <summary>
- /// __m128 _mm_cmpnge_ps (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m128, imm8(1)
- /// </summary>
- public static Vector128<float> CompareNotGreaterThanOrEqual(Vector128<float> left, Vector128<float> right) => CompareNotGreaterThanOrEqual(left, right);
-
- /// <summary>
- /// __m128 _mm_cmpnge_ss (__m128 a, __m128 b)
- /// CMPSS xmm, xmm/m32, imm8(1)
- /// </summary>
- public static Vector128<float> CompareScalarNotGreaterThanOrEqual(Vector128<float> left, Vector128<float> right) => CompareScalarNotGreaterThanOrEqual(left, right);
-
- /// <summary>
- /// __m128 _mm_cmpnlt_ps (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m128, imm8(5)
- /// </summary>
- public static Vector128<float> CompareNotLessThan(Vector128<float> left, Vector128<float> right) => CompareNotLessThan(left, right);
-
- /// <summary>
- /// __m128 _mm_cmpnlt_ss (__m128 a, __m128 b)
- /// CMPSS xmm, xmm/m32, imm8(5)
- /// </summary>
- public static Vector128<float> CompareScalarNotLessThan(Vector128<float> left, Vector128<float> right) => CompareScalarNotLessThan(left, right);
-
- /// <summary>
- /// __m128 _mm_cmpnle_ps (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m128, imm8(6)
- /// </summary>
- public static Vector128<float> CompareNotLessThanOrEqual(Vector128<float> left, Vector128<float> right) => CompareNotLessThanOrEqual(left, right);
-
- /// <summary>
- /// __m128 _mm_cmpnle_ss (__m128 a, __m128 b)
- /// CMPSS xmm, xmm/m32, imm8(6)
- /// </summary>
- public static Vector128<float> CompareScalarNotLessThanOrEqual(Vector128<float> left, Vector128<float> right) => CompareScalarNotLessThanOrEqual(left, right);
-
- /// <summary>
- /// __m128 _mm_cmpord_ps (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m128, imm8(7)
- /// </summary>
- public static Vector128<float> CompareOrdered(Vector128<float> left, Vector128<float> right) => CompareOrdered(left, right);
-
- /// <summary>
- /// __m128 _mm_cmpord_ss (__m128 a, __m128 b)
- /// CMPSS xmm, xmm/m32, imm8(7)
- /// </summary>
- public static Vector128<float> CompareScalarOrdered(Vector128<float> left, Vector128<float> right) => CompareScalarOrdered(left, right);
-
- /// <summary>
- /// __m128 _mm_cmpunord_ps (__m128 a, __m128 b)
- /// CMPPS xmm, xmm/m128, imm8(3)
- /// </summary>
- public static Vector128<float> CompareUnordered(Vector128<float> left, Vector128<float> right) => CompareUnordered(left, right);
-
- /// <summary>
- /// __m128 _mm_cmpunord_ss (__m128 a, __m128 b)
- /// CMPSS xmm, xmm/m32, imm8(3)
- /// </summary>
- public static Vector128<float> CompareScalarUnordered(Vector128<float> left, Vector128<float> right) => CompareScalarUnordered(left, right);
-
- /// <summary>
- /// int _mm_cvtss_si32 (__m128 a)
- /// CVTSS2SI r32, xmm/m32
- /// </summary>
- public static int ConvertToInt32(Vector128<float> value) => ConvertToInt32(value);
-
- /// <summary>
- /// __m128 _mm_cvtsi32_ss (__m128 a, int b)
- /// CVTSI2SS xmm, reg/m32
- /// </summary>
- public static Vector128<float> ConvertScalarToVector128Single(Vector128<float> upper, int value) => ConvertScalarToVector128Single(upper, value);
-
- /// <summary>
- /// int _mm_cvttss_si32 (__m128 a)
- /// CVTTSS2SI r32, xmm/m32
- /// </summary>
- public static int ConvertToInt32WithTruncation(Vector128<float> value) => ConvertToInt32WithTruncation(value);
-
- /// <summary>
- /// __m128 _mm_div_ps (__m128 a, __m128 b)
- /// DIVPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> Divide(Vector128<float> left, Vector128<float> right) => Divide(left, right);
-
- /// <summary>
- /// __m128 _mm_div_ss (__m128 a, __m128 b)
- /// DIVSS xmm, xmm/m32
- /// </summary>
- public static Vector128<float> DivideScalar(Vector128<float> left, Vector128<float> right) => DivideScalar(left, right);
-
- /// <summary>
- /// __m128 _mm_loadu_ps (float const* mem_address)
- /// MOVUPS xmm, m128
- /// </summary>
- public static unsafe Vector128<float> LoadVector128(float* address) => LoadVector128(address);
-
- /// <summary>
- /// __m128 _mm_load_ss (float const* mem_address)
- /// MOVSS xmm, m32
- /// </summary>
- public static unsafe Vector128<float> LoadScalarVector128(float* address) => LoadScalarVector128(address);
-
- /// <summary>
- /// __m128 _mm_load_ps (float const* mem_address)
- /// MOVAPS xmm, m128
- /// </summary>
- public static unsafe Vector128<float> LoadAlignedVector128(float* address) => LoadAlignedVector128(address);
-
- /// <summary>
- /// __m128 _mm_loadh_pi (__m128 a, __m64 const* mem_addr)
- /// MOVHPS xmm, m64
- /// </summary>
- public static unsafe Vector128<float> LoadHigh(Vector128<float> lower, float* address) => LoadHigh(lower, address);
-
- /// <summary>
- /// __m128 _mm_loadl_pi (__m128 a, __m64 const* mem_addr)
- /// MOVLPS xmm, m64
- /// </summary>
- public static unsafe Vector128<float> LoadLow(Vector128<float> upper, float* address) => LoadLow(upper, address);
-
- /// <summary>
- /// __m128 _mm_max_ps (__m128 a, __m128 b)
- /// MAXPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> Max(Vector128<float> left, Vector128<float> right) => Max(left, right);
-
- /// <summary>
- /// __m128 _mm_max_ss (__m128 a, __m128 b)
- /// MAXSS xmm, xmm/m32
- /// </summary>
- public static Vector128<float> MaxScalar(Vector128<float> left, Vector128<float> right) => MaxScalar(left, right);
-
- /// <summary>
- /// __m128 _mm_min_ps (__m128 a, __m128 b)
- /// MINPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> Min(Vector128<float> left, Vector128<float> right) => Min(left, right);
-
- /// <summary>
- /// __m128 _mm_min_ss (__m128 a, __m128 b)
- /// MINSS xmm, xmm/m32
- /// </summary>
- public static Vector128<float> MinScalar(Vector128<float> left, Vector128<float> right) => MinScalar(left, right);
-
- /// <summary>
- /// __m128 _mm_move_ss (__m128 a, __m128 b)
- /// MOVSS xmm, xmm
- /// </summary>
- public static Vector128<float> MoveScalar(Vector128<float> upper, Vector128<float> value) => MoveScalar(upper, value);
-
- /// <summary>
- /// __m128 _mm_movehl_ps (__m128 a, __m128 b)
- /// MOVHLPS xmm, xmm
- /// </summary>
- public static Vector128<float> MoveHighToLow(Vector128<float> left, Vector128<float> right) => MoveHighToLow(left, right);
-
- /// <summary>
- /// __m128 _mm_movelh_ps (__m128 a, __m128 b)
- /// MOVLHPS xmm, xmm
- /// </summary>
- public static Vector128<float> MoveLowToHigh(Vector128<float> left, Vector128<float> right) => MoveLowToHigh(left, right);
-
- /// <summary>
- /// int _mm_movemask_ps (__m128 a)
- /// MOVMSKPS reg, xmm
- /// </summary>
- public static int MoveMask(Vector128<float> value) => MoveMask(value);
-
- /// <summary>
- /// __m128 _mm_mul_ps (__m128 a, __m128 b)
- /// MULPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> Multiply(Vector128<float> left, Vector128<float> right) => Multiply(left, right);
-
- /// <summary>
- /// __m128 _mm_mul_ss (__m128 a, __m128 b)
- /// MULPS xmm, xmm/m32
- /// </summary>
- public static Vector128<float> MultiplyScalar(Vector128<float> left, Vector128<float> right) => MultiplyScalar(left, right);
-
- /// <summary>
- /// __m128 _mm_or_ps (__m128 a, __m128 b)
- /// ORPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> Or(Vector128<float> left, Vector128<float> right) => Or(left, right);
-
- /// <summary>
- /// void _mm_prefetch(char* p, int i)
- /// PREFETCHT0 m8
- /// </summary>
- public static unsafe void Prefetch0(void* address) => Prefetch0(address);
-
- /// <summary>
- /// void _mm_prefetch(char* p, int i)
- /// PREFETCHT1 m8
- /// </summary>
- public static unsafe void Prefetch1(void* address) => Prefetch1(address);
-
- /// <summary>
- /// void _mm_prefetch(char* p, int i)
- /// PREFETCHT2 m8
- /// </summary>
- public static unsafe void Prefetch2(void* address) => Prefetch2(address);
-
- /// <summary>
- /// void _mm_prefetch(char* p, int i)
- /// PREFETCHNTA m8
- /// </summary>
- public static unsafe void PrefetchNonTemporal(void* address) => PrefetchNonTemporal(address);
-
- /// <summary>
- /// __m128 _mm_rcp_ps (__m128 a)
- /// RCPPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> Reciprocal(Vector128<float> value) => Reciprocal(value);
-
- /// <summary>
- /// __m128 _mm_rcp_ss (__m128 a)
- /// RCPSS xmm, xmm/m32
- /// </summary>
- public static Vector128<float> ReciprocalScalar(Vector128<float> value) => ReciprocalScalar(value);
-
- /// <summary>
- /// __m128 _mm_rcp_ss (__m128 a, __m128 b)
- /// RCPSS xmm, xmm/m32
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<float> ReciprocalScalar(Vector128<float> upper, Vector128<float> value) => ReciprocalScalar(upper, value);
-
- /// <summary>
- /// __m128 _mm_rsqrt_ps (__m128 a)
- /// RSQRTPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> ReciprocalSqrt(Vector128<float> value) => ReciprocalSqrt(value);
-
- /// <summary>
- /// __m128 _mm_rsqrt_ss (__m128 a)
- /// RSQRTSS xmm, xmm/m32
- /// </summary>
- public static Vector128<float> ReciprocalSqrtScalar(Vector128<float> value) => ReciprocalSqrtScalar(value);
-
- /// <summary>
- /// __m128 _mm_rsqrt_ss (__m128 a, __m128 b)
- /// RSQRTSS xmm, xmm/m32
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<float> ReciprocalSqrtScalar(Vector128<float> upper, Vector128<float> value) => ReciprocalSqrtScalar(upper, value);
-
- /// <summary>
- /// __m128 _mm_shuffle_ps (__m128 a, __m128 b, unsigned int control)
- /// SHUFPS xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<float> Shuffle(Vector128<float> left, Vector128<float> right, byte control) => Shuffle(left, right, control);
-
- /// <summary>
- /// __m128 _mm_sqrt_ps (__m128 a)
- /// SQRTPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> Sqrt(Vector128<float> value) => Sqrt(value);
-
- /// <summary>
- /// __m128 _mm_sqrt_ss (__m128 a)
- /// SQRTSS xmm, xmm/m32
- /// </summary>
- public static Vector128<float> SqrtScalar(Vector128<float> value) => SqrtScalar(value);
-
- /// <summary>
- /// __m128 _mm_sqrt_ss (__m128 a, __m128 b)
- /// SQRTSS xmm, xmm/m32
- /// The above native signature does not exist. We provide this additional overload for consistency with the other scalar APIs.
- /// </summary>
- public static Vector128<float> SqrtScalar(Vector128<float> upper, Vector128<float> value) => SqrtScalar(upper, value);
-
- /// <summary>
- /// void _mm_store_ps (float* mem_addr, __m128 a)
- /// MOVAPS m128, xmm
- /// </summary>
- public static unsafe void StoreAligned(float* address, Vector128<float> source) => StoreAligned(address, source);
-
- /// <summary>
- /// void _mm_stream_ps (float* mem_addr, __m128 a)
- /// MOVNTPS m128, xmm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(float* address, Vector128<float> source) => StoreAlignedNonTemporal(address, source);
-
- /// <summary>
- /// void _mm_storeu_ps (float* mem_addr, __m128 a)
- /// MOVUPS m128, xmm
- /// </summary>
- public static unsafe void Store(float* address, Vector128<float> source) => Store(address, source);
-
- /// <summary>
- /// void _mm_sfence(void)
- /// SFENCE
- /// </summary>
- public static void StoreFence() => StoreFence();
-
- /// <summary>
- /// void _mm_store_ss (float* mem_addr, __m128 a)
- /// MOVSS m32, xmm
- /// </summary>
- public static unsafe void StoreScalar(float* address, Vector128<float> source) => StoreScalar(address, source);
-
- /// <summary>
- /// void _mm_storeh_pi (__m64* mem_addr, __m128 a)
- /// MOVHPS m64, xmm
- /// </summary>
- public static unsafe void StoreHigh(float* address, Vector128<float> source) => StoreHigh(address, source);
-
- /// <summary>
- /// void _mm_storel_pi (__m64* mem_addr, __m128 a)
- /// MOVLPS m64, xmm
- /// </summary>
- public static unsafe void StoreLow(float* address, Vector128<float> source) => StoreLow(address, source);
-
- /// <summary>
- /// __m128d _mm_sub_ps (__m128d a, __m128d b)
- /// SUBPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> Subtract(Vector128<float> left, Vector128<float> right) => Subtract(left, right);
-
- /// <summary>
- /// __m128 _mm_sub_ss (__m128 a, __m128 b)
- /// SUBSS xmm, xmm/m32
- /// </summary>
- public static Vector128<float> SubtractScalar(Vector128<float> left, Vector128<float> right) => SubtractScalar(left, right);
-
- /// <summary>
- /// __m128 _mm_unpackhi_ps (__m128 a, __m128 b)
- /// UNPCKHPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> UnpackHigh(Vector128<float> left, Vector128<float> right) => UnpackHigh(left, right);
-
- /// <summary>
- /// __m128 _mm_unpacklo_ps (__m128 a, __m128 b)
- /// UNPCKLPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> UnpackLow(Vector128<float> left, Vector128<float> right) => UnpackLow(left, right);
-
- /// <summary>
- /// __m128 _mm_xor_ps (__m128 a, __m128 b)
- /// XORPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> Xor(Vector128<float> left, Vector128<float> right) => Xor(left, right);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse2.PlatformNotSupported.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse2.PlatformNotSupported.cs
deleted file mode 100644
index df46013a29b..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse2.PlatformNotSupported.cs
+++ /dev/null
@@ -1,1680 +0,0 @@
-// 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;
-using System.Runtime.CompilerServices;
-using System.Runtime.Intrinsics;
-
-namespace System.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel SSE2 hardware instructions via intrinsics
- /// </summary>
- [CLSCompliant(false)]
- public abstract class Sse2 : Sse
- {
- internal Sse2() { }
-
- public static new bool IsSupported { [Intrinsic] get { return false; } }
-
- public new abstract class X64 : Sse.X64
- {
- internal X64() { }
-
- public static new bool IsSupported { [Intrinsic] get { return false; } }
-
- /// <summary>
- /// __int64 _mm_cvtsd_si64 (__m128d a)
- /// CVTSD2SI r64, xmm/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static long ConvertToInt64(Vector128<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __int64 _mm_cvtsi128_si64 (__m128i a)
- /// MOVQ reg/m64, xmm
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static long ConvertToInt64(Vector128<long> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __int64 _mm_cvtsi128_si64 (__m128i a)
- /// MOVQ reg/m64, xmm
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong ConvertToUInt64(Vector128<ulong> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_cvtsi64_sd (__m128d a, __int64 b)
- /// CVTSI2SD xmm, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static Vector128<double> ConvertScalarToVector128Double(Vector128<double> upper, long value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_cvtsi64_si128 (__int64 a)
- /// MOVQ xmm, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static Vector128<long> ConvertScalarToVector128Int64(long value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_cvtsi64_si128 (__int64 a)
- /// MOVQ xmm, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static Vector128<ulong> ConvertScalarToVector128UInt64(ulong value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __int64 _mm_cvttsd_si64 (__m128d a)
- /// CVTTSD2SI reg, xmm/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static long ConvertToInt64WithTruncation(Vector128<double> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm_stream_si64(__int64 *p, __int64 a)
- /// MOVNTI m64, r64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static unsafe void StoreNonTemporal(long* address, long value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_stream_si64(__int64 *p, __int64 a)
- /// MOVNTI m64, r64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static unsafe void StoreNonTemporal(ulong* address, ulong value) { throw new PlatformNotSupportedException(); }
- }
-
- /// <summary>
- /// __m128i _mm_add_epi8 (__m128i a, __m128i b)
- /// PADDB xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> Add(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_add_epi8 (__m128i a, __m128i b)
- /// PADDB xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> Add(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_add_epi16 (__m128i a, __m128i b)
- /// PADDW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> Add(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_add_epi16 (__m128i a, __m128i b)
- /// PADDW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> Add(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_add_epi32 (__m128i a, __m128i b)
- /// PADDD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> Add(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_add_epi32 (__m128i a, __m128i b)
- /// PADDD xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> Add(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_add_epi64 (__m128i a, __m128i b)
- /// PADDQ xmm, xmm/m128
- /// </summary>
- public static Vector128<long> Add(Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_add_epi64 (__m128i a, __m128i b)
- /// PADDQ xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> Add(Vector128<ulong> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_add_pd (__m128d a, __m128d b)
- /// ADDPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> Add(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_add_sd (__m128d a, __m128d b)
- /// ADDSD xmm, xmm/m64
- /// </summary>
- public static Vector128<double> AddScalar(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_adds_epi8 (__m128i a, __m128i b)
- /// PADDSB xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> AddSaturate(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_adds_epu8 (__m128i a, __m128i b)
- /// PADDUSB xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> AddSaturate(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_adds_epi16 (__m128i a, __m128i b)
- /// PADDSW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> AddSaturate(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_adds_epu16 (__m128i a, __m128i b)
- /// PADDUSW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> AddSaturate(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_and_si128 (__m128i a, __m128i b)
- /// PAND xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> And(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_and_si128 (__m128i a, __m128i b)
- /// PAND xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> And(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_and_si128 (__m128i a, __m128i b)
- /// PAND xmm, xmm/m128
- /// </summary>
- public static Vector128<short> And(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_and_si128 (__m128i a, __m128i b)
- /// PAND xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> And(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_and_si128 (__m128i a, __m128i b)
- /// PAND xmm, xmm/m128
- /// </summary>
- public static Vector128<int> And(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_and_si128 (__m128i a, __m128i b)
- /// PAND xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> And(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_and_si128 (__m128i a, __m128i b)
- /// PAND xmm, xmm/m128
- /// </summary>
- public static Vector128<long> And(Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_and_si128 (__m128i a, __m128i b)
- /// PAND xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> And(Vector128<ulong> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_and_pd (__m128d a, __m128d b)
- /// ANDPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> And(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_andnot_si128 (__m128i a, __m128i b)
- /// PANDN xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> AndNot(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_andnot_si128 (__m128i a, __m128i b)
- /// PANDN xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> AndNot(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_andnot_si128 (__m128i a, __m128i b)
- /// PANDN xmm, xmm/m128
- /// </summary>
- public static Vector128<short> AndNot(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_andnot_si128 (__m128i a, __m128i b)
- /// PANDN xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> AndNot(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_andnot_si128 (__m128i a, __m128i b)
- /// PANDN xmm, xmm/m128
- /// </summary>
- public static Vector128<int> AndNot(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_andnot_si128 (__m128i a, __m128i b)
- /// PANDN xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> AndNot(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_andnot_si128 (__m128i a, __m128i b)
- /// PANDN xmm, xmm/m128
- /// </summary>
- public static Vector128<long> AndNot(Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_andnot_si128 (__m128i a, __m128i b)
- /// PANDN xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> AndNot(Vector128<ulong> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_andnot_pd (__m128d a, __m128d b)
- /// ADDNPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> AndNot(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_avg_epu8 (__m128i a, __m128i b)
- /// PAVGB xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> Average(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_avg_epu16 (__m128i a, __m128i b)
- /// PAVGW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> Average(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_cmpeq_epi8 (__m128i a, __m128i b)
- /// PCMPEQB xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> CompareEqual(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_cmpeq_epi8 (__m128i a, __m128i b)
- /// PCMPEQB xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> CompareEqual(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_cmpeq_epi16 (__m128i a, __m128i b)
- /// PCMPEQW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> CompareEqual(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_cmpeq_epi16 (__m128i a, __m128i b)
- /// PCMPEQW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> CompareEqual(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_cmpeq_epi32 (__m128i a, __m128i b)
- /// PCMPEQD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> CompareEqual(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_cmpeq_epi32 (__m128i a, __m128i b)
- /// PCMPEQD xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> CompareEqual(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_cmpeq_pd (__m128d a, __m128d b)
- /// CMPPD xmm, xmm/m128, imm8(0)
- /// </summary>
- public static Vector128<double> CompareEqual(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_comieq_sd (__m128d a, __m128d b)
- /// COMISD xmm, xmm/m64
- /// </summary>
- public static bool CompareScalarOrderedEqual(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_ucomieq_sd (__m128d a, __m128d b)
- /// UCOMISD xmm, xmm/m64
- /// </summary>
- public static bool CompareScalarUnorderedEqual(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_cmpeq_sd (__m128d a, __m128d b)
- /// CMPSD xmm, xmm/m64, imm8(0)
- /// </summary>
- public static Vector128<double> CompareScalarEqual(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_cmpgt_epi8 (__m128i a, __m128i b)
- /// PCMPGTB xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> CompareGreaterThan(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_cmpgt_epi16 (__m128i a, __m128i b)
- /// PCMPGTW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> CompareGreaterThan(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_cmpgt_epi32 (__m128i a, __m128i b)
- /// PCMPGTD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> CompareGreaterThan(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_cmpgt_pd (__m128d a, __m128d b)
- /// CMPPD xmm, xmm/m128, imm8(6)
- /// </summary>
- public static Vector128<double> CompareGreaterThan(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_comigt_sd (__m128d a, __m128d b)
- /// COMISD xmm, xmm/m64
- /// </summary>
- public static bool CompareScalarOrderedGreaterThan(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_ucomigt_sd (__m128d a, __m128d b)
- /// UCOMISD xmm, xmm/m64
- /// </summary>
- public static bool CompareScalarUnorderedGreaterThan(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_cmpgt_sd (__m128d a, __m128d b)
- /// CMPSD xmm, xmm/m64, imm8(6)
- /// </summary>
- public static Vector128<double> CompareScalarGreaterThan(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_cmpge_pd (__m128d a, __m128d b)
- /// CMPPD xmm, xmm/m128, imm8(5)
- /// </summary>
- public static Vector128<double> CompareGreaterThanOrEqual(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_comige_sd (__m128d a, __m128d b)
- /// COMISD xmm, xmm/m64
- /// </summary>
- public static bool CompareScalarOrderedGreaterThanOrEqual(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_ucomige_sd (__m128d a, __m128d b)
- /// UCOMISD xmm, xmm/m64
- /// </summary>
- public static bool CompareScalarUnorderedGreaterThanOrEqual(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_cmpge_sd (__m128d a, __m128d b)
- /// CMPSD xmm, xmm/m64, imm8(5)
- /// </summary>
- public static Vector128<double> CompareScalarGreaterThanOrEqual(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_cmplt_epi8 (__m128i a, __m128i b)
- /// PCMPGTB xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> CompareLessThan(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_cmplt_epi16 (__m128i a, __m128i b)
- /// PCMPGTW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> CompareLessThan(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_cmplt_epi32 (__m128i a, __m128i b)
- /// PCMPGTD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> CompareLessThan(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_cmplt_pd (__m128d a, __m128d b)
- /// CMPPD xmm, xmm/m128, imm8(1)
- /// </summary>
- public static Vector128<double> CompareLessThan(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_comilt_sd (__m128d a, __m128d b)
- /// COMISD xmm, xmm/m64
- /// </summary>
- public static bool CompareScalarOrderedLessThan(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_ucomilt_sd (__m128d a, __m128d b)
- /// UCOMISD xmm, xmm/m64
- /// </summary>
- public static bool CompareScalarUnorderedLessThan(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_cmplt_sd (__m128d a, __m128d b)
- /// CMPSD xmm, xmm/m64, imm8(1)
- /// </summary>
- public static Vector128<double> CompareScalarLessThan(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_cmple_pd (__m128d a, __m128d b)
- /// CMPPD xmm, xmm/m128, imm8(2)
- /// </summary>
- public static Vector128<double> CompareLessThanOrEqual(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_comile_sd (__m128d a, __m128d b)
- /// COMISD xmm, xmm/m64
- /// </summary>
- public static bool CompareScalarOrderedLessThanOrEqual(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_ucomile_sd (__m128d a, __m128d b)
- /// UCOMISD xmm, xmm/m64
- /// </summary>
- public static bool CompareScalarUnorderedLessThanOrEqual(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_cmple_sd (__m128d a, __m128d b)
- /// CMPSD xmm, xmm/m64, imm8(2)
- /// </summary>
- public static Vector128<double> CompareScalarLessThanOrEqual(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_cmpneq_pd (__m128d a, __m128d b)
- /// CMPPD xmm, xmm/m128, imm8(4)
- /// </summary>
- public static Vector128<double> CompareNotEqual(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_comineq_sd (__m128d a, __m128d b)
- /// COMISD xmm, xmm/m64
- /// </summary>
- public static bool CompareScalarOrderedNotEqual(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_ucomineq_sd (__m128d a, __m128d b)
- /// UCOMISD xmm, xmm/m64
- /// </summary>
- public static bool CompareScalarUnorderedNotEqual(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_cmpneq_sd (__m128d a, __m128d b)
- /// CMPSD xmm, xmm/m64, imm8(4)
- /// </summary>
- public static Vector128<double> CompareScalarNotEqual(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_cmpngt_pd (__m128d a, __m128d b)
- /// CMPPD xmm, xmm/m128, imm8(2)
- /// </summary>
- public static Vector128<double> CompareNotGreaterThan(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_cmpngt_sd (__m128d a, __m128d b)
- /// CMPSD xmm, xmm/m64, imm8(2)
- /// </summary>
- public static Vector128<double> CompareScalarNotGreaterThan(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_cmpnge_pd (__m128d a, __m128d b)
- /// CMPPD xmm, xmm/m128, imm8(1)
- /// </summary>
- public static Vector128<double> CompareNotGreaterThanOrEqual(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_cmpnge_sd (__m128d a, __m128d b)
- /// CMPSD xmm, xmm/m64, imm8(1)
- /// </summary>
- public static Vector128<double> CompareScalarNotGreaterThanOrEqual(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_cmpnlt_pd (__m128d a, __m128d b)
- /// CMPPD xmm, xmm/m128, imm8(5)
- /// </summary>
- public static Vector128<double> CompareNotLessThan(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_cmpnlt_sd (__m128d a, __m128d b)
- /// CMPSD xmm, xmm/m64, imm8(5)
- /// </summary>
- public static Vector128<double> CompareScalarNotLessThan(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_cmpnle_pd (__m128d a, __m128d b)
- /// CMPPD xmm, xmm/m128, imm8(6)
- /// </summary>
- public static Vector128<double> CompareNotLessThanOrEqual(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_cmpnle_sd (__m128d a, __m128d b)
- /// CMPSD xmm, xmm/m64, imm8(6)
- /// </summary>
- public static Vector128<double> CompareScalarNotLessThanOrEqual(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_cmpord_pd (__m128d a, __m128d b)
- /// CMPPD xmm, xmm/m128, imm8(7)
- /// </summary>
- public static Vector128<double> CompareOrdered(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_cmpord_sd (__m128d a, __m128d b)
- /// CMPSD xmm, xmm/m64, imm8(7)
- /// </summary>
- public static Vector128<double> CompareScalarOrdered(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_cmpunord_pd (__m128d a, __m128d b)
- /// CMPPD xmm, xmm/m128, imm8(3)
- /// </summary>
- public static Vector128<double> CompareUnordered(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_cmpunord_sd (__m128d a, __m128d b)
- /// CMPSD xmm, xmm/m64, imm8(3)
- /// </summary>
- public static Vector128<double> CompareScalarUnordered(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_cvtps_epi32 (__m128 a)
- /// CVTPS2DQ xmm, xmm/m128
- /// </summary>
- public static Vector128<int> ConvertToVector128Int32(Vector128<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_cvtpd_epi32 (__m128d a)
- /// CVTPD2DQ xmm, xmm/m128
- /// </summary>
- public static Vector128<int> ConvertToVector128Int32(Vector128<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm_cvtepi32_ps (__m128i a)
- /// CVTDQ2PS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> ConvertToVector128Single(Vector128<int> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm_cvtpd_ps (__m128d a)
- /// CVTPD2PS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> ConvertToVector128Single(Vector128<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_cvtepi32_pd (__m128i a)
- /// CVTDQ2PD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> ConvertToVector128Double(Vector128<int> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_cvtps_pd (__m128 a)
- /// CVTPS2PD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> ConvertToVector128Double(Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_cvtsd_si32 (__m128d a)
- /// CVTSD2SI r32, xmm/m64
- /// </summary>
- public static int ConvertToInt32(Vector128<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// int _mm_cvtsi128_si32 (__m128i a)
- /// MOVD reg/m32, xmm
- /// </summary>
- public static int ConvertToInt32(Vector128<int> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// int _mm_cvtsi128_si32 (__m128i a)
- /// MOVD reg/m32, xmm
- /// </summary>
- public static uint ConvertToUInt32(Vector128<uint> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_cvtsi32_sd (__m128d a, int b)
- /// CVTSI2SD xmm, reg/m32
- /// </summary>
- public static Vector128<double> ConvertScalarToVector128Double(Vector128<double> upper, int value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_cvtss_sd (__m128d a, __m128 b)
- /// CVTSS2SD xmm, xmm/m32
- /// </summary>
- public static Vector128<double> ConvertScalarToVector128Double(Vector128<double> upper, Vector128<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_cvtsi32_si128 (int a)
- /// MOVD xmm, reg/m32
- /// </summary>
- public static Vector128<int> ConvertScalarToVector128Int32(int value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm_cvtsd_ss (__m128 a, __m128d b)
- /// CVTSD2SS xmm, xmm/m64
- /// </summary>
- public static Vector128<float> ConvertScalarToVector128Single(Vector128<float> upper, Vector128<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_cvtsi32_si128 (int a)
- /// MOVD xmm, reg/m32
- /// </summary>
- public static Vector128<uint> ConvertScalarToVector128UInt32(uint value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_cvttps_epi32 (__m128 a)
- /// CVTTPS2DQ xmm, xmm/m128
- /// </summary>
- public static Vector128<int> ConvertToVector128Int32WithTruncation(Vector128<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_cvttpd_epi32 (__m128d a)
- /// CVTTPD2DQ xmm, xmm/m128
- /// </summary>
- public static Vector128<int> ConvertToVector128Int32WithTruncation(Vector128<double> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_cvttsd_si32 (__m128d a)
- /// CVTTSD2SI reg, xmm/m64
- /// </summary>
- public static int ConvertToInt32WithTruncation(Vector128<double> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_div_pd (__m128d a, __m128d b)
- /// DIVPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> Divide(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_div_sd (__m128d a, __m128d b)
- /// DIVSD xmm, xmm/m64
- /// </summary>
- public static Vector128<double> DivideScalar(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_extract_epi16 (__m128i a, int immediate)
- /// PEXTRW reg, xmm, imm8
- /// </summary>
- public static ushort Extract(Vector128<ushort> value, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_insert_epi16 (__m128i a, int i, int immediate)
- /// PINSRW xmm, reg/m16, imm8
- /// </summary>
- public static Vector128<short> Insert(Vector128<short> value, short data, byte index) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_insert_epi16 (__m128i a, int i, int immediate)
- /// PINSRW xmm, reg/m16, imm8
- /// </summary>
- public static Vector128<ushort> Insert(Vector128<ushort> value, ushort data, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_loadu_si128 (__m128i const* mem_address)
- /// MOVDQU xmm, m128
- /// </summary>
- public static unsafe Vector128<sbyte> LoadVector128(sbyte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_loadu_si128 (__m128i const* mem_address)
- /// MOVDQU xmm, m128
- /// </summary>
- public static unsafe Vector128<byte> LoadVector128(byte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_loadu_si128 (__m128i const* mem_address)
- /// MOVDQU xmm, m128
- /// </summary>
- public static unsafe Vector128<short> LoadVector128(short* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_loadu_si128 (__m128i const* mem_address)
- /// MOVDQU xmm, m128
- /// </summary>
- public static unsafe Vector128<ushort> LoadVector128(ushort* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_loadu_si128 (__m128i const* mem_address)
- /// MOVDQU xmm, m128
- /// </summary>
- public static unsafe Vector128<int> LoadVector128(int* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_loadu_si128 (__m128i const* mem_address)
- /// MOVDQU xmm, m128
- /// </summary>
- public static unsafe Vector128<uint> LoadVector128(uint* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_loadu_si128 (__m128i const* mem_address)
- /// MOVDQU xmm, m128
- /// </summary>
- public static unsafe Vector128<long> LoadVector128(long* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_loadu_si128 (__m128i const* mem_address)
- /// MOVDQU xmm, m128
- /// </summary>
- public static unsafe Vector128<ulong> LoadVector128(ulong* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_loadu_pd (double const* mem_address)
- /// MOVUPD xmm, m128
- /// </summary>
- public static unsafe Vector128<double> LoadVector128(double* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_load_sd (double const* mem_address)
- /// MOVSD xmm, m64
- /// </summary>
- public static unsafe Vector128<double> LoadScalarVector128(double* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_load_si128 (__m128i const* mem_address)
- /// MOVDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<sbyte> LoadAlignedVector128(sbyte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_load_si128 (__m128i const* mem_address)
- /// MOVDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<byte> LoadAlignedVector128(byte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_load_si128 (__m128i const* mem_address)
- /// MOVDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<short> LoadAlignedVector128(short* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_load_si128 (__m128i const* mem_address)
- /// MOVDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<ushort> LoadAlignedVector128(ushort* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_load_si128 (__m128i const* mem_address)
- /// MOVDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<int> LoadAlignedVector128(int* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_load_si128 (__m128i const* mem_address)
- /// MOVDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<uint> LoadAlignedVector128(uint* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_load_si128 (__m128i const* mem_address)
- /// MOVDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<long> LoadAlignedVector128(long* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_load_si128 (__m128i const* mem_address)
- /// MOVDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<ulong> LoadAlignedVector128(ulong* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_load_pd (double const* mem_address)
- /// MOVAPD xmm, m128
- /// </summary>
- public static unsafe Vector128<double> LoadAlignedVector128(double* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm_lfence(void)
- /// LFENCE
- /// </summary>
- public static void LoadFence() { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_loadh_pd (__m128d a, double const* mem_addr)
- /// MOVHPD xmm, m64
- /// </summary>
- public static unsafe Vector128<double> LoadHigh(Vector128<double> lower, double* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_loadl_pd (__m128d a, double const* mem_addr)
- /// MOVLPD xmm, m64
- /// </summary>
- public static unsafe Vector128<double> LoadLow(Vector128<double> upper, double* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_loadl_epi32 (__m128i const* mem_addr)
- /// MOVD xmm, reg/m64
- /// The above native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<int> LoadScalarVector128(int* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_loadl_epi32 (__m128i const* mem_addr)
- /// MOVD xmm, reg/m64
- /// The above native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<uint> LoadScalarVector128(uint* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_loadl_epi64 (__m128i const* mem_addr)
- /// MOVQ xmm, reg/m64
- /// </summary>
- public static unsafe Vector128<long> LoadScalarVector128(long* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_loadl_epi64 (__m128i const* mem_addr)
- /// MOVQ xmm, reg/m64
- /// </summary>
- public static unsafe Vector128<ulong> LoadScalarVector128(ulong* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm_maskmoveu_si128 (__m128i a, __m128i mask, char* mem_address)
- /// MASKMOVDQU xmm, xmm
- /// </summary>
- public static unsafe void MaskMove(Vector128<sbyte> source, Vector128<sbyte> mask, sbyte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_maskmoveu_si128 (__m128i a, __m128i mask, char* mem_address)
- /// MASKMOVDQU xmm, xmm
- /// </summary>
- public static unsafe void MaskMove(Vector128<byte> source, Vector128<byte> mask, byte* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_max_epu8 (__m128i a, __m128i b)
- /// PMAXUB xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> Max(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_max_epi16 (__m128i a, __m128i b)
- /// PMAXSW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> Max(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_max_pd (__m128d a, __m128d b)
- /// MAXPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> Max(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_max_sd (__m128d a, __m128d b)
- /// MAXSD xmm, xmm/m64
- /// </summary>
- public static Vector128<double> MaxScalar(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm_mfence(void)
- /// MFENCE
- /// </summary>
- public static void MemoryFence() { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_min_epu8 (__m128i a, __m128i b)
- /// PMINUB xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> Min(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_min_epi16 (__m128i a, __m128i b)
- /// PMINSW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> Min(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_min_pd (__m128d a, __m128d b)
- /// MINPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> Min(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_min_sd (__m128d a, __m128d b)
- /// MINSD xmm, xmm/m64
- /// </summary>
- public static Vector128<double> MinScalar(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_move_sd (__m128d a, __m128d b)
- /// MOVSD xmm, xmm
- /// </summary>
- public static Vector128<double> MoveScalar(Vector128<double> upper, Vector128<double> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_movemask_epi8 (__m128i a)
- /// PMOVMSKB reg, xmm
- /// </summary>
- public static int MoveMask(Vector128<sbyte> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// int _mm_movemask_epi8 (__m128i a)
- /// PMOVMSKB reg, xmm
- /// </summary>
- public static int MoveMask(Vector128<byte> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// int _mm_movemask_pd (__m128d a)
- /// MOVMSKPD reg, xmm
- /// </summary>
- public static int MoveMask(Vector128<double> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_move_epi64 (__m128i a)
- /// MOVQ xmm, xmm
- /// </summary>
- public static Vector128<long> MoveScalar(Vector128<long> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_move_epi64 (__m128i a)
- /// MOVQ xmm, xmm
- /// </summary>
- public static Vector128<ulong> MoveScalar(Vector128<ulong> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_mul_epu32 (__m128i a, __m128i b)
- /// PMULUDQ xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> Multiply(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_mul_pd (__m128d a, __m128d b)
- /// MULPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> Multiply(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_mul_sd (__m128d a, __m128d b)
- /// MULSD xmm, xmm/m64
- /// </summary>
- public static Vector128<double> MultiplyScalar(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_mulhi_epi16 (__m128i a, __m128i b)
- /// PMULHW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> MultiplyHigh(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_mulhi_epu16 (__m128i a, __m128i b)
- /// PMULHUW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> MultiplyHigh(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_madd_epi16 (__m128i a, __m128i b)
- /// PMADDWD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> MultiplyAddAdjacent(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_mullo_epi16 (__m128i a, __m128i b)
- /// PMULLW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> MultiplyLow(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_mullo_epi16 (__m128i a, __m128i b)
- /// PMULLW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> MultiplyLow(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_or_si128 (__m128i a, __m128i b)
- /// POR xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> Or(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_or_si128 (__m128i a, __m128i b)
- /// POR xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> Or(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_or_si128 (__m128i a, __m128i b)
- /// POR xmm, xmm/m128
- /// </summary>
- public static Vector128<short> Or(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_or_si128 (__m128i a, __m128i b)
- /// POR xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> Or(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_or_si128 (__m128i a, __m128i b)
- /// POR xmm, xmm/m128
- /// </summary>
- public static Vector128<int> Or(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_or_si128 (__m128i a, __m128i b)
- /// POR xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> Or(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_or_si128 (__m128i a, __m128i b)
- /// POR xmm, xmm/m128
- /// </summary>
- public static Vector128<long> Or(Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_or_si128 (__m128i a, __m128i b)
- /// POR xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> Or(Vector128<ulong> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_or_pd (__m128d a, __m128d b)
- /// ORPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> Or(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_packs_epi16 (__m128i a, __m128i b)
- /// PACKSSWB xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> PackSignedSaturate(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_packs_epi32 (__m128i a, __m128i b)
- /// PACKSSDW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> PackSignedSaturate(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_packus_epi16 (__m128i a, __m128i b)
- /// PACKUSWB xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> PackUnsignedSaturate(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_sad_epu8 (__m128i a, __m128i b)
- /// PSADBW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> SumAbsoluteDifferences(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_shuffle_epi32 (__m128i a, int immediate)
- /// PSHUFD xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<int> Shuffle(Vector128<int> value, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_shuffle_epi32 (__m128i a, int immediate)
- /// PSHUFD xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<uint> Shuffle(Vector128<uint> value, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_shuffle_pd (__m128d a, __m128d b, int immediate)
- /// SHUFPD xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<double> Shuffle(Vector128<double> left, Vector128<double> right, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_shufflehi_epi16 (__m128i a, int immediate)
- /// PSHUFHW xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<short> ShuffleHigh(Vector128<short> value, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_shufflehi_epi16 (__m128i a, int control)
- /// PSHUFHW xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<ushort> ShuffleHigh(Vector128<ushort> value, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_shufflelo_epi16 (__m128i a, int control)
- /// PSHUFLW xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<short> ShuffleLow(Vector128<short> value, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_shufflelo_epi16 (__m128i a, int control)
- /// PSHUFLW xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<ushort> ShuffleLow(Vector128<ushort> value, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_sll_epi16 (__m128i a, __m128i count)
- /// PSLLW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> ShiftLeftLogical(Vector128<short> value, Vector128<short> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_sll_epi16 (__m128i a, __m128i count)
- /// PSLLW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> ShiftLeftLogical(Vector128<ushort> value, Vector128<ushort> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_sll_epi32 (__m128i a, __m128i count)
- /// PSLLD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> ShiftLeftLogical(Vector128<int> value, Vector128<int> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_sll_epi32 (__m128i a, __m128i count)
- /// PSLLD xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> ShiftLeftLogical(Vector128<uint> value, Vector128<uint> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_sll_epi64 (__m128i a, __m128i count)
- /// PSLLQ xmm, xmm/m128
- /// </summary>
- public static Vector128<long> ShiftLeftLogical(Vector128<long> value, Vector128<long> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_sll_epi64 (__m128i a, __m128i count)
- /// PSLLQ xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> ShiftLeftLogical(Vector128<ulong> value, Vector128<ulong> count) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_slli_epi16 (__m128i a, int immediate)
- /// PSLLW xmm, imm8
- /// </summary>
- public static Vector128<short> ShiftLeftLogical(Vector128<short> value, byte count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_slli_epi16 (__m128i a, int immediate)
- /// PSLLW xmm, imm8
- /// </summary>
- public static Vector128<ushort> ShiftLeftLogical(Vector128<ushort> value, byte count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_slli_epi32 (__m128i a, int immediate)
- /// PSLLD xmm, imm8
- /// </summary>
- public static Vector128<int> ShiftLeftLogical(Vector128<int> value, byte count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_slli_epi32 (__m128i a, int immediate)
- /// PSLLD xmm, imm8
- /// </summary>
- public static Vector128<uint> ShiftLeftLogical(Vector128<uint> value, byte count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_slli_epi64 (__m128i a, int immediate)
- /// PSLLQ xmm, imm8
- /// </summary>
- public static Vector128<long> ShiftLeftLogical(Vector128<long> value, byte count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_slli_epi64 (__m128i a, int immediate)
- /// PSLLQ xmm, imm8
- /// </summary>
- public static Vector128<ulong> ShiftLeftLogical(Vector128<ulong> value, byte count) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_bslli_si128 (__m128i a, int imm8)
- /// PSLLDQ xmm, imm8
- /// </summary>
- public static Vector128<sbyte> ShiftLeftLogical128BitLane(Vector128<sbyte> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_bslli_si128 (__m128i a, int imm8)
- /// PSLLDQ xmm, imm8
- /// </summary>
- public static Vector128<byte> ShiftLeftLogical128BitLane(Vector128<byte> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_bslli_si128 (__m128i a, int imm8)
- /// PSLLDQ xmm, imm8
- /// </summary>
- public static Vector128<short> ShiftLeftLogical128BitLane(Vector128<short> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_bslli_si128 (__m128i a, int imm8)
- /// PSLLDQ xmm, imm8
- /// </summary>
- public static Vector128<ushort> ShiftLeftLogical128BitLane(Vector128<ushort> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_bslli_si128 (__m128i a, int imm8)
- /// PSLLDQ xmm, imm8
- /// </summary>
- public static Vector128<int> ShiftLeftLogical128BitLane(Vector128<int> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_bslli_si128 (__m128i a, int imm8)
- /// PSLLDQ xmm, imm8
- /// </summary>
- public static Vector128<uint> ShiftLeftLogical128BitLane(Vector128<uint> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_bslli_si128 (__m128i a, int imm8)
- /// PSLLDQ xmm, imm8
- /// </summary>
- public static Vector128<long> ShiftLeftLogical128BitLane(Vector128<long> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_bslli_si128 (__m128i a, int imm8)
- /// PSLLDQ xmm, imm8
- /// </summary>
- public static Vector128<ulong> ShiftLeftLogical128BitLane(Vector128<ulong> value, byte numBytes) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_sra_epi16 (__m128i a, __m128i count)
- /// PSRAW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> ShiftRightArithmetic(Vector128<short> value, Vector128<short> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_sra_epi32 (__m128i a, __m128i count)
- /// PSRAD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> ShiftRightArithmetic(Vector128<int> value, Vector128<int> count) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_srai_epi16 (__m128i a, int immediate)
- /// PSRAW xmm, imm8
- /// </summary>
- public static Vector128<short> ShiftRightArithmetic(Vector128<short> value, byte count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_srai_epi32 (__m128i a, int immediate)
- /// PSRAD xmm, imm8
- /// </summary>
- public static Vector128<int> ShiftRightArithmetic(Vector128<int> value, byte count) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_srl_epi16 (__m128i a, __m128i count)
- /// PSRLW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> ShiftRightLogical(Vector128<short> value, Vector128<short> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_srl_epi16 (__m128i a, __m128i count)
- /// PSRLW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> ShiftRightLogical(Vector128<ushort> value, Vector128<ushort> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_srl_epi32 (__m128i a, __m128i count)
- /// PSRLD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> ShiftRightLogical(Vector128<int> value, Vector128<int> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_srl_epi32 (__m128i a, __m128i count)
- /// PSRLD xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> ShiftRightLogical(Vector128<uint> value, Vector128<uint> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_srl_epi64 (__m128i a, __m128i count)
- /// PSRLQ xmm, xmm/m128
- /// </summary>
- public static Vector128<long> ShiftRightLogical(Vector128<long> value, Vector128<long> count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_srl_epi64 (__m128i a, __m128i count)
- /// PSRLQ xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> ShiftRightLogical(Vector128<ulong> value, Vector128<ulong> count) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_srli_epi16 (__m128i a, int immediate)
- /// PSRLW xmm, imm8
- /// </summary>
- public static Vector128<short> ShiftRightLogical(Vector128<short> value, byte count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_srli_epi16 (__m128i a, int immediate)
- /// PSRLW xmm, imm8
- /// </summary>
- public static Vector128<ushort> ShiftRightLogical(Vector128<ushort> value, byte count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_srli_epi32 (__m128i a, int immediate)
- /// PSRLD xmm, imm8
- /// </summary>
- public static Vector128<int> ShiftRightLogical(Vector128<int> value, byte count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_srli_epi32 (__m128i a, int immediate)
- /// PSRLD xmm, imm8
- /// </summary>
- public static Vector128<uint> ShiftRightLogical(Vector128<uint> value, byte count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_srli_epi64 (__m128i a, int immediate)
- /// PSRLQ xmm, imm8
- /// </summary>
- public static Vector128<long> ShiftRightLogical(Vector128<long> value, byte count) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_srli_epi64 (__m128i a, int immediate)
- /// PSRLQ xmm, imm8
- /// </summary>
- public static Vector128<ulong> ShiftRightLogical(Vector128<ulong> value, byte count) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_bsrli_si128 (__m128i a, int imm8)
- /// PSRLDQ xmm, imm8
- /// </summary>
- public static Vector128<sbyte> ShiftRightLogical128BitLane(Vector128<sbyte> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_bsrli_si128 (__m128i a, int imm8)
- /// PSRLDQ xmm, imm8
- /// </summary>
- public static Vector128<byte> ShiftRightLogical128BitLane(Vector128<byte> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_bsrli_si128 (__m128i a, int imm8)
- /// PSRLDQ xmm, imm8
- /// </summary>
- public static Vector128<short> ShiftRightLogical128BitLane(Vector128<short> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_bsrli_si128 (__m128i a, int imm8)
- /// PSRLDQ xmm, imm8
- /// </summary>
- public static Vector128<ushort> ShiftRightLogical128BitLane(Vector128<ushort> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_bsrli_si128 (__m128i a, int imm8)
- /// PSRLDQ xmm, imm8
- /// </summary>
- public static Vector128<int> ShiftRightLogical128BitLane(Vector128<int> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_bsrli_si128 (__m128i a, int imm8)
- /// PSRLDQ xmm, imm8
- /// </summary>
- public static Vector128<uint> ShiftRightLogical128BitLane(Vector128<uint> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_bsrli_si128 (__m128i a, int imm8)
- /// PSRLDQ xmm, imm8
- /// </summary>
- public static Vector128<long> ShiftRightLogical128BitLane(Vector128<long> value, byte numBytes) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_bsrli_si128 (__m128i a, int imm8)
- /// PSRLDQ xmm, imm8
- /// </summary>
- public static Vector128<ulong> ShiftRightLogical128BitLane(Vector128<ulong> value, byte numBytes) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_sqrt_pd (__m128d a)
- /// SQRTPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> Sqrt(Vector128<double> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_sqrt_sd (__m128d a)
- /// SQRTSD xmm, xmm/64
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<double> SqrtScalar(Vector128<double> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_sqrt_sd (__m128d a, __m128d b)
- /// SQRTSD xmm, xmm/64
- /// </summary>
- public static Vector128<double> SqrtScalar(Vector128<double> upper, Vector128<double> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm_store_sd (double* mem_addr, __m128d a)
- /// MOVSD m64, xmm
- /// </summary>
- public static unsafe void StoreScalar(double* address, Vector128<double> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_storel_epi64 (__m128i* mem_addr, __m128i a)
- /// MOVQ m64, xmm
- /// </summary>
- public static unsafe void StoreScalar(long* address, Vector128<long> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_storel_epi64 (__m128i* mem_addr, __m128i a)
- /// MOVQ m64, xmm
- /// </summary>
- public static unsafe void StoreScalar(ulong* address, Vector128<ulong> source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm_store_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQA m128, xmm
- /// </summary>
- public static unsafe void StoreAligned(sbyte* address, Vector128<sbyte> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_store_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQA m128, xmm
- /// </summary>
- public static unsafe void StoreAligned(byte* address, Vector128<byte> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_store_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQA m128, xmm
- /// </summary>
- public static unsafe void StoreAligned(short* address, Vector128<short> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_store_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQA m128, xmm
- /// </summary>
- public static unsafe void StoreAligned(ushort* address, Vector128<ushort> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_store_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQA m128, xmm
- /// </summary>
- public static unsafe void StoreAligned(int* address, Vector128<int> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_store_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQA m128, xmm
- /// </summary>
- public static unsafe void StoreAligned(uint* address, Vector128<uint> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_store_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQA m128, xmm
- /// </summary>
- public static unsafe void StoreAligned(long* address, Vector128<long> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_store_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQA m128, xmm
- /// </summary>
- public static unsafe void StoreAligned(ulong* address, Vector128<ulong> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_store_pd (double* mem_addr, __m128d a)
- /// MOVAPD m128, xmm
- /// </summary>
- public static unsafe void StoreAligned(double* address, Vector128<double> source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm_stream_si128 (__m128i* mem_addr, __m128i a)
- /// MOVNTDQ m128, xmm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(sbyte* address, Vector128<sbyte> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_stream_si128 (__m128i* mem_addr, __m128i a)
- /// MOVNTDQ m128, xmm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(byte* address, Vector128<byte> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_stream_si128 (__m128i* mem_addr, __m128i a)
- /// MOVNTDQ m128, xmm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(short* address, Vector128<short> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_stream_si128 (__m128i* mem_addr, __m128i a)
- /// MOVNTDQ m128, xmm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(ushort* address, Vector128<ushort> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_stream_si128 (__m128i* mem_addr, __m128i a)
- /// MOVNTDQ m128, xmm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(int* address, Vector128<int> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_stream_si128 (__m128i* mem_addr, __m128i a)
- /// MOVNTDQ m128, xmm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(uint* address, Vector128<uint> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_stream_si128 (__m128i* mem_addr, __m128i a)
- /// MOVNTDQ m128, xmm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(long* address, Vector128<long> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_stream_si128 (__m128i* mem_addr, __m128i a)
- /// MOVNTDQ m128, xmm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(ulong* address, Vector128<ulong> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_stream_pd (double* mem_addr, __m128d a)
- /// MOVNTPD m128, xmm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(double* address, Vector128<double> source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm_storeu_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQU m128, xmm
- /// </summary>
- public static unsafe void Store(sbyte* address, Vector128<sbyte> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_storeu_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQU m128, xmm
- /// </summary>
- public static unsafe void Store(byte* address, Vector128<byte> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_storeu_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQU m128, xmm
- /// </summary>
- public static unsafe void Store(short* address, Vector128<short> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_storeu_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQU m128, xmm
- /// </summary>
- public static unsafe void Store(ushort* address, Vector128<ushort> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_storeu_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQU m128, xmm
- /// </summary>
- public static unsafe void Store(int* address, Vector128<int> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_storeu_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQU m128, xmm
- /// </summary>
- public static unsafe void Store(uint* address, Vector128<uint> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_storeu_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQU m128, xmm
- /// </summary>
- public static unsafe void Store(long* address, Vector128<long> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_storeu_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQU m128, xmm
- /// </summary>
- public static unsafe void Store(ulong* address, Vector128<ulong> source) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_storeu_pd (double* mem_addr, __m128d a)
- /// MOVUPD m128, xmm
- /// </summary>
- public static unsafe void Store(double* address, Vector128<double> source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm_storeh_pd (double* mem_addr, __m128d a)
- /// MOVHPD m64, xmm
- /// </summary>
- public static unsafe void StoreHigh(double* address, Vector128<double> source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm_storel_pd (double* mem_addr, __m128d a)
- /// MOVLPD m64, xmm
- /// </summary>
- public static unsafe void StoreLow(double* address, Vector128<double> source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// void _mm_stream_si32(int *p, int a)
- /// MOVNTI m32, r32
- /// </summary>
- public static unsafe void StoreNonTemporal(int* address, int value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// void _mm_stream_si32(int *p, int a)
- /// MOVNTI m32, r32
- /// </summary>
- public static unsafe void StoreNonTemporal(uint* address, uint value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_sub_epi8 (__m128i a, __m128i b)
- /// PSUBB xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> Subtract(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_sub_epi8 (__m128i a, __m128i b)
- /// PSUBB xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> Subtract(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_sub_epi16 (__m128i a, __m128i b)
- /// PSUBW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> Subtract(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_sub_epi16 (__m128i a, __m128i b)
- /// PSUBW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> Subtract(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_sub_epi32 (__m128i a, __m128i b)
- /// PSUBD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> Subtract(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_sub_epi32 (__m128i a, __m128i b)
- /// PSUBD xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> Subtract(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_sub_epi64 (__m128i a, __m128i b)
- /// PSUBQ xmm, xmm/m128
- /// </summary>
- public static Vector128<long> Subtract(Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_sub_epi64 (__m128i a, __m128i b)
- /// PSUBQ xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> Subtract(Vector128<ulong> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_sub_pd (__m128d a, __m128d b)
- /// SUBPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> Subtract(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_sub_sd (__m128d a, __m128d b)
- /// SUBSD xmm, xmm/m64
- /// </summary>
- public static Vector128<double> SubtractScalar(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_subs_epi8 (__m128i a, __m128i b)
- /// PSUBSB xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> SubtractSaturate(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_subs_epi16 (__m128i a, __m128i b)
- /// PSUBSW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> SubtractSaturate(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_subs_epu8 (__m128i a, __m128i b)
- /// PSUBUSB xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> SubtractSaturate(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_subs_epu16 (__m128i a, __m128i b)
- /// PSUBUSW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> SubtractSaturate(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_unpackhi_epi8 (__m128i a, __m128i b)
- /// PUNPCKHBW xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> UnpackHigh(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_unpackhi_epi8 (__m128i a, __m128i b)
- /// PUNPCKHBW xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> UnpackHigh(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_unpackhi_epi16 (__m128i a, __m128i b)
- /// PUNPCKHWD xmm, xmm/m128
- /// </summary>
- public static Vector128<short> UnpackHigh(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_unpackhi_epi16 (__m128i a, __m128i b)
- /// PUNPCKHWD xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> UnpackHigh(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_unpackhi_epi32 (__m128i a, __m128i b)
- /// PUNPCKHDQ xmm, xmm/m128
- /// </summary>
- public static Vector128<int> UnpackHigh(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_unpackhi_epi32 (__m128i a, __m128i b)
- /// PUNPCKHDQ xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> UnpackHigh(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_unpackhi_epi64 (__m128i a, __m128i b)
- /// PUNPCKHQDQ xmm, xmm/m128
- /// </summary>
- public static Vector128<long> UnpackHigh(Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_unpackhi_epi64 (__m128i a, __m128i b)
- /// PUNPCKHQDQ xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> UnpackHigh(Vector128<ulong> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_unpackhi_pd (__m128d a, __m128d b)
- /// UNPCKHPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> UnpackHigh(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_unpacklo_epi8 (__m128i a, __m128i b)
- /// PUNPCKLBW xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> UnpackLow(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_unpacklo_epi8 (__m128i a, __m128i b)
- /// PUNPCKLBW xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> UnpackLow(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_unpacklo_epi16 (__m128i a, __m128i b)
- /// PUNPCKLWD xmm, xmm/m128
- /// </summary>
- public static Vector128<short> UnpackLow(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_unpacklo_epi16 (__m128i a, __m128i b)
- /// PUNPCKLWD xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> UnpackLow(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_unpacklo_epi32 (__m128i a, __m128i b)
- /// PUNPCKLDQ xmm, xmm/m128
- /// </summary>
- public static Vector128<int> UnpackLow(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_unpacklo_epi32 (__m128i a, __m128i b)
- /// PUNPCKLDQ xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> UnpackLow(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_unpacklo_epi64 (__m128i a, __m128i b)
- /// PUNPCKLQDQ xmm, xmm/m128
- /// </summary>
- public static Vector128<long> UnpackLow(Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_unpacklo_epi64 (__m128i a, __m128i b)
- /// PUNPCKLQDQ xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> UnpackLow(Vector128<ulong> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_unpacklo_pd (__m128d a, __m128d b)
- /// UNPCKLPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> UnpackLow(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_xor_si128 (__m128i a, __m128i b)
- /// PXOR xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> Xor(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_xor_si128 (__m128i a, __m128i b)
- /// PXOR xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> Xor(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_xor_si128 (__m128i a, __m128i b)
- /// PXOR xmm, xmm/m128
- /// </summary>
- public static Vector128<short> Xor(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_xor_si128 (__m128i a, __m128i b)
- /// PXOR xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> Xor(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_xor_si128 (__m128i a, __m128i b)
- /// PXOR xmm, xmm/m128
- /// </summary>
- public static Vector128<int> Xor(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_xor_si128 (__m128i a, __m128i b)
- /// PXOR xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> Xor(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_xor_si128 (__m128i a, __m128i b)
- /// PXOR xmm, xmm/m128
- /// </summary>
- public static Vector128<long> Xor(Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_xor_si128 (__m128i a, __m128i b)
- /// PXOR xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> Xor(Vector128<ulong> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_xor_pd (__m128d a, __m128d b)
- /// XORPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> Xor(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse2.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse2.cs
deleted file mode 100644
index 464faffc7df..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse2.cs
+++ /dev/null
@@ -1,1684 +0,0 @@
-// 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.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel SSE2 hardware instructions via intrinsics
- /// </summary>
- [Intrinsic]
- [CLSCompliant(false)]
- public abstract class Sse2 : Sse
- {
- internal Sse2() { }
-
- public static new bool IsSupported { get => IsSupported; }
-
- [Intrinsic]
- public new abstract class X64 : Sse.X64
- {
- internal X64() { }
-
- public static new bool IsSupported { get => IsSupported; }
-
- /// <summary>
- /// __int64 _mm_cvtsd_si64 (__m128d a)
- /// CVTSD2SI r64, xmm/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static long ConvertToInt64(Vector128<double> value) => ConvertToInt64(value);
- /// <summary>
- /// __int64 _mm_cvtsi128_si64 (__m128i a)
- /// MOVQ reg/m64, xmm
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static long ConvertToInt64(Vector128<long> value) => ConvertToInt64(value);
-
- /// <summary>
- /// __int64 _mm_cvtsi128_si64 (__m128i a)
- /// MOVQ reg/m64, xmm
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong ConvertToUInt64(Vector128<ulong> value) => ConvertToUInt64(value);
-
- /// <summary>
- /// __m128d _mm_cvtsi64_sd (__m128d a, __int64 b)
- /// CVTSI2SD xmm, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static Vector128<double> ConvertScalarToVector128Double(Vector128<double> upper, long value) => ConvertScalarToVector128Double(upper, value);
-
- /// <summary>
- /// __m128i _mm_cvtsi64_si128 (__int64 a)
- /// MOVQ xmm, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static Vector128<long> ConvertScalarToVector128Int64(long value) => ConvertScalarToVector128Int64(value);
-
- /// <summary>
- /// __m128i _mm_cvtsi64_si128 (__int64 a)
- /// MOVQ xmm, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static Vector128<ulong> ConvertScalarToVector128UInt64(ulong value) => ConvertScalarToVector128UInt64(value);
-
- /// <summary>
- /// __int64 _mm_cvttsd_si64 (__m128d a)
- /// CVTTSD2SI reg, xmm/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static long ConvertToInt64WithTruncation(Vector128<double> value) => ConvertToInt64WithTruncation(value);
-
- /// <summary>
- /// void _mm_stream_si64(__int64 *p, __int64 a)
- /// MOVNTI m64, r64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static unsafe void StoreNonTemporal(long* address, long value) => StoreNonTemporal(address, value);
- /// <summary>
- /// void _mm_stream_si64(__int64 *p, __int64 a)
- /// MOVNTI m64, r64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static unsafe void StoreNonTemporal(ulong* address, ulong value) => StoreNonTemporal(address, value);
- }
-
- /// <summary>
- /// __m128i _mm_add_epi8 (__m128i a, __m128i b)
- /// PADDB xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> Add(Vector128<byte> left, Vector128<byte> right) => Add(left, right);
- /// <summary>
- /// __m128i _mm_add_epi8 (__m128i a, __m128i b)
- /// PADDB xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> Add(Vector128<sbyte> left, Vector128<sbyte> right) => Add(left, right);
- /// <summary>
- /// __m128i _mm_add_epi16 (__m128i a, __m128i b)
- /// PADDW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> Add(Vector128<short> left, Vector128<short> right) => Add(left, right);
- /// <summary>
- /// __m128i _mm_add_epi16 (__m128i a, __m128i b)
- /// PADDW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> Add(Vector128<ushort> left, Vector128<ushort> right) => Add(left, right);
- /// <summary>
- /// __m128i _mm_add_epi32 (__m128i a, __m128i b)
- /// PADDD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> Add(Vector128<int> left, Vector128<int> right) => Add(left, right);
- /// <summary>
- /// __m128i _mm_add_epi32 (__m128i a, __m128i b)
- /// PADDD xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> Add(Vector128<uint> left, Vector128<uint> right) => Add(left, right);
- /// <summary>
- /// __m128i _mm_add_epi64 (__m128i a, __m128i b)
- /// PADDQ xmm, xmm/m128
- /// </summary>
- public static Vector128<long> Add(Vector128<long> left, Vector128<long> right) => Add(left, right);
- /// <summary>
- /// __m128i _mm_add_epi64 (__m128i a, __m128i b)
- /// PADDQ xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> Add(Vector128<ulong> left, Vector128<ulong> right) => Add(left, right);
- /// <summary>
- /// __m128d _mm_add_pd (__m128d a, __m128d b)
- /// ADDPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> Add(Vector128<double> left, Vector128<double> right) => Add(left, right);
-
- /// <summary>
- /// __m128d _mm_add_sd (__m128d a, __m128d b)
- /// ADDSD xmm, xmm/m64
- /// </summary>
- public static Vector128<double> AddScalar(Vector128<double> left, Vector128<double> right) => AddScalar(left, right);
-
- /// <summary>
- /// __m128i _mm_adds_epi8 (__m128i a, __m128i b)
- /// PADDSB xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> AddSaturate(Vector128<sbyte> left, Vector128<sbyte> right) => AddSaturate(left, right);
- /// <summary>
- /// __m128i _mm_adds_epu8 (__m128i a, __m128i b)
- /// PADDUSB xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> AddSaturate(Vector128<byte> left, Vector128<byte> right) => AddSaturate(left, right);
- /// <summary>
- /// __m128i _mm_adds_epi16 (__m128i a, __m128i b)
- /// PADDSW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> AddSaturate(Vector128<short> left, Vector128<short> right) => AddSaturate(left, right);
- /// <summary>
- /// __m128i _mm_adds_epu16 (__m128i a, __m128i b)
- /// PADDUSW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> AddSaturate(Vector128<ushort> left, Vector128<ushort> right) => AddSaturate(left, right);
-
- /// <summary>
- /// __m128i _mm_and_si128 (__m128i a, __m128i b)
- /// PAND xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> And(Vector128<byte> left, Vector128<byte> right) => And(left, right);
- /// <summary>
- /// __m128i _mm_and_si128 (__m128i a, __m128i b)
- /// PAND xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> And(Vector128<sbyte> left, Vector128<sbyte> right) => And(left, right);
- /// <summary>
- /// __m128i _mm_and_si128 (__m128i a, __m128i b)
- /// PAND xmm, xmm/m128
- /// </summary>
- public static Vector128<short> And(Vector128<short> left, Vector128<short> right) => And(left, right);
- /// <summary>
- /// __m128i _mm_and_si128 (__m128i a, __m128i b)
- /// PAND xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> And(Vector128<ushort> left, Vector128<ushort> right) => And(left, right);
- /// <summary>
- /// __m128i _mm_and_si128 (__m128i a, __m128i b)
- /// PAND xmm, xmm/m128
- /// </summary>
- public static Vector128<int> And(Vector128<int> left, Vector128<int> right) => And(left, right);
- /// <summary>
- /// __m128i _mm_and_si128 (__m128i a, __m128i b)
- /// PAND xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> And(Vector128<uint> left, Vector128<uint> right) => And(left, right);
- /// <summary>
- /// __m128i _mm_and_si128 (__m128i a, __m128i b)
- /// PAND xmm, xmm/m128
- /// </summary>
- public static Vector128<long> And(Vector128<long> left, Vector128<long> right) => And(left, right);
- /// <summary>
- /// __m128i _mm_and_si128 (__m128i a, __m128i b)
- /// PAND xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> And(Vector128<ulong> left, Vector128<ulong> right) => And(left, right);
- /// <summary>
- /// __m128d _mm_and_pd (__m128d a, __m128d b)
- /// ANDPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> And(Vector128<double> left, Vector128<double> right) => And(left, right);
-
- /// <summary>
- /// __m128i _mm_andnot_si128 (__m128i a, __m128i b)
- /// PANDN xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> AndNot(Vector128<byte> left, Vector128<byte> right) => AndNot(left, right);
- /// <summary>
- /// __m128i _mm_andnot_si128 (__m128i a, __m128i b)
- /// PANDN xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> AndNot(Vector128<sbyte> left, Vector128<sbyte> right) => AndNot(left, right);
- /// <summary>
- /// __m128i _mm_andnot_si128 (__m128i a, __m128i b)
- /// PANDN xmm, xmm/m128
- /// </summary>
- public static Vector128<short> AndNot(Vector128<short> left, Vector128<short> right) => AndNot(left, right);
- /// <summary>
- /// __m128i _mm_andnot_si128 (__m128i a, __m128i b)
- /// PANDN xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> AndNot(Vector128<ushort> left, Vector128<ushort> right) => AndNot(left, right);
- /// <summary>
- /// __m128i _mm_andnot_si128 (__m128i a, __m128i b)
- /// PANDN xmm, xmm/m128
- /// </summary>
- public static Vector128<int> AndNot(Vector128<int> left, Vector128<int> right) => AndNot(left, right);
- /// <summary>
- /// __m128i _mm_andnot_si128 (__m128i a, __m128i b)
- /// PANDN xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> AndNot(Vector128<uint> left, Vector128<uint> right) => AndNot(left, right);
- /// <summary>
- /// __m128i _mm_andnot_si128 (__m128i a, __m128i b)
- /// PANDN xmm, xmm/m128
- /// </summary>
- public static Vector128<long> AndNot(Vector128<long> left, Vector128<long> right) => AndNot(left, right);
- /// <summary>
- /// __m128i _mm_andnot_si128 (__m128i a, __m128i b)
- /// PANDN xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> AndNot(Vector128<ulong> left, Vector128<ulong> right) => AndNot(left, right);
- /// <summary>
- /// __m128d _mm_andnot_pd (__m128d a, __m128d b)
- /// ADDNPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> AndNot(Vector128<double> left, Vector128<double> right) => AndNot(left, right);
-
- /// <summary>
- /// __m128i _mm_avg_epu8 (__m128i a, __m128i b)
- /// PAVGB xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> Average(Vector128<byte> left, Vector128<byte> right) => Average(left, right);
- /// <summary>
- /// __m128i _mm_avg_epu16 (__m128i a, __m128i b)
- /// PAVGW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> Average(Vector128<ushort> left, Vector128<ushort> right) => Average(left, right);
-
- /// <summary>
- /// __m128i _mm_cmpeq_epi8 (__m128i a, __m128i b)
- /// PCMPEQB xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> CompareEqual(Vector128<sbyte> left, Vector128<sbyte> right) => CompareEqual(left, right);
- /// <summary>
- /// __m128i _mm_cmpeq_epi8 (__m128i a, __m128i b)
- /// PCMPEQB xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> CompareEqual(Vector128<byte> left, Vector128<byte> right) => CompareEqual(left, right);
- /// <summary>
- /// __m128i _mm_cmpeq_epi16 (__m128i a, __m128i b)
- /// PCMPEQW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> CompareEqual(Vector128<short> left, Vector128<short> right) => CompareEqual(left, right);
- /// <summary>
- /// __m128i _mm_cmpeq_epi16 (__m128i a, __m128i b)
- /// PCMPEQW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> CompareEqual(Vector128<ushort> left, Vector128<ushort> right) => CompareEqual(left, right);
- /// <summary>
- /// __m128i _mm_cmpeq_epi32 (__m128i a, __m128i b)
- /// PCMPEQD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> CompareEqual(Vector128<int> left, Vector128<int> right) => CompareEqual(left, right);
- /// <summary>
- /// __m128i _mm_cmpeq_epi32 (__m128i a, __m128i b)
- /// PCMPEQD xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> CompareEqual(Vector128<uint> left, Vector128<uint> right) => CompareEqual(left, right);
- /// <summary>
- /// __m128d _mm_cmpeq_pd (__m128d a, __m128d b)
- /// CMPPD xmm, xmm/m128, imm8(0)
- /// </summary>
- public static Vector128<double> CompareEqual(Vector128<double> left, Vector128<double> right) => CompareEqual(left, right);
-
- /// <summary>
- /// int _mm_comieq_sd (__m128d a, __m128d b)
- /// COMISD xmm, xmm/m64
- /// </summary>
- public static bool CompareScalarOrderedEqual(Vector128<double> left, Vector128<double> right) => CompareScalarOrderedEqual(left, right);
-
- /// <summary>
- /// int _mm_ucomieq_sd (__m128d a, __m128d b)
- /// UCOMISD xmm, xmm/m64
- /// </summary>
- public static bool CompareScalarUnorderedEqual(Vector128<double> left, Vector128<double> right) => CompareScalarUnorderedEqual(left, right);
-
- /// <summary>
- /// __m128d _mm_cmpeq_sd (__m128d a, __m128d b)
- /// CMPSD xmm, xmm/m64, imm8(0)
- /// </summary>
- public static Vector128<double> CompareScalarEqual(Vector128<double> left, Vector128<double> right) => CompareScalarEqual(left, right);
-
- /// <summary>
- /// __m128i _mm_cmpgt_epi8 (__m128i a, __m128i b)
- /// PCMPGTB xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> CompareGreaterThan(Vector128<sbyte> left, Vector128<sbyte> right) => CompareGreaterThan(left, right);
- /// <summary>
- /// __m128i _mm_cmpgt_epi16 (__m128i a, __m128i b)
- /// PCMPGTW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> CompareGreaterThan(Vector128<short> left, Vector128<short> right) => CompareGreaterThan(left, right);
- /// <summary>
- /// __m128i _mm_cmpgt_epi32 (__m128i a, __m128i b)
- /// PCMPGTD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> CompareGreaterThan(Vector128<int> left, Vector128<int> right) => CompareGreaterThan(left, right);
- /// <summary>
- /// __m128d _mm_cmpgt_pd (__m128d a, __m128d b)
- /// CMPPD xmm, xmm/m128, imm8(6)
- /// </summary>
- public static Vector128<double> CompareGreaterThan(Vector128<double> left, Vector128<double> right) => CompareGreaterThan(left, right);
-
- /// <summary>
- /// int _mm_comigt_sd (__m128d a, __m128d b)
- /// COMISD xmm, xmm/m64
- /// </summary>
- public static bool CompareScalarOrderedGreaterThan(Vector128<double> left, Vector128<double> right) => CompareScalarOrderedGreaterThan(left, right);
-
- /// <summary>
- /// int _mm_ucomigt_sd (__m128d a, __m128d b)
- /// UCOMISD xmm, xmm/m64
- /// </summary>
- public static bool CompareScalarUnorderedGreaterThan(Vector128<double> left, Vector128<double> right) => CompareScalarUnorderedGreaterThan(left, right);
-
- /// <summary>
- /// __m128d _mm_cmpgt_sd (__m128d a, __m128d b)
- /// CMPSD xmm, xmm/m64, imm8(6)
- /// </summary>
- public static Vector128<double> CompareScalarGreaterThan(Vector128<double> left, Vector128<double> right) => CompareScalarGreaterThan(left, right);
-
- /// <summary>
- /// __m128d _mm_cmpge_pd (__m128d a, __m128d b)
- /// CMPPD xmm, xmm/m128, imm8(5)
- /// </summary>
- public static Vector128<double> CompareGreaterThanOrEqual(Vector128<double> left, Vector128<double> right) => CompareGreaterThanOrEqual(left, right);
-
- /// <summary>
- /// int _mm_comige_sd (__m128d a, __m128d b)
- /// COMISD xmm, xmm/m64
- /// </summary>
- public static bool CompareScalarOrderedGreaterThanOrEqual(Vector128<double> left, Vector128<double> right) => CompareScalarOrderedGreaterThanOrEqual(left, right);
-
- /// <summary>
- /// int _mm_ucomige_sd (__m128d a, __m128d b)
- /// UCOMISD xmm, xmm/m64
- /// </summary>
- public static bool CompareScalarUnorderedGreaterThanOrEqual(Vector128<double> left, Vector128<double> right) => CompareScalarUnorderedGreaterThanOrEqual(left, right);
-
- /// <summary>
- /// __m128d _mm_cmpge_sd (__m128d a, __m128d b)
- /// CMPSD xmm, xmm/m64, imm8(5)
- /// </summary>
- public static Vector128<double> CompareScalarGreaterThanOrEqual(Vector128<double> left, Vector128<double> right) => CompareScalarGreaterThanOrEqual(left, right);
-
- /// <summary>
- /// __m128i _mm_cmplt_epi8 (__m128i a, __m128i b)
- /// PCMPGTB xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> CompareLessThan(Vector128<sbyte> left, Vector128<sbyte> right) => CompareLessThan(left, right);
- /// <summary>
- /// __m128i _mm_cmplt_epi16 (__m128i a, __m128i b)
- /// PCMPGTW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> CompareLessThan(Vector128<short> left, Vector128<short> right) => CompareLessThan(left, right);
- /// <summary>
- /// __m128i _mm_cmplt_epi32 (__m128i a, __m128i b)
- /// PCMPGTD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> CompareLessThan(Vector128<int> left, Vector128<int> right) => CompareLessThan(left, right);
- /// <summary>
- /// __m128d _mm_cmplt_pd (__m128d a, __m128d b)
- /// CMPPD xmm, xmm/m128, imm8(1)
- /// </summary>
- public static Vector128<double> CompareLessThan(Vector128<double> left, Vector128<double> right) => CompareLessThan(left, right);
-
- /// <summary>
- /// int _mm_comilt_sd (__m128d a, __m128d b)
- /// COMISD xmm, xmm/m64
- /// </summary>
- public static bool CompareScalarOrderedLessThan(Vector128<double> left, Vector128<double> right) => CompareScalarOrderedLessThan(left, right);
-
- /// <summary>
- /// int _mm_ucomilt_sd (__m128d a, __m128d b)
- /// UCOMISD xmm, xmm/m64
- /// </summary>
- public static bool CompareScalarUnorderedLessThan(Vector128<double> left, Vector128<double> right) => CompareScalarUnorderedLessThan(left, right);
-
- /// <summary>
- /// __m128d _mm_cmplt_sd (__m128d a, __m128d b)
- /// CMPSD xmm, xmm/m64, imm8(1)
- /// </summary>
- public static Vector128<double> CompareScalarLessThan(Vector128<double> left, Vector128<double> right) => CompareScalarLessThan(left, right);
-
- /// <summary>
- /// __m128d _mm_cmple_pd (__m128d a, __m128d b)
- /// CMPPD xmm, xmm/m128, imm8(2)
- /// </summary>
- public static Vector128<double> CompareLessThanOrEqual(Vector128<double> left, Vector128<double> right) => CompareLessThanOrEqual(left, right);
-
- /// <summary>
- /// int _mm_comile_sd (__m128d a, __m128d b)
- /// COMISD xmm, xmm/m64
- /// </summary>
- public static bool CompareScalarOrderedLessThanOrEqual(Vector128<double> left, Vector128<double> right) => CompareScalarOrderedLessThanOrEqual(left, right);
-
- /// <summary>
- /// int _mm_ucomile_sd (__m128d a, __m128d b)
- /// UCOMISD xmm, xmm/m64
- /// </summary>
- public static bool CompareScalarUnorderedLessThanOrEqual(Vector128<double> left, Vector128<double> right) => CompareScalarUnorderedLessThanOrEqual(left, right);
-
- /// <summary>
- /// __m128d _mm_cmple_sd (__m128d a, __m128d b)
- /// CMPSD xmm, xmm/m64, imm8(2)
- /// </summary>
- public static Vector128<double> CompareScalarLessThanOrEqual(Vector128<double> left, Vector128<double> right) => CompareScalarLessThanOrEqual(left, right);
-
- /// <summary>
- /// __m128d _mm_cmpneq_pd (__m128d a, __m128d b)
- /// CMPPD xmm, xmm/m128, imm8(4)
- /// </summary>
- public static Vector128<double> CompareNotEqual(Vector128<double> left, Vector128<double> right) => CompareNotEqual(left, right);
-
- /// <summary>
- /// int _mm_comineq_sd (__m128d a, __m128d b)
- /// COMISD xmm, xmm/m64
- /// </summary>
- public static bool CompareScalarOrderedNotEqual(Vector128<double> left, Vector128<double> right) => CompareScalarOrderedNotEqual(left, right);
-
- /// <summary>
- /// int _mm_ucomineq_sd (__m128d a, __m128d b)
- /// UCOMISD xmm, xmm/m64
- /// </summary>
- public static bool CompareScalarUnorderedNotEqual(Vector128<double> left, Vector128<double> right) => CompareScalarUnorderedNotEqual(left, right);
-
- /// <summary>
- /// __m128d _mm_cmpneq_sd (__m128d a, __m128d b)
- /// CMPSD xmm, xmm/m64, imm8(4)
- /// </summary>
- public static Vector128<double> CompareScalarNotEqual(Vector128<double> left, Vector128<double> right) => CompareScalarNotEqual(left, right);
-
- /// <summary>
- /// __m128d _mm_cmpngt_pd (__m128d a, __m128d b)
- /// CMPPD xmm, xmm/m128, imm8(2)
- /// </summary>
- public static Vector128<double> CompareNotGreaterThan(Vector128<double> left, Vector128<double> right) => CompareNotGreaterThan(left, right);
-
- /// <summary>
- /// __m128d _mm_cmpngt_sd (__m128d a, __m128d b)
- /// CMPSD xmm, xmm/m64, imm8(2)
- /// </summary>
- public static Vector128<double> CompareScalarNotGreaterThan(Vector128<double> left, Vector128<double> right) => CompareScalarNotGreaterThan(left, right);
-
- /// <summary>
- /// __m128d _mm_cmpnge_pd (__m128d a, __m128d b)
- /// CMPPD xmm, xmm/m128, imm8(1)
- /// </summary>
- public static Vector128<double> CompareNotGreaterThanOrEqual(Vector128<double> left, Vector128<double> right) => CompareNotGreaterThanOrEqual(left, right);
-
- /// <summary>
- /// __m128d _mm_cmpnge_sd (__m128d a, __m128d b)
- /// CMPSD xmm, xmm/m64, imm8(1)
- /// </summary>
- public static Vector128<double> CompareScalarNotGreaterThanOrEqual(Vector128<double> left, Vector128<double> right) => CompareScalarNotGreaterThanOrEqual(left, right);
-
- /// <summary>
- /// __m128d _mm_cmpnlt_pd (__m128d a, __m128d b)
- /// CMPPD xmm, xmm/m128, imm8(5)
- /// </summary>
- public static Vector128<double> CompareNotLessThan(Vector128<double> left, Vector128<double> right) => CompareNotLessThan(left, right);
-
- /// <summary>
- /// __m128d _mm_cmpnlt_sd (__m128d a, __m128d b)
- /// CMPSD xmm, xmm/m64, imm8(5)
- /// </summary>
- public static Vector128<double> CompareScalarNotLessThan(Vector128<double> left, Vector128<double> right) => CompareScalarNotLessThan(left, right);
-
- /// <summary>
- /// __m128d _mm_cmpnle_pd (__m128d a, __m128d b)
- /// CMPPD xmm, xmm/m128, imm8(6)
- /// </summary>
- public static Vector128<double> CompareNotLessThanOrEqual(Vector128<double> left, Vector128<double> right) => CompareNotLessThanOrEqual(left, right);
-
- /// <summary>
- /// __m128d _mm_cmpnle_sd (__m128d a, __m128d b)
- /// CMPSD xmm, xmm/m64, imm8(6)
- /// </summary>
- public static Vector128<double> CompareScalarNotLessThanOrEqual(Vector128<double> left, Vector128<double> right) => CompareScalarNotLessThanOrEqual(left, right);
-
- /// <summary>
- /// __m128d _mm_cmpord_pd (__m128d a, __m128d b)
- /// CMPPD xmm, xmm/m128, imm8(7)
- /// </summary>
- public static Vector128<double> CompareOrdered(Vector128<double> left, Vector128<double> right) => CompareOrdered(left, right);
-
- /// <summary>
- /// __m128d _mm_cmpord_sd (__m128d a, __m128d b)
- /// CMPSD xmm, xmm/m64, imm8(7)
- /// </summary>
- public static Vector128<double> CompareScalarOrdered(Vector128<double> left, Vector128<double> right) => CompareScalarOrdered(left, right);
-
- /// <summary>
- /// __m128d _mm_cmpunord_pd (__m128d a, __m128d b)
- /// CMPPD xmm, xmm/m128, imm8(3)
- /// </summary>
- public static Vector128<double> CompareUnordered(Vector128<double> left, Vector128<double> right) => CompareUnordered(left, right);
-
- /// <summary>
- /// __m128d _mm_cmpunord_sd (__m128d a, __m128d b)
- /// CMPSD xmm, xmm/m64, imm8(3)
- /// </summary>
- public static Vector128<double> CompareScalarUnordered(Vector128<double> left, Vector128<double> right) => CompareScalarUnordered(left, right);
-
- /// <summary>
- /// __m128i _mm_cvtps_epi32 (__m128 a)
- /// CVTPS2DQ xmm, xmm/m128
- /// </summary>
- public static Vector128<int> ConvertToVector128Int32(Vector128<float> value) => ConvertToVector128Int32(value);
- /// <summary>
- /// __m128i _mm_cvtpd_epi32 (__m128d a)
- /// CVTPD2DQ xmm, xmm/m128
- /// </summary>
- public static Vector128<int> ConvertToVector128Int32(Vector128<double> value) => ConvertToVector128Int32(value);
- /// <summary>
- /// __m128 _mm_cvtepi32_ps (__m128i a)
- /// CVTDQ2PS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> ConvertToVector128Single(Vector128<int> value) => ConvertToVector128Single(value);
- /// <summary>
- /// __m128 _mm_cvtpd_ps (__m128d a)
- /// CVTPD2PS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> ConvertToVector128Single(Vector128<double> value) => ConvertToVector128Single(value);
- /// <summary>
- /// __m128d _mm_cvtepi32_pd (__m128i a)
- /// CVTDQ2PD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> ConvertToVector128Double(Vector128<int> value) => ConvertToVector128Double(value);
- /// <summary>
- /// __m128d _mm_cvtps_pd (__m128 a)
- /// CVTPS2PD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> ConvertToVector128Double(Vector128<float> value) => ConvertToVector128Double(value);
-
- /// <summary>
- /// int _mm_cvtsd_si32 (__m128d a)
- /// CVTSD2SI r32, xmm/m64
- /// </summary>
- public static int ConvertToInt32(Vector128<double> value) => ConvertToInt32(value);
- /// <summary>
- /// int _mm_cvtsi128_si32 (__m128i a)
- /// MOVD reg/m32, xmm
- /// </summary>
- public static int ConvertToInt32(Vector128<int> value) => ConvertToInt32(value);
-
- /// <summary>
- /// int _mm_cvtsi128_si32 (__m128i a)
- /// MOVD reg/m32, xmm
- /// </summary>
- public static uint ConvertToUInt32(Vector128<uint> value) => ConvertToUInt32(value);
-
- /// <summary>
- /// __m128d _mm_cvtsi32_sd (__m128d a, int b)
- /// CVTSI2SD xmm, reg/m32
- /// </summary>
- public static Vector128<double> ConvertScalarToVector128Double(Vector128<double> upper, int value) => ConvertScalarToVector128Double(upper, value);
-
- /// <summary>
- /// __m128d _mm_cvtss_sd (__m128d a, __m128 b)
- /// CVTSS2SD xmm, xmm/m32
- /// </summary>
- public static Vector128<double> ConvertScalarToVector128Double(Vector128<double> upper, Vector128<float> value) => ConvertScalarToVector128Double(upper, value);
-
- /// <summary>
- /// __m128i _mm_cvtsi32_si128 (int a)
- /// MOVD xmm, reg/m32
- /// </summary>
- public static Vector128<int> ConvertScalarToVector128Int32(int value) => ConvertScalarToVector128Int32(value);
-
- /// <summary>
- /// __m128 _mm_cvtsd_ss (__m128 a, __m128d b)
- /// CVTSD2SS xmm, xmm/m64
- /// </summary>
- public static Vector128<float> ConvertScalarToVector128Single(Vector128<float> upper, Vector128<double> value) => ConvertScalarToVector128Single(upper, value);
- /// <summary>
- /// __m128i _mm_cvtsi32_si128 (int a)
- /// MOVD xmm, reg/m32
- /// </summary>
- public static Vector128<uint> ConvertScalarToVector128UInt32(uint value) => ConvertScalarToVector128UInt32(value);
-
- /// <summary>
- /// __m128i _mm_cvttps_epi32 (__m128 a)
- /// CVTTPS2DQ xmm, xmm/m128
- /// </summary>
- public static Vector128<int> ConvertToVector128Int32WithTruncation(Vector128<float> value) => ConvertToVector128Int32WithTruncation(value);
- /// <summary>
- /// __m128i _mm_cvttpd_epi32 (__m128d a)
- /// CVTTPD2DQ xmm, xmm/m128
- /// </summary>
- public static Vector128<int> ConvertToVector128Int32WithTruncation(Vector128<double> value) => ConvertToVector128Int32WithTruncation(value);
-
- /// <summary>
- /// int _mm_cvttsd_si32 (__m128d a)
- /// CVTTSD2SI reg, xmm/m64
- /// </summary>
- public static int ConvertToInt32WithTruncation(Vector128<double> value) => ConvertToInt32WithTruncation(value);
-
- /// <summary>
- /// __m128d _mm_div_pd (__m128d a, __m128d b)
- /// DIVPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> Divide(Vector128<double> left, Vector128<double> right) => Divide(left, right);
-
- /// <summary>
- /// __m128d _mm_div_sd (__m128d a, __m128d b)
- /// DIVSD xmm, xmm/m64
- /// </summary>
- public static Vector128<double> DivideScalar(Vector128<double> left, Vector128<double> right) => DivideScalar(left, right);
-
- /// <summary>
- /// int _mm_extract_epi16 (__m128i a, int immediate)
- /// PEXTRW reg, xmm, imm8
- /// </summary>
- public static ushort Extract(Vector128<ushort> value, byte index) => Extract(value, index);
-
- /// <summary>
- /// __m128i _mm_insert_epi16 (__m128i a, int i, int immediate)
- /// PINSRW xmm, reg/m16, imm8
- /// </summary>
- public static Vector128<short> Insert(Vector128<short> value, short data, byte index) => Insert(value, data, index);
- /// <summary>
- /// __m128i _mm_insert_epi16 (__m128i a, int i, int immediate)
- /// PINSRW xmm, reg/m16, imm8
- /// </summary>
- public static Vector128<ushort> Insert(Vector128<ushort> value, ushort data, byte index) => Insert(value, data, index);
-
- /// <summary>
- /// __m128i _mm_loadu_si128 (__m128i const* mem_address)
- /// MOVDQU xmm, m128
- /// </summary>
- public static unsafe Vector128<sbyte> LoadVector128(sbyte* address) => LoadVector128(address);
- /// <summary>
- /// __m128i _mm_loadu_si128 (__m128i const* mem_address)
- /// MOVDQU xmm, m128
- /// </summary>
- public static unsafe Vector128<byte> LoadVector128(byte* address) => LoadVector128(address);
- /// <summary>
- /// __m128i _mm_loadu_si128 (__m128i const* mem_address)
- /// MOVDQU xmm, m128
- /// </summary>
- public static unsafe Vector128<short> LoadVector128(short* address) => LoadVector128(address);
- /// <summary>
- /// __m128i _mm_loadu_si128 (__m128i const* mem_address)
- /// MOVDQU xmm, m128
- /// </summary>
- public static unsafe Vector128<ushort> LoadVector128(ushort* address) => LoadVector128(address);
- /// <summary>
- /// __m128i _mm_loadu_si128 (__m128i const* mem_address)
- /// MOVDQU xmm, m128
- /// </summary>
- public static unsafe Vector128<int> LoadVector128(int* address) => LoadVector128(address);
- /// <summary>
- /// __m128i _mm_loadu_si128 (__m128i const* mem_address)
- /// MOVDQU xmm, m128
- /// </summary>
- public static unsafe Vector128<uint> LoadVector128(uint* address) => LoadVector128(address);
- /// <summary>
- /// __m128i _mm_loadu_si128 (__m128i const* mem_address)
- /// MOVDQU xmm, m128
- /// </summary>
- public static unsafe Vector128<long> LoadVector128(long* address) => LoadVector128(address);
- /// <summary>
- /// __m128i _mm_loadu_si128 (__m128i const* mem_address)
- /// MOVDQU xmm, m128
- /// </summary>
- public static unsafe Vector128<ulong> LoadVector128(ulong* address) => LoadVector128(address);
- /// <summary>
- /// __m128d _mm_loadu_pd (double const* mem_address)
- /// MOVUPD xmm, m128
- /// </summary>
- public static unsafe Vector128<double> LoadVector128(double* address) => LoadVector128(address);
-
- /// <summary>
- /// __m128d _mm_load_sd (double const* mem_address)
- /// MOVSD xmm, m64
- /// </summary>
- public static unsafe Vector128<double> LoadScalarVector128(double* address) => LoadScalarVector128(address);
-
- /// <summary>
- /// __m128i _mm_load_si128 (__m128i const* mem_address)
- /// MOVDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<sbyte> LoadAlignedVector128(sbyte* address) => LoadAlignedVector128(address);
- /// <summary>
- /// __m128i _mm_load_si128 (__m128i const* mem_address)
- /// MOVDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<byte> LoadAlignedVector128(byte* address) => LoadAlignedVector128(address);
- /// <summary>
- /// __m128i _mm_load_si128 (__m128i const* mem_address)
- /// MOVDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<short> LoadAlignedVector128(short* address) => LoadAlignedVector128(address);
- /// <summary>
- /// __m128i _mm_load_si128 (__m128i const* mem_address)
- /// MOVDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<ushort> LoadAlignedVector128(ushort* address) => LoadAlignedVector128(address);
- /// <summary>
- /// __m128i _mm_load_si128 (__m128i const* mem_address)
- /// MOVDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<int> LoadAlignedVector128(int* address) => LoadAlignedVector128(address);
- /// <summary>
- /// __m128i _mm_load_si128 (__m128i const* mem_address)
- /// MOVDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<uint> LoadAlignedVector128(uint* address) => LoadAlignedVector128(address);
- /// <summary>
- /// __m128i _mm_load_si128 (__m128i const* mem_address)
- /// MOVDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<long> LoadAlignedVector128(long* address) => LoadAlignedVector128(address);
- /// <summary>
- /// __m128i _mm_load_si128 (__m128i const* mem_address)
- /// MOVDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<ulong> LoadAlignedVector128(ulong* address) => LoadAlignedVector128(address);
- /// <summary>
- /// __m128d _mm_load_pd (double const* mem_address)
- /// MOVAPD xmm, m128
- /// </summary>
- public static unsafe Vector128<double> LoadAlignedVector128(double* address) => LoadAlignedVector128(address);
-
- /// <summary>
- /// void _mm_lfence(void)
- /// LFENCE
- /// </summary>
- public static void LoadFence() => LoadFence();
-
- /// <summary>
- /// __m128d _mm_loadh_pd (__m128d a, double const* mem_addr)
- /// MOVHPD xmm, m64
- /// </summary>
- public static unsafe Vector128<double> LoadHigh(Vector128<double> lower, double* address) => LoadHigh(lower, address);
-
- /// <summary>
- /// __m128d _mm_loadl_pd (__m128d a, double const* mem_addr)
- /// MOVLPD xmm, m64
- /// </summary>
- public static unsafe Vector128<double> LoadLow(Vector128<double> upper, double* address) => LoadLow(upper, address);
-
- /// <summary>
- /// __m128i _mm_loadl_epi32 (__m128i const* mem_addr)
- /// MOVD xmm, reg/m32
- /// The above native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<int> LoadScalarVector128(int* address) => LoadScalarVector128(address);
- /// <summary>
- /// __m128i _mm_loadl_epi32 (__m128i const* mem_addr)
- /// MOVD xmm, reg/m32
- /// The above native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<uint> LoadScalarVector128(uint* address) => LoadScalarVector128(address);
- /// <summary>
- /// __m128i _mm_loadl_epi64 (__m128i const* mem_addr)
- /// MOVQ xmm, reg/m64
- /// </summary>
- public static unsafe Vector128<long> LoadScalarVector128(long* address) => LoadScalarVector128(address);
- /// <summary>
- /// __m128i _mm_loadl_epi64 (__m128i const* mem_addr)
- /// MOVQ xmm, reg/m64
- /// </summary>
- public static unsafe Vector128<ulong> LoadScalarVector128(ulong* address) => LoadScalarVector128(address);
-
- /// <summary>
- /// void _mm_maskmoveu_si128 (__m128i a, __m128i mask, char* mem_address)
- /// MASKMOVDQU xmm, xmm
- /// </summary>
- public static unsafe void MaskMove(Vector128<sbyte> source, Vector128<sbyte> mask, sbyte* address) => MaskMove(source, mask, address);
- /// <summary>
- /// void _mm_maskmoveu_si128 (__m128i a, __m128i mask, char* mem_address)
- /// MASKMOVDQU xmm, xmm
- /// </summary>
- public static unsafe void MaskMove(Vector128<byte> source, Vector128<byte> mask, byte* address) => MaskMove(source, mask, address);
-
- /// <summary>
- /// __m128i _mm_max_epu8 (__m128i a, __m128i b)
- /// PMAXUB xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> Max(Vector128<byte> left, Vector128<byte> right) => Max(left, right);
- /// <summary>
- /// __m128i _mm_max_epi16 (__m128i a, __m128i b)
- /// PMAXSW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> Max(Vector128<short> left, Vector128<short> right) => Max(left, right);
- /// <summary>
- /// __m128d _mm_max_pd (__m128d a, __m128d b)
- /// MAXPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> Max(Vector128<double> left, Vector128<double> right) => Max(left, right);
-
- /// <summary>
- /// __m128d _mm_max_sd (__m128d a, __m128d b)
- /// MAXSD xmm, xmm/m64
- /// </summary>
- public static Vector128<double> MaxScalar(Vector128<double> left, Vector128<double> right) => MaxScalar(left, right);
-
- /// <summary>
- /// void _mm_mfence(void)
- /// MFENCE
- /// </summary>
- public static void MemoryFence() => MemoryFence();
-
- /// <summary>
- /// __m128i _mm_min_epu8 (__m128i a, __m128i b)
- /// PMINUB xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> Min(Vector128<byte> left, Vector128<byte> right) => Min(left, right);
- /// <summary>
- /// __m128i _mm_min_epi16 (__m128i a, __m128i b)
- /// PMINSW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> Min(Vector128<short> left, Vector128<short> right) => Min(left, right);
- /// <summary>
- /// __m128d _mm_min_pd (__m128d a, __m128d b)
- /// MINPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> Min(Vector128<double> left, Vector128<double> right) => Min(left, right);
-
- /// <summary>
- /// __m128d _mm_min_sd (__m128d a, __m128d b)
- /// MINSD xmm, xmm/m64
- /// </summary>
- public static Vector128<double> MinScalar(Vector128<double> left, Vector128<double> right) => MinScalar(left, right);
-
- /// <summary>
- /// __m128d _mm_move_sd (__m128d a, __m128d b)
- /// MOVSD xmm, xmm
- /// </summary>
- public static Vector128<double> MoveScalar(Vector128<double> upper, Vector128<double> value) => MoveScalar(upper, value);
-
- /// <summary>
- /// int _mm_movemask_epi8 (__m128i a)
- /// PMOVMSKB reg, xmm
- /// </summary>
- public static int MoveMask(Vector128<sbyte> value) => MoveMask(value);
- /// <summary>
- /// int _mm_movemask_epi8 (__m128i a)
- /// PMOVMSKB reg, xmm
- /// </summary>
- public static int MoveMask(Vector128<byte> value) => MoveMask(value);
- /// <summary>
- /// int _mm_movemask_pd (__m128d a)
- /// MOVMSKPD reg, xmm
- /// </summary>
- public static int MoveMask(Vector128<double> value) => MoveMask(value);
-
- /// <summary>
- /// __m128i _mm_move_epi64 (__m128i a)
- /// MOVQ xmm, xmm
- /// </summary>
- public static Vector128<long> MoveScalar(Vector128<long> value) => MoveScalar(value);
- /// <summary>
- /// __m128i _mm_move_epi64 (__m128i a)
- /// MOVQ xmm, xmm
- /// </summary>
- public static Vector128<ulong> MoveScalar(Vector128<ulong> value) => MoveScalar(value);
-
- /// <summary>
- /// __m128i _mm_mul_epu32 (__m128i a, __m128i b)
- /// PMULUDQ xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> Multiply(Vector128<uint> left, Vector128<uint> right) => Multiply(left, right);
- /// <summary>
- /// __m128d _mm_mul_pd (__m128d a, __m128d b)
- /// MULPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> Multiply(Vector128<double> left, Vector128<double> right) => Multiply(left, right);
-
- /// <summary>
- /// __m128d _mm_mul_sd (__m128d a, __m128d b)
- /// MULSD xmm, xmm/m64
- /// </summary>
- public static Vector128<double> MultiplyScalar(Vector128<double> left, Vector128<double> right) => MultiplyScalar(left, right);
-
- /// <summary>
- /// __m128i _mm_mulhi_epi16 (__m128i a, __m128i b)
- /// PMULHW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> MultiplyHigh(Vector128<short> left, Vector128<short> right) => MultiplyHigh(left, right);
- /// <summary>
- /// __m128i _mm_mulhi_epu16 (__m128i a, __m128i b)
- /// PMULHUW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> MultiplyHigh(Vector128<ushort> left, Vector128<ushort> right) => MultiplyHigh(left, right);
-
- /// <summary>
- /// __m128i _mm_madd_epi16 (__m128i a, __m128i b)
- /// PMADDWD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> MultiplyAddAdjacent(Vector128<short> left, Vector128<short> right) => MultiplyAddAdjacent(left, right);
-
- /// <summary>
- /// __m128i _mm_mullo_epi16 (__m128i a, __m128i b)
- /// PMULLW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> MultiplyLow(Vector128<short> left, Vector128<short> right) => MultiplyLow(left, right);
- /// <summary>
- /// __m128i _mm_mullo_epi16 (__m128i a, __m128i b)
- /// PMULLW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> MultiplyLow(Vector128<ushort> left, Vector128<ushort> right) => MultiplyLow(left, right);
-
- /// <summary>
- /// __m128i _mm_or_si128 (__m128i a, __m128i b)
- /// POR xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> Or(Vector128<byte> left, Vector128<byte> right) => Or(left, right);
- /// <summary>
- /// __m128i _mm_or_si128 (__m128i a, __m128i b)
- /// POR xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> Or(Vector128<sbyte> left, Vector128<sbyte> right) => Or(left, right);
- /// <summary>
- /// __m128i _mm_or_si128 (__m128i a, __m128i b)
- /// POR xmm, xmm/m128
- /// </summary>
- public static Vector128<short> Or(Vector128<short> left, Vector128<short> right) => Or(left, right);
- /// <summary>
- /// __m128i _mm_or_si128 (__m128i a, __m128i b)
- /// POR xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> Or(Vector128<ushort> left, Vector128<ushort> right) => Or(left, right);
- /// <summary>
- /// __m128i _mm_or_si128 (__m128i a, __m128i b)
- /// POR xmm, xmm/m128
- /// </summary>
- public static Vector128<int> Or(Vector128<int> left, Vector128<int> right) => Or(left, right);
- /// <summary>
- /// __m128i _mm_or_si128 (__m128i a, __m128i b)
- /// POR xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> Or(Vector128<uint> left, Vector128<uint> right) => Or(left, right);
- /// <summary>
- /// __m128i _mm_or_si128 (__m128i a, __m128i b)
- /// POR xmm, xmm/m128
- /// </summary>
- public static Vector128<long> Or(Vector128<long> left, Vector128<long> right) => Or(left, right);
- /// <summary>
- /// __m128i _mm_or_si128 (__m128i a, __m128i b)
- /// POR xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> Or(Vector128<ulong> left, Vector128<ulong> right) => Or(left, right);
- /// <summary>
- /// __m128d _mm_or_pd (__m128d a, __m128d b)
- /// ORPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> Or(Vector128<double> left, Vector128<double> right) => Or(left, right);
-
- /// <summary>
- /// __m128i _mm_packs_epi16 (__m128i a, __m128i b)
- /// PACKSSWB xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> PackSignedSaturate(Vector128<short> left, Vector128<short> right) => PackSignedSaturate(left, right);
- /// <summary>
- /// __m128i _mm_packs_epi32 (__m128i a, __m128i b)
- /// PACKSSDW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> PackSignedSaturate(Vector128<int> left, Vector128<int> right) => PackSignedSaturate(left, right);
-
- /// <summary>
- /// __m128i _mm_packus_epi16 (__m128i a, __m128i b)
- /// PACKUSWB xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> PackUnsignedSaturate(Vector128<short> left, Vector128<short> right) => PackUnsignedSaturate(left, right);
-
- /// <summary>
- /// __m128i _mm_sad_epu8 (__m128i a, __m128i b)
- /// PSADBW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> SumAbsoluteDifferences(Vector128<byte> left, Vector128<byte> right) => SumAbsoluteDifferences(left, right);
-
- /// <summary>
- /// __m128i _mm_shuffle_epi32 (__m128i a, int immediate)
- /// PSHUFD xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<int> Shuffle(Vector128<int> value, byte control) => Shuffle(value, control);
- /// <summary>
- /// __m128i _mm_shuffle_epi32 (__m128i a, int immediate)
- /// PSHUFD xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<uint> Shuffle(Vector128<uint> value, byte control) => Shuffle(value, control);
- /// <summary>
- /// __m128d _mm_shuffle_pd (__m128d a, __m128d b, int immediate)
- /// SHUFPD xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<double> Shuffle(Vector128<double> left, Vector128<double> right, byte control) => Shuffle(left, right, control);
-
- /// <summary>
- /// __m128i _mm_shufflehi_epi16 (__m128i a, int immediate)
- /// PSHUFHW xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<short> ShuffleHigh(Vector128<short> value, byte control) => ShuffleHigh(value, control);
- /// <summary>
- /// __m128i _mm_shufflehi_epi16 (__m128i a, int control)
- /// PSHUFHW xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<ushort> ShuffleHigh(Vector128<ushort> value, byte control) => ShuffleHigh(value, control);
-
- /// <summary>
- /// __m128i _mm_shufflelo_epi16 (__m128i a, int control)
- /// PSHUFLW xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<short> ShuffleLow(Vector128<short> value, byte control) => ShuffleLow(value, control);
- /// <summary>
- /// __m128i _mm_shufflelo_epi16 (__m128i a, int control)
- /// PSHUFLW xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<ushort> ShuffleLow(Vector128<ushort> value, byte control) => ShuffleLow(value, control);
-
- /// <summary>
- /// __m128i _mm_sll_epi16 (__m128i a, __m128i count)
- /// PSLLW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> ShiftLeftLogical(Vector128<short> value, Vector128<short> count) => ShiftLeftLogical(value, count);
- /// <summary>
- /// __m128i _mm_sll_epi16 (__m128i a, __m128i count)
- /// PSLLW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> ShiftLeftLogical(Vector128<ushort> value, Vector128<ushort> count) => ShiftLeftLogical(value, count);
- /// <summary>
- /// __m128i _mm_sll_epi32 (__m128i a, __m128i count)
- /// PSLLD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> ShiftLeftLogical(Vector128<int> value, Vector128<int> count) => ShiftLeftLogical(value, count);
- /// <summary>
- /// __m128i _mm_sll_epi32 (__m128i a, __m128i count)
- /// PSLLD xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> ShiftLeftLogical(Vector128<uint> value, Vector128<uint> count) => ShiftLeftLogical(value, count);
- /// <summary>
- /// __m128i _mm_sll_epi64 (__m128i a, __m128i count)
- /// PSLLQ xmm, xmm/m128
- /// </summary>
- public static Vector128<long> ShiftLeftLogical(Vector128<long> value, Vector128<long> count) => ShiftLeftLogical(value, count);
- /// <summary>
- /// __m128i _mm_sll_epi64 (__m128i a, __m128i count)
- /// PSLLQ xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> ShiftLeftLogical(Vector128<ulong> value, Vector128<ulong> count) => ShiftLeftLogical(value, count);
-
- /// <summary>
- /// __m128i _mm_slli_epi16 (__m128i a, int immediate)
- /// PSLLW xmm, imm8
- /// </summary>
- public static Vector128<short> ShiftLeftLogical(Vector128<short> value, byte count) => ShiftLeftLogical(value, count);
- /// <summary>
- /// __m128i _mm_slli_epi16 (__m128i a, int immediate)
- /// PSLLW xmm, imm8
- /// </summary>
- public static Vector128<ushort> ShiftLeftLogical(Vector128<ushort> value, byte count) => ShiftLeftLogical(value, count);
- /// <summary>
- /// __m128i _mm_slli_epi32 (__m128i a, int immediate)
- /// PSLLD xmm, imm8
- /// </summary>
- public static Vector128<int> ShiftLeftLogical(Vector128<int> value, byte count) => ShiftLeftLogical(value, count);
- /// <summary>
- /// __m128i _mm_slli_epi32 (__m128i a, int immediate)
- /// PSLLD xmm, imm8
- /// </summary>
- public static Vector128<uint> ShiftLeftLogical(Vector128<uint> value, byte count) => ShiftLeftLogical(value, count);
- /// <summary>
- /// __m128i _mm_slli_epi64 (__m128i a, int immediate)
- /// PSLLQ xmm, imm8
- /// </summary>
- public static Vector128<long> ShiftLeftLogical(Vector128<long> value, byte count) => ShiftLeftLogical(value, count);
- /// <summary>
- /// __m128i _mm_slli_epi64 (__m128i a, int immediate)
- /// PSLLQ xmm, imm8
- /// </summary>
- public static Vector128<ulong> ShiftLeftLogical(Vector128<ulong> value, byte count) => ShiftLeftLogical(value, count);
-
- /// <summary>
- /// __m128i _mm_bslli_si128 (__m128i a, int imm8)
- /// PSLLDQ xmm, imm8
- /// </summary>
- public static Vector128<sbyte> ShiftLeftLogical128BitLane(Vector128<sbyte> value, byte numBytes) => ShiftLeftLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m128i _mm_bslli_si128 (__m128i a, int imm8)
- /// PSLLDQ xmm, imm8
- /// </summary>
- public static Vector128<byte> ShiftLeftLogical128BitLane(Vector128<byte> value, byte numBytes) => ShiftLeftLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m128i _mm_bslli_si128 (__m128i a, int imm8)
- /// PSLLDQ xmm, imm8
- /// </summary>
- public static Vector128<short> ShiftLeftLogical128BitLane(Vector128<short> value, byte numBytes) => ShiftLeftLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m128i _mm_bslli_si128 (__m128i a, int imm8)
- /// PSLLDQ xmm, imm8
- /// </summary>
- public static Vector128<ushort> ShiftLeftLogical128BitLane(Vector128<ushort> value, byte numBytes) => ShiftLeftLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m128i _mm_bslli_si128 (__m128i a, int imm8)
- /// PSLLDQ xmm, imm8
- /// </summary>
- public static Vector128<int> ShiftLeftLogical128BitLane(Vector128<int> value, byte numBytes) => ShiftLeftLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m128i _mm_bslli_si128 (__m128i a, int imm8)
- /// PSLLDQ xmm, imm8
- /// </summary>
- public static Vector128<uint> ShiftLeftLogical128BitLane(Vector128<uint> value, byte numBytes) => ShiftLeftLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m128i _mm_bslli_si128 (__m128i a, int imm8)
- /// PSLLDQ xmm, imm8
- /// </summary>
- public static Vector128<long> ShiftLeftLogical128BitLane(Vector128<long> value, byte numBytes) => ShiftLeftLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m128i _mm_bslli_si128 (__m128i a, int imm8)
- /// PSLLDQ xmm, imm8
- /// </summary>
- public static Vector128<ulong> ShiftLeftLogical128BitLane(Vector128<ulong> value, byte numBytes) => ShiftLeftLogical128BitLane(value, numBytes);
-
- /// <summary>
- /// __m128i _mm_sra_epi16 (__m128i a, __m128i count)
- /// PSRAW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> ShiftRightArithmetic(Vector128<short> value, Vector128<short> count) => ShiftRightArithmetic(value, count);
- /// <summary>
- /// __m128i _mm_sra_epi32 (__m128i a, __m128i count)
- /// PSRAD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> ShiftRightArithmetic(Vector128<int> value, Vector128<int> count) => ShiftRightArithmetic(value, count);
-
- /// <summary>
- /// __m128i _mm_srai_epi16 (__m128i a, int immediate)
- /// PSRAW xmm, imm8
- /// </summary>
- public static Vector128<short> ShiftRightArithmetic(Vector128<short> value, byte count) => ShiftRightArithmetic(value, count);
- /// <summary>
- /// __m128i _mm_srai_epi32 (__m128i a, int immediate)
- /// PSRAD xmm, imm8
- /// </summary>
- public static Vector128<int> ShiftRightArithmetic(Vector128<int> value, byte count) => ShiftRightArithmetic(value, count);
-
- /// <summary>
- /// __m128i _mm_srl_epi16 (__m128i a, __m128i count)
- /// PSRLW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> ShiftRightLogical(Vector128<short> value, Vector128<short> count) => ShiftRightLogical(value, count);
- /// <summary>
- /// __m128i _mm_srl_epi16 (__m128i a, __m128i count)
- /// PSRLW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> ShiftRightLogical(Vector128<ushort> value, Vector128<ushort> count) => ShiftRightLogical(value, count);
- /// <summary>
- /// __m128i _mm_srl_epi32 (__m128i a, __m128i count)
- /// PSRLD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> ShiftRightLogical(Vector128<int> value, Vector128<int> count) => ShiftRightLogical(value, count);
- /// <summary>
- /// __m128i _mm_srl_epi32 (__m128i a, __m128i count)
- /// PSRLD xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> ShiftRightLogical(Vector128<uint> value, Vector128<uint> count) => ShiftRightLogical(value, count);
- /// <summary>
- /// __m128i _mm_srl_epi64 (__m128i a, __m128i count)
- /// PSRLQ xmm, xmm/m128
- /// </summary>
- public static Vector128<long> ShiftRightLogical(Vector128<long> value, Vector128<long> count) => ShiftRightLogical(value, count);
- /// <summary>
- /// __m128i _mm_srl_epi64 (__m128i a, __m128i count)
- /// PSRLQ xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> ShiftRightLogical(Vector128<ulong> value, Vector128<ulong> count) => ShiftRightLogical(value, count);
-
- /// <summary>
- /// __m128i _mm_srli_epi16 (__m128i a, int immediate)
- /// PSRLW xmm, imm8
- /// </summary>
- public static Vector128<short> ShiftRightLogical(Vector128<short> value, byte count) => ShiftRightLogical(value, count);
- /// <summary>
- /// __m128i _mm_srli_epi16 (__m128i a, int immediate)
- /// PSRLW xmm, imm8
- /// </summary>
- public static Vector128<ushort> ShiftRightLogical(Vector128<ushort> value, byte count) => ShiftRightLogical(value, count);
- /// <summary>
- /// __m128i _mm_srli_epi32 (__m128i a, int immediate)
- /// PSRLD xmm, imm8
- /// </summary>
- public static Vector128<int> ShiftRightLogical(Vector128<int> value, byte count) => ShiftRightLogical(value, count);
- /// <summary>
- /// __m128i _mm_srli_epi32 (__m128i a, int immediate)
- /// PSRLD xmm, imm8
- /// </summary>
- public static Vector128<uint> ShiftRightLogical(Vector128<uint> value, byte count) => ShiftRightLogical(value, count);
- /// <summary>
- /// __m128i _mm_srli_epi64 (__m128i a, int immediate)
- /// PSRLQ xmm, imm8
- /// </summary>
- public static Vector128<long> ShiftRightLogical(Vector128<long> value, byte count) => ShiftRightLogical(value, count);
- /// <summary>
- /// __m128i _mm_srli_epi64 (__m128i a, int immediate)
- /// PSRLQ xmm, imm8
- /// </summary>
- public static Vector128<ulong> ShiftRightLogical(Vector128<ulong> value, byte count) => ShiftRightLogical(value, count);
-
- /// <summary>
- /// __m128i _mm_bsrli_si128 (__m128i a, int imm8)
- /// PSRLDQ xmm, imm8
- /// </summary>
- public static Vector128<sbyte> ShiftRightLogical128BitLane(Vector128<sbyte> value, byte numBytes) => ShiftRightLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m128i _mm_bsrli_si128 (__m128i a, int imm8)
- /// PSRLDQ xmm, imm8
- /// </summary>
- public static Vector128<byte> ShiftRightLogical128BitLane(Vector128<byte> value, byte numBytes) => ShiftRightLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m128i _mm_bsrli_si128 (__m128i a, int imm8)
- /// PSRLDQ xmm, imm8
- /// </summary>
- public static Vector128<short> ShiftRightLogical128BitLane(Vector128<short> value, byte numBytes) => ShiftRightLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m128i _mm_bsrli_si128 (__m128i a, int imm8)
- /// PSRLDQ xmm, imm8
- /// </summary>
- public static Vector128<ushort> ShiftRightLogical128BitLane(Vector128<ushort> value, byte numBytes) => ShiftRightLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m128i _mm_bsrli_si128 (__m128i a, int imm8)
- /// PSRLDQ xmm, imm8
- /// </summary>
- public static Vector128<int> ShiftRightLogical128BitLane(Vector128<int> value, byte numBytes) => ShiftRightLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m128i _mm_bsrli_si128 (__m128i a, int imm8)
- /// PSRLDQ xmm, imm8
- /// </summary>
- public static Vector128<uint> ShiftRightLogical128BitLane(Vector128<uint> value, byte numBytes) => ShiftRightLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m128i _mm_bsrli_si128 (__m128i a, int imm8)
- /// PSRLDQ xmm, imm8
- /// </summary>
- public static Vector128<long> ShiftRightLogical128BitLane(Vector128<long> value, byte numBytes) => ShiftRightLogical128BitLane(value, numBytes);
- /// <summary>
- /// __m128i _mm_bsrli_si128 (__m128i a, int imm8)
- /// PSRLDQ xmm, imm8
- /// </summary>
- public static Vector128<ulong> ShiftRightLogical128BitLane(Vector128<ulong> value, byte numBytes) => ShiftRightLogical128BitLane(value, numBytes);
-
- /// <summary>
- /// __m128d _mm_sqrt_pd (__m128d a)
- /// SQRTPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> Sqrt(Vector128<double> value) => Sqrt(value);
-
- /// <summary>
- /// __m128d _mm_sqrt_sd (__m128d a)
- /// SQRTSD xmm, xmm/64
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<double> SqrtScalar(Vector128<double> value) => SqrtScalar(value);
-
- /// <summary>
- /// __m128d _mm_sqrt_sd (__m128d a, __m128d b)
- /// SQRTSD xmm, xmm/64
- /// </summary>
- public static Vector128<double> SqrtScalar(Vector128<double> upper, Vector128<double> value) => SqrtScalar(upper, value);
-
- /// <summary>
- /// void _mm_store_sd (double* mem_addr, __m128d a)
- /// MOVSD m64, xmm
- /// </summary>
- public static unsafe void StoreScalar(double* address, Vector128<double> source) => StoreScalar(address, source);
- /// <summary>
- /// void _mm_storel_epi64 (__m128i* mem_addr, __m128i a)
- /// MOVQ m64, xmm
- /// </summary>
- public static unsafe void StoreScalar(long* address, Vector128<long> source) => StoreScalar(address, source);
- /// <summary>
- /// void _mm_storel_epi64 (__m128i* mem_addr, __m128i a)
- /// MOVQ m64, xmm
- /// </summary>
- public static unsafe void StoreScalar(ulong* address, Vector128<ulong> source) => StoreScalar(address, source);
-
- /// <summary>
- /// void _mm_store_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQA m128, xmm
- /// </summary>
- public static unsafe void StoreAligned(sbyte* address, Vector128<sbyte> source) => StoreAligned(address, source);
- /// <summary>
- /// void _mm_store_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQA m128, xmm
- /// </summary>
- public static unsafe void StoreAligned(byte* address, Vector128<byte> source) => StoreAligned(address, source);
- /// <summary>
- /// void _mm_store_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQA m128, xmm
- /// </summary>
- public static unsafe void StoreAligned(short* address, Vector128<short> source) => StoreAligned(address, source);
- /// <summary>
- /// void _mm_store_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQA m128, xmm
- /// </summary>
- public static unsafe void StoreAligned(ushort* address, Vector128<ushort> source) => StoreAligned(address, source);
- /// <summary>
- /// void _mm_store_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQA m128, xmm
- /// </summary>
- public static unsafe void StoreAligned(int* address, Vector128<int> source) => StoreAligned(address, source);
- /// <summary>
- /// void _mm_store_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQA m128, xmm
- /// </summary>
- public static unsafe void StoreAligned(uint* address, Vector128<uint> source) => StoreAligned(address, source);
- /// <summary>
- /// void _mm_store_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQA m128, xmm
- /// </summary>
- public static unsafe void StoreAligned(long* address, Vector128<long> source) => StoreAligned(address, source);
- /// <summary>
- /// void _mm_store_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQA m128, xmm
- /// </summary>
- public static unsafe void StoreAligned(ulong* address, Vector128<ulong> source) => StoreAligned(address, source);
- /// <summary>
- /// void _mm_store_pd (double* mem_addr, __m128d a)
- /// MOVAPD m128, xmm
- /// </summary>
- public static unsafe void StoreAligned(double* address, Vector128<double> source) => StoreAligned(address, source);
-
- /// <summary>
- /// void _mm_stream_si128 (__m128i* mem_addr, __m128i a)
- /// MOVNTDQ m128, xmm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(sbyte* address, Vector128<sbyte> source) => StoreAlignedNonTemporal(address, source);
- /// <summary>
- /// void _mm_stream_si128 (__m128i* mem_addr, __m128i a)
- /// MOVNTDQ m128, xmm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(byte* address, Vector128<byte> source) => StoreAlignedNonTemporal(address, source);
- /// <summary>
- /// void _mm_stream_si128 (__m128i* mem_addr, __m128i a)
- /// MOVNTDQ m128, xmm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(short* address, Vector128<short> source) => StoreAlignedNonTemporal(address, source);
- /// <summary>
- /// void _mm_stream_si128 (__m128i* mem_addr, __m128i a)
- /// MOVNTDQ m128, xmm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(ushort* address, Vector128<ushort> source) => StoreAlignedNonTemporal(address, source);
- /// <summary>
- /// void _mm_stream_si128 (__m128i* mem_addr, __m128i a)
- /// MOVNTDQ m128, xmm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(int* address, Vector128<int> source) => StoreAlignedNonTemporal(address, source);
- /// <summary>
- /// void _mm_stream_si128 (__m128i* mem_addr, __m128i a)
- /// MOVNTDQ m128, xmm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(uint* address, Vector128<uint> source) => StoreAlignedNonTemporal(address, source);
- /// <summary>
- /// void _mm_stream_si128 (__m128i* mem_addr, __m128i a)
- /// MOVNTDQ m128, xmm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(long* address, Vector128<long> source) => StoreAlignedNonTemporal(address, source);
- /// <summary>
- /// void _mm_stream_si128 (__m128i* mem_addr, __m128i a)
- /// MOVNTDQ m128, xmm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(ulong* address, Vector128<ulong> source) => StoreAlignedNonTemporal(address, source);
- /// <summary>
- /// void _mm_stream_pd (double* mem_addr, __m128d a)
- /// MOVNTPD m128, xmm
- /// </summary>
- public static unsafe void StoreAlignedNonTemporal(double* address, Vector128<double> source) => StoreAlignedNonTemporal(address, source);
-
- /// <summary>
- /// void _mm_storeu_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQU m128, xmm
- /// </summary>
- public static unsafe void Store(sbyte* address, Vector128<sbyte> source) => Store(address, source);
- /// <summary>
- /// void _mm_storeu_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQU m128, xmm
- /// </summary>
- public static unsafe void Store(byte* address, Vector128<byte> source) => Store(address, source);
- /// <summary>
- /// void _mm_storeu_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQU m128, xmm
- /// </summary>
- public static unsafe void Store(short* address, Vector128<short> source) => Store(address, source);
- /// <summary>
- /// void _mm_storeu_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQU m128, xmm
- /// </summary>
- public static unsafe void Store(ushort* address, Vector128<ushort> source) => Store(address, source);
- /// <summary>
- /// void _mm_storeu_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQU m128, xmm
- /// </summary>
- public static unsafe void Store(int* address, Vector128<int> source) => Store(address, source);
- /// <summary>
- /// void _mm_storeu_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQU m128, xmm
- /// </summary>
- public static unsafe void Store(uint* address, Vector128<uint> source) => Store(address, source);
- /// <summary>
- /// void _mm_storeu_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQU m128, xmm
- /// </summary>
- public static unsafe void Store(long* address, Vector128<long> source) => Store(address, source);
- /// <summary>
- /// void _mm_storeu_si128 (__m128i* mem_addr, __m128i a)
- /// MOVDQU m128, xmm
- /// </summary>
- public static unsafe void Store(ulong* address, Vector128<ulong> source) => Store(address, source);
- /// <summary>
- /// void _mm_storeu_pd (double* mem_addr, __m128d a)
- /// MOVUPD m128, xmm
- /// </summary>
- public static unsafe void Store(double* address, Vector128<double> source) => Store(address, source);
-
- /// <summary>
- /// void _mm_storeh_pd (double* mem_addr, __m128d a)
- /// MOVHPD m64, xmm
- /// </summary>
- public static unsafe void StoreHigh(double* address, Vector128<double> source) => StoreHigh(address, source);
-
- /// <summary>
- /// void _mm_storel_pd (double* mem_addr, __m128d a)
- /// MOVLPD m64, xmm
- /// </summary>
- public static unsafe void StoreLow(double* address, Vector128<double> source) => StoreLow(address, source);
-
- /// <summary>
- /// void _mm_stream_si32(int *p, int a)
- /// MOVNTI m32, r32
- /// </summary>
- public static unsafe void StoreNonTemporal(int* address, int value) => StoreNonTemporal(address, value);
- /// <summary>
- /// void _mm_stream_si32(int *p, int a)
- /// MOVNTI m32, r32
- /// </summary>
- public static unsafe void StoreNonTemporal(uint* address, uint value) => StoreNonTemporal(address, value);
-
- /// <summary>
- /// __m128i _mm_sub_epi8 (__m128i a, __m128i b)
- /// PSUBB xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> Subtract(Vector128<byte> left, Vector128<byte> right) => Subtract(left, right);
- /// <summary>
- /// __m128i _mm_sub_epi8 (__m128i a, __m128i b)
- /// PSUBB xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> Subtract(Vector128<sbyte> left, Vector128<sbyte> right) => Subtract(left, right);
- /// <summary>
- /// __m128i _mm_sub_epi16 (__m128i a, __m128i b)
- /// PSUBW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> Subtract(Vector128<short> left, Vector128<short> right) => Subtract(left, right);
- /// <summary>
- /// __m128i _mm_sub_epi16 (__m128i a, __m128i b)
- /// PSUBW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> Subtract(Vector128<ushort> left, Vector128<ushort> right) => Subtract(left, right);
- /// <summary>
- /// __m128i _mm_sub_epi32 (__m128i a, __m128i b)
- /// PSUBD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> Subtract(Vector128<int> left, Vector128<int> right) => Subtract(left, right);
- /// <summary>
- /// __m128i _mm_sub_epi32 (__m128i a, __m128i b)
- /// PSUBD xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> Subtract(Vector128<uint> left, Vector128<uint> right) => Subtract(left, right);
- /// <summary>
- /// __m128i _mm_sub_epi64 (__m128i a, __m128i b)
- /// PSUBQ xmm, xmm/m128
- /// </summary>
- public static Vector128<long> Subtract(Vector128<long> left, Vector128<long> right) => Subtract(left, right);
- /// <summary>
- /// __m128i _mm_sub_epi64 (__m128i a, __m128i b)
- /// PSUBQ xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> Subtract(Vector128<ulong> left, Vector128<ulong> right) => Subtract(left, right);
- /// <summary>
- /// __m128d _mm_sub_pd (__m128d a, __m128d b)
- /// SUBPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> Subtract(Vector128<double> left, Vector128<double> right) => Subtract(left, right);
-
- /// <summary>
- /// __m128d _mm_sub_sd (__m128d a, __m128d b)
- /// SUBSD xmm, xmm/m64
- /// </summary>
- public static Vector128<double> SubtractScalar(Vector128<double> left, Vector128<double> right) => SubtractScalar(left, right);
-
- /// <summary>
- /// __m128i _mm_subs_epi8 (__m128i a, __m128i b)
- /// PSUBSB xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> SubtractSaturate(Vector128<sbyte> left, Vector128<sbyte> right) => SubtractSaturate(left, right);
- /// <summary>
- /// __m128i _mm_subs_epi16 (__m128i a, __m128i b)
- /// PSUBSW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> SubtractSaturate(Vector128<short> left, Vector128<short> right) => SubtractSaturate(left, right);
- /// <summary>
- /// __m128i _mm_subs_epu8 (__m128i a, __m128i b)
- /// PSUBUSB xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> SubtractSaturate(Vector128<byte> left, Vector128<byte> right) => SubtractSaturate(left, right);
- /// <summary>
- /// __m128i _mm_subs_epu16 (__m128i a, __m128i b)
- /// PSUBUSW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> SubtractSaturate(Vector128<ushort> left, Vector128<ushort> right) => SubtractSaturate(left, right);
-
- /// <summary>
- /// __m128i _mm_unpackhi_epi8 (__m128i a, __m128i b)
- /// PUNPCKHBW xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> UnpackHigh(Vector128<byte> left, Vector128<byte> right) => UnpackHigh(left, right);
- /// <summary>
- /// __m128i _mm_unpackhi_epi8 (__m128i a, __m128i b)
- /// PUNPCKHBW xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> UnpackHigh(Vector128<sbyte> left, Vector128<sbyte> right) => UnpackHigh(left, right);
- /// <summary>
- /// __m128i _mm_unpackhi_epi16 (__m128i a, __m128i b)
- /// PUNPCKHWD xmm, xmm/m128
- /// </summary>
- public static Vector128<short> UnpackHigh(Vector128<short> left, Vector128<short> right) => UnpackHigh(left, right);
- /// <summary>
- /// __m128i _mm_unpackhi_epi16 (__m128i a, __m128i b)
- /// PUNPCKHWD xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> UnpackHigh(Vector128<ushort> left, Vector128<ushort> right) => UnpackHigh(left, right);
- /// <summary>
- /// __m128i _mm_unpackhi_epi32 (__m128i a, __m128i b)
- /// PUNPCKHDQ xmm, xmm/m128
- /// </summary>
- public static Vector128<int> UnpackHigh(Vector128<int> left, Vector128<int> right) => UnpackHigh(left, right);
- /// <summary>
- /// __m128i _mm_unpackhi_epi32 (__m128i a, __m128i b)
- /// PUNPCKHDQ xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> UnpackHigh(Vector128<uint> left, Vector128<uint> right) => UnpackHigh(left, right);
- /// <summary>
- /// __m128i _mm_unpackhi_epi64 (__m128i a, __m128i b)
- /// PUNPCKHQDQ xmm, xmm/m128
- /// </summary>
- public static Vector128<long> UnpackHigh(Vector128<long> left, Vector128<long> right) => UnpackHigh(left, right);
- /// <summary>
- /// __m128i _mm_unpackhi_epi64 (__m128i a, __m128i b)
- /// PUNPCKHQDQ xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> UnpackHigh(Vector128<ulong> left, Vector128<ulong> right) => UnpackHigh(left, right);
- /// <summary>
- /// __m128d _mm_unpackhi_pd (__m128d a, __m128d b)
- /// UNPCKHPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> UnpackHigh(Vector128<double> left, Vector128<double> right) => UnpackHigh(left, right);
-
- /// <summary>
- /// __m128i _mm_unpacklo_epi8 (__m128i a, __m128i b)
- /// PUNPCKLBW xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> UnpackLow(Vector128<byte> left, Vector128<byte> right) => UnpackLow(left, right);
- /// <summary>
- /// __m128i _mm_unpacklo_epi8 (__m128i a, __m128i b)
- /// PUNPCKLBW xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> UnpackLow(Vector128<sbyte> left, Vector128<sbyte> right) => UnpackLow(left, right);
- /// <summary>
- /// __m128i _mm_unpacklo_epi16 (__m128i a, __m128i b)
- /// PUNPCKLWD xmm, xmm/m128
- /// </summary>
- public static Vector128<short> UnpackLow(Vector128<short> left, Vector128<short> right) => UnpackLow(left, right);
- /// <summary>
- /// __m128i _mm_unpacklo_epi16 (__m128i a, __m128i b)
- /// PUNPCKLWD xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> UnpackLow(Vector128<ushort> left, Vector128<ushort> right) => UnpackLow(left, right);
- /// <summary>
- /// __m128i _mm_unpacklo_epi32 (__m128i a, __m128i b)
- /// PUNPCKLDQ xmm, xmm/m128
- /// </summary>
- public static Vector128<int> UnpackLow(Vector128<int> left, Vector128<int> right) => UnpackLow(left, right);
- /// <summary>
- /// __m128i _mm_unpacklo_epi32 (__m128i a, __m128i b)
- /// PUNPCKLDQ xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> UnpackLow(Vector128<uint> left, Vector128<uint> right) => UnpackLow(left, right);
- /// <summary>
- /// __m128i _mm_unpacklo_epi64 (__m128i a, __m128i b)
- /// PUNPCKLQDQ xmm, xmm/m128
- /// </summary>
- public static Vector128<long> UnpackLow(Vector128<long> left, Vector128<long> right) => UnpackLow(left, right);
- /// <summary>
- /// __m128i _mm_unpacklo_epi64 (__m128i a, __m128i b)
- /// PUNPCKLQDQ xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> UnpackLow(Vector128<ulong> left, Vector128<ulong> right) => UnpackLow(left, right);
- /// <summary>
- /// __m128d _mm_unpacklo_pd (__m128d a, __m128d b)
- /// UNPCKLPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> UnpackLow(Vector128<double> left, Vector128<double> right) => UnpackLow(left, right);
-
- /// <summary>
- /// __m128i _mm_xor_si128 (__m128i a, __m128i b)
- /// PXOR xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> Xor(Vector128<byte> left, Vector128<byte> right) => Xor(left, right);
- /// <summary>
- /// __m128i _mm_xor_si128 (__m128i a, __m128i b)
- /// PXOR xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> Xor(Vector128<sbyte> left, Vector128<sbyte> right) => Xor(left, right);
- /// <summary>
- /// __m128i _mm_xor_si128 (__m128i a, __m128i b)
- /// PXOR xmm, xmm/m128
- /// </summary>
- public static Vector128<short> Xor(Vector128<short> left, Vector128<short> right) => Xor(left, right);
- /// <summary>
- /// __m128i _mm_xor_si128 (__m128i a, __m128i b)
- /// PXOR xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> Xor(Vector128<ushort> left, Vector128<ushort> right) => Xor(left, right);
- /// <summary>
- /// __m128i _mm_xor_si128 (__m128i a, __m128i b)
- /// PXOR xmm, xmm/m128
- /// </summary>
- public static Vector128<int> Xor(Vector128<int> left, Vector128<int> right) => Xor(left, right);
- /// <summary>
- /// __m128i _mm_xor_si128 (__m128i a, __m128i b)
- /// PXOR xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> Xor(Vector128<uint> left, Vector128<uint> right) => Xor(left, right);
- /// <summary>
- /// __m128i _mm_xor_si128 (__m128i a, __m128i b)
- /// PXOR xmm, xmm/m128
- /// </summary>
- public static Vector128<long> Xor(Vector128<long> left, Vector128<long> right) => Xor(left, right);
- /// <summary>
- /// __m128i _mm_xor_si128 (__m128i a, __m128i b)
- /// PXOR xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> Xor(Vector128<ulong> left, Vector128<ulong> right) => Xor(left, right);
- /// <summary>
- /// __m128d _mm_xor_pd (__m128d a, __m128d b)
- /// XORPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> Xor(Vector128<double> left, Vector128<double> right) => Xor(left, right);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse3.PlatformNotSupported.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse3.PlatformNotSupported.cs
deleted file mode 100644
index 8e238c232b7..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse3.PlatformNotSupported.cs
+++ /dev/null
@@ -1,92 +0,0 @@
-// 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;
-using System.Runtime.CompilerServices;
-using System.Runtime.Intrinsics;
-
-namespace System.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel SSE3 hardware instructions via intrinsics
- /// </summary>
- [CLSCompliant(false)]
- public abstract class Sse3 : Sse2
- {
- internal Sse3() { }
-
- public static new bool IsSupported { [Intrinsic] get { return false; } }
-
- /// <summary>
- /// __m128 _mm_addsub_ps (__m128 a, __m128 b)
- /// ADDSUBPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> AddSubtract(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_addsub_pd (__m128d a, __m128d b)
- /// ADDSUBPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> AddSubtract(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_hadd_ps (__m128 a, __m128 b)
- /// HADDPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> HorizontalAdd(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_hadd_pd (__m128d a, __m128d b)
- /// HADDPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> HorizontalAdd(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_hsub_ps (__m128 a, __m128 b)
- /// HSUBPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> HorizontalSubtract(Vector128<float> left, Vector128<float> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_hsub_pd (__m128d a, __m128d b)
- /// HSUBPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> HorizontalSubtract(Vector128<double> left, Vector128<double> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_loaddup_pd (double const* mem_addr)
- /// MOVDDUP xmm, m64
- /// </summary>
- public static unsafe Vector128<double> LoadAndDuplicateToVector128(double* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_lddqu_si128 (__m128i const* mem_addr)
- /// LDDQU xmm, m128
- /// </summary>
- public static unsafe Vector128<sbyte> LoadDquVector128(sbyte* address) { throw new PlatformNotSupportedException(); }
- public static unsafe Vector128<byte> LoadDquVector128(byte* address) { throw new PlatformNotSupportedException(); }
- public static unsafe Vector128<short> LoadDquVector128(short* address) { throw new PlatformNotSupportedException(); }
- public static unsafe Vector128<ushort> LoadDquVector128(ushort* address) { throw new PlatformNotSupportedException(); }
- public static unsafe Vector128<int> LoadDquVector128(int* address) { throw new PlatformNotSupportedException(); }
- public static unsafe Vector128<uint> LoadDquVector128(uint* address) { throw new PlatformNotSupportedException(); }
- public static unsafe Vector128<long> LoadDquVector128(long* address) { throw new PlatformNotSupportedException(); }
- public static unsafe Vector128<ulong> LoadDquVector128(ulong* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_movedup_pd (__m128d a)
- /// MOVDDUP xmm, xmm/m64
- /// </summary>
- public static Vector128<double> MoveAndDuplicate(Vector128<double> source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_movehdup_ps (__m128 a)
- /// MOVSHDUP xmm, xmm/m128
- /// </summary>
- public static Vector128<float> MoveHighAndDuplicate(Vector128<float> source) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_moveldup_ps (__m128 a)
- /// MOVSLDUP xmm, xmm/m128
- /// </summary>
- public static Vector128<float> MoveLowAndDuplicate(Vector128<float> source) { throw new PlatformNotSupportedException(); }
-
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse3.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse3.cs
deleted file mode 100644
index f8e10e17e3c..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse3.cs
+++ /dev/null
@@ -1,90 +0,0 @@
-// 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.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel SSE3 hardware instructions via intrinsics
- /// </summary>
- [Intrinsic]
- [CLSCompliant(false)]
- public abstract class Sse3 : Sse2
- {
- internal Sse3() { }
-
- public static new bool IsSupported { get => IsSupported; }
-
- /// <summary>
- /// __m128 _mm_addsub_ps (__m128 a, __m128 b)
- /// ADDSUBPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> AddSubtract(Vector128<float> left, Vector128<float> right) => AddSubtract(left, right);
- /// <summary>
- /// __m128d _mm_addsub_pd (__m128d a, __m128d b)
- /// ADDSUBPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> AddSubtract(Vector128<double> left, Vector128<double> right) => AddSubtract(left, right);
-
- /// <summary>
- /// __m128 _mm_hadd_ps (__m128 a, __m128 b)
- /// HADDPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> HorizontalAdd(Vector128<float> left, Vector128<float> right) => HorizontalAdd(left, right);
- /// <summary>
- /// __m128d _mm_hadd_pd (__m128d a, __m128d b)
- /// HADDPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> HorizontalAdd(Vector128<double> left, Vector128<double> right) => HorizontalAdd(left, right);
-
- /// <summary>
- /// __m128 _mm_hsub_ps (__m128 a, __m128 b)
- /// HSUBPS xmm, xmm/m128
- /// </summary>
- public static Vector128<float> HorizontalSubtract(Vector128<float> left, Vector128<float> right) => HorizontalSubtract(left, right);
- /// <summary>
- /// __m128d _mm_hsub_pd (__m128d a, __m128d b)
- /// HSUBPD xmm, xmm/m128
- /// </summary>
- public static Vector128<double> HorizontalSubtract(Vector128<double> left, Vector128<double> right) => HorizontalSubtract(left, right);
-
- /// <summary>
- /// __m128d _mm_loaddup_pd (double const* mem_addr)
- /// MOVDDUP xmm, m64
- /// </summary>
- public static unsafe Vector128<double> LoadAndDuplicateToVector128(double* address) => LoadAndDuplicateToVector128(address);
-
- /// <summary>
- /// __m128i _mm_lddqu_si128 (__m128i const* mem_addr)
- /// LDDQU xmm, m128
- /// </summary>
- public static unsafe Vector128<sbyte> LoadDquVector128(sbyte* address) => LoadDquVector128(address);
- public static unsafe Vector128<byte> LoadDquVector128(byte* address) => LoadDquVector128(address);
- public static unsafe Vector128<short> LoadDquVector128(short* address) => LoadDquVector128(address);
- public static unsafe Vector128<ushort> LoadDquVector128(ushort* address) => LoadDquVector128(address);
- public static unsafe Vector128<int> LoadDquVector128(int* address) => LoadDquVector128(address);
- public static unsafe Vector128<uint> LoadDquVector128(uint* address) => LoadDquVector128(address);
- public static unsafe Vector128<long> LoadDquVector128(long* address) => LoadDquVector128(address);
- public static unsafe Vector128<ulong> LoadDquVector128(ulong* address) => LoadDquVector128(address);
-
- /// <summary>
- /// __m128d _mm_movedup_pd (__m128d a)
- /// MOVDDUP xmm, xmm/m64
- /// </summary>
- public static Vector128<double> MoveAndDuplicate(Vector128<double> source) => MoveAndDuplicate(source);
-
- /// <summary>
- /// __m128 _mm_movehdup_ps (__m128 a)
- /// MOVSHDUP xmm, xmm/m128
- /// </summary>
- public static Vector128<float> MoveHighAndDuplicate(Vector128<float> source) => MoveHighAndDuplicate(source);
-
- /// <summary>
- /// __m128 _mm_moveldup_ps (__m128 a)
- /// MOVSLDUP xmm, xmm/m128
- /// </summary>
- public static Vector128<float> MoveLowAndDuplicate(Vector128<float> source) => MoveLowAndDuplicate(source);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse41.PlatformNotSupported.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse41.PlatformNotSupported.cs
deleted file mode 100644
index c992e9bebc2..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse41.PlatformNotSupported.cs
+++ /dev/null
@@ -1,713 +0,0 @@
-// 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;
-using System.Runtime.CompilerServices;
-using System.Runtime.Intrinsics;
-
-namespace System.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel SSE4.1 hardware instructions via intrinsics
- /// </summary>
- [CLSCompliant(false)]
- public abstract class Sse41 : Ssse3
- {
- internal Sse41() { }
-
- public static new bool IsSupported { [Intrinsic] get { return false; } }
-
- public new abstract class X64 : Sse2.X64
- {
- internal X64() { }
-
- public static new bool IsSupported { [Intrinsic] get { return false; } }
-
- /// <summary>
- /// __int64 _mm_extract_epi64 (__m128i a, const int imm8)
- /// PEXTRQ reg/m64, xmm, imm8
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static long Extract(Vector128<long> value, byte index) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __int64 _mm_extract_epi64 (__m128i a, const int imm8)
- /// PEXTRQ reg/m64, xmm, imm8
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong Extract(Vector128<ulong> value, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_insert_epi64 (__m128i a, __int64 i, const int imm8)
- /// PINSRQ xmm, reg/m64, imm8
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static Vector128<long> Insert(Vector128<long> value, long data, byte index) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_insert_epi64 (__m128i a, __int64 i, const int imm8)
- /// PINSRQ xmm, reg/m64, imm8
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static Vector128<ulong> Insert(Vector128<ulong> value, ulong data, byte index) { throw new PlatformNotSupportedException(); }
- }
-
- /// <summary>
- /// __m128i _mm_blend_epi16 (__m128i a, __m128i b, const int imm8)
- /// PBLENDW xmm, xmm/m128 imm8
- /// </summary>
- public static Vector128<short> Blend(Vector128<short> left, Vector128<short> right, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_blend_epi16 (__m128i a, __m128i b, const int imm8)
- /// PBLENDW xmm, xmm/m128 imm8
- /// </summary>
- public static Vector128<ushort> Blend(Vector128<ushort> left, Vector128<ushort> right, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_blend_ps (__m128 a, __m128 b, const int imm8)
- /// BLENDPS xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<float> Blend(Vector128<float> left, Vector128<float> right, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_blend_pd (__m128d a, __m128d b, const int imm8)
- /// BLENDPD xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<double> Blend(Vector128<double> left, Vector128<double> right, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
- /// PBLENDVB xmm, xmm/m128, xmm
- /// </summary>
- public static Vector128<sbyte> BlendVariable(Vector128<sbyte> left, Vector128<sbyte> right, Vector128<sbyte> mask) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
- /// PBLENDVB xmm, xmm/m128, xmm
- /// </summary>
- public static Vector128<byte> BlendVariable(Vector128<byte> left, Vector128<byte> right, Vector128<byte> mask) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
- /// PBLENDVB xmm, xmm/m128, xmm
- /// This intrinsic generates PBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
- /// </summary>
- public static Vector128<short> BlendVariable(Vector128<short> left, Vector128<short> right, Vector128<short> mask) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
- /// PBLENDVB xmm, xmm/m128, xmm
- /// This intrinsic generates PBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
- /// </summary>
- public static Vector128<ushort> BlendVariable(Vector128<ushort> left, Vector128<ushort> right, Vector128<ushort> mask) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
- /// PBLENDVB xmm, xmm/m128, xmm
- /// This intrinsic generates PBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
- /// </summary>
- public static Vector128<int> BlendVariable(Vector128<int> left, Vector128<int> right, Vector128<int> mask) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
- /// PBLENDVB xmm, xmm/m128, xmm
- /// This intrinsic generates PBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
- /// </summary>
- public static Vector128<uint> BlendVariable(Vector128<uint> left, Vector128<uint> right, Vector128<uint> mask) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
- /// PBLENDVB xmm, xmm/m128, xmm
- /// This intrinsic generates PBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
- /// </summary>
- public static Vector128<long> BlendVariable(Vector128<long> left, Vector128<long> right, Vector128<long> mask) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
- /// PBLENDVB xmm, xmm/m128, xmm
- /// This intrinsic generates PBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
- /// </summary>
- public static Vector128<ulong> BlendVariable(Vector128<ulong> left, Vector128<ulong> right, Vector128<ulong> mask) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm_blendv_ps (__m128 a, __m128 b, __m128 mask)
- /// BLENDVPS xmm, xmm/m128, xmm0
- /// </summary>
- public static Vector128<float> BlendVariable(Vector128<float> left, Vector128<float> right, Vector128<float> mask) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_blendv_pd (__m128d a, __m128d b, __m128d mask)
- /// BLENDVPD xmm, xmm/m128, xmm0
- /// </summary>
- public static Vector128<double> BlendVariable(Vector128<double> left, Vector128<double> right, Vector128<double> mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_ceil_ps (__m128 a)
- /// ROUNDPS xmm, xmm/m128, imm8(10)
- /// </summary>
- public static Vector128<float> Ceiling(Vector128<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_ceil_pd (__m128d a)
- /// ROUNDPD xmm, xmm/m128, imm8(10)
- /// </summary>
- public static Vector128<double> Ceiling(Vector128<double> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_ceil_sd (__m128d a)
- /// ROUNDSD xmm, xmm/m128, imm8(10)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<double> CeilingScalar(Vector128<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm_ceil_ss (__m128 a)
- /// ROUNDSD xmm, xmm/m128, imm8(10)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<float> CeilingScalar(Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_ceil_sd (__m128d a, __m128d b)
- /// ROUNDSD xmm, xmm/m128, imm8(10)
- /// </summary>
- public static Vector128<double> CeilingScalar(Vector128<double> upper, Vector128<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm_ceil_ss (__m128 a, __m128 b)
- /// ROUNDSS xmm, xmm/m128, imm8(10)
- /// </summary>
- public static Vector128<float> CeilingScalar(Vector128<float> upper, Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_cmpeq_epi64 (__m128i a, __m128i b)
- /// PCMPEQQ xmm, xmm/m128
- /// </summary>
- public static Vector128<long> CompareEqual(Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_cmpeq_epi64 (__m128i a, __m128i b)
- /// PCMPEQQ xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> CompareEqual(Vector128<ulong> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_cvtepi8_epi16 (__m128i a)
- /// PMOVSXBW xmm, xmm
- /// </summary>
- public static Vector128<short> ConvertToVector128Int16(Vector128<sbyte> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_cvtepu8_epi16 (__m128i a)
- /// PMOVZXBW xmm, xmm
- /// </summary>
- public static Vector128<short> ConvertToVector128Int16(Vector128<byte> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_cvtepi8_epi32 (__m128i a)
- /// PMOVSXBD xmm, xmm
- /// </summary>
- public static Vector128<int> ConvertToVector128Int32(Vector128<sbyte> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_cvtepu8_epi32 (__m128i a)
- /// PMOVZXBD xmm, xmm
- /// </summary>
- public static Vector128<int> ConvertToVector128Int32(Vector128<byte> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_cvtepi16_epi32 (__m128i a)
- /// PMOVSXWD xmm, xmm
- /// </summary>
- public static Vector128<int> ConvertToVector128Int32(Vector128<short> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_cvtepu16_epi32 (__m128i a)
- /// PMOVZXWD xmm, xmm
- /// </summary>
- public static Vector128<int> ConvertToVector128Int32(Vector128<ushort> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_cvtepi8_epi64 (__m128i a)
- /// PMOVSXBQ xmm, xmm
- /// </summary>
- public static Vector128<long> ConvertToVector128Int64(Vector128<sbyte> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_cvtepu8_epi64 (__m128i a)
- /// PMOVZXBQ xmm, xmm
- /// </summary>
- public static Vector128<long> ConvertToVector128Int64(Vector128<byte> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_cvtepi16_epi64 (__m128i a)
- /// PMOVSXWQ xmm, xmm
- /// </summary>
- public static Vector128<long> ConvertToVector128Int64(Vector128<short> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_cvtepu16_epi64 (__m128i a)
- /// PMOVZXWQ xmm, xmm
- /// </summary>
- public static Vector128<long> ConvertToVector128Int64(Vector128<ushort> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_cvtepi32_epi64 (__m128i a)
- /// PMOVSXDQ xmm, xmm
- /// </summary>
- public static Vector128<long> ConvertToVector128Int64(Vector128<int> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_cvtepu32_epi64 (__m128i a)
- /// PMOVZXDQ xmm, xmm
- /// </summary>
- public static Vector128<long> ConvertToVector128Int64(Vector128<uint> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// PMOVSXBW xmm, m64
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<short> ConvertToVector128Int16(sbyte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// PMOVZXBW xmm, m64
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<short> ConvertToVector128Int16(byte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// PMOVSXBD xmm, m32
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<int> ConvertToVector128Int32(sbyte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// PMOVZXBD xmm, m32
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<int> ConvertToVector128Int32(byte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// PMOVSXWD xmm, m64
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<int> ConvertToVector128Int32(short* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// PMOVZXWD xmm, m64
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<int> ConvertToVector128Int32(ushort* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// PMOVSXBQ xmm, m16
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<long> ConvertToVector128Int64(sbyte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// PMOVZXBQ xmm, m16
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<long> ConvertToVector128Int64(byte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// PMOVSXWQ xmm, m32
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<long> ConvertToVector128Int64(short* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// PMOVZXWQ xmm, m32
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<long> ConvertToVector128Int64(ushort* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// PMOVSXDQ xmm, m64
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<long> ConvertToVector128Int64(int* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// PMOVZXDQ xmm, m64
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<long> ConvertToVector128Int64(uint* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_dp_ps (__m128 a, __m128 b, const int imm8)
- /// DPPS xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<float> DotProduct(Vector128<float> left, Vector128<float> right, byte control) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_dp_pd (__m128d a, __m128d b, const int imm8)
- /// DPPD xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<double> DotProduct(Vector128<double> left, Vector128<double> right, byte control) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_extract_epi8 (__m128i a, const int imm8)
- /// PEXTRB reg/m8, xmm, imm8
- /// </summary>
- public static byte Extract(Vector128<byte> value, byte index) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// int _mm_extract_epi32 (__m128i a, const int imm8)
- /// PEXTRD reg/m32, xmm, imm8
- /// </summary>
- public static int Extract(Vector128<int> value, byte index) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// int _mm_extract_epi32 (__m128i a, const int imm8)
- /// PEXTRD reg/m32, xmm, imm8
- /// </summary>
- public static uint Extract(Vector128<uint> value, byte index) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// int _mm_extract_ps (__m128 a, const int imm8)
- /// EXTRACTPS xmm, xmm/m32, imm8
- /// </summary>
- public static float Extract(Vector128<float> value, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_floor_ps (__m128 a)
- /// ROUNDPS xmm, xmm/m128, imm8(9)
- /// </summary>
- public static Vector128<float> Floor(Vector128<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_floor_pd (__m128d a)
- /// ROUNDPD xmm, xmm/m128, imm8(9)
- /// </summary>
- public static Vector128<double> Floor(Vector128<double> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_floor_sd (__m128d a)
- /// ROUNDSD xmm, xmm/m128, imm8(9)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<double> FloorScalar(Vector128<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm_floor_ss (__m128 a)
- /// ROUNDSS xmm, xmm/m128, imm8(9)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<float> FloorScalar(Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_floor_sd (__m128d a, __m128d b)
- /// ROUNDSD xmm, xmm/m128, imm8(9)
- /// </summary>
- public static Vector128<double> FloorScalar(Vector128<double> upper, Vector128<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm_floor_ss (__m128 a, __m128 b)
- /// ROUNDSS xmm, xmm/m128, imm8(9)
- /// </summary>
- public static Vector128<float> FloorScalar(Vector128<float> upper, Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_insert_epi8 (__m128i a, int i, const int imm8)
- /// PINSRB xmm, reg/m8, imm8
- /// </summary>
- public static Vector128<sbyte> Insert(Vector128<sbyte> value, sbyte data, byte index) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_insert_epi8 (__m128i a, int i, const int imm8)
- /// PINSRB xmm, reg/m8, imm8
- /// </summary>
- public static Vector128<byte> Insert(Vector128<byte> value, byte data, byte index) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_insert_epi32 (__m128i a, int i, const int imm8)
- /// PINSRD xmm, reg/m32, imm8
- /// </summary>
- public static Vector128<int> Insert(Vector128<int> value, int data, byte index) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_insert_epi32 (__m128i a, int i, const int imm8)
- /// PINSRD xmm, reg/m32, imm8
- /// </summary>
- public static Vector128<uint> Insert(Vector128<uint> value, uint data, byte index) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm_insert_ps (__m128 a, __m128 b, const int imm8)
- /// INSERTPS xmm, xmm/m32, imm8
- /// </summary>
- public static Vector128<float> Insert(Vector128<float> value, Vector128<float> data, byte index) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_max_epi8 (__m128i a, __m128i b)
- /// PMAXSB xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> Max(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_max_epu16 (__m128i a, __m128i b)
- /// PMAXUW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> Max(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_max_epi32 (__m128i a, __m128i b)
- /// PMAXSD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> Max(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_max_epu32 (__m128i a, __m128i b)
- /// PMAXUD xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> Max(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_min_epi8 (__m128i a, __m128i b)
- /// PMINSB xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> Min(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_min_epu16 (__m128i a, __m128i b)
- /// PMINUW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> Min(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_min_epi32 (__m128i a, __m128i b)
- /// PMINSD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> Min(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_min_epu32 (__m128i a, __m128i b)
- /// PMINUD xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> Min(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_minpos_epu16 (__m128i a)
- /// PHMINPOSUW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> MinHorizontal(Vector128<ushort> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_mpsadbw_epu8 (__m128i a, __m128i b, const int imm8)
- /// MPSADBW xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<ushort> MultipleSumAbsoluteDifferences(Vector128<byte> left, Vector128<byte> right, byte mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_mul_epi32 (__m128i a, __m128i b)
- /// PMULDQ xmm, xmm/m128
- /// </summary>
- public static Vector128<long> Multiply(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_mullo_epi32 (__m128i a, __m128i b)
- /// PMULLD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> MultiplyLow(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_mullo_epi32 (__m128i a, __m128i b)
- /// PMULLD xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> MultiplyLow(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_packus_epi32 (__m128i a, __m128i b)
- /// PACKUSDW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> PackUnsignedSaturate(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_round_ps (__m128 a, int rounding)
- /// ROUNDPS xmm, xmm/m128, imm8(8)
- /// _MM_FROUND_TO_NEAREST_INT |_MM_FROUND_NO_EXC
- /// </summary>
- public static Vector128<float> RoundToNearestInteger(Vector128<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// _MM_FROUND_TO_NEG_INF |_MM_FROUND_NO_EXC; ROUNDPS xmm, xmm/m128, imm8(9)
- /// </summary>
- public static Vector128<float> RoundToNegativeInfinity(Vector128<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// _MM_FROUND_TO_POS_INF |_MM_FROUND_NO_EXC; ROUNDPS xmm, xmm/m128, imm8(10)
- /// </summary>
- public static Vector128<float> RoundToPositiveInfinity(Vector128<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// _MM_FROUND_TO_ZERO |_MM_FROUND_NO_EXC; ROUNDPS xmm, xmm/m128, imm8(11)
- /// </summary>
- public static Vector128<float> RoundToZero(Vector128<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// _MM_FROUND_CUR_DIRECTION; ROUNDPS xmm, xmm/m128, imm8(4)
- /// </summary>
- public static Vector128<float> RoundCurrentDirection(Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_round_pd (__m128d a, int rounding)
- /// ROUNDPD xmm, xmm/m128, imm8(8)
- /// _MM_FROUND_TO_NEAREST_INT |_MM_FROUND_NO_EXC
- /// </summary>
- public static Vector128<double> RoundToNearestInteger(Vector128<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// _MM_FROUND_TO_NEG_INF |_MM_FROUND_NO_EXC; ROUNDPD xmm, xmm/m128, imm8(9)
- /// </summary>
- public static Vector128<double> RoundToNegativeInfinity(Vector128<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// _MM_FROUND_TO_POS_INF |_MM_FROUND_NO_EXC; ROUNDPD xmm, xmm/m128, imm8(10)
- /// </summary>
- public static Vector128<double> RoundToPositiveInfinity(Vector128<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// _MM_FROUND_TO_ZERO |_MM_FROUND_NO_EXC; ROUNDPD xmm, xmm/m128, imm8(11)
- /// </summary>
- public static Vector128<double> RoundToZero(Vector128<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// _MM_FROUND_CUR_DIRECTION; ROUNDPD xmm, xmm/m128, imm8(4)
- /// </summary>
- public static Vector128<double> RoundCurrentDirection(Vector128<double> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_round_sd (__m128d a, _MM_FROUND_CUR_DIRECTION)
- /// ROUNDSD xmm, xmm/m128, imm8(4)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<double> RoundCurrentDirectionScalar(Vector128<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_round_sd (__m128d a, _MM_FROUND_TO_NEAREST_INT |_MM_FROUND_NO_EXC)
- /// ROUNDSD xmm, xmm/m128, imm8(8)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<double> RoundToNearestIntegerScalar(Vector128<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_round_sd (__m128d a, _MM_FROUND_TO_NEG_INF |_MM_FROUND_NO_EXC)
- /// ROUNDSD xmm, xmm/m128, imm8(9)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<double> RoundToNegativeInfinityScalar(Vector128<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_round_sd (__m128d a, _MM_FROUND_TO_POS_INF |_MM_FROUND_NO_EXC)
- /// ROUNDSD xmm, xmm/m128, imm8(10)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<double> RoundToPositiveInfinityScalar(Vector128<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_round_sd (__m128d a, _MM_FROUND_TO_ZERO |_MM_FROUND_NO_EXC)
- /// ROUNDSD xmm, xmm/m128, imm8(11)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<double> RoundToZeroScalar(Vector128<double> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128d _mm_round_sd (__m128d a, __m128d b, _MM_FROUND_CUR_DIRECTION)
- /// ROUNDSD xmm, xmm/m128, imm8(4)
- /// </summary>
- public static Vector128<double> RoundCurrentDirectionScalar(Vector128<double> upper, Vector128<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_round_sd (__m128d a, __m128d b, _MM_FROUND_TO_NEAREST_INT |_MM_FROUND_NO_EXC)
- /// ROUNDSD xmm, xmm/m128, imm8(8)
- /// </summary>
- public static Vector128<double> RoundToNearestIntegerScalar(Vector128<double> upper, Vector128<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_round_sd (__m128d a, __m128d b, _MM_FROUND_TO_NEG_INF |_MM_FROUND_NO_EXC)
- /// ROUNDSD xmm, xmm/m128, imm8(9)
- /// </summary>
- public static Vector128<double> RoundToNegativeInfinityScalar(Vector128<double> upper, Vector128<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_round_sd (__m128d a, __m128d b, _MM_FROUND_TO_POS_INF |_MM_FROUND_NO_EXC)
- /// ROUNDSD xmm, xmm/m128, imm8(10)
- /// </summary>
- public static Vector128<double> RoundToPositiveInfinityScalar(Vector128<double> upper, Vector128<double> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128d _mm_round_sd (__m128d a, __m128d b, _MM_FROUND_TO_ZERO |_MM_FROUND_NO_EXC)
- /// ROUNDSD xmm, xmm/m128, imm8(11)
- /// </summary>
- public static Vector128<double> RoundToZeroScalar(Vector128<double> upper, Vector128<double> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_round_ss (__m128 a, _MM_FROUND_CUR_DIRECTION)
- /// ROUNDSS xmm, xmm/m128, imm8(4)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<float> RoundCurrentDirectionScalar(Vector128<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm_round_ss (__m128 a, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC)
- /// ROUNDSS xmm, xmm/m128, imm8(8)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<float> RoundToNearestIntegerScalar(Vector128<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm_round_ss (__m128 a, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC)
- /// ROUNDSS xmm, xmm/m128, imm8(9)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<float> RoundToNegativeInfinityScalar(Vector128<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm_round_ss (__m128 a, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC)
- /// ROUNDSS xmm, xmm/m128, imm8(10)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<float> RoundToPositiveInfinityScalar(Vector128<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm_round_ss (__m128 a, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC)
- /// ROUNDSS xmm, xmm/m128, imm8(11)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<float> RoundToZeroScalar(Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128 _mm_round_ss (__m128 a, __m128 b, _MM_FROUND_CUR_DIRECTION)
- /// ROUNDSS xmm, xmm/m128, imm8(4)
- /// </summary>
- public static Vector128<float> RoundCurrentDirectionScalar(Vector128<float> upper, Vector128<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm_round_ss (__m128 a, __m128 b, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC)
- /// ROUNDSS xmm, xmm/m128, imm8(8)
- /// </summary>
- public static Vector128<float> RoundToNearestIntegerScalar(Vector128<float> upper, Vector128<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm_round_ss (__m128 a, __m128 b, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC)
- /// ROUNDSS xmm, xmm/m128, imm8(9)
- /// </summary>
- public static Vector128<float> RoundToNegativeInfinityScalar(Vector128<float> upper, Vector128<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm_round_ss (__m128 a, __m128 b, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC)
- /// ROUNDSS xmm, xmm/m128, imm8(10)
- /// </summary>
- public static Vector128<float> RoundToPositiveInfinityScalar(Vector128<float> upper, Vector128<float> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128 _mm_round_ss (__m128 a, __m128 b, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC)
- /// ROUNDSS xmm, xmm/m128, imm8(11)
- /// </summary>
- public static Vector128<float> RoundToZeroScalar(Vector128<float> upper, Vector128<float> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_stream_load_si128 (const __m128i* mem_addr)
- /// MOVNTDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<sbyte> LoadAlignedVector128NonTemporal(sbyte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_stream_load_si128 (const __m128i* mem_addr)
- /// MOVNTDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<byte> LoadAlignedVector128NonTemporal(byte* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_stream_load_si128 (const __m128i* mem_addr)
- /// MOVNTDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<short> LoadAlignedVector128NonTemporal(short* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_stream_load_si128 (const __m128i* mem_addr)
- /// MOVNTDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<ushort> LoadAlignedVector128NonTemporal(ushort* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_stream_load_si128 (const __m128i* mem_addr)
- /// MOVNTDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<int> LoadAlignedVector128NonTemporal(int* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_stream_load_si128 (const __m128i* mem_addr)
- /// MOVNTDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<uint> LoadAlignedVector128NonTemporal(uint* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_stream_load_si128 (const __m128i* mem_addr)
- /// MOVNTDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<long> LoadAlignedVector128NonTemporal(long* address) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_stream_load_si128 (const __m128i* mem_addr)
- /// MOVNTDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<ulong> LoadAlignedVector128NonTemporal(ulong* address) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_testc_si128 (__m128i a, __m128i b)
- /// PTEST xmm, xmm/m128
- /// </summary>
- public static bool TestC(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
- public static bool TestC(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
- public static bool TestC(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
- public static bool TestC(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
- public static bool TestC(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
- public static bool TestC(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
- public static bool TestC(Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
- public static bool TestC(Vector128<ulong> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_testnzc_si128 (__m128i a, __m128i b)
- /// PTEST xmm, xmm/m128
- /// </summary>
- public static bool TestNotZAndNotC(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
- public static bool TestNotZAndNotC(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
- public static bool TestNotZAndNotC(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
- public static bool TestNotZAndNotC(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
- public static bool TestNotZAndNotC(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
- public static bool TestNotZAndNotC(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
- public static bool TestNotZAndNotC(Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
- public static bool TestNotZAndNotC(Vector128<ulong> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// int _mm_testz_si128 (__m128i a, __m128i b)
- /// PTEST xmm, xmm/m128
- /// </summary>
- public static bool TestZ(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
- public static bool TestZ(Vector128<byte> left, Vector128<byte> right) { throw new PlatformNotSupportedException(); }
- public static bool TestZ(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
- public static bool TestZ(Vector128<ushort> left, Vector128<ushort> right) { throw new PlatformNotSupportedException(); }
- public static bool TestZ(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
- public static bool TestZ(Vector128<uint> left, Vector128<uint> right) { throw new PlatformNotSupportedException(); }
- public static bool TestZ(Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
- public static bool TestZ(Vector128<ulong> left, Vector128<ulong> right) { throw new PlatformNotSupportedException(); }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse41.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse41.cs
deleted file mode 100644
index 300b8f0af33..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse41.cs
+++ /dev/null
@@ -1,713 +0,0 @@
-// 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.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel SSE4.1 hardware instructions via intrinsics
- /// </summary>
- [Intrinsic]
- [CLSCompliant(false)]
- public abstract class Sse41 : Ssse3
- {
- internal Sse41() { }
-
- public static new bool IsSupported { get => IsSupported; }
-
- [Intrinsic]
- public new abstract class X64 : Sse2.X64
- {
- internal X64() { }
-
- public static new bool IsSupported { get => IsSupported; }
-
- /// <summary>
- /// __int64 _mm_extract_epi64 (__m128i a, const int imm8)
- /// PEXTRQ reg/m64, xmm, imm8
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static long Extract(Vector128<long> value, byte index) => Extract(value, index);
- /// <summary>
- /// __int64 _mm_extract_epi64 (__m128i a, const int imm8)
- /// PEXTRQ reg/m64, xmm, imm8
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong Extract(Vector128<ulong> value, byte index) => Extract(value, index);
-
- /// <summary>
- /// __m128i _mm_insert_epi64 (__m128i a, __int64 i, const int imm8)
- /// PINSRQ xmm, reg/m64, imm8
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static Vector128<long> Insert(Vector128<long> value, long data, byte index) => Insert(value, data, index);
- /// <summary>
- /// __m128i _mm_insert_epi64 (__m128i a, __int64 i, const int imm8)
- /// PINSRQ xmm, reg/m64, imm8
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static Vector128<ulong> Insert(Vector128<ulong> value, ulong data, byte index) => Insert(value, data, index);
- }
-
- /// <summary>
- /// __m128i _mm_blend_epi16 (__m128i a, __m128i b, const int imm8)
- /// PBLENDW xmm, xmm/m128 imm8
- /// </summary>
- public static Vector128<short> Blend(Vector128<short> left, Vector128<short> right, byte control) => Blend(left, right, control);
-
- /// <summary>
- /// __m128i _mm_blend_epi16 (__m128i a, __m128i b, const int imm8)
- /// PBLENDW xmm, xmm/m128 imm8
- /// </summary>
- public static Vector128<ushort> Blend(Vector128<ushort> left, Vector128<ushort> right, byte control) => Blend(left, right, control);
-
- /// <summary>
- /// __m128 _mm_blend_ps (__m128 a, __m128 b, const int imm8)
- /// BLENDPS xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<float> Blend(Vector128<float> left, Vector128<float> right, byte control) => Blend(left, right, control);
-
- /// <summary>
- /// __m128d _mm_blend_pd (__m128d a, __m128d b, const int imm8)
- /// BLENDPD xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<double> Blend(Vector128<double> left, Vector128<double> right, byte control) => Blend(left, right, control);
-
- /// <summary>
- /// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
- /// PBLENDVB xmm, xmm/m128, xmm
- /// </summary>
- public static Vector128<sbyte> BlendVariable(Vector128<sbyte> left, Vector128<sbyte> right, Vector128<sbyte> mask) => BlendVariable(left, right, mask);
- /// <summary>
- /// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
- /// PBLENDVB xmm, xmm/m128, xmm
- /// </summary>
- public static Vector128<byte> BlendVariable(Vector128<byte> left, Vector128<byte> right, Vector128<byte> mask) => BlendVariable(left, right, mask);
- /// <summary>
- /// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
- /// PBLENDVB xmm, xmm/m128, xmm
- /// This intrinsic generates PBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
- /// </summary>
- public static Vector128<short> BlendVariable(Vector128<short> left, Vector128<short> right, Vector128<short> mask) => BlendVariable(left, right, mask);
- /// <summary>
- /// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
- /// PBLENDVB xmm, xmm/m128, xmm
- /// This intrinsic generates PBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
- /// </summary>
- public static Vector128<ushort> BlendVariable(Vector128<ushort> left, Vector128<ushort> right, Vector128<ushort> mask) => BlendVariable(left, right, mask);
- /// <summary>
- /// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
- /// PBLENDVB xmm, xmm/m128, xmm
- /// This intrinsic generates PBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
- /// </summary>
- public static Vector128<int> BlendVariable(Vector128<int> left, Vector128<int> right, Vector128<int> mask) => BlendVariable(left, right, mask);
- /// <summary>
- /// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
- /// PBLENDVB xmm, xmm/m128, xmm
- /// This intrinsic generates PBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
- /// </summary>
- public static Vector128<uint> BlendVariable(Vector128<uint> left, Vector128<uint> right, Vector128<uint> mask) => BlendVariable(left, right, mask);
- /// <summary>
- /// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
- /// PBLENDVB xmm, xmm/m128, xmm
- /// This intrinsic generates PBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
- /// </summary>
- public static Vector128<long> BlendVariable(Vector128<long> left, Vector128<long> right, Vector128<long> mask) => BlendVariable(left, right, mask);
- /// <summary>
- /// __m128i _mm_blendv_epi8 (__m128i a, __m128i b, __m128i mask)
- /// PBLENDVB xmm, xmm/m128, xmm
- /// This intrinsic generates PBLENDVB that needs a BYTE mask-vector, so users should correctly set each mask byte for the selected elements.
- /// </summary>
- public static Vector128<ulong> BlendVariable(Vector128<ulong> left, Vector128<ulong> right, Vector128<ulong> mask) => BlendVariable(left, right, mask);
- /// <summary>
- /// __m128 _mm_blendv_ps (__m128 a, __m128 b, __m128 mask)
- /// BLENDVPS xmm, xmm/m128, xmm0
- /// </summary>
- public static Vector128<float> BlendVariable(Vector128<float> left, Vector128<float> right, Vector128<float> mask) => BlendVariable(left, right, mask);
- /// <summary>
- /// __m128d _mm_blendv_pd (__m128d a, __m128d b, __m128d mask)
- /// BLENDVPD xmm, xmm/m128, xmm0
- /// </summary>
- public static Vector128<double> BlendVariable(Vector128<double> left, Vector128<double> right, Vector128<double> mask) => BlendVariable(left, right, mask);
-
- /// <summary>
- /// __m128 _mm_ceil_ps (__m128 a)
- /// ROUNDPS xmm, xmm/m128, imm8(10)
- /// </summary>
- public static Vector128<float> Ceiling(Vector128<float> value) => Ceiling(value);
- /// <summary>
- /// __m128d _mm_ceil_pd (__m128d a)
- /// ROUNDPD xmm, xmm/m128, imm8(10)
- /// </summary>
- public static Vector128<double> Ceiling(Vector128<double> value) => Ceiling(value);
-
- /// <summary>
- /// __m128d _mm_ceil_sd (__m128d a)
- /// ROUNDSD xmm, xmm/m128, imm8(10)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<double> CeilingScalar(Vector128<double> value) => CeilingScalar(value);
- /// <summary>
- /// __m128 _mm_ceil_ss (__m128 a)
- /// ROUNDSD xmm, xmm/m128, imm8(10)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<float> CeilingScalar(Vector128<float> value) => CeilingScalar(value);
-
- /// <summary>
- /// __m128d _mm_ceil_sd (__m128d a, __m128d b)
- /// ROUNDSD xmm, xmm/m128, imm8(10)
- /// </summary>
- public static Vector128<double> CeilingScalar(Vector128<double> upper, Vector128<double> value) => CeilingScalar(upper, value);
- /// <summary>
- /// __m128 _mm_ceil_ss (__m128 a, __m128 b)
- /// ROUNDSS xmm, xmm/m128, imm8(10)
- /// </summary>
- public static Vector128<float> CeilingScalar(Vector128<float> upper, Vector128<float> value) => CeilingScalar(upper, value);
-
- /// <summary>
- /// __m128i _mm_cmpeq_epi64 (__m128i a, __m128i b)
- /// PCMPEQQ xmm, xmm/m128
- /// </summary>
- public static Vector128<long> CompareEqual(Vector128<long> left, Vector128<long> right) => CompareEqual(left, right);
- /// <summary>
- /// __m128i _mm_cmpeq_epi64 (__m128i a, __m128i b)
- /// PCMPEQQ xmm, xmm/m128
- /// </summary>
- public static Vector128<ulong> CompareEqual(Vector128<ulong> left, Vector128<ulong> right) => CompareEqual(left, right);
-
- /// <summary>
- /// __m128i _mm_cvtepi8_epi16 (__m128i a)
- /// PMOVSXBW xmm, xmm
- /// </summary>
- public static Vector128<short> ConvertToVector128Int16(Vector128<sbyte> value) => ConvertToVector128Int16(value);
- /// <summary>
- /// __m128i _mm_cvtepu8_epi16 (__m128i a)
- /// PMOVZXBW xmm, xmm
- /// </summary>
- public static Vector128<short> ConvertToVector128Int16(Vector128<byte> value) => ConvertToVector128Int16(value);
- /// <summary>
- /// __m128i _mm_cvtepi8_epi32 (__m128i a)
- /// PMOVSXBD xmm, xmm
- /// </summary>
- public static Vector128<int> ConvertToVector128Int32(Vector128<sbyte> value) => ConvertToVector128Int32(value);
- /// <summary>
- /// __m128i _mm_cvtepu8_epi32 (__m128i a)
- /// PMOVZXBD xmm, xmm
- /// </summary>
- public static Vector128<int> ConvertToVector128Int32(Vector128<byte> value) => ConvertToVector128Int32(value);
- /// <summary>
- /// __m128i _mm_cvtepi16_epi32 (__m128i a)
- /// PMOVSXWD xmm, xmm
- /// </summary>
- public static Vector128<int> ConvertToVector128Int32(Vector128<short> value) => ConvertToVector128Int32(value);
- /// <summary>
- /// __m128i _mm_cvtepu16_epi32 (__m128i a)
- /// PMOVZXWD xmm, xmm
- /// </summary>
- public static Vector128<int> ConvertToVector128Int32(Vector128<ushort> value) => ConvertToVector128Int32(value);
- /// <summary>
- /// __m128i _mm_cvtepi8_epi64 (__m128i a)
- /// PMOVSXBQ xmm, xmm
- /// </summary>
- public static Vector128<long> ConvertToVector128Int64(Vector128<sbyte> value) => ConvertToVector128Int64(value);
- /// <summary>
- /// __m128i _mm_cvtepu8_epi64 (__m128i a)
- /// PMOVZXBQ xmm, xmm
- /// </summary>
- public static Vector128<long> ConvertToVector128Int64(Vector128<byte> value) => ConvertToVector128Int64(value);
- /// <summary>
- /// __m128i _mm_cvtepi16_epi64 (__m128i a)
- /// PMOVSXWQ xmm, xmm
- /// </summary>
- public static Vector128<long> ConvertToVector128Int64(Vector128<short> value) => ConvertToVector128Int64(value);
- /// <summary>
- /// __m128i _mm_cvtepu16_epi64 (__m128i a)
- /// PMOVZXWQ xmm, xmm
- /// </summary>
- public static Vector128<long> ConvertToVector128Int64(Vector128<ushort> value) => ConvertToVector128Int64(value);
- /// <summary>
- /// __m128i _mm_cvtepi32_epi64 (__m128i a)
- /// PMOVSXDQ xmm, xmm
- /// </summary>
- public static Vector128<long> ConvertToVector128Int64(Vector128<int> value) => ConvertToVector128Int64(value);
- /// <summary>
- /// __m128i _mm_cvtepu32_epi64 (__m128i a)
- /// PMOVZXDQ xmm, xmm
- /// </summary>
- public static Vector128<long> ConvertToVector128Int64(Vector128<uint> value) => ConvertToVector128Int64(value);
-
- /// <summary>
- /// PMOVSXBW xmm, m64
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<short> ConvertToVector128Int16(sbyte* address) => ConvertToVector128Int16(address);
- /// <summary>
- /// PMOVZXBW xmm, m64
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<short> ConvertToVector128Int16(byte* address) => ConvertToVector128Int16(address);
- /// <summary>
- /// PMOVSXBD xmm, m32
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<int> ConvertToVector128Int32(sbyte* address) => ConvertToVector128Int32(address);
- /// <summary>
- /// PMOVZXBD xmm, m32
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<int> ConvertToVector128Int32(byte* address) => ConvertToVector128Int32(address);
- /// <summary>
- /// PMOVSXWD xmm, m64
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<int> ConvertToVector128Int32(short* address) => ConvertToVector128Int32(address);
- /// <summary>
- /// PMOVZXWD xmm, m64
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<int> ConvertToVector128Int32(ushort* address) => ConvertToVector128Int32(address);
- /// <summary>
- /// PMOVSXBQ xmm, m16
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<long> ConvertToVector128Int64(sbyte* address) => ConvertToVector128Int64(address);
- /// <summary>
- /// PMOVZXBQ xmm, m16
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<long> ConvertToVector128Int64(byte* address) => ConvertToVector128Int64(address);
- /// <summary>
- /// PMOVSXWQ xmm, m32
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<long> ConvertToVector128Int64(short* address) => ConvertToVector128Int64(address);
- /// <summary>
- /// PMOVZXWQ xmm, m32
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<long> ConvertToVector128Int64(ushort* address) => ConvertToVector128Int64(address);
- /// <summary>
- /// PMOVSXDQ xmm, m64
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<long> ConvertToVector128Int64(int* address) => ConvertToVector128Int64(address);
- /// <summary>
- /// PMOVZXDQ xmm, m64
- /// The native signature does not exist. We provide this additional overload for completeness.
- /// </summary>
- public static unsafe Vector128<long> ConvertToVector128Int64(uint* address) => ConvertToVector128Int64(address);
-
- /// <summary>
- /// __m128 _mm_dp_ps (__m128 a, __m128 b, const int imm8)
- /// DPPS xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<float> DotProduct(Vector128<float> left, Vector128<float> right, byte control) => DotProduct(left, right, control);
- /// <summary>
- /// __m128d _mm_dp_pd (__m128d a, __m128d b, const int imm8)
- /// DPPD xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<double> DotProduct(Vector128<double> left, Vector128<double> right, byte control) => DotProduct(left, right, control);
-
- /// <summary>
- /// int _mm_extract_epi8 (__m128i a, const int imm8)
- /// PEXTRB reg/m8, xmm, imm8
- /// </summary>
- public static byte Extract(Vector128<byte> value, byte index) => Extract(value, index);
- /// <summary>
- /// int _mm_extract_epi32 (__m128i a, const int imm8)
- /// PEXTRD reg/m32, xmm, imm8
- /// </summary>
- public static int Extract(Vector128<int> value, byte index) => Extract(value, index);
- /// <summary>
- /// int _mm_extract_epi32 (__m128i a, const int imm8)
- /// PEXTRD reg/m32, xmm, imm8
- /// </summary>
- public static uint Extract(Vector128<uint> value, byte index) => Extract(value, index);
- /// <summary>
- /// int _mm_extract_ps (__m128 a, const int imm8)
- /// EXTRACTPS xmm, xmm/m32, imm8
- /// </summary>
- public static float Extract(Vector128<float> value, byte index) => Extract(value, index);
-
- /// <summary>
- /// __m128 _mm_floor_ps (__m128 a)
- /// ROUNDPS xmm, xmm/m128, imm8(9)
- /// </summary>
- public static Vector128<float> Floor(Vector128<float> value) => Floor(value);
- /// <summary>
- /// __m128d _mm_floor_pd (__m128d a)
- /// ROUNDPD xmm, xmm/m128, imm8(9)
- /// </summary>
- public static Vector128<double> Floor(Vector128<double> value) => Floor(value);
-
- /// <summary>
- /// __m128d _mm_floor_sd (__m128d a)
- /// ROUNDSD xmm, xmm/m128, imm8(9)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<double> FloorScalar(Vector128<double> value) => FloorScalar(value);
- /// <summary>
- /// __m128 _mm_floor_ss (__m128 a)
- /// ROUNDSS xmm, xmm/m128, imm8(9)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<float> FloorScalar(Vector128<float> value) => FloorScalar(value);
-
- /// <summary>
- /// __m128d _mm_floor_sd (__m128d a, __m128d b)
- /// ROUNDSD xmm, xmm/m128, imm8(9)
- /// </summary>
- public static Vector128<double> FloorScalar(Vector128<double> upper, Vector128<double> value) => FloorScalar(upper, value);
- /// <summary>
- /// __m128 _mm_floor_ss (__m128 a, __m128 b)
- /// ROUNDSS xmm, xmm/m128, imm8(9)
- /// </summary>
- public static Vector128<float> FloorScalar(Vector128<float> upper, Vector128<float> value) => FloorScalar(upper, value);
-
- /// <summary>
- /// __m128i _mm_insert_epi8 (__m128i a, int i, const int imm8)
- /// PINSRB xmm, reg/m8, imm8
- /// </summary>
- public static Vector128<sbyte> Insert(Vector128<sbyte> value, sbyte data, byte index) => Insert(value, data, index);
- /// <summary>
- /// __m128i _mm_insert_epi8 (__m128i a, int i, const int imm8)
- /// PINSRB xmm, reg/m8, imm8
- /// </summary>
- public static Vector128<byte> Insert(Vector128<byte> value, byte data, byte index) => Insert(value, data, index);
- /// <summary>
- /// __m128i _mm_insert_epi32 (__m128i a, int i, const int imm8)
- /// PINSRD xmm, reg/m32, imm8
- /// </summary>
- public static Vector128<int> Insert(Vector128<int> value, int data, byte index) => Insert(value, data, index);
- /// <summary>
- /// __m128i _mm_insert_epi32 (__m128i a, int i, const int imm8)
- /// PINSRD xmm, reg/m32, imm8
- /// </summary>
- public static Vector128<uint> Insert(Vector128<uint> value, uint data, byte index) => Insert(value, data, index);
- /// <summary>
- /// __m128 _mm_insert_ps (__m128 a, __m128 b, const int imm8)
- /// INSERTPS xmm, xmm/m32, imm8
- /// </summary>
- public static Vector128<float> Insert(Vector128<float> value, Vector128<float> data, byte index) => Insert(value, data, index);
-
- /// <summary>
- /// __m128i _mm_max_epi8 (__m128i a, __m128i b)
- /// PMAXSB xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> Max(Vector128<sbyte> left, Vector128<sbyte> right) => Max(left, right);
- /// <summary>
- /// __m128i _mm_max_epu16 (__m128i a, __m128i b)
- /// PMAXUW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> Max(Vector128<ushort> left, Vector128<ushort> right) => Max(left, right);
- /// <summary>
- /// __m128i _mm_max_epi32 (__m128i a, __m128i b)
- /// PMAXSD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> Max(Vector128<int> left, Vector128<int> right) => Max(left, right);
- /// <summary>
- /// __m128i _mm_max_epu32 (__m128i a, __m128i b)
- /// PMAXUD xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> Max(Vector128<uint> left, Vector128<uint> right) => Max(left, right);
-
- /// <summary>
- /// __m128i _mm_min_epi8 (__m128i a, __m128i b)
- /// PMINSB xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> Min(Vector128<sbyte> left, Vector128<sbyte> right) => Min(left, right);
- /// <summary>
- /// __m128i _mm_min_epu16 (__m128i a, __m128i b)
- /// PMINUW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> Min(Vector128<ushort> left, Vector128<ushort> right) => Min(left, right);
- /// <summary>
- /// __m128i _mm_min_epi32 (__m128i a, __m128i b)
- /// PMINSD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> Min(Vector128<int> left, Vector128<int> right) => Min(left, right);
- /// <summary>
- /// __m128i _mm_min_epu32 (__m128i a, __m128i b)
- /// PMINUD xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> Min(Vector128<uint> left, Vector128<uint> right) => Min(left, right);
-
- /// <summary>
- /// __m128i _mm_minpos_epu16 (__m128i a)
- /// PHMINPOSUW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> MinHorizontal(Vector128<ushort> value) => MinHorizontal(value);
-
- /// <summary>
- /// __m128i _mm_mpsadbw_epu8 (__m128i a, __m128i b, const int imm8)
- /// MPSADBW xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<ushort> MultipleSumAbsoluteDifferences(Vector128<byte> left, Vector128<byte> right, byte mask) => MultipleSumAbsoluteDifferences(left, right, mask);
-
- /// <summary>
- /// __m128i _mm_mul_epi32 (__m128i a, __m128i b)
- /// PMULDQ xmm, xmm/m128
- /// </summary>
- public static Vector128<long> Multiply(Vector128<int> left, Vector128<int> right) => Multiply(left, right);
-
- /// <summary>
- /// __m128i _mm_mullo_epi32 (__m128i a, __m128i b)
- /// PMULLD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> MultiplyLow(Vector128<int> left, Vector128<int> right) => MultiplyLow(left, right);
- /// <summary>
- /// __m128i _mm_mullo_epi32 (__m128i a, __m128i b)
- /// PMULLD xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> MultiplyLow(Vector128<uint> left, Vector128<uint> right) => MultiplyLow(left, right);
-
- /// <summary>
- /// __m128i _mm_packus_epi32 (__m128i a, __m128i b)
- /// PACKUSDW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> PackUnsignedSaturate(Vector128<int> left, Vector128<int> right) => PackUnsignedSaturate(left, right);
-
- /// <summary>
- /// __m128 _mm_round_ps (__m128 a, int rounding)
- /// ROUNDPS xmm, xmm/m128, imm8(8)
- /// _MM_FROUND_TO_NEAREST_INT |_MM_FROUND_NO_EXC
- /// </summary>
- public static Vector128<float> RoundToNearestInteger(Vector128<float> value) => RoundToNearestInteger(value);
- /// <summary>
- /// _MM_FROUND_TO_NEG_INF |_MM_FROUND_NO_EXC; ROUNDPS xmm, xmm/m128, imm8(9)
- /// </summary>
- public static Vector128<float> RoundToNegativeInfinity(Vector128<float> value) => RoundToNegativeInfinity(value);
- /// <summary>
- /// _MM_FROUND_TO_POS_INF |_MM_FROUND_NO_EXC; ROUNDPS xmm, xmm/m128, imm8(10)
- /// </summary>
- public static Vector128<float> RoundToPositiveInfinity(Vector128<float> value) => RoundToPositiveInfinity(value);
- /// <summary>
- /// _MM_FROUND_TO_ZERO |_MM_FROUND_NO_EXC; ROUNDPS xmm, xmm/m128, imm8(11)
- /// </summary>
- public static Vector128<float> RoundToZero(Vector128<float> value) => RoundToZero(value);
- /// <summary>
- /// _MM_FROUND_CUR_DIRECTION; ROUNDPS xmm, xmm/m128, imm8(4)
- /// </summary>
- public static Vector128<float> RoundCurrentDirection(Vector128<float> value) => RoundCurrentDirection(value);
-
- /// <summary>
- /// __m128d _mm_round_pd (__m128d a, int rounding)
- /// ROUNDPD xmm, xmm/m128, imm8(8)
- /// _MM_FROUND_TO_NEAREST_INT |_MM_FROUND_NO_EXC
- /// </summary>
- public static Vector128<double> RoundToNearestInteger(Vector128<double> value) => RoundToNearestInteger(value);
- /// <summary>
- /// _MM_FROUND_TO_NEG_INF |_MM_FROUND_NO_EXC; ROUNDPD xmm, xmm/m128, imm8(9)
- /// </summary>
- public static Vector128<double> RoundToNegativeInfinity(Vector128<double> value) => RoundToNegativeInfinity(value);
- /// <summary>
- /// _MM_FROUND_TO_POS_INF |_MM_FROUND_NO_EXC; ROUNDPD xmm, xmm/m128, imm8(10)
- /// </summary>
- public static Vector128<double> RoundToPositiveInfinity(Vector128<double> value) => RoundToPositiveInfinity(value);
- /// <summary>
- /// _MM_FROUND_TO_ZERO |_MM_FROUND_NO_EXC; ROUNDPD xmm, xmm/m128, imm8(11)
- /// </summary>
- public static Vector128<double> RoundToZero(Vector128<double> value) => RoundToZero(value);
- /// <summary>
- /// _MM_FROUND_CUR_DIRECTION; ROUNDPD xmm, xmm/m128, imm8(4)
- /// </summary>
- public static Vector128<double> RoundCurrentDirection(Vector128<double> value) => RoundCurrentDirection(value);
-
- /// <summary>
- /// __m128d _mm_round_sd (__m128d a, _MM_FROUND_CUR_DIRECTION)
- /// ROUNDSD xmm, xmm/m128, imm8(4)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<double> RoundCurrentDirectionScalar(Vector128<double> value) => RoundCurrentDirectionScalar(value);
- /// <summary>
- /// __m128d _mm_round_sd (__m128d a, _MM_FROUND_TO_NEAREST_INT |_MM_FROUND_NO_EXC)
- /// ROUNDSD xmm, xmm/m128, imm8(8)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<double> RoundToNearestIntegerScalar(Vector128<double> value) => RoundToNearestIntegerScalar(value);
- /// <summary>
- /// __m128d _mm_round_sd (__m128d a, _MM_FROUND_TO_NEG_INF |_MM_FROUND_NO_EXC)
- /// ROUNDSD xmm, xmm/m128, imm8(9)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<double> RoundToNegativeInfinityScalar(Vector128<double> value) => RoundToNegativeInfinityScalar(value);
- /// <summary>
- /// __m128d _mm_round_sd (__m128d a, _MM_FROUND_TO_POS_INF |_MM_FROUND_NO_EXC)
- /// ROUNDSD xmm, xmm/m128, imm8(10)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<double> RoundToPositiveInfinityScalar(Vector128<double> value) => RoundToPositiveInfinityScalar(value);
- /// <summary>
- /// __m128d _mm_round_sd (__m128d a, _MM_FROUND_TO_ZERO |_MM_FROUND_NO_EXC)
- /// ROUNDSD xmm, xmm/m128, imm8(11)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<double> RoundToZeroScalar(Vector128<double> value) => RoundToZeroScalar(value);
-
- /// <summary>
- /// __m128d _mm_round_sd (__m128d a, __m128d b, _MM_FROUND_CUR_DIRECTION)
- /// ROUNDSD xmm, xmm/m128, imm8(4)
- /// </summary>
- public static Vector128<double> RoundCurrentDirectionScalar(Vector128<double> upper, Vector128<double> value) => RoundCurrentDirectionScalar(upper, value);
- /// <summary>
- /// __m128d _mm_round_sd (__m128d a, __m128d b, _MM_FROUND_TO_NEAREST_INT |_MM_FROUND_NO_EXC)
- /// ROUNDSD xmm, xmm/m128, imm8(8)
- /// </summary>
- public static Vector128<double> RoundToNearestIntegerScalar(Vector128<double> upper, Vector128<double> value) => RoundToNearestIntegerScalar(upper, value);
- /// <summary>
- /// __m128d _mm_round_sd (__m128d a, __m128d b, _MM_FROUND_TO_NEG_INF |_MM_FROUND_NO_EXC)
- /// ROUNDSD xmm, xmm/m128, imm8(9)
- /// </summary>
- public static Vector128<double> RoundToNegativeInfinityScalar(Vector128<double> upper, Vector128<double> value) => RoundToNegativeInfinityScalar(upper, value);
- /// <summary>
- /// __m128d _mm_round_sd (__m128d a, __m128d b, _MM_FROUND_TO_POS_INF |_MM_FROUND_NO_EXC)
- /// ROUNDSD xmm, xmm/m128, imm8(10)
- /// </summary>
- public static Vector128<double> RoundToPositiveInfinityScalar(Vector128<double> upper, Vector128<double> value) => RoundToPositiveInfinityScalar(upper, value);
- /// <summary>
- /// __m128d _mm_round_sd (__m128d a, __m128d b, _MM_FROUND_TO_ZERO |_MM_FROUND_NO_EXC)
- /// ROUNDSD xmm, xmm/m128, imm8(11)
- /// </summary>
- public static Vector128<double> RoundToZeroScalar(Vector128<double> upper, Vector128<double> value) => RoundToZeroScalar(upper, value);
-
- /// <summary>
- /// __m128 _mm_round_ss (__m128 a, _MM_FROUND_CUR_DIRECTION)
- /// ROUNDSS xmm, xmm/m128, imm8(4)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<float> RoundCurrentDirectionScalar(Vector128<float> value) => RoundCurrentDirectionScalar(value);
- /// <summary>
- /// __m128 _mm_round_ss (__m128 a, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC)
- /// ROUNDSS xmm, xmm/m128, imm8(8)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<float> RoundToNearestIntegerScalar(Vector128<float> value) => RoundToNearestIntegerScalar(value);
- /// <summary>
- /// __m128 _mm_round_ss (__m128 a, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC)
- /// ROUNDSS xmm, xmm/m128, imm8(9)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<float> RoundToNegativeInfinityScalar(Vector128<float> value) => RoundToNegativeInfinityScalar(value);
- /// <summary>
- /// __m128 _mm_round_ss (__m128 a, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC)
- /// ROUNDSS xmm, xmm/m128, imm8(10)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<float> RoundToPositiveInfinityScalar(Vector128<float> value) => RoundToPositiveInfinityScalar(value);
- /// <summary>
- /// __m128 _mm_round_ss (__m128 a, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC)
- /// ROUNDSS xmm, xmm/m128, imm8(11)
- /// The above native signature does not exist. We provide this additional overload for the recommended use case of this intrinsic.
- /// </summary>
- public static Vector128<float> RoundToZeroScalar(Vector128<float> value) => RoundToZeroScalar(value);
-
- /// <summary>
- /// __m128 _mm_round_ss (__m128 a, __m128 b, _MM_FROUND_CUR_DIRECTION)
- /// ROUNDSS xmm, xmm/m128, imm8(4)
- /// </summary>
- public static Vector128<float> RoundCurrentDirectionScalar(Vector128<float> upper, Vector128<float> value) => RoundCurrentDirectionScalar(upper, value);
- /// <summary>
- /// __m128 _mm_round_ss (__m128 a, __m128 b, _MM_FROUND_TO_NEAREST_INT | _MM_FROUND_NO_EXC)
- /// ROUNDSS xmm, xmm/m128, imm8(8)
- /// </summary>
- public static Vector128<float> RoundToNearestIntegerScalar(Vector128<float> upper, Vector128<float> value) => RoundToNearestIntegerScalar(upper, value);
- /// <summary>
- /// __m128 _mm_round_ss (__m128 a, __m128 b, _MM_FROUND_TO_NEG_INF | _MM_FROUND_NO_EXC)
- /// ROUNDSS xmm, xmm/m128, imm8(9)
- /// </summary>
- public static Vector128<float> RoundToNegativeInfinityScalar(Vector128<float> upper, Vector128<float> value) => RoundToNegativeInfinityScalar(upper, value);
- /// <summary>
- /// __m128 _mm_round_ss (__m128 a, __m128 b, _MM_FROUND_TO_POS_INF | _MM_FROUND_NO_EXC)
- /// ROUNDSS xmm, xmm/m128, imm8(10)
- /// </summary>
- public static Vector128<float> RoundToPositiveInfinityScalar(Vector128<float> upper, Vector128<float> value) => RoundToPositiveInfinityScalar(upper, value);
- /// <summary>
- /// __m128 _mm_round_ss (__m128 a, __m128 b, _MM_FROUND_TO_ZERO | _MM_FROUND_NO_EXC)
- /// ROUNDSS xmm, xmm/m128, imm8(11)
- /// </summary>
- public static Vector128<float> RoundToZeroScalar(Vector128<float> upper, Vector128<float> value) => RoundToZeroScalar(upper, value);
-
- /// <summary>
- /// __m128i _mm_stream_load_si128 (const __m128i* mem_addr)
- /// MOVNTDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<sbyte> LoadAlignedVector128NonTemporal(sbyte* address) => LoadAlignedVector128NonTemporal(address);
- /// <summary>
- /// __m128i _mm_stream_load_si128 (const __m128i* mem_addr)
- /// MOVNTDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<byte> LoadAlignedVector128NonTemporal(byte* address) => LoadAlignedVector128NonTemporal(address);
- /// <summary>
- /// __m128i _mm_stream_load_si128 (const __m128i* mem_addr)
- /// MOVNTDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<short> LoadAlignedVector128NonTemporal(short* address) => LoadAlignedVector128NonTemporal(address);
- /// <summary>
- /// __m128i _mm_stream_load_si128 (const __m128i* mem_addr)
- /// MOVNTDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<ushort> LoadAlignedVector128NonTemporal(ushort* address) => LoadAlignedVector128NonTemporal(address);
- /// <summary>
- /// __m128i _mm_stream_load_si128 (const __m128i* mem_addr)
- /// MOVNTDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<int> LoadAlignedVector128NonTemporal(int* address) => LoadAlignedVector128NonTemporal(address);
- /// <summary>
- /// __m128i _mm_stream_load_si128 (const __m128i* mem_addr)
- /// MOVNTDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<uint> LoadAlignedVector128NonTemporal(uint* address) => LoadAlignedVector128NonTemporal(address);
- /// <summary>
- /// __m128i _mm_stream_load_si128 (const __m128i* mem_addr)
- /// MOVNTDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<long> LoadAlignedVector128NonTemporal(long* address) => LoadAlignedVector128NonTemporal(address);
- /// <summary>
- /// __m128i _mm_stream_load_si128 (const __m128i* mem_addr)
- /// MOVNTDQA xmm, m128
- /// </summary>
- public static unsafe Vector128<ulong> LoadAlignedVector128NonTemporal(ulong* address) => LoadAlignedVector128NonTemporal(address);
-
- /// <summary>
- /// int _mm_testc_si128 (__m128i a, __m128i b)
- /// PTEST xmm, xmm/m128
- /// </summary>
- public static bool TestC(Vector128<sbyte> left, Vector128<sbyte> right) => TestC(left, right);
- public static bool TestC(Vector128<byte> left, Vector128<byte> right) => TestC(left, right);
- public static bool TestC(Vector128<short> left, Vector128<short> right) => TestC(left, right);
- public static bool TestC(Vector128<ushort> left, Vector128<ushort> right) => TestC(left, right);
- public static bool TestC(Vector128<int> left, Vector128<int> right) => TestC(left, right);
- public static bool TestC(Vector128<uint> left, Vector128<uint> right) => TestC(left, right);
- public static bool TestC(Vector128<long> left, Vector128<long> right) => TestC(left, right);
- public static bool TestC(Vector128<ulong> left, Vector128<ulong> right) => TestC(left, right);
-
- /// <summary>
- /// int _mm_testnzc_si128 (__m128i a, __m128i b)
- /// PTEST xmm, xmm/m128
- /// </summary>
- public static bool TestNotZAndNotC(Vector128<sbyte> left, Vector128<sbyte> right) => TestNotZAndNotC(left, right);
- public static bool TestNotZAndNotC(Vector128<byte> left, Vector128<byte> right) => TestNotZAndNotC(left, right);
- public static bool TestNotZAndNotC(Vector128<short> left, Vector128<short> right) => TestNotZAndNotC(left, right);
- public static bool TestNotZAndNotC(Vector128<ushort> left, Vector128<ushort> right) => TestNotZAndNotC(left, right);
- public static bool TestNotZAndNotC(Vector128<int> left, Vector128<int> right) => TestNotZAndNotC(left, right);
- public static bool TestNotZAndNotC(Vector128<uint> left, Vector128<uint> right) => TestNotZAndNotC(left, right);
- public static bool TestNotZAndNotC(Vector128<long> left, Vector128<long> right) => TestNotZAndNotC(left, right);
- public static bool TestNotZAndNotC(Vector128<ulong> left, Vector128<ulong> right) => TestNotZAndNotC(left, right);
-
- /// <summary>
- /// int _mm_testz_si128 (__m128i a, __m128i b)
- /// PTEST xmm, xmm/m128
- /// </summary>
- public static bool TestZ(Vector128<sbyte> left, Vector128<sbyte> right) => TestZ(left, right);
- public static bool TestZ(Vector128<byte> left, Vector128<byte> right) => TestZ(left, right);
- public static bool TestZ(Vector128<short> left, Vector128<short> right) => TestZ(left, right);
- public static bool TestZ(Vector128<ushort> left, Vector128<ushort> right) => TestZ(left, right);
- public static bool TestZ(Vector128<int> left, Vector128<int> right) => TestZ(left, right);
- public static bool TestZ(Vector128<uint> left, Vector128<uint> right) => TestZ(left, right);
- public static bool TestZ(Vector128<long> left, Vector128<long> right) => TestZ(left, right);
- public static bool TestZ(Vector128<ulong> left, Vector128<ulong> right) => TestZ(left, right);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse42.PlatformNotSupported.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse42.PlatformNotSupported.cs
deleted file mode 100644
index 9025dc504e2..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse42.PlatformNotSupported.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-// 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;
-using System.Runtime.CompilerServices;
-using System.Runtime.Intrinsics;
-
-namespace System.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel SSE4.2 hardware instructions via intrinsics
- /// </summary>
- [CLSCompliant(false)]
- public abstract class Sse42 : Sse41
- {
- internal Sse42() { }
-
- public static new bool IsSupported { [Intrinsic] get { return false; } }
-
- public new abstract class X64 : Sse41.X64
- {
- internal X64() { }
-
- public static new bool IsSupported { [Intrinsic] get { return false; } }
-
- /// <summary>
- /// unsigned __int64 _mm_crc32_u64 (unsigned __int64 crc, unsigned __int64 v)
- /// CRC32 reg, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong Crc32(ulong crc, ulong data) { throw new PlatformNotSupportedException(); }
- }
-
- /// <summary>
- /// __m128i _mm_cmpgt_epi64 (__m128i a, __m128i b)
- /// PCMPGTQ xmm, xmm/m128
- /// </summary>
- public static Vector128<long> CompareGreaterThan(Vector128<long> left, Vector128<long> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// unsigned int _mm_crc32_u8 (unsigned int crc, unsigned char v)
- /// CRC32 reg, reg/m8
- /// </summary>
- public static uint Crc32(uint crc, byte data) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// unsigned int _mm_crc32_u16 (unsigned int crc, unsigned short v)
- /// CRC32 reg, reg/m16
- /// </summary>
- public static uint Crc32(uint crc, ushort data) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// unsigned int _mm_crc32_u32 (unsigned int crc, unsigned int v)
- /// CRC32 reg, reg/m32
- /// </summary>
- public static uint Crc32(uint crc, uint data) { throw new PlatformNotSupportedException(); }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse42.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse42.cs
deleted file mode 100644
index fde754ab7e9..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Sse42.cs
+++ /dev/null
@@ -1,57 +0,0 @@
-// 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.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel SSE4.2 hardware instructions via intrinsics
- /// </summary>
- [Intrinsic]
- [CLSCompliant(false)]
- public abstract class Sse42 : Sse41
- {
- internal Sse42() { }
-
- public static new bool IsSupported { get => IsSupported; }
-
- [Intrinsic]
- public new abstract class X64 : Sse41.X64
- {
- internal X64() { }
-
- public static new bool IsSupported { get => IsSupported; }
-
- /// <summary>
- /// unsigned __int64 _mm_crc32_u64 (unsigned __int64 crc, unsigned __int64 v)
- /// CRC32 reg, reg/m64
- /// This intrinisc is only available on 64-bit processes
- /// </summary>
- public static ulong Crc32(ulong crc, ulong data) => Crc32(crc, data);
- }
-
- /// <summary>
- /// __m128i _mm_cmpgt_epi64 (__m128i a, __m128i b)
- /// PCMPGTQ xmm, xmm/m128
- /// </summary>
- public static Vector128<long> CompareGreaterThan(Vector128<long> left, Vector128<long> right) => CompareGreaterThan(left, right);
-
- /// <summary>
- /// unsigned int _mm_crc32_u8 (unsigned int crc, unsigned char v)
- /// CRC32 reg, reg/m8
- /// </summary>
- public static uint Crc32(uint crc, byte data) => Crc32(crc, data);
- /// <summary>
- /// unsigned int _mm_crc32_u16 (unsigned int crc, unsigned short v)
- /// CRC32 reg, reg/m16
- /// </summary>
- public static uint Crc32(uint crc, ushort data) => Crc32(crc, data);
- /// <summary>
- /// unsigned int _mm_crc32_u32 (unsigned int crc, unsigned int v)
- /// CRC32 reg, reg/m32
- /// </summary>
- public static uint Crc32(uint crc, uint data) => Crc32(crc, data);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Ssse3.PlatformNotSupported.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Ssse3.PlatformNotSupported.cs
deleted file mode 100644
index ed02211642f..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Ssse3.PlatformNotSupported.cs
+++ /dev/null
@@ -1,165 +0,0 @@
-// 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;
-using System.Runtime.CompilerServices;
-using System.Runtime.Intrinsics;
-
-namespace System.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel SSSE3 hardware instructions via intrinsics
- /// </summary>
- [CLSCompliant(false)]
- public abstract class Ssse3 : Sse3
- {
- internal Ssse3() { }
-
- public static new bool IsSupported { [Intrinsic] get { return false; } }
-
- /// <summary>
- /// __m128i _mm_abs_epi8 (__m128i a)
- /// PABSB xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> Abs(Vector128<sbyte> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_abs_epi16 (__m128i a)
- /// PABSW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> Abs(Vector128<short> value) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_abs_epi32 (__m128i a)
- /// PABSD xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> Abs(Vector128<int> value) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_alignr_epi8 (__m128i a, __m128i b, int count)
- /// PALIGNR xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<sbyte> AlignRight(Vector128<sbyte> left, Vector128<sbyte> right, byte mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_alignr_epi8 (__m128i a, __m128i b, int count)
- /// PALIGNR xmm, xmm/m128, imm8
- /// This intrinsic generates PALIGNR that operates over bytes rather than elements of the vectors.
- /// </summary>
- public static Vector128<byte> AlignRight(Vector128<byte> left, Vector128<byte> right, byte mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_alignr_epi8 (__m128i a, __m128i b, int count)
- /// PALIGNR xmm, xmm/m128, imm8
- /// This intrinsic generates PALIGNR that operates over bytes rather than elements of the vectors.
- /// </summary>
- public static Vector128<short> AlignRight(Vector128<short> left, Vector128<short> right, byte mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_alignr_epi8 (__m128i a, __m128i b, int count)
- /// PALIGNR xmm, xmm/m128, imm8
- /// This intrinsic generates PALIGNR that operates over bytes rather than elements of the vectors.
- /// </summary>
- public static Vector128<ushort> AlignRight(Vector128<ushort> left, Vector128<ushort> right, byte mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_alignr_epi8 (__m128i a, __m128i b, int count)
- /// PALIGNR xmm, xmm/m128, imm8
- /// This intrinsic generates PALIGNR that operates over bytes rather than elements of the vectors.
- /// </summary>
- public static Vector128<int> AlignRight(Vector128<int> left, Vector128<int> right, byte mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_alignr_epi8 (__m128i a, __m128i b, int count)
- /// PALIGNR xmm, xmm/m128, imm8
- /// This intrinsic generates PALIGNR that operates over bytes rather than elements of the vectors.
- /// </summary>
- public static Vector128<uint> AlignRight(Vector128<uint> left, Vector128<uint> right, byte mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_alignr_epi8 (__m128i a, __m128i b, int count)
- /// PALIGNR xmm, xmm/m128, imm8
- /// This intrinsic generates PALIGNR that operates over bytes rather than elements of the vectors.
- /// </summary>
- public static Vector128<long> AlignRight(Vector128<long> left, Vector128<long> right, byte mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_alignr_epi8 (__m128i a, __m128i b, int count)
- /// PALIGNR xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<ulong> AlignRight(Vector128<ulong> left, Vector128<ulong> right, byte mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_hadd_epi16 (__m128i a, __m128i b)
- /// PHADDW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> HorizontalAdd(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_hadd_epi32 (__m128i a, __m128i b)
- /// PHADDD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> HorizontalAdd(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_hadds_epi16 (__m128i a, __m128i b)
- /// PHADDSW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> HorizontalAddSaturate(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_hsub_epi16 (__m128i a, __m128i b)
- /// PHSUBW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> HorizontalSubtract(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_hsub_epi32 (__m128i a, __m128i b)
- /// PHSUBD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> HorizontalSubtract(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_hsubs_epi16 (__m128i a, __m128i b)
- /// PHSUBSW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> HorizontalSubtractSaturate(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_maddubs_epi16 (__m128i a, __m128i b)
- /// PMADDUBSW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> MultiplyAddAdjacent(Vector128<byte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_mulhrs_epi16 (__m128i a, __m128i b)
- /// PMULHRSW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> MultiplyHighRoundScale(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_shuffle_epi8 (__m128i a, __m128i b)
- /// PSHUFB xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> Shuffle(Vector128<sbyte> value, Vector128<sbyte> mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_shuffle_epi8 (__m128i a, __m128i b)
- /// PSHUFB xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> Shuffle(Vector128<byte> value, Vector128<byte> mask) { throw new PlatformNotSupportedException(); }
-
- /// <summary>
- /// __m128i _mm_sign_epi8 (__m128i a, __m128i b)
- /// PSIGNB xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> Sign(Vector128<sbyte> left, Vector128<sbyte> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_sign_epi16 (__m128i a, __m128i b)
- /// PSIGNW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> Sign(Vector128<short> left, Vector128<short> right) { throw new PlatformNotSupportedException(); }
- /// <summary>
- /// __m128i _mm_sign_epi32 (__m128i a, __m128i b)
- /// PSIGND xmm, xmm/m128
- /// </summary>
- public static Vector128<int> Sign(Vector128<int> left, Vector128<int> right) { throw new PlatformNotSupportedException(); }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Ssse3.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Ssse3.cs
deleted file mode 100644
index 389dd08086f..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Intrinsics/X86/Ssse3.cs
+++ /dev/null
@@ -1,165 +0,0 @@
-// 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.Runtime.Intrinsics.X86
-{
- /// <summary>
- /// This class provides access to Intel SSSE3 hardware instructions via intrinsics
- /// </summary>
- [Intrinsic]
- [CLSCompliant(false)]
- public abstract class Ssse3 : Sse3
- {
- internal Ssse3() { }
-
- public static new bool IsSupported { get => IsSupported; }
-
- /// <summary>
- /// __m128i _mm_abs_epi8 (__m128i a)
- /// PABSB xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> Abs(Vector128<sbyte> value) => Abs(value);
- /// <summary>
- /// __m128i _mm_abs_epi16 (__m128i a)
- /// PABSW xmm, xmm/m128
- /// </summary>
- public static Vector128<ushort> Abs(Vector128<short> value) => Abs(value);
- /// <summary>
- /// __m128i _mm_abs_epi32 (__m128i a)
- /// PABSD xmm, xmm/m128
- /// </summary>
- public static Vector128<uint> Abs(Vector128<int> value) => Abs(value);
-
- /// <summary>
- /// __m128i _mm_alignr_epi8 (__m128i a, __m128i b, int count)
- /// PALIGNR xmm, xmm/m128, imm8
- /// </summary>
- public static Vector128<sbyte> AlignRight(Vector128<sbyte> left, Vector128<sbyte> right, byte mask) => AlignRight(left, right, mask);
-
- /// <summary>
- /// __m128i _mm_alignr_epi8 (__m128i a, __m128i b, int count)
- /// PALIGNR xmm, xmm/m128, imm8
- /// This intrinsic generates PALIGNR that operates over bytes rather than elements of the vectors.
- /// </summary>
- public static Vector128<byte> AlignRight(Vector128<byte> left, Vector128<byte> right, byte mask) => AlignRight(left, right, mask);
-
- /// <summary>
- /// __m128i _mm_alignr_epi8 (__m128i a, __m128i b, int count)
- /// PALIGNR xmm, xmm/m128, imm8
- /// This intrinsic generates PALIGNR that operates over bytes rather than elements of the vectors.
- /// </summary>
- public static Vector128<short> AlignRight(Vector128<short> left, Vector128<short> right, byte mask) => AlignRight(left, right, mask);
-
- /// <summary>
- /// __m128i _mm_alignr_epi8 (__m128i a, __m128i b, int count)
- /// PALIGNR xmm, xmm/m128, imm8
- /// This intrinsic generates PALIGNR that operates over bytes rather than elements of the vectors.
- /// </summary>
- public static Vector128<ushort> AlignRight(Vector128<ushort> left, Vector128<ushort> right, byte mask) => AlignRight(left, right, mask);
-
- /// <summary>
- /// __m128i _mm_alignr_epi8 (__m128i a, __m128i b, int count)
- /// PALIGNR xmm, xmm/m128, imm8
- /// This intrinsic generates PALIGNR that operates over bytes rather than elements of the vectors.
- /// </summary>
- public static Vector128<int> AlignRight(Vector128<int> left, Vector128<int> right, byte mask) => AlignRight(left, right, mask);
-
- /// <summary>
- /// __m128i _mm_alignr_epi8 (__m128i a, __m128i b, int count)
- /// PALIGNR xmm, xmm/m128, imm8
- /// This intrinsic generates PALIGNR that operates over bytes rather than elements of the vectors.
- /// </summary>
- public static Vector128<uint> AlignRight(Vector128<uint> left, Vector128<uint> right, byte mask) => AlignRight(left, right, mask);
-
- /// <summary>
- /// __m128i _mm_alignr_epi8 (__m128i a, __m128i b, int count)
- /// PALIGNR xmm, xmm/m128, imm8
- /// This intrinsic generates PALIGNR that operates over bytes rather than elements of the vectors.
- /// </summary>
- public static Vector128<long> AlignRight(Vector128<long> left, Vector128<long> right, byte mask) => AlignRight(left, right, mask);
-
- /// <summary>
- /// __m128i _mm_alignr_epi8 (__m128i a, __m128i b, int count)
- /// PALIGNR xmm, xmm/m128, imm8
- /// This intrinsic generates PALIGNR that operates over bytes rather than elements of the vectors.
- /// </summary>
- public static Vector128<ulong> AlignRight(Vector128<ulong> left, Vector128<ulong> right, byte mask) => AlignRight(left, right, mask);
-
- /// <summary>
- /// __m128i _mm_hadd_epi16 (__m128i a, __m128i b)
- /// PHADDW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> HorizontalAdd(Vector128<short> left, Vector128<short> right) => HorizontalAdd(left, right);
- /// <summary>
- /// __m128i _mm_hadd_epi32 (__m128i a, __m128i b)
- /// PHADDD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> HorizontalAdd(Vector128<int> left, Vector128<int> right) => HorizontalAdd(left, right);
-
- /// <summary>
- /// __m128i _mm_hadds_epi16 (__m128i a, __m128i b)
- /// PHADDSW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> HorizontalAddSaturate(Vector128<short> left, Vector128<short> right) => HorizontalAddSaturate(left, right);
-
- /// <summary>
- /// __m128i _mm_hsub_epi16 (__m128i a, __m128i b)
- /// PHSUBW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> HorizontalSubtract(Vector128<short> left, Vector128<short> right) => HorizontalSubtract(left, right);
- /// <summary>
- /// __m128i _mm_hsub_epi32 (__m128i a, __m128i b)
- /// PHSUBD xmm, xmm/m128
- /// </summary>
- public static Vector128<int> HorizontalSubtract(Vector128<int> left, Vector128<int> right) => HorizontalSubtract(left, right);
-
- /// <summary>
- /// __m128i _mm_hsubs_epi16 (__m128i a, __m128i b)
- /// PHSUBSW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> HorizontalSubtractSaturate(Vector128<short> left, Vector128<short> right) => HorizontalSubtractSaturate(left, right);
-
- /// <summary>
- /// __m128i _mm_maddubs_epi16 (__m128i a, __m128i b)
- /// PMADDUBSW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> MultiplyAddAdjacent(Vector128<byte> left, Vector128<sbyte> right) => MultiplyAddAdjacent(left, right);
-
- /// <summary>
- /// __m128i _mm_mulhrs_epi16 (__m128i a, __m128i b)
- /// PMULHRSW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> MultiplyHighRoundScale(Vector128<short> left, Vector128<short> right) => MultiplyHighRoundScale(left, right);
-
- /// <summary>
- /// __m128i _mm_shuffle_epi8 (__m128i a, __m128i b)
- /// PSHUFB xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> Shuffle(Vector128<sbyte> value, Vector128<sbyte> mask) => Shuffle(value, mask);
-
- /// <summary>
- /// __m128i _mm_shuffle_epi8 (__m128i a, __m128i b)
- /// PSHUFB xmm, xmm/m128
- /// </summary>
- public static Vector128<byte> Shuffle(Vector128<byte> value, Vector128<byte> mask) => Shuffle(value, mask);
-
- /// <summary>
- /// __m128i _mm_sign_epi8 (__m128i a, __m128i b)
- /// PSIGNB xmm, xmm/m128
- /// </summary>
- public static Vector128<sbyte> Sign(Vector128<sbyte> left, Vector128<sbyte> right) => Sign(left, right);
- /// <summary>
- /// __m128i _mm_sign_epi16 (__m128i a, __m128i b)
- /// PSIGNW xmm, xmm/m128
- /// </summary>
- public static Vector128<short> Sign(Vector128<short> left, Vector128<short> right) => Sign(left, right);
- /// <summary>
- /// __m128i _mm_sign_epi32 (__m128i a, __m128i b)
- /// PSIGND xmm, xmm/m128
- /// </summary>
- public static Vector128<int> Sign(Vector128<int> left, Vector128<int> right) => Sign(left, right);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Loader/AssemblyLoadContext.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Loader/AssemblyLoadContext.cs
deleted file mode 100644
index 5ae3f8d06f3..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Loader/AssemblyLoadContext.cs
+++ /dev/null
@@ -1,801 +0,0 @@
-// 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.Collections.Generic;
-using System.ComponentModel;
-using System.Diagnostics;
-using System.IO;
-using System.Reflection;
-using System.Runtime.InteropServices;
-using System.Threading;
-
-namespace System.Runtime.Loader
-{
- public partial class AssemblyLoadContext
- {
- private enum InternalState
- {
- /// <summary>
- /// The ALC is alive (default)
- /// </summary>
- Alive,
-
- /// <summary>
- /// The unload process has started, the Unloading event will be called
- /// once the underlying LoaderAllocator has been finalized
- /// </summary>
- Unloading
- }
-
- private static readonly Dictionary<long, WeakReference<AssemblyLoadContext>> s_allContexts = new Dictionary<long, WeakReference<AssemblyLoadContext>>();
- private static long s_nextId;
-
-#region private data members
- // If you modify any of these fields, you must also update the
- // AssemblyLoadContextBaseObject structure in object.h
-
- // synchronization primitive to protect against usage of this instance while unloading
- private readonly object _unloadLock;
-
- private event Func<Assembly, string, IntPtr>? _resolvingUnmanagedDll;
-
- private event Func<AssemblyLoadContext, AssemblyName, Assembly>? _resolving;
-
- private event Action<AssemblyLoadContext>? _unloading;
-
- private readonly string? _name;
-
- // Contains the reference to VM's representation of the AssemblyLoadContext
- private readonly IntPtr _nativeAssemblyLoadContext;
-
- // Id used by s_allContexts
- private readonly long _id;
-
- // Indicates the state of this ALC (Alive or in Unloading state)
- private InternalState _state;
-
- private readonly bool _isCollectible;
-#endregion
-
- protected AssemblyLoadContext() : this(false, false, null)
- {
- }
-
- protected AssemblyLoadContext(bool isCollectible) : this(false, isCollectible, null)
- {
- }
-
- public AssemblyLoadContext(string? name, bool isCollectible = false) : this(false, isCollectible, name)
- {
- }
-
- private protected AssemblyLoadContext(bool representsTPALoadContext, bool isCollectible, string? name)
- {
- // Initialize the VM side of AssemblyLoadContext if not already done.
- _isCollectible = isCollectible;
-
- _name = name;
-
- // The _unloadLock needs to be assigned after the IsCollectible to ensure proper behavior of the finalizer
- // even in case the following allocation fails or the thread is aborted between these two lines.
- _unloadLock = new object();
-
- if (!isCollectible)
- {
- // For non collectible AssemblyLoadContext, the finalizer should never be called and thus the AssemblyLoadContext should not
- // be on the finalizer queue.
- GC.SuppressFinalize(this);
- }
-
- // If this is a collectible ALC, we are creating a weak handle tracking resurrection otherwise we use a strong handle
- var thisHandle = GCHandle.Alloc(this, IsCollectible ? GCHandleType.WeakTrackResurrection : GCHandleType.Normal);
- var thisHandlePtr = GCHandle.ToIntPtr(thisHandle);
- _nativeAssemblyLoadContext = InitializeAssemblyLoadContext(thisHandlePtr, representsTPALoadContext, isCollectible);
-
- // Add this instance to the list of alive ALC
- lock (s_allContexts)
- {
- _id = s_nextId++;
- s_allContexts.Add(_id, new WeakReference<AssemblyLoadContext>(this, true));
- }
- }
-
- ~AssemblyLoadContext()
- {
- // Use the _unloadLock as a guard to detect the corner case when the constructor of the AssemblyLoadContext was not executed
- // e.g. due to the JIT failing to JIT it.
- if (_unloadLock != null)
- {
- // Only valid for a Collectible ALC. Non-collectible ALCs have the finalizer suppressed.
- Debug.Assert(IsCollectible);
- // We get here only in case the explicit Unload was not initiated.
- Debug.Assert(_state != InternalState.Unloading);
- InitiateUnload();
- }
- }
-
- private void RaiseUnloadEvent()
- {
- // Ensure that we raise the Unload event only once
- Interlocked.Exchange(ref _unloading, null!)?.Invoke(this);
- }
-
- private void InitiateUnload()
- {
- RaiseUnloadEvent();
-
- // When in Unloading state, we are not supposed to be called on the finalizer
- // as the native side is holding a strong reference after calling Unload
- lock (_unloadLock)
- {
- Debug.Assert(_state == InternalState.Alive);
-
- var thisStrongHandle = GCHandle.Alloc(this, GCHandleType.Normal);
- var thisStrongHandlePtr = GCHandle.ToIntPtr(thisStrongHandle);
- // The underlying code will transform the original weak handle
- // created by InitializeLoadContext to a strong handle
- PrepareForAssemblyLoadContextRelease(_nativeAssemblyLoadContext, thisStrongHandlePtr);
-
- _state = InternalState.Unloading;
- }
-
- lock (s_allContexts)
- {
- s_allContexts.Remove(_id);
- }
- }
-
- public IEnumerable<Assembly> Assemblies
- {
- get
- {
- foreach (Assembly a in GetLoadedAssemblies())
- {
- AssemblyLoadContext? alc = GetLoadContext(a);
-
- if (alc == this)
- {
- yield return a;
- }
- }
- }
- }
-
- // Event handler for resolving native libraries.
- // This event is raised if the native library could not be resolved via
- // the default resolution logic [including AssemblyLoadContext.LoadUnmanagedDll()]
- //
- // Inputs: Invoking assembly, and library name to resolve
- // Returns: A handle to the loaded native library
- public event Func<Assembly, string, IntPtr>? ResolvingUnmanagedDll
- {
- add
- {
- _resolvingUnmanagedDll += value;
- }
- remove
- {
- _resolvingUnmanagedDll -= value;
- }
- }
-
- // Event handler for resolving managed assemblies.
- // This event is raised if the managed assembly could not be resolved via
- // the default resolution logic [including AssemblyLoadContext.Load()]
- //
- // Inputs: The AssemblyLoadContext and AssemblyName to be loaded
- // Returns: The Loaded assembly object.
- public event Func<AssemblyLoadContext, AssemblyName, Assembly?>? Resolving
- {
- add
- {
- _resolving += value;
- }
- remove
- {
- _resolving -= value;
- }
- }
-
- public event Action<AssemblyLoadContext>? Unloading
- {
- add
- {
- _unloading += value;
- }
- remove
- {
- _unloading -= value;
- }
- }
-
-#region AppDomainEvents
- // Occurs when an Assembly is loaded
- internal static event AssemblyLoadEventHandler? AssemblyLoad;
-
- // Occurs when resolution of type fails
- internal static event ResolveEventHandler? TypeResolve;
-
- // Occurs when resolution of resource fails
- internal static event ResolveEventHandler? ResourceResolve;
-
- // Occurs when resolution of assembly fails
- // This event is fired after resolve events of AssemblyLoadContext fails
- internal static event ResolveEventHandler? AssemblyResolve;
-#endregion
-
- public static AssemblyLoadContext Default => DefaultAssemblyLoadContext.s_loadContext;
-
- public bool IsCollectible => _isCollectible;
-
- public string? Name => _name;
-
- public override string ToString() => "\"" + Name + "\" " + GetType().ToString() + " #" + _id;
-
- public static IEnumerable<AssemblyLoadContext> All
- {
- get
- {
- _ = AssemblyLoadContext.Default; // Ensure default is initialized
-
- List<WeakReference<AssemblyLoadContext>>? alcList = null;
- lock (s_allContexts)
- {
- // To make this thread safe we need a quick snapshot while locked
- alcList = new List<WeakReference<AssemblyLoadContext>>(s_allContexts.Values);
- }
-
- foreach (WeakReference<AssemblyLoadContext> weakAlc in alcList)
- {
- if (weakAlc.TryGetTarget(out AssemblyLoadContext? alc))
- {
- yield return alc;
- }
- }
- }
- }
-
- // Helper to return AssemblyName corresponding to the path of an IL assembly
- public static AssemblyName GetAssemblyName(string assemblyPath)
- {
- if (assemblyPath == null)
- {
- throw new ArgumentNullException(nameof(assemblyPath));
- }
-
- return AssemblyName.GetAssemblyName(assemblyPath);
- }
-
- // Custom AssemblyLoadContext implementations can override this
- // method to perform custom processing and use one of the protected
- // helpers above to load the assembly.
- protected virtual Assembly? Load(AssemblyName assemblyName)
- {
- return null;
- }
-
-#if !CORERT
- [System.Security.DynamicSecurityMethod] // Methods containing StackCrawlMark local var has to be marked DynamicSecurityMethod
- public Assembly LoadFromAssemblyName(AssemblyName assemblyName)
- {
- if (assemblyName == null)
- throw new ArgumentNullException(nameof(assemblyName));
-
- // Attempt to load the assembly, using the same ordering as static load, in the current load context.
- StackCrawlMark stackMark = StackCrawlMark.LookForMyCaller;
- return Assembly.Load(assemblyName, ref stackMark, this);
- }
-#endif
-
- // These methods load assemblies into the current AssemblyLoadContext
- // They may be used in the implementation of an AssemblyLoadContext derivation
- public Assembly LoadFromAssemblyPath(string assemblyPath)
- {
- if (assemblyPath == null)
- {
- throw new ArgumentNullException(nameof(assemblyPath));
- }
-
- if (PathInternal.IsPartiallyQualified(assemblyPath))
- {
- throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, assemblyPath), nameof(assemblyPath));
- }
-
- lock (_unloadLock)
- {
- VerifyIsAlive();
-
- return InternalLoadFromPath(assemblyPath, null);
- }
- }
-
- public Assembly LoadFromNativeImagePath(string nativeImagePath, string? assemblyPath)
- {
- if (nativeImagePath == null)
- {
- throw new ArgumentNullException(nameof(nativeImagePath));
- }
-
- if (PathInternal.IsPartiallyQualified(nativeImagePath))
- {
- throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, nativeImagePath), nameof(nativeImagePath));
- }
-
- if (assemblyPath != null && PathInternal.IsPartiallyQualified(assemblyPath))
- {
- throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, assemblyPath), nameof(assemblyPath));
- }
-
- lock (_unloadLock)
- {
- VerifyIsAlive();
-
- return InternalLoadFromPath(assemblyPath, nativeImagePath);
- }
- }
-
- public Assembly LoadFromStream(Stream assembly)
- {
- return LoadFromStream(assembly, null);
- }
-
- public Assembly LoadFromStream(Stream assembly, Stream? assemblySymbols)
- {
- if (assembly == null)
- {
- throw new ArgumentNullException(nameof(assembly));
- }
-
- int iAssemblyStreamLength = (int)assembly.Length;
-
- if (iAssemblyStreamLength <= 0)
- {
- throw new BadImageFormatException(SR.BadImageFormat_BadILFormat);
- }
-
- // Allocate the byte[] to hold the assembly
- byte[] arrAssembly = new byte[iAssemblyStreamLength];
-
- // Copy the assembly to the byte array
- assembly.Read(arrAssembly, 0, iAssemblyStreamLength);
-
- // Get the symbol stream in byte[] if provided
- byte[]? arrSymbols = null;
- if (assemblySymbols != null)
- {
- var iSymbolLength = (int)assemblySymbols.Length;
- arrSymbols = new byte[iSymbolLength];
-
- assemblySymbols.Read(arrSymbols, 0, iSymbolLength);
- }
-
- lock (_unloadLock)
- {
- VerifyIsAlive();
-
- return InternalLoad(arrAssembly, arrSymbols);
- }
- }
-
- // This method provides a way for overriders of LoadUnmanagedDll() to load an unmanaged DLL from a specific path in a
- // platform-independent way. The DLL is loaded with default load flags.
- protected IntPtr LoadUnmanagedDllFromPath(string unmanagedDllPath)
- {
- if (unmanagedDllPath == null)
- {
- throw new ArgumentNullException(nameof(unmanagedDllPath));
- }
-
- if (unmanagedDllPath.Length == 0)
- {
- throw new ArgumentException(SR.Argument_EmptyPath, nameof(unmanagedDllPath));
- }
-
- if (PathInternal.IsPartiallyQualified(unmanagedDllPath))
- {
- throw new ArgumentException(SR.Format(SR.Argument_AbsolutePathRequired, unmanagedDllPath), nameof(unmanagedDllPath));
- }
-
- return NativeLibrary.Load(unmanagedDllPath);
- }
-
- // Custom AssemblyLoadContext implementations can override this
- // method to perform the load of unmanaged native dll
- // This function needs to return the HMODULE of the dll it loads
- protected virtual IntPtr LoadUnmanagedDll(string unmanagedDllName)
- {
- // defer to default coreclr policy of loading unmanaged dll
- return IntPtr.Zero;
- }
-
- public void Unload()
- {
- if (!IsCollectible)
- {
- throw new InvalidOperationException(SR.AssemblyLoadContext_Unload_CannotUnloadIfNotCollectible);
- }
-
- GC.SuppressFinalize(this);
- InitiateUnload();
- }
-
- internal static void OnProcessExit()
- {
- lock (s_allContexts)
- {
- foreach (KeyValuePair<long, WeakReference<AssemblyLoadContext>> alcAlive in s_allContexts)
- {
- if (alcAlive.Value.TryGetTarget(out AssemblyLoadContext? alc))
- {
- alc.RaiseUnloadEvent();
- }
- }
- }
- }
-
- private void VerifyIsAlive()
- {
- if (_state != InternalState.Alive)
- {
- throw new InvalidOperationException(SR.AssemblyLoadContext_Verify_NotUnloading);
- }
- }
-
- private static AsyncLocal<AssemblyLoadContext?>? s_asyncLocalCurrent;
-
- /// <summary>Nullable current AssemblyLoadContext used for context sensitive reflection APIs</summary>
- /// <remarks>
- /// This is an advanced setting used in reflection assembly loading scenarios.
- ///
- /// There are a set of contextual reflection APIs which load managed assemblies through an inferred AssemblyLoadContext.
- /// * <see cref="System.Activator.CreateInstance" />
- /// * <see cref="System.Reflection.Assembly.Load" />
- /// * <see cref="System.Reflection.Assembly.GetType" />
- /// * <see cref="System.Type.GetType" />
- ///
- /// When CurrentContextualReflectionContext is null, the AssemblyLoadContext is inferred.
- /// The inference logic is simple.
- /// * For static methods, it is the AssemblyLoadContext which loaded the method caller's assembly.
- /// * For instance methods, it is the AssemblyLoadContext which loaded the instance's assembly.
- ///
- /// When this property is set, the CurrentContextualReflectionContext value is used by these contextual reflection APIs for loading.
- ///
- /// This property is typically set in a using block by
- /// <see cref="System.Runtime.Loader.AssemblyLoadContext.EnterContextualReflection"/>.
- ///
- /// The property is stored in an AsyncLocal&lt;AssemblyLoadContext&gt;. This means the setting can be unique for every async or thread in the process.
- ///
- /// For more details see https://github.com/dotnet/coreclr/blob/master/Documentation/design-docs/AssemblyLoadContext.ContextualReflection.md
- /// </remarks>
- public static AssemblyLoadContext? CurrentContextualReflectionContext => s_asyncLocalCurrent?.Value;
-
- private static void SetCurrentContextualReflectionContext(AssemblyLoadContext? value)
- {
- if (s_asyncLocalCurrent == null)
- {
- Interlocked.CompareExchange<AsyncLocal<AssemblyLoadContext?>?>(ref s_asyncLocalCurrent, new AsyncLocal<AssemblyLoadContext?>(), null);
- }
- s_asyncLocalCurrent!.Value = value; // Remove ! when compiler specially-recognizes CompareExchange for nullability
- }
-
- /// <summary>Enter scope using this AssemblyLoadContext for ContextualReflection</summary>
- /// <returns>A disposable ContextualReflectionScope for use in a using block</returns>
- /// <remarks>
- /// Sets CurrentContextualReflectionContext to this instance.
- /// <see cref="System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext"/>
- ///
- /// Returns a disposable ContextualReflectionScope for use in a using block. When the using calls the
- /// Dispose() method, it restores the ContextualReflectionScope to its previous value.
- /// </remarks>
- public ContextualReflectionScope EnterContextualReflection()
- {
- return new ContextualReflectionScope(this);
- }
-
- /// <summary>Enter scope using this AssemblyLoadContext for ContextualReflection</summary>
- /// <param name="activating">Set CurrentContextualReflectionContext to the AssemblyLoadContext which loaded activating.</param>
- /// <returns>A disposable ContextualReflectionScope for use in a using block</returns>
- /// <remarks>
- /// Sets CurrentContextualReflectionContext to to the AssemblyLoadContext which loaded activating.
- /// <see cref="System.Runtime.Loader.AssemblyLoadContext.CurrentContextualReflectionContext"/>
- ///
- /// Returns a disposable ContextualReflectionScope for use in a using block. When the using calls the
- /// Dispose() method, it restores the ContextualReflectionScope to its previous value.
- /// </remarks>
- public static ContextualReflectionScope EnterContextualReflection(Assembly? activating)
- {
- if (activating == null)
- return new ContextualReflectionScope(null);
-
- AssemblyLoadContext? assemblyLoadContext = GetLoadContext(activating);
-
- if (assemblyLoadContext == null)
- {
- // All RuntimeAssemblies & Only RuntimeAssemblies have an AssemblyLoadContext
- throw new ArgumentException(SR.Arg_MustBeRuntimeAssembly, nameof(activating));
- }
-
- return assemblyLoadContext.EnterContextualReflection();
- }
-
- /// <summary>Opaque disposable struct used to restore CurrentContextualReflectionContext</summary>
- /// <remarks>
- /// This is an implmentation detail of the AssemblyLoadContext.EnterContextualReflection APIs.
- /// It is a struct, to avoid heap allocation.
- /// It is required to be public to avoid boxing.
- /// <see cref="System.Runtime.Loader.AssemblyLoadContext.EnterContextualReflection"/>
- /// </remarks>
- [EditorBrowsable(EditorBrowsableState.Never)]
- public struct ContextualReflectionScope : IDisposable
- {
- private readonly AssemblyLoadContext? _activated;
- private readonly AssemblyLoadContext? _predecessor;
- private readonly bool _initialized;
-
- internal ContextualReflectionScope(AssemblyLoadContext? activating)
- {
- _predecessor = AssemblyLoadContext.CurrentContextualReflectionContext;
- AssemblyLoadContext.SetCurrentContextualReflectionContext(activating);
- _activated = activating;
- _initialized = true;
- }
-
- public void Dispose()
- {
- if (_initialized)
- {
- // Do not clear initialized. Always restore the _predecessor in Dispose()
- // _initialized = false;
- AssemblyLoadContext.SetCurrentContextualReflectionContext(_predecessor);
- }
- }
- }
-
-#if !CORERT
- // This method is invoked by the VM when using the host-provided assembly load context
- // implementation.
- private static Assembly? Resolve(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)
- {
- AssemblyLoadContext context = (AssemblyLoadContext)(GCHandle.FromIntPtr(gchManagedAssemblyLoadContext).Target)!;
-
- return context.ResolveUsingLoad(assemblyName);
- }
-
- // This method is invoked by the VM to resolve an assembly reference using the Resolving event
- // after trying assembly resolution via Load override and TPA load context without success.
- private static Assembly? ResolveUsingResolvingEvent(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)
- {
- AssemblyLoadContext context = (AssemblyLoadContext)(GCHandle.FromIntPtr(gchManagedAssemblyLoadContext).Target)!;
-
- // Invoke the AssemblyResolve event callbacks if wired up
- return context.ResolveUsingEvent(assemblyName);
- }
-
- // This method is invoked by the VM to resolve a satellite assembly reference
- // after trying assembly resolution via Load override without success.
- private static Assembly? ResolveSatelliteAssembly(IntPtr gchManagedAssemblyLoadContext, AssemblyName assemblyName)
- {
- AssemblyLoadContext context = (AssemblyLoadContext)(GCHandle.FromIntPtr(gchManagedAssemblyLoadContext).Target)!;
-
- // Invoke the ResolveSatelliteAssembly method
- return context.ResolveSatelliteAssembly(assemblyName);
- }
-
- private Assembly? GetFirstResolvedAssemblyFromResolvingEvent(AssemblyName assemblyName)
- {
- Assembly? resolvedAssembly = null;
-
- Func<AssemblyLoadContext, AssemblyName, Assembly>? resolvingHandler = _resolving;
-
- if (resolvingHandler != null)
- {
- // Loop through the event subscribers and return the first non-null Assembly instance
- foreach (Func<AssemblyLoadContext, AssemblyName, Assembly> handler in resolvingHandler.GetInvocationList())
- {
- resolvedAssembly = handler(this, assemblyName);
-#if CORECLR
- if (AssemblyLoadContext.IsTracingEnabled())
- {
- AssemblyLoadContext.TraceResolvingHandlerInvoked(
- assemblyName.FullName,
- handler.Method.Name,
- this != AssemblyLoadContext.Default ? ToString() : Name,
- resolvedAssembly?.FullName,
- resolvedAssembly != null && !resolvedAssembly.IsDynamic ? resolvedAssembly.Location : null);
- }
-#endif // CORECLR
- if (resolvedAssembly != null)
- {
- return resolvedAssembly;
- }
- }
- }
-
- return null;
- }
-
- private static Assembly ValidateAssemblyNameWithSimpleName(Assembly assembly, string? requestedSimpleName)
- {
- if (string.IsNullOrEmpty(requestedSimpleName))
- {
- throw new ArgumentException(SR.ArgumentNull_AssemblyNameName);
- }
-
- // Get the name of the loaded assembly
- string? loadedSimpleName = null;
-
- // Derived type's Load implementation is expected to use one of the LoadFrom* methods to get the assembly
- // which is a RuntimeAssembly instance. However, since Assembly type can be used build any other artifact (e.g. AssemblyBuilder),
- // we need to check for RuntimeAssembly.
- RuntimeAssembly? rtLoadedAssembly = assembly as RuntimeAssembly;
- if (rtLoadedAssembly != null)
- {
- loadedSimpleName = rtLoadedAssembly.GetSimpleName();
- }
-
- // The simple names should match at the very least
- if (string.IsNullOrEmpty(loadedSimpleName) || !requestedSimpleName.Equals(loadedSimpleName, StringComparison.InvariantCultureIgnoreCase))
- {
- throw new InvalidOperationException(SR.Argument_CustomAssemblyLoadContextRequestedNameMismatch);
- }
-
- return assembly;
- }
-
- private Assembly? ResolveUsingLoad(AssemblyName assemblyName)
- {
- string? simpleName = assemblyName.Name;
- Assembly? assembly = Load(assemblyName);
-
- if (assembly != null)
- {
- assembly = ValidateAssemblyNameWithSimpleName(assembly, simpleName);
- }
-
- return assembly;
- }
-
- private Assembly? ResolveUsingEvent(AssemblyName assemblyName)
- {
- string? simpleName = assemblyName.Name;
-
- // Invoke the Resolving event callbacks if wired up
- Assembly? assembly = GetFirstResolvedAssemblyFromResolvingEvent(assemblyName);
- if (assembly != null)
- {
- assembly = ValidateAssemblyNameWithSimpleName(assembly, simpleName);
- }
-
- return assembly;
- }
-
- // This method is called by the VM.
- private static void OnAssemblyLoad(RuntimeAssembly assembly)
- {
- AssemblyLoad?.Invoke(AppDomain.CurrentDomain, new AssemblyLoadEventArgs(assembly));
- }
-
- // This method is called by the VM.
- private static RuntimeAssembly? OnResourceResolve(RuntimeAssembly assembly, string resourceName)
- {
- return InvokeResolveEvent(ResourceResolve, assembly, resourceName);
- }
-
- // This method is called by the VM
- private static RuntimeAssembly? OnTypeResolve(RuntimeAssembly assembly, string typeName)
- {
- return InvokeResolveEvent(TypeResolve, assembly, typeName);
- }
-
- // This method is called by the VM.
- private static RuntimeAssembly? OnAssemblyResolve(RuntimeAssembly assembly, string assemblyFullName)
- {
- return InvokeResolveEvent(AssemblyResolve, assembly, assemblyFullName);
- }
-
- private static RuntimeAssembly? InvokeResolveEvent(ResolveEventHandler? eventHandler, RuntimeAssembly assembly, string name)
- {
- if (eventHandler == null)
- return null;
-
- var args = new ResolveEventArgs(name, assembly);
-
- foreach (ResolveEventHandler handler in eventHandler.GetInvocationList())
- {
- Assembly? asm = handler(AppDomain.CurrentDomain, args);
-#if CORECLR
- if (eventHandler == AssemblyResolve && AssemblyLoadContext.IsTracingEnabled())
- {
- AssemblyLoadContext.TraceAssemblyResolveHandlerInvoked(
- name,
- handler.Method.Name,
- asm?.FullName,
- asm != null && !asm.IsDynamic ? asm.Location : null);
- }
-#endif // CORECLR
- RuntimeAssembly? ret = GetRuntimeAssembly(asm);
- if (ret != null)
- return ret;
- }
-
- return null;
- }
-#endif // !CORERT
-
- private Assembly? ResolveSatelliteAssembly(AssemblyName assemblyName)
- {
- // Called by native runtime when CultureName is not empty
- Debug.Assert(assemblyName.CultureName?.Length > 0);
-
- const string SatelliteSuffix = ".resources";
-
- if (assemblyName.Name == null || !assemblyName.Name.EndsWith(SatelliteSuffix, StringComparison.Ordinal))
- return null;
-
- string parentAssemblyName = assemblyName.Name.Substring(0, assemblyName.Name.Length - SatelliteSuffix.Length);
-
- Assembly parentAssembly = LoadFromAssemblyName(new AssemblyName(parentAssemblyName));
-
- AssemblyLoadContext parentALC = GetLoadContext(parentAssembly)!;
-
- string parentDirectory = Path.GetDirectoryName(parentAssembly.Location)!;
-
- string assemblyPath = Path.Combine(parentDirectory, assemblyName.CultureName!, $"{assemblyName.Name}.dll");
-
- if (Internal.IO.File.InternalExists(assemblyPath))
- {
- return parentALC.LoadFromAssemblyPath(assemblyPath);
- }
- else if (Path.IsCaseSensitive)
- {
- assemblyPath = Path.Combine(parentDirectory, assemblyName.CultureName!.ToLowerInvariant(), $"{assemblyName.Name}.dll");
-
- if (Internal.IO.File.InternalExists(assemblyPath))
- {
- return parentALC.LoadFromAssemblyPath(assemblyPath);
- }
- }
-
- return null;
- }
-
- internal IntPtr GetResolvedUnmanagedDll(Assembly assembly, string unmanagedDllName)
- {
- IntPtr resolvedDll = IntPtr.Zero;
-
- Func<Assembly, string, IntPtr>? dllResolveHandler = _resolvingUnmanagedDll;
-
- if (dllResolveHandler != null)
- {
- // Loop through the event subscribers and return the first non-null native library handle
- foreach (Func<Assembly, string, IntPtr> handler in dllResolveHandler.GetInvocationList())
- {
- resolvedDll = handler(assembly, unmanagedDllName);
- if (resolvedDll != IntPtr.Zero)
- {
- return resolvedDll;
- }
- }
- }
-
- return IntPtr.Zero;
- }
- }
-
- internal sealed class DefaultAssemblyLoadContext : AssemblyLoadContext
- {
- internal static readonly AssemblyLoadContext s_loadContext = new DefaultAssemblyLoadContext();
-
- internal DefaultAssemblyLoadContext() : base(true, false, "Default")
- {
- }
- }
-
- internal sealed class IndividualAssemblyLoadContext : AssemblyLoadContext
- {
- internal IndividualAssemblyLoadContext(string name) : base(false, false, name)
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Loader/LibraryNameVariation.Unix.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Loader/LibraryNameVariation.Unix.cs
deleted file mode 100644
index f83ceae0dee..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Loader/LibraryNameVariation.Unix.cs
+++ /dev/null
@@ -1,68 +0,0 @@
-// 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.Collections.Generic;
-using System.IO;
-
-namespace System.Runtime.Loader
-{
- internal partial struct LibraryNameVariation
- {
- private const string LibraryNamePrefix = "lib";
-#if PLATFORM_OSX
- private const string LibraryNameSuffix = ".dylib";
-#else
- private const string LibraryNameSuffix = ".so";
-#endif
-
- internal static IEnumerable<LibraryNameVariation> DetermineLibraryNameVariations(string libName, bool isRelativePath)
- {
- // This is a copy of the logic in DetermineLibNameVariations in dllimport.cpp in CoreCLR
-
- if (!isRelativePath)
- {
- yield return new LibraryNameVariation(string.Empty, string.Empty);
- }
- else
- {
- bool containsSuffix = false;
- int indexOfSuffix = libName.IndexOf(LibraryNameSuffix, StringComparison.OrdinalIgnoreCase);
- if (indexOfSuffix >= 0)
- {
- indexOfSuffix += LibraryNameSuffix.Length;
- containsSuffix = indexOfSuffix == libName.Length || libName[indexOfSuffix] == '.';
- }
-
- bool containsDelim = libName.Contains(Path.DirectorySeparatorChar);
-
- if (containsSuffix)
- {
- yield return new LibraryNameVariation(string.Empty, string.Empty);
- if (!containsDelim)
- {
- yield return new LibraryNameVariation(LibraryNamePrefix, string.Empty);
- }
- yield return new LibraryNameVariation(string.Empty, LibraryNameSuffix);
- if (!containsDelim)
- {
- yield return new LibraryNameVariation(LibraryNamePrefix, LibraryNameSuffix);
- }
- }
- else
- {
- yield return new LibraryNameVariation(string.Empty, LibraryNameSuffix);
- if (!containsDelim)
- {
- yield return new LibraryNameVariation(LibraryNamePrefix, LibraryNameSuffix);
- }
- yield return new LibraryNameVariation(string.Empty, string.Empty);
- if (!containsDelim)
- {
- yield return new LibraryNameVariation(LibraryNamePrefix, string.Empty);
- }
- }
- }
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Loader/LibraryNameVariation.Windows.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Loader/LibraryNameVariation.Windows.cs
deleted file mode 100644
index 64b9e17075a..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Loader/LibraryNameVariation.Windows.cs
+++ /dev/null
@@ -1,27 +0,0 @@
-// 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.Collections.Generic;
-
-namespace System.Runtime.Loader
-{
- internal partial struct LibraryNameVariation
- {
- private const string LibraryNameSuffix = ".dll";
-
- internal static IEnumerable<LibraryNameVariation> DetermineLibraryNameVariations(string libName, bool isRelativePath)
- {
- // This is a copy of the logic in DetermineLibNameVariations in dllimport.cpp in CoreCLR
-
- yield return new LibraryNameVariation(string.Empty, string.Empty);
-
- if (isRelativePath &&
- !libName.EndsWith(".dll", StringComparison.OrdinalIgnoreCase) &&
- !libName.EndsWith(".exe", StringComparison.OrdinalIgnoreCase))
- {
- yield return new LibraryNameVariation(string.Empty, LibraryNameSuffix);
- }
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Loader/LibraryNameVariation.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Loader/LibraryNameVariation.cs
deleted file mode 100644
index 2b11f8a9bef..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Loader/LibraryNameVariation.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-// 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.Runtime.Loader
-{
- internal partial struct LibraryNameVariation
- {
- public string Prefix;
- public string Suffix;
-
- public LibraryNameVariation(string prefix, string suffix)
- {
- Prefix = prefix;
- Suffix = suffix;
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/MemoryFailPoint.Unix.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/MemoryFailPoint.Unix.cs
deleted file mode 100644
index b63068eb26a..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/MemoryFailPoint.Unix.cs
+++ /dev/null
@@ -1,40 +0,0 @@
-// 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.Runtime
-{
- public sealed partial class MemoryFailPoint
- {
- private static ulong GetTopOfMemory()
- {
- // These values are optimistic assumptions. In reality the value will
- // often be lower.
- return IntPtr.Size == 4 ? uint.MaxValue : ulong.MaxValue;
- }
-
- private static bool CheckForAvailableMemory(out ulong availPageFile, out ulong totalAddressSpaceFree)
- {
- // TODO: Implement
- availPageFile = 0;
- totalAddressSpaceFree = 0;
- return false;
- }
-
- // Based on the shouldThrow parameter, this will throw an exception, or
- // returns whether there is enough space. In all cases, we update
- // our last known free address space, hopefully avoiding needing to
- // probe again.
- private static void CheckForFreeAddressSpace(ulong size, bool shouldThrow)
- {
- // Unreachable until CheckForAvailableMemory is implemented
- }
-
- // Allocate a specified number of bytes, commit them and free them. This should enlarge
- // page file if necessary and possible.
- private static void GrowPageFileIfNecessaryAndPossible(UIntPtr numBytes)
- {
- // Unreachable until CheckForAvailableMemory is implemented
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/MemoryFailPoint.Windows.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/MemoryFailPoint.Windows.cs
deleted file mode 100644
index 7a8ed0c1d18..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/MemoryFailPoint.Windows.cs
+++ /dev/null
@@ -1,102 +0,0 @@
-// 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.IO;
-
-namespace System.Runtime
-{
- public sealed partial class MemoryFailPoint
- {
- private static ulong GetTopOfMemory()
- {
- Interop.Kernel32.GetSystemInfo(out Interop.Kernel32.SYSTEM_INFO info);
- return (ulong)info.lpMaximumApplicationAddress;
- }
-
- private static bool CheckForAvailableMemory(out ulong availPageFile, out ulong totalAddressSpaceFree)
- {
- bool r;
- Interop.Kernel32.MEMORYSTATUSEX memory = default;
- r = Interop.Kernel32.GlobalMemoryStatusEx(ref memory);
- if (!r)
- throw Win32Marshal.GetExceptionForLastWin32Error();
- availPageFile = memory.availPageFile;
- totalAddressSpaceFree = memory.availVirtual;
- // Console.WriteLine($"Memory gate: Mem load: {memory.memoryLoad}% Available memory (physical + page file): {(memory.availPageFile >> 20)} MB Total free address space: {memory.availVirtual >> 20} MB GC Heap: {(GC.GetTotalMemory(true) >> 20)} MB");
- return true;
- }
-
- // Based on the shouldThrow parameter, this will throw an exception.
- // In all cases, we update our last known free address space, hopefully
- // avoiding needing to probe again.
- private static unsafe void CheckForFreeAddressSpace(ulong size, bool shouldThrow)
- {
- // Start walking the address space at 0. VirtualAlloc may wrap
- // around the address space. We don't need to find the exact
- // pages that VirtualAlloc would return - we just need to
- // know whether VirtualAlloc could succeed.
- ulong freeSpaceAfterGCHeap = MemFreeAfterAddress(null, size);
-
- // Console.WriteLine($"MemoryFailPoint: Checked for free VA space. Found enough? {(freeSpaceAfterGCHeap >= size)} Asked for: {size} Found: {freeSpaceAfterGCHeap}");
-
- // We may set these without taking a lock - I don't believe
- // this will hurt, as long as we never increment this number in
- // the Dispose method. If we do an extra bit of checking every
- // once in a while, but we avoid taking a lock, we may win.
- LastKnownFreeAddressSpace = (long)freeSpaceAfterGCHeap;
- LastTimeCheckingAddressSpace = Environment.TickCount;
-
- if (freeSpaceAfterGCHeap < size && shouldThrow)
- throw new InsufficientMemoryException(SR.InsufficientMemory_MemFailPoint_VAFrag);
- }
-
- // Returns the amount of consecutive free memory available in a block
- // of pages. If we didn't have enough address space, we still return
- // a positive value < size, to help potentially avoid the overhead of
- // this check if we use a MemoryFailPoint with a smaller size next.
- private static unsafe ulong MemFreeAfterAddress(void* address, ulong size)
- {
- if (size >= s_topOfMemory)
- return 0;
-
- ulong largestFreeRegion = 0;
- Interop.Kernel32.MEMORY_BASIC_INFORMATION memInfo = default;
- UIntPtr sizeOfMemInfo = (UIntPtr)sizeof(Interop.Kernel32.MEMORY_BASIC_INFORMATION);
-
- while (((ulong)address) + size < s_topOfMemory)
- {
- UIntPtr r = Interop.Kernel32.VirtualQuery(address, ref memInfo, sizeOfMemInfo);
- if (r == UIntPtr.Zero)
- throw Win32Marshal.GetExceptionForLastWin32Error();
-
- ulong regionSize = memInfo.RegionSize.ToUInt64();
- if (memInfo.State == Interop.Kernel32.MEM_FREE)
- {
- if (regionSize >= size)
- return regionSize;
- else
- largestFreeRegion = Math.Max(largestFreeRegion, regionSize);
- }
- address = (void*)((ulong)address + regionSize);
- }
- return largestFreeRegion;
- }
-
- // Allocate a specified number of bytes, commit them and free them. This should enlarge
- // page file if necessary and possible.
- private static void GrowPageFileIfNecessaryAndPossible(UIntPtr numBytes)
- {
- unsafe
- {
- void* pMemory = Interop.Kernel32.VirtualAlloc(null, numBytes, Interop.Kernel32.MEM_COMMIT, Interop.Kernel32.PAGE_READWRITE);
- if (pMemory != null)
- {
- bool r = Interop.Kernel32.VirtualFree(pMemory, UIntPtr.Zero, Interop.Kernel32.MEM_RELEASE);
- if (!r)
- throw Win32Marshal.GetExceptionForLastWin32Error();
- }
- }
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/MemoryFailPoint.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/MemoryFailPoint.cs
deleted file mode 100644
index 04dcc95d38d..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/MemoryFailPoint.cs
+++ /dev/null
@@ -1,404 +0,0 @@
-// 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.
-
-/*============================================================
-**
-**
-**
-** Provides a way for an app to not start an operation unless
-** there's a reasonable chance there's enough memory
-** available for the operation to succeed.
-**
-**
-===========================================================*/
-
-using System.Threading;
-using System.Runtime.CompilerServices;
-using System.Runtime.ConstrainedExecution;
-using System.Diagnostics;
-
-/*
- This class allows an application to fail before starting certain
- activities. The idea is to fail early instead of failing in the middle
- of some long-running operation to increase the survivability of the
- application and ensure you don't have to write tricky code to handle an
- OOM anywhere in your app's code (which implies state corruption, meaning you
- should unload the appdomain, if you have a transacted environment to ensure
- rollback of individual transactions). This is an incomplete tool to attempt
- hoisting all your OOM failures from anywhere in your worker methods to one
- particular point where it is easier to handle an OOM failure, and you can
- optionally choose to not start a workitem if it will likely fail. This does
- not help the performance of your code directly (other than helping to avoid
- AD unloads). The point is to avoid starting work if it is likely to fail.
- The Enterprise Services team has used these memory gates effectively in the
- unmanaged world for a decade.
-
- In Whidbey, we will simply check to see if there is enough memory available
- in the OS's page file & attempt to ensure there might be enough space free
- within the process's address space (checking for address space fragmentation
- as well). We will not commit or reserve any memory. To avoid race conditions with
- other threads using MemoryFailPoints, we'll also keep track of a
- process-wide amount of memory "reserved" via all currently-active
- MemoryFailPoints. This has two problems:
- 1) This can account for memory twice. If a thread creates a
- MemoryFailPoint for 100 MB then allocates 99 MB, we'll see 99 MB
- less free memory and 100 MB less reserved memory. Yet, subtracting
- off the 100 MB is necessary because the thread may not have started
- allocating memory yet. Disposing of this class immediately after
- front-loaded allocations have completed is a great idea.
- 2) This is still vulnerable to race conditions with other threads that don't use
- MemoryFailPoints.
- So this class is far from perfect. But it may be good enough to
- meaningfully reduce the frequency of OutOfMemoryExceptions in managed apps.
-
- In Orcas or later, we might allocate some memory from the OS and add it
- to a allocation context for this thread. Obviously, at that point we need
- some way of conveying when we release this block of memory. So, we
- implemented IDisposable on this type in Whidbey and expect all users to call
- this from within a using block to provide lexical scope for their memory
- usage. The call to Dispose (implicit with the using block) will give us an
- opportunity to release this memory, perhaps. We anticipate this will give
- us the possibility of a more effective design in a future version.
-
- In Orcas, we may also need to differentiate between allocations that would
- go into the normal managed heap vs. the large object heap, or we should
- consider checking for enough free space in both locations (with any
- appropriate adjustments to ensure the memory is contiguous).
-*/
-
-namespace System.Runtime
-{
- public sealed partial class MemoryFailPoint : CriticalFinalizerObject, IDisposable
- {
- // Find the top section of user mode memory. Avoid the last 64K.
- // Windows reserves that block for the kernel, apparently, and doesn't
- // let us ask about that memory. But since we ask for memory in 1 MB
- // chunks, we don't have to special case this. Also, we need to
- // deal with 32 bit machines in 3 GB mode.
- // Using Win32's GetSystemInfo should handle all this for us.
- private static readonly ulong s_topOfMemory = GetTopOfMemory();
-
- // Walking the address space is somewhat expensive, taking around half
- // a millisecond. Doing that per transaction limits us to a max of
- // ~2000 transactions/second. Instead, let's do this address space
- // walk once every 10 seconds, or when we will likely fail. This
- // amortization scheme can reduce the cost of a memory gate by about
- // a factor of 100.
- private static long s_hiddenLastKnownFreeAddressSpace = 0;
- private static long s_hiddenLastTimeCheckingAddressSpace = 0;
- private const int CheckThreshold = 10 * 1000; // 10 seconds
-
- private static long LastKnownFreeAddressSpace
- {
- get => Volatile.Read(ref s_hiddenLastKnownFreeAddressSpace);
- set => Volatile.Write(ref s_hiddenLastKnownFreeAddressSpace, value);
- }
-
- private static void AddToLastKnownFreeAddressSpace(long addend) =>
- Interlocked.Add(ref s_hiddenLastKnownFreeAddressSpace, addend);
-
- private static long LastTimeCheckingAddressSpace
- {
- get => Volatile.Read(ref s_hiddenLastTimeCheckingAddressSpace);
- set => Volatile.Write(ref s_hiddenLastTimeCheckingAddressSpace, value);
- }
-
- // When allocating memory segment by segment, we've hit some cases
- // where there are only 22 MB of memory available on the machine,
- // we need 1 16 MB segment, and the OS does not succeed in giving us
- // that memory. Reasons for this could include:
- // 1) The GC does allocate memory when doing a collection.
- // 2) Another process on the machine could grab that memory.
- // 3) Some other part of the runtime might grab this memory.
- // If we build in a little padding, we can help protect
- // ourselves against some of these cases, and we want to err on the
- // conservative side with this class.
- private const int LowMemoryFudgeFactor = 16 << 20;
-
- // Round requested size to a 16MB multiple to have a better granularity
- // when checking for available memory.
- private const int MemoryCheckGranularity = 16;
-
- // Note: This may become dynamically tunable in the future.
- // Also note that we can have different segment sizes for the normal vs.
- // large object heap. We currently use the max of the two.
- private static readonly ulong s_GCSegmentSize = GC.GetSegmentSize();
-
- // For multi-threaded workers, we want to ensure that if two workers
- // use a MemoryFailPoint at the same time, and they both succeed, that
- // they don't trample over each other's memory. Keep a process-wide
- // count of "reserved" memory, and decrement this in Dispose and
- // in the critical finalizer.
- private static long s_failPointReservedMemory;
-
- private readonly ulong _reservedMemory; // The size of this request (from user)
- private bool _mustSubtractReservation; // Did we add data to SharedStatics?
-
- // We can remove this link demand in a future version - we will
- // have scenarios for this in partial trust in the future, but
- // we're doing this just to restrict this in case the code below
- // is somehow incorrect.
- public MemoryFailPoint(int sizeInMegabytes)
- {
- if (sizeInMegabytes <= 0)
- throw new ArgumentOutOfRangeException(nameof(sizeInMegabytes), SR.ArgumentOutOfRange_NeedNonNegNum);
-
- ulong size = ((ulong)sizeInMegabytes) << 20;
- _reservedMemory = size;
-
- // Check to see that we both have enough memory on the system
- // and that we have enough room within the user section of the
- // process's address space. Also, we need to use the GC segment
- // size, not the amount of memory the user wants to allocate.
- // Consider correcting this to reflect free memory within the GC
- // heap, and to check both the normal & large object heaps.
- ulong segmentSize = (ulong)(Math.Ceiling((double)size / s_GCSegmentSize) * s_GCSegmentSize);
- if (segmentSize >= s_topOfMemory)
- throw new InsufficientMemoryException(SR.InsufficientMemory_MemFailPoint_TooBig);
-
- ulong requestedSizeRounded = (ulong)(Math.Ceiling((double)sizeInMegabytes / MemoryCheckGranularity) * MemoryCheckGranularity);
- // re-convert into bytes
- requestedSizeRounded <<= 20;
-
- ulong availPageFile = 0; // available VM (physical + page file)
- ulong totalAddressSpaceFree = 0; // non-contiguous free address space
-
- // Check for available memory, with 2 attempts at getting more
- // memory.
- // Stage 0: If we don't have enough, trigger a GC.
- // Stage 1: If we don't have enough, try growing the swap file.
- // Stage 2: Update memory state, then fail or leave loop.
- //
- // (In the future, we could consider adding another stage after
- // Stage 0 to run finalizers. However, before doing that make sure
- // that we could abort this constructor when we call
- // GC.WaitForPendingFinalizers, noting that this method uses a CER
- // so it can't be aborted, and we have a critical finalizer. It
- // would probably work, but do some thinking first.)
- for (int stage = 0; stage < 3; stage++)
- {
- if (!CheckForAvailableMemory(out availPageFile, out totalAddressSpaceFree))
- {
- // _mustSubtractReservation == false
- return;
- }
-
- // If we have enough room, then skip some stages.
- // Note that multiple threads can still lead to a race condition for our free chunk
- // of address space, which can't be easily solved.
- ulong reserved = MemoryFailPointReservedMemory;
- ulong segPlusReserved = segmentSize + reserved;
- bool overflow = segPlusReserved < segmentSize || segPlusReserved < reserved;
- bool needPageFile = availPageFile < (requestedSizeRounded + reserved + LowMemoryFudgeFactor) || overflow;
- bool needAddressSpace = totalAddressSpaceFree < segPlusReserved || overflow;
-
- // Ensure our cached amount of free address space is not stale.
- long now = Environment.TickCount; // Handle wraparound.
- if (now > LastTimeCheckingAddressSpace + CheckThreshold || now < LastTimeCheckingAddressSpace ||
- LastKnownFreeAddressSpace < (long)segmentSize)
- {
- CheckForFreeAddressSpace(segmentSize, false);
- }
- bool needContiguousVASpace = (ulong)LastKnownFreeAddressSpace < segmentSize;
-
-#if false
- Console.WriteLine($"MemoryFailPoint:" +
- $"Checking for {(segmentSize >> 20)} MB, " +
- $"for allocation size of {sizeInMegabytes} MB, " +
- $"stage {stage}. " +
- $"Need page file? {needPageFile} " +
- $"Need Address Space? {needAddressSpace} " +
- $"Need Contiguous address space? {needContiguousVASpace} " +
- $"Avail page file: {(availPageFile >> 20)} MB " +
- $"Total free VA space: {totalAddressSpaceFree >> 20} MB " +
- $"Contiguous free address space (found): {LastKnownFreeAddressSpace >> 20} MB " +
- $"Space reserved via process's MemoryFailPoints: {reserved} MB");
-#endif
-
- if (!needPageFile && !needAddressSpace && !needContiguousVASpace)
- break;
-
- switch (stage)
- {
- case 0:
- // The GC will release empty segments to the OS. This will
- // relieve us from having to guess whether there's
- // enough memory in either GC heap, and whether
- // internal fragmentation will prevent those
- // allocations from succeeding.
- GC.Collect();
- continue;
-
- case 1:
- // Do this step if and only if the page file is too small.
- if (!needPageFile)
- continue;
-
- // Attempt to grow the OS's page file. Note that we ignore
- // any allocation routines from the host intentionally.
- RuntimeHelpers.PrepareConstrainedRegions();
-
- // This shouldn't overflow due to the if clauses above.
- UIntPtr numBytes = new UIntPtr(segmentSize);
- GrowPageFileIfNecessaryAndPossible(numBytes);
- continue;
-
- case 2:
- // The call to CheckForAvailableMemory above updated our
- // state.
- if (needPageFile || needAddressSpace)
- {
- InsufficientMemoryException e = new InsufficientMemoryException(SR.InsufficientMemory_MemFailPoint);
-#if DEBUG
- e.Data["MemFailPointState"] = new MemoryFailPointState(sizeInMegabytes, segmentSize,
- needPageFile, needAddressSpace, needContiguousVASpace,
- availPageFile >> 20, totalAddressSpaceFree >> 20,
- LastKnownFreeAddressSpace >> 20, reserved);
-#endif
- throw e;
- }
-
- if (needContiguousVASpace)
- {
- InsufficientMemoryException e = new InsufficientMemoryException(SR.InsufficientMemory_MemFailPoint_VAFrag);
-#if DEBUG
- e.Data["MemFailPointState"] = new MemoryFailPointState(sizeInMegabytes, segmentSize,
- needPageFile, needAddressSpace, needContiguousVASpace,
- availPageFile >> 20, totalAddressSpaceFree >> 20,
- LastKnownFreeAddressSpace >> 20, reserved);
-#endif
- throw e;
- }
-
- break;
-
- default:
- Debug.Fail("Fell through switch statement!");
- break;
- }
- }
-
- // Success - we have enough room the last time we checked.
- // Now update our shared state in a somewhat atomic fashion
- // and handle a simple race condition with other MemoryFailPoint instances.
- AddToLastKnownFreeAddressSpace(-((long)size));
- if (LastKnownFreeAddressSpace < 0)
- CheckForFreeAddressSpace(segmentSize, true);
-
- RuntimeHelpers.PrepareConstrainedRegions();
-
- AddMemoryFailPointReservation((long)size);
- _mustSubtractReservation = true;
- }
-
- ~MemoryFailPoint()
- {
- Dispose(false);
- }
-
- // Applications must call Dispose, which conceptually "releases" the
- // memory that was "reserved" by the MemoryFailPoint. This affects a
- // global count of reserved memory in this version (helping to throttle
- // future MemoryFailPoints) in this version. We may in the
- // future create an allocation context and release it in the Dispose
- // method. While the finalizer will eventually free this block of
- // memory, apps will help their performance greatly by calling Dispose.
- public void Dispose()
- {
- Dispose(true);
- GC.SuppressFinalize(this);
- }
-
- private void Dispose(bool disposing)
- {
- // This is just bookkeeping to ensure multiple threads can really
- // get enough memory, and this does not actually reserve memory
- // within the GC heap.
- if (_mustSubtractReservation)
- {
- RuntimeHelpers.PrepareConstrainedRegions();
-
- AddMemoryFailPointReservation(-((long)_reservedMemory));
- _mustSubtractReservation = false;
- }
-
- /*
- // Prototype performance
- // Let's pretend that we returned at least some free memory to
- // the GC heap. We don't know this is true - the objects could
- // have a longer lifetime, and the memory could be elsewhere in the
- // GC heap. Additionally, we subtracted off the segment size, not
- // this size. That's ok - we don't mind if this slowly degrades
- // and requires us to refresh the value a little bit sooner.
- // But releasing the memory here should help us avoid probing for
- // free address space excessively with large workItem sizes.
- Interlocked.Add(ref LastKnownFreeAddressSpace, _reservedMemory);
- */
- }
-
- internal static long AddMemoryFailPointReservation(long size) =>
- // Size can legitimately be negative - see Dispose.
- Interlocked.Add(ref s_failPointReservedMemory, (long)size);
-
- internal static ulong MemoryFailPointReservedMemory
- {
- get
- {
- Debug.Assert(Volatile.Read(ref s_failPointReservedMemory) >= 0, "Process-wide MemoryFailPoint reserved memory was negative!");
- return (ulong)Volatile.Read(ref s_failPointReservedMemory);
- }
- }
-
-#if DEBUG
- [Serializable]
- internal sealed class MemoryFailPointState
- {
- private readonly ulong _segmentSize;
- private readonly int _allocationSizeInMB;
- private readonly bool _needPageFile;
- private readonly bool _needAddressSpace;
- private readonly bool _needContiguousVASpace;
- private readonly ulong _availPageFile;
- private readonly ulong _totalFreeAddressSpace;
- private readonly long _lastKnownFreeAddressSpace;
- private readonly ulong _reservedMem;
- private readonly string _stackTrace; // Where did we fail, for additional debugging.
-
- internal MemoryFailPointState(int allocationSizeInMB, ulong segmentSize, bool needPageFile, bool needAddressSpace, bool needContiguousVASpace, ulong availPageFile, ulong totalFreeAddressSpace, long lastKnownFreeAddressSpace, ulong reservedMem)
- {
- _allocationSizeInMB = allocationSizeInMB;
- _segmentSize = segmentSize;
- _needPageFile = needPageFile;
- _needAddressSpace = needAddressSpace;
- _needContiguousVASpace = needContiguousVASpace;
- _availPageFile = availPageFile;
- _totalFreeAddressSpace = totalFreeAddressSpace;
- _lastKnownFreeAddressSpace = lastKnownFreeAddressSpace;
- _reservedMem = reservedMem;
- try
- {
- _stackTrace = Environment.StackTrace;
- }
- catch (System.Security.SecurityException)
- {
- _stackTrace = "no permission";
- }
- catch (OutOfMemoryException)
- {
- _stackTrace = "out of memory";
- }
- }
-
- public override string ToString()
- {
- return string.Format(System.Globalization.CultureInfo.InvariantCulture, "MemoryFailPoint detected insufficient memory to guarantee an operation could complete. Checked for {0} MB, for allocation size of {1} MB. Need page file? {2} Need Address Space? {3} Need Contiguous address space? {4} Avail page file: {5} MB Total free VA space: {6} MB Contiguous free address space (found): {7} MB Space reserved by process's MemoryFailPoints: {8} MB",
- _segmentSize >> 20, _allocationSizeInMB, _needPageFile,
- _needAddressSpace, _needContiguousVASpace,
- _availPageFile >> 20, _totalFreeAddressSpace >> 20,
- _lastKnownFreeAddressSpace >> 20, _reservedMem);
- }
- }
-#endif
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Remoting/ObjectHandle.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Remoting/ObjectHandle.cs
deleted file mode 100644
index 9dd987ac5d2..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Remoting/ObjectHandle.cs
+++ /dev/null
@@ -1,21 +0,0 @@
-// 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.Runtime.Remoting
-{
- public class ObjectHandle : MarshalByRefObject
- {
- private readonly object? _wrappedObject;
-
- public ObjectHandle(object? o)
- {
- _wrappedObject = o;
- }
-
- public object? Unwrap()
- {
- return _wrappedObject;
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/DeserializationToken.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/DeserializationToken.cs
deleted file mode 100644
index 2be35a6553f..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/DeserializationToken.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-// 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.Runtime.Serialization
-{
- // Tracks whether deserialization is currently in progress
- public readonly struct DeserializationToken : IDisposable
- {
- private readonly DeserializationTracker? _tracker;
-
- internal DeserializationToken(DeserializationTracker? tracker)
- {
- _tracker = tracker;
- }
-
- // If this token owned the DeserializationTracker, turn off DeserializationInProgress tracking
- public void Dispose()
- {
- if (_tracker != null && _tracker.DeserializationInProgress)
- {
- lock (_tracker)
- {
- if (_tracker.DeserializationInProgress)
- {
- _tracker.DeserializationInProgress = false;
- SerializationInfo.AsyncDeserializationInProgress.Value = false;
- }
- }
- }
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/DeserializationTracker.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/DeserializationTracker.cs
deleted file mode 100644
index 1662ee02d4a..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/DeserializationTracker.cs
+++ /dev/null
@@ -1,14 +0,0 @@
-// 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.Runtime.Serialization
-{
- // Tracks whether deserialization is currently in progress
- internal sealed class DeserializationTracker
- {
- // True if the thread this tracker applies to is currently deserializing
- // potentially untrusted data
- internal bool DeserializationInProgress { get; set; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/IDeserializationCallback.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/IDeserializationCallback.cs
deleted file mode 100644
index 22b799c78f4..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/IDeserializationCallback.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-// 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.Runtime.Serialization
-{
- public interface IDeserializationCallback
- {
- void OnDeserialization(object? sender);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/IFormatterConverter.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/IFormatterConverter.cs
deleted file mode 100644
index 663123b243b..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/IFormatterConverter.cs
+++ /dev/null
@@ -1,28 +0,0 @@
-// 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.Runtime.Serialization
-{
- [CLSCompliant(false)]
- public interface IFormatterConverter
- {
- object Convert(object value, Type type);
- object Convert(object value, TypeCode typeCode);
- bool ToBoolean(object value);
- char ToChar(object value);
- sbyte ToSByte(object value);
- byte ToByte(object value);
- short ToInt16(object value);
- ushort ToUInt16(object value);
- int ToInt32(object value);
- uint ToUInt32(object value);
- long ToInt64(object value);
- ulong ToUInt64(object value);
- float ToSingle(object value);
- double ToDouble(object value);
- decimal ToDecimal(object value);
- DateTime ToDateTime(object value);
- string? ToString(object value);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/IObjectReference.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/IObjectReference.cs
deleted file mode 100644
index d41bc50dde4..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/IObjectReference.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-// 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.Runtime.Serialization
-{
- public interface IObjectReference
- {
- object GetRealObject(StreamingContext context);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/ISafeSerializationData.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/ISafeSerializationData.cs
deleted file mode 100644
index 06ef1999da0..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/ISafeSerializationData.cs
+++ /dev/null
@@ -1,207 +0,0 @@
-// 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.Runtime.Serialization
-{
- //
- // #SafeSerialization
- //
- // Types which are serializable via the ISerializable interface have a problem when it comes to allowing
- // transparent subtypes which can allow themselves to serialize since the GetObjectData method is
- // SecurityCritical.
- //
- // For instance, System.Exception implements ISerializable, however it is also desirable to have
- // transparent exceptions with their own fields that need to be serialized. (For instance, in transparent
- // assemblies such as the DLR and F#, or even in partial trust application code). Since overriding
- // GetObjectData requires that the overriding method be security critical, this won't work directly.
- //
- // SafeSerializationManager solves this problem by allowing any partial trust code to contribute
- // individual chunks of serializable data to be included in the serialized version of the derived class.
- // These chunks are then deserialized back out of the serialized type and notified that they should
- // populate the fields of the deserialized object when serialization is complete. This allows partial
- // trust or transparent code to participate in serialization of an ISerializable type without having to
- // override GetObjectData or implement the ISerializable constructor.
- //
- // On the serialization side, SafeSerializationManager has an event SerializeObjectState which it will
- // fire in response to serialization in order to gather the units of serializable data that should be
- // stored with the rest of the object during serialization. Methods which respond to these events
- // create serializable objects which implement the ISafeSerializationData interface and add them to the
- // collection of other serialized data by calling AddSerializedState on the SafeSerializationEventArgs
- // passed into the event.
- //
- // By using an event rather than a virtual method on the base ISerializable object, we allow multiple
- // potentially untrusted subclasses to participate in serialization, without each one having to ensure
- // that it calls up to the base type in order for the whole system to work. (For instance Exception :
- // TrustedException : UntrustedException, in this scenario UntrustedException would be able to override
- // the virtual method an prevent TrustedException from ever seeing the method call, either accidentally
- // or maliciously).
- //
- // Further, by only allowing additions of new chunks of serialization state rather than exposing the
- // whole underlying list, we avoid exposing potentially sensitive serialized state to any of the
- // potentially untrusted subclasses.
- //
- // At deserialization time, SafeSerializationManager performs the reverse operation. It deserializes the
- // chunks of serialized state, and then notifies them that the object they belong to is deserialized by
- // calling their CompleteSerialization method. In repsonse to this call, the state objects populate the
- // fields of the object being deserialized with the state that they held.
- //
- // From a security perspective, the chunks of serialized state can only contain data that the specific
- // subclass itself had access to read (otherwise it wouldn't be able to populate the type with that
- // data), as opposed to having access to far more data in the SerializationInfo that GetObjectData uses.
- // Similarly, at deserialization time, the serialized state can only modify fields that the type itself
- // has access to (again, as opposed to the full SerializationInfo which could be modified).
- //
- // Individual types which wish to participate in safe serialization do so by containing an instance of a
- // SafeSerializationManager and exposing its serialization event. During GetObjectData, the
- // SafeSerializationManager is serialized just like any other field of the containing type. However, at
- // the end of serialization it is called back one last time to CompleteSerialization.
- //
- // In CompleteSerialization, if the SafeSerializationManager detects that it has extra chunks of
- // data to handle, it substitutes the root type being serialized (formerly the real type hosting the
- // SafeSerializationManager) with itself. This allows it to gain more control over the deserialization
- // process. It also saves away an extra bit of state in the serialization info indicating the real type
- // of object that should be recreated during deserialization.
- //
- // At this point the serialized state looks like this:
- // Data:
- // realSerializedData1
- // ...
- // realSerializedDataN
- // safeSerializationData -> this is the serialization data member of the parent type
- // _serializedState -> list of saved serialized states from subclasses responding to the safe
- // serialization event
- // RealTypeSerializationName -> type which is using safe serialization
- // Type:
- // SafeSerializationManager
- //
- // That is, the serialized data claims to be of type SafeSerializationManager, however contains only the
- // data from the real object being serialized along with one bit of safe serialization metadata.
- //
- // At deserialization time, since the serialized data claims to be of type SafeSerializationManager, the
- // root object being created is an instance of the SafeSerializationManager class. However, it detects
- // that this isn't a real SafeSerializationManager (by looking for the real type field in the metadata),
- // and simply saves away the SerializationInfo and the real type being deserialized.
- //
- // Since SafeSerializationManager implements IObjectReference, the next step of deserialization is the
- // GetRealObject callback. This callback is the one responsible for getting the
- // SafeSerializationManager out of the way and instead creating an instance of the actual type which was
- // serialized.
- //
- // It does this by first creating an instance of the real type being deserialzed (saved away in the
- // deserialzation constructor), but not running any of its constructors. Instead, it walks the
- // inheritance hierarchy (moving toward the most derived type) looking for the last full trust type to
- // implement the standard ISerializable constructor before any type does not implement the constructor.
- // It is this last type's deserialization constructor which is then invoked, passing in the saved
- // SerializationInfo. Once the constructors are run, we return this object as the real deserialized
- // object.
- //
- // The reason that we do this walk is so that ISerializable types can protect themselves from malicious
- // input during deserialization by making their deserialization constructors unavailable to partial
- // trust code. By not requiring every type have a copy of this constructor, partial trust code can
- // participate in safe serialization and not be required to have access to the parent's constructor.
- //
- // It should be noted however, that this heuristic means that if a full trust type does derive from
- // a transparent or partial trust type using this safe serialization mechanism, that full trust type
- // will not have its constructor called. Further, the protection of not invoking partial trust
- // deserialization constructors only comes into play if SafeSerializationManager is in control of
- // deserialization, which means there must be at least one (even empty) safe serialization event
- // handler registered.
- //
- // Another interesting note is that at this point there are now two SafeSerializationManagers alive for
- // this deserialization. The first object is the one which is controlling the deserialization and was
- // created as the root object of the deserialization. The second one is the object which contains the
- // serialized data chunks and is a data member of the real object being deserialized. For this reason,
- // the data objects cannot be notified that the deserialization is complete during GetRealObject since
- // the ISafeSerializationData objects are not members of the active SafeSerializationManager instance.
- //
- // The next step is the OnDeserialized callback, which comes to SafeSerializableObject since it was
- // pretending to be the root object of the deserialization. It responds to this callback by calling
- // any existing OnDeserialized callback on the real type that was deserialized.
- //
- // The real type needs to call its data member SafeSerializationData object's CompleteDeserialization
- // method in response to the OnDeserialized call. This CompleteDeserialization call will then iterate
- // through the ISafeSerializationData objects calling each of their CompleteDeserialization methods so
- // that they can plug the nearly-complete object with their saved data.
- //
- // The reason for having a new ISafeSerializationData interface which is basically identical to
- // IDeserializationCallback is that IDeserializationCallback will be called on the stored data chunks
- // by the serialization code when they are deserialized, and that's not a desirable behavior.
- // Essentially, we need to change the meaning of the object parameter to mean "parent object which
- // participated in safe serialization", rather than "this object".
- //
- // Implementing safe serialization on an ISerialiable type is relatively straight forward. (For an
- // example, see System.Exception):
- //
- // 1. Include a data member of type SafeSerializationManager:
- //
- // private SafeSerializationManager _safeSerializationManager;
- //
- // 2. Add a protected SerializeObjectState event, which passes through to the SafeSerializationManager:
- //
- // protected event EventHandler<SafeSerializationEventArgs>? SerializeObjectState
- // {
- // add { _safeSerializationManager.SerializeObjectState += value; }
- // remove { _safeSerializationManager.SerializeObjectState -= value; }
- // }
- //
- // 3. Serialize the safe serialization object in GetObjectData, and call its CompleteSerialization method:
- //
- // {
- // info.AddValue("_safeSerializationManager", _safeSerializationManager, typeof(SafeSerializationManager));
- // _safeSerializationManager.CompleteSerialization(this, info, context);
- // }
- //
- // 4. Add an OnDeserialized handler if one doesn't already exist, and call CompleteDeserialization in it:
- //
- // [OnDeserialized]
- // private void OnDeserialized(StreamingContext context)
- // {
- // _safeSerializationManager.CompleteDeserialization(this);
- // }
- //
- // On the client side, using safe serialization is also pretty easy. For example:
- //
- // [Serializable]
- // public class TransparentException : Exception
- // {
- // [Serializable]
- // private struct TransparentExceptionState : ISafeSerializationData
- // {
- // public string _extraData;
- //
- // void ISafeSerializationData.CompleteDeserialization(object obj)
- // {
- // TransparentException exception = obj as TransparentException;
- // exception._state = this;
- // }
- // }
- //
- // [NonSerialized]
- // private TransparentExceptionState _state = new TransparentExceptionState();
- //
- // public TransparentException()
- // {
- // SerializeObjectState += delegate(object exception, SafeSerializationEventArgs eventArgs)
- // {
- // eventArgs.AddSerializedState(_state);
- // };
- // }
- //
- // public string ExtraData
- // {
- // get { return _state._extraData; }
- // set { _state._extraData = value; }
- // }
- // }
- //
-
- // Interface to be supported by objects which are stored in safe serialization stores
- public interface ISafeSerializationData
- {
- // CompleteDeserialization is called when the object to which the extra serialized data was attached
- // has completed its deserialization, and now needs to be populated with the extra data stored in
- // this object.
- void CompleteDeserialization(object deserialized);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/ISerializable.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/ISerializable.cs
deleted file mode 100644
index 383b3f07af3..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/ISerializable.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-// 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.Runtime.Serialization
-{
- public interface ISerializable
- {
- void GetObjectData(SerializationInfo info, StreamingContext context);
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/OnDeserializedAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/OnDeserializedAttribute.cs
deleted file mode 100644
index 408a55ccf9e..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/OnDeserializedAttribute.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-// 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.Runtime.Serialization
-{
- [AttributeUsage(AttributeTargets.Method, Inherited = false)]
- public sealed class OnDeserializedAttribute : Attribute
- {
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/OnDeserializingAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/OnDeserializingAttribute.cs
deleted file mode 100644
index 162857e8d3b..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/OnDeserializingAttribute.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-// 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.Runtime.Serialization
-{
- [AttributeUsage(AttributeTargets.Method, Inherited = false)]
- public sealed class OnDeserializingAttribute : Attribute
- {
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/OnSerializedAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/OnSerializedAttribute.cs
deleted file mode 100644
index 020dd0257ca..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/OnSerializedAttribute.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-// 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.Runtime.Serialization
-{
- [AttributeUsage(AttributeTargets.Method, Inherited = false)]
- public sealed class OnSerializedAttribute : Attribute
- {
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/OnSerializingAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/OnSerializingAttribute.cs
deleted file mode 100644
index 8dc8af3f235..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/OnSerializingAttribute.cs
+++ /dev/null
@@ -1,11 +0,0 @@
-// 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.Runtime.Serialization
-{
- [AttributeUsage(AttributeTargets.Method, Inherited = false)]
- public sealed class OnSerializingAttribute : Attribute
- {
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/OptionalFieldAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/OptionalFieldAttribute.cs
deleted file mode 100644
index 3d6a523071d..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/OptionalFieldAttribute.cs
+++ /dev/null
@@ -1,25 +0,0 @@
-// 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.Runtime.Serialization
-{
- [AttributeUsage(AttributeTargets.Field, Inherited = false)]
- public sealed class OptionalFieldAttribute : Attribute
- {
- private int _versionAdded = 1;
-
- public int VersionAdded
- {
- get => _versionAdded;
- set
- {
- if (value < 1)
- {
- throw new ArgumentException(SR.Serialization_OptionalFieldVersionValue);
- }
- _versionAdded = value;
- }
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/SafeSerializationEventArgs.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/SafeSerializationEventArgs.cs
deleted file mode 100644
index d6613b4ac22..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/SafeSerializationEventArgs.cs
+++ /dev/null
@@ -1,18 +0,0 @@
-// 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.Runtime.Serialization
-{
- // This type exists for public surface compatibility only.
- public sealed class SafeSerializationEventArgs : EventArgs
- {
- private SafeSerializationEventArgs() { }
-
- public void AddSerializedState(ISafeSerializationData serializedState)
- {
- }
-
- public StreamingContext StreamingContext { get; }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/SerializationException.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/SerializationException.cs
deleted file mode 100644
index 3dc6e8fca2f..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/SerializationException.cs
+++ /dev/null
@@ -1,38 +0,0 @@
-// 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.Runtime.Serialization
-{
- [Serializable]
- [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
- public class SerializationException : SystemException
- {
- /// <summary>
- /// Creates a new SerializationException with its message
- /// string set to a default message.
- /// </summary>
- public SerializationException()
- : base(SR.SerializationException)
- {
- HResult = HResults.COR_E_SERIALIZATION;
- }
-
- public SerializationException(string? message)
- : base(message)
- {
- HResult = HResults.COR_E_SERIALIZATION;
- }
-
- public SerializationException(string? message, Exception? innerException)
- : base(message, innerException)
- {
- HResult = HResults.COR_E_SERIALIZATION;
- }
-
- protected SerializationException(SerializationInfo info, StreamingContext context)
- : base(info, context)
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/SerializationInfo.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/SerializationInfo.cs
deleted file mode 100644
index b44c66fcea1..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/SerializationInfo.cs
+++ /dev/null
@@ -1,642 +0,0 @@
-// 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.Collections.Generic;
-using System.Diagnostics;
-using System.Security;
-using System.Threading;
-
-namespace System.Runtime.Serialization
-{
- /// <summary>The structure for holding all of the data needed for object serialization and deserialization.</summary>
- public sealed class SerializationInfo
- {
- private const int DefaultSize = 4;
-
- // Even though we have a dictionary, we're still keeping all the arrays around for back-compat.
- // Otherwise we may run into potentially breaking behaviors like GetEnumerator() not returning entries in the same order they were added.
- private string[] _names;
- private object?[] _values;
- private Type[] _types;
- private int _count;
- private readonly Dictionary<string, int> _nameToIndex;
- private readonly IFormatterConverter _converter;
- private string _rootTypeName;
- private string _rootTypeAssemblyName;
- private Type _rootType;
-
- internal static AsyncLocal<bool> AsyncDeserializationInProgress { get; } = new AsyncLocal<bool>();
-
-#if !CORECLR
- // On AoT, assume private members are reflection blocked, so there's no further protection required
- // for the thread's DeserializationTracker
- [ThreadStatic]
- private static DeserializationTracker? t_deserializationTracker;
-
- private static DeserializationTracker GetThreadDeserializationTracker() =>
- t_deserializationTracker ??= new DeserializationTracker();
-#endif // !CORECLR
-
- // Returns true if deserialization is currently in progress
- public static bool DeserializationInProgress
- {
-#if CORECLR
- [DynamicSecurityMethod] // Methods containing StackCrawlMark local var must be marked DynamicSecurityMethod
-#endif
- get
- {
- if (AsyncDeserializationInProgress.Value)
- {
- return true;
- }
-
-#if CORECLR
- StackCrawlMark stackMark = StackCrawlMark.LookForMe;
- DeserializationTracker tracker = Thread.GetThreadDeserializationTracker(ref stackMark);
-#else
- DeserializationTracker tracker = GetThreadDeserializationTracker();
-#endif
- bool result = tracker.DeserializationInProgress;
- return result;
- }
- }
-
- // Throws a SerializationException if dangerous deserialization is currently
- // in progress
- public static void ThrowIfDeserializationInProgress()
- {
- if (DeserializationInProgress)
- {
- throw new SerializationException(SR.Serialization_DangerousDeserialization);
- }
- }
-
- // Throws a DeserializationBlockedException if dangerous deserialization is currently
- // in progress and the AppContext switch Switch.System.Runtime.Serialization.SerializationGuard.{switchSuffix}
- // is not true. The value of the switch is cached in cachedValue to avoid repeated lookups:
- // 0: No value cached
- // 1: The switch is true
- // -1: The switch is false
- public static void ThrowIfDeserializationInProgress(string switchSuffix, ref int cachedValue)
- {
- const string SwitchPrefix = "Switch.System.Runtime.Serialization.SerializationGuard.";
- if (switchSuffix == null)
- {
- throw new ArgumentNullException(nameof(switchSuffix));
- }
- if (string.IsNullOrWhiteSpace(switchSuffix))
- {
- throw new ArgumentException(SR.Argument_EmptyName, nameof(switchSuffix));
- }
-
- if (cachedValue == 0)
- {
- bool isEnabled = false;
- if (AppContext.TryGetSwitch(SwitchPrefix + switchSuffix, out isEnabled) && isEnabled)
- {
- cachedValue = 1;
- }
- else
- {
- cachedValue = -1;
- }
- }
-
- if (cachedValue == 1)
- {
- return;
- }
- else if (cachedValue == -1)
- {
- if (DeserializationInProgress)
- {
- throw new SerializationException(SR.Format(SR.Serialization_DangerousDeserialization_Switch, SwitchPrefix + switchSuffix));
- }
- }
- else
- {
- throw new ArgumentOutOfRangeException(nameof(cachedValue));
- }
- }
-
- // Declares that the current thread and async context have begun deserialization.
- // In this state, if the SerializationGuard or other related AppContext switches are set,
- // actions likely to be dangerous during deserialization, such as starting a process will be blocked.
- // Returns a DeserializationToken that must be disposed to remove the deserialization state.
-#if CORECLR
- [DynamicSecurityMethod] // Methods containing StackCrawlMark local var must be marked DynamicSecurityMethod
-#endif
- public static DeserializationToken StartDeserialization()
- {
- if (LocalAppContextSwitches.SerializationGuard)
- {
-#if CORECLR
- StackCrawlMark stackMark = StackCrawlMark.LookForMe;
- DeserializationTracker tracker = Thread.GetThreadDeserializationTracker(ref stackMark);
-#else
- DeserializationTracker tracker = GetThreadDeserializationTracker();
-#endif
- if (!tracker.DeserializationInProgress)
- {
- lock (tracker)
- {
- if (!tracker.DeserializationInProgress)
- {
- AsyncDeserializationInProgress.Value = true;
- tracker.DeserializationInProgress = true;
- return new DeserializationToken(tracker);
- }
- }
- }
- }
-
- return new DeserializationToken(null);
- }
-
- [CLSCompliant(false)]
- public SerializationInfo(Type type, IFormatterConverter converter)
- {
- if ((object)type == null)
- {
- throw new ArgumentNullException(nameof(type));
- }
-
- if (converter == null)
- {
- throw new ArgumentNullException(nameof(converter));
- }
-
- _rootType = type;
- _rootTypeName = type.FullName!;
- _rootTypeAssemblyName = type.Module.Assembly.FullName!;
-
- _names = new string[DefaultSize];
- _values = new object[DefaultSize];
- _types = new Type[DefaultSize];
-
- _nameToIndex = new Dictionary<string, int>();
-
- _converter = converter;
- }
-
- [CLSCompliant(false)]
- public SerializationInfo(Type type, IFormatterConverter converter, bool requireSameTokenInPartialTrust)
- : this(type, converter)
- {
- // requireSameTokenInPartialTrust is a vacuous parameter in a platform that does not support partial trust.
- }
-
- public string FullTypeName
- {
- get => _rootTypeName;
- set
- {
- if (null == value)
- {
- throw new ArgumentNullException(nameof(value));
- }
-
- _rootTypeName = value;
- IsFullTypeNameSetExplicit = true;
- }
- }
-
- public string AssemblyName
- {
- get => _rootTypeAssemblyName;
- set
- {
- if (null == value)
- {
- throw new ArgumentNullException(nameof(value));
- }
- _rootTypeAssemblyName = value;
- IsAssemblyNameSetExplicit = true;
- }
- }
-
- public bool IsFullTypeNameSetExplicit { get; private set; }
-
- public bool IsAssemblyNameSetExplicit { get; private set; }
-
- public void SetType(Type type)
- {
- if ((object)type == null)
- {
- throw new ArgumentNullException(nameof(type));
- }
-
- if (!ReferenceEquals(_rootType, type))
- {
- _rootType = type;
- _rootTypeName = type.FullName!;
- _rootTypeAssemblyName = type.Module.Assembly.FullName!;
- IsFullTypeNameSetExplicit = false;
- IsAssemblyNameSetExplicit = false;
- }
- }
-
- public int MemberCount => _count;
-
- public Type ObjectType => _rootType;
-
- public SerializationInfoEnumerator GetEnumerator() => new SerializationInfoEnumerator(_names, _values, _types, _count);
-
- private void ExpandArrays()
- {
- int newSize;
- Debug.Assert(_names.Length == _count, "[SerializationInfo.ExpandArrays]_names.Length == _count");
-
- newSize = (_count * 2);
-
- // In the pathological case, we may wrap
- if (newSize < _count)
- {
- if (int.MaxValue > _count)
- {
- newSize = int.MaxValue;
- }
- }
-
- // Allocate more space and copy the data
- string[] newMembers = new string[newSize];
- object[] newData = new object[newSize];
- Type[] newTypes = new Type[newSize];
-
- Array.Copy(_names, newMembers, _count);
- Array.Copy(_values, newData, _count);
- Array.Copy(_types, newTypes, _count);
-
- // Assign the new arrays back to the member vars.
- _names = newMembers;
- _values = newData;
- _types = newTypes;
- }
-
- public void AddValue(string name, object? value, Type type)
- {
- if (null == name)
- {
- throw new ArgumentNullException(nameof(name));
- }
-
- if ((object)type == null)
- {
- throw new ArgumentNullException(nameof(type));
- }
-
- AddValueInternal(name, value, type);
- }
-
- public void AddValue(string name, object? value)
- {
- if (null == value)
- {
- AddValue(name, value, typeof(object));
- }
- else
- {
- AddValue(name, value, value.GetType());
- }
- }
-
- public void AddValue(string name, bool value)
- {
- AddValue(name, (object)value, typeof(bool));
- }
-
- public void AddValue(string name, char value)
- {
- AddValue(name, (object)value, typeof(char));
- }
-
- [CLSCompliant(false)]
- public void AddValue(string name, sbyte value)
- {
- AddValue(name, (object)value, typeof(sbyte));
- }
-
- public void AddValue(string name, byte value)
- {
- AddValue(name, (object)value, typeof(byte));
- }
-
- public void AddValue(string name, short value)
- {
- AddValue(name, (object)value, typeof(short));
- }
-
- [CLSCompliant(false)]
- public void AddValue(string name, ushort value)
- {
- AddValue(name, (object)value, typeof(ushort));
- }
-
- public void AddValue(string name, int value)
- {
- AddValue(name, (object)value, typeof(int));
- }
-
- [CLSCompliant(false)]
- public void AddValue(string name, uint value)
- {
- AddValue(name, (object)value, typeof(uint));
- }
-
- public void AddValue(string name, long value)
- {
- AddValue(name, (object)value, typeof(long));
- }
-
- [CLSCompliant(false)]
- public void AddValue(string name, ulong value)
- {
- AddValue(name, (object)value, typeof(ulong));
- }
-
- public void AddValue(string name, float value)
- {
- AddValue(name, (object)value, typeof(float));
- }
-
- public void AddValue(string name, double value)
- {
- AddValue(name, (object)value, typeof(double));
- }
-
- public void AddValue(string name, decimal value)
- {
- AddValue(name, (object)value, typeof(decimal));
- }
-
- public void AddValue(string name, DateTime value)
- {
- AddValue(name, (object)value, typeof(DateTime));
- }
-
- internal void AddValueInternal(string name, object? value, Type type)
- {
- if (_nameToIndex.ContainsKey(name))
- {
- throw new SerializationException(SR.Serialization_SameNameTwice);
- }
- _nameToIndex.Add(name, _count);
-
- // If we need to expand the arrays, do so.
- if (_count >= _names.Length)
- {
- ExpandArrays();
- }
-
- // Add the data and then advance the counter.
- _names[_count] = name;
- _values[_count] = value;
- _types[_count] = type;
- _count++;
- }
-
- /// <summary>
- /// Finds the value if it exists in the current data. If it does, we replace
- /// the values, if not, we append it to the end. This is useful to the
- /// ObjectManager when it's performing fixups.
- ///
- /// All error checking is done with asserts. Although public in coreclr,
- /// it's not exposed in a contract and is only meant to be used by corefx.
- ///
- /// This isn't a public API, but it gets invoked dynamically by
- /// BinaryFormatter
- ///
- /// This should not be used by clients: exposing out this functionality would allow children
- /// to overwrite their parent's values. It is public in order to give corefx access to it for
- /// its ObjectManager implementation, but it should not be exposed out of a contract.
- /// </summary>
- /// <param name="name"> The name of the data to be updated.</param>
- /// <param name="value"> The new value.</param>
- /// <param name="type"> The type of the data being added.</param>
- public void UpdateValue(string name, object value, Type type)
- {
- Debug.Assert(null != name, "[SerializationInfo.UpdateValue]name!=null");
- Debug.Assert(null != value, "[SerializationInfo.UpdateValue]value!=null");
- Debug.Assert(null != (object)type, "[SerializationInfo.UpdateValue]type!=null");
-
- int index = FindElement(name);
- if (index < 0)
- {
- AddValueInternal(name, value, type);
- }
- else
- {
- _values[index] = value;
- _types[index] = type;
- }
- }
-
- private int FindElement(string name)
- {
- if (null == name)
- {
- throw new ArgumentNullException(nameof(name));
- }
- int index;
- if (_nameToIndex.TryGetValue(name, out index))
- {
- return index;
- }
- return -1;
- }
-
- /// <summary>
- /// Gets the location of a particular member and then returns
- /// the value of the element at that location. The type of the member is
- /// returned in the foundType field.
- /// </summary>
- /// <param name="name"> The name of the element to find.</param>
- /// <param name="foundType"> The type of the element associated with the given name.</param>
- /// <returns>The value of the element at the position associated with name.</returns>
- private object? GetElement(string name, out Type foundType)
- {
- int index = FindElement(name);
- if (index == -1)
- {
- throw new SerializationException(SR.Format(SR.Serialization_NotFound, name));
- }
-
- Debug.Assert(index < _values.Length, "[SerializationInfo.GetElement]index<_values.Length");
- Debug.Assert(index < _types.Length, "[SerializationInfo.GetElement]index<_types.Length");
-
- foundType = _types[index];
- Debug.Assert((object)foundType != null, "[SerializationInfo.GetElement]foundType!=null");
- return _values[index];
- }
-
- private object? GetElementNoThrow(string name, out Type? foundType)
- {
- int index = FindElement(name);
- if (index == -1)
- {
- foundType = null;
- return null;
- }
-
- Debug.Assert(index < _values.Length, "[SerializationInfo.GetElement]index<_values.Length");
- Debug.Assert(index < _types.Length, "[SerializationInfo.GetElement]index<_types.Length");
-
- foundType = _types[index];
- Debug.Assert((object)foundType != null, "[SerializationInfo.GetElement]foundType!=null");
- return _values[index];
- }
-
- public object? GetValue(string name, Type type)
- {
- if ((object)type == null)
- {
- throw new ArgumentNullException(nameof(type));
- }
-
- if (!type.IsRuntimeImplemented())
- throw new ArgumentException(SR.Argument_MustBeRuntimeType);
-
- Type foundType;
- object? value = GetElement(name, out foundType);
-
- if (ReferenceEquals(foundType, type) || type.IsAssignableFrom(foundType) || value == null)
- {
- return value;
- }
-
- Debug.Assert(_converter != null, "[SerializationInfo.GetValue]_converter!=null");
- return _converter.Convert(value, type);
- }
-
- internal object? GetValueNoThrow(string name, Type type)
- {
- Debug.Assert((object)type != null, "[SerializationInfo.GetValue]type ==null");
- Debug.Assert(type.IsRuntimeImplemented(), "[SerializationInfo.GetValue]type is not a runtime type");
-
- Type? foundType;
- object? value = GetElementNoThrow(name, out foundType);
- if (value == null)
- return null;
-
- if (ReferenceEquals(foundType, type) || type.IsAssignableFrom(foundType))
- {
- return value;
- }
-
- Debug.Assert(_converter != null, "[SerializationInfo.GetValue]_converter!=null");
-
- return _converter.Convert(value, type);
- }
-
- public bool GetBoolean(string name)
- {
- Type foundType;
- object? value = GetElement(name, out foundType);
- return ReferenceEquals(foundType, typeof(bool)) ? (bool)value! : _converter.ToBoolean(value!); // if value is null To* method will either deal with it or throw
- }
-
- public char GetChar(string name)
- {
- Type foundType;
- object? value = GetElement(name, out foundType);
- return ReferenceEquals(foundType, typeof(char)) ? (char)value! : _converter.ToChar(value!);
- }
-
- [CLSCompliant(false)]
- public sbyte GetSByte(string name)
- {
- Type foundType;
- object? value = GetElement(name, out foundType);
- return ReferenceEquals(foundType, typeof(sbyte)) ? (sbyte)value! : _converter.ToSByte(value!);
- }
-
- public byte GetByte(string name)
- {
- Type foundType;
- object? value = GetElement(name, out foundType);
- return ReferenceEquals(foundType, typeof(byte)) ? (byte)value! : _converter.ToByte(value!);
- }
-
- public short GetInt16(string name)
- {
- Type foundType;
- object? value = GetElement(name, out foundType);
- return ReferenceEquals(foundType, typeof(short)) ? (short)value! : _converter.ToInt16(value!);
- }
-
- [CLSCompliant(false)]
- public ushort GetUInt16(string name)
- {
- Type foundType;
- object? value = GetElement(name, out foundType);
- return ReferenceEquals(foundType, typeof(ushort)) ? (ushort)value! : _converter.ToUInt16(value!);
- }
-
- public int GetInt32(string name)
- {
- Type foundType;
- object? value = GetElement(name, out foundType);
- return ReferenceEquals(foundType, typeof(int)) ? (int)value! : _converter.ToInt32(value!);
- }
-
- [CLSCompliant(false)]
- public uint GetUInt32(string name)
- {
- Type foundType;
- object? value = GetElement(name, out foundType);
- return ReferenceEquals(foundType, typeof(uint)) ? (uint)value! : _converter.ToUInt32(value!);
- }
-
- public long GetInt64(string name)
- {
- Type foundType;
- object? value = GetElement(name, out foundType);
- return ReferenceEquals(foundType, typeof(long)) ? (long)value! : _converter.ToInt64(value!);
- }
-
- [CLSCompliant(false)]
- public ulong GetUInt64(string name)
- {
- Type foundType;
- object? value = GetElement(name, out foundType);
- return ReferenceEquals(foundType, typeof(ulong)) ? (ulong)value! : _converter.ToUInt64(value!);
- }
-
- public float GetSingle(string name)
- {
- Type foundType;
- object? value = GetElement(name, out foundType);
- return ReferenceEquals(foundType, typeof(float)) ? (float)value! : _converter.ToSingle(value!);
- }
-
-
- public double GetDouble(string name)
- {
- Type foundType;
- object? value = GetElement(name, out foundType);
- return ReferenceEquals(foundType, typeof(double)) ? (double)value! : _converter.ToDouble(value!);
- }
-
- public decimal GetDecimal(string name)
- {
- Type foundType;
- object? value = GetElement(name, out foundType);
- return ReferenceEquals(foundType, typeof(decimal)) ? (decimal)value! : _converter.ToDecimal(value!);
- }
-
- public DateTime GetDateTime(string name)
- {
- Type foundType;
- object? value = GetElement(name, out foundType);
- return ReferenceEquals(foundType, typeof(DateTime)) ? (DateTime)value! : _converter.ToDateTime(value!);
- }
-
- public string? GetString(string name)
- {
- Type foundType;
- object? value = GetElement(name, out foundType);
- return ReferenceEquals(foundType, typeof(string)) || value == null ? (string?)value : _converter.ToString(value);
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/SerializationInfoEnumerator.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/SerializationInfoEnumerator.cs
deleted file mode 100644
index bdc25c763f8..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/SerializationInfoEnumerator.cs
+++ /dev/null
@@ -1,127 +0,0 @@
-// 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.Collections;
-using System.Diagnostics;
-
-namespace System.Runtime.Serialization
-{
- public readonly struct SerializationEntry
- {
- private readonly string _name;
- private readonly object? _value;
- private readonly Type _type;
-
- internal SerializationEntry(string entryName, object? entryValue, Type entryType)
- {
- _name = entryName;
- _value = entryValue;
- _type = entryType;
- }
-
- public object? Value => _value;
- public string Name => _name;
- public Type ObjectType => _type;
- }
-
- public sealed class SerializationInfoEnumerator : IEnumerator
- {
- private readonly string[] _members;
- private readonly object?[] _data;
- private readonly Type[] _types;
- private readonly int _numItems;
- private int _currItem;
- private bool _current;
-
- internal SerializationInfoEnumerator(string[] members, object?[] info, Type[] types, int numItems)
- {
- Debug.Assert(members != null, "[SerializationInfoEnumerator.ctor]members!=null");
- Debug.Assert(info != null, "[SerializationInfoEnumerator.ctor]info!=null");
- Debug.Assert(types != null, "[SerializationInfoEnumerator.ctor]types!=null");
- Debug.Assert(numItems >= 0, "[SerializationInfoEnumerator.ctor]numItems>=0");
- Debug.Assert(members.Length >= numItems, "[SerializationInfoEnumerator.ctor]members.Length>=numItems");
- Debug.Assert(info.Length >= numItems, "[SerializationInfoEnumerator.ctor]info.Length>=numItems");
- Debug.Assert(types.Length >= numItems, "[SerializationInfoEnumerator.ctor]types.Length>=numItems");
-
- _members = members;
- _data = info;
- _types = types;
-
- // The MoveNext semantic is much easier if we enforce that [0..m_numItems] are valid entries
- // in the enumerator, hence we subtract 1.
- _numItems = numItems - 1;
- _currItem = -1;
- _current = false;
- }
-
- public bool MoveNext()
- {
- if (_currItem < _numItems)
- {
- _currItem++;
- _current = true;
- }
- else
- {
- _current = false;
- }
-
- return _current;
- }
-
- object? IEnumerator.Current => Current;
-
- public SerializationEntry Current
- {
- get
- {
- if (!_current)
- {
- throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen);
- }
- return new SerializationEntry(_members[_currItem], _data[_currItem], _types[_currItem]);
- }
- }
-
- public void Reset()
- {
- _currItem = -1;
- _current = false;
- }
-
- public string Name
- {
- get
- {
- if (!_current)
- {
- throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen);
- }
- return _members[_currItem];
- }
- }
- public object? Value
- {
- get
- {
- if (!_current)
- {
- throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen);
- }
- return _data[_currItem];
- }
- }
- public Type ObjectType
- {
- get
- {
- if (!_current)
- {
- throw new InvalidOperationException(SR.InvalidOperation_EnumOpCantHappen);
- }
- return _types[_currItem];
- }
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/StreamingContext.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/StreamingContext.cs
deleted file mode 100644
index f61366bd491..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Serialization/StreamingContext.cs
+++ /dev/null
@@ -1,52 +0,0 @@
-// 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.Runtime.Serialization
-{
- public readonly struct StreamingContext
- {
- private readonly object? _additionalContext;
- private readonly StreamingContextStates _state;
-
- public StreamingContext(StreamingContextStates state) : this(state, null)
- {
- }
-
- public StreamingContext(StreamingContextStates state, object? additional)
- {
- _state = state;
- _additionalContext = additional;
- }
-
- public override bool Equals(object? obj)
- {
- if (!(obj is StreamingContext))
- {
- return false;
- }
- StreamingContext ctx = (StreamingContext)obj;
- return ctx._additionalContext == _additionalContext && ctx._state == _state;
- }
-
- public override int GetHashCode() => (int)_state;
-
- public StreamingContextStates State => _state;
-
- public object? Context => _additionalContext;
- }
-
- [Flags]
- public enum StreamingContextStates
- {
- CrossProcess = 0x01,
- CrossMachine = 0x02,
- File = 0x04,
- Persistence = 0x08,
- Remoting = 0x10,
- Other = 0x20,
- Clone = 0x40,
- CrossAppDomain = 0x80,
- All = 0xFF,
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Versioning/NonVersionableAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Versioning/NonVersionableAttribute.cs
deleted file mode 100644
index cb9533f2c3b..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Versioning/NonVersionableAttribute.cs
+++ /dev/null
@@ -1,33 +0,0 @@
-// 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.
-
-/*============================================================
-**
-**
-**
-** The [NonVersionable] attribute is applied to indicate that the implementation
-** of a particular member or layout of a struct cannot be changed for given platform in incompatible way.
-** This allows cross-module inlining of methods and data structures whose implementation
-** is never changed in ReadyToRun native images. Any changes to such members or types would be
-** breaking changes for ReadyToRun.
-**
-** Applying this type also has the side effect that the inlining tables in R2R images will not
-** report that inlining of NonVersionable attributed methods occured. These inlining tables are used
-** by profilers to figure out the set of methods that need to be rejited when one method is instrumented,
-** so in effect NonVersionable methods are also non-instrumentable. Generally this is OK for
-** extremely trivial low level methods where NonVersionable gets used, but if there is any plan to
-** significantly extend its usage or allow 3rd parties to use it please discuss with the diagnostics team.
-===========================================================*/
-
-namespace System.Runtime.Versioning
-{
- [AttributeUsage(AttributeTargets.Class | AttributeTargets.Struct | AttributeTargets.Method | AttributeTargets.Constructor,
- AllowMultiple = false, Inherited = false)]
- internal sealed class NonVersionableAttribute : Attribute
- {
- public NonVersionableAttribute()
- {
- }
- }
-}
diff --git a/netcore/System.Private.CoreLib/shared/System/Runtime/Versioning/TargetFrameworkAttribute.cs b/netcore/System.Private.CoreLib/shared/System/Runtime/Versioning/TargetFrameworkAttribute.cs
deleted file mode 100644
index 173aee56298..00000000000
--- a/netcore/System.Private.CoreLib/shared/System/Runtime/Versioning/TargetFrameworkAttribute.cs
+++ /dev/null
@@ -1,41 +0,0 @@
-// 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.
-
-/*============================================================
-**
-**
-**
-** Purpose: Identifies which SKU and version of the .NET
-** Framework that a particular library was compiled against.
-** Emitted by VS, and can help catch deployment problems.
-**
-===========================================================*/
-
-namespace System.Runtime.Versioning
-{
- [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false, Inherited = false)]
- public sealed class TargetFrameworkAttribute : Attribute
- {
- private readonly string _frameworkName; // A target framework moniker
- private string? _frameworkDisplayName;
-
- // The frameworkName parameter is intended to be the string form of a FrameworkName instance.
- public TargetFrameworkAttribute(string frameworkName)
- {
- if (frameworkName == null)
- throw new ArgumentNullException(nameof(frameworkName));
- _frameworkName = frameworkName;
- }
-
- // The target framework moniker that this assembly was compiled against.
- // Use the FrameworkName class to interpret target framework monikers.
- public string FrameworkName => _frameworkName;
-
- public string? FrameworkDisplayName
- {
- get => _frameworkDisplayName;
- set => _frameworkDisplayName = value;
- }
- }
-}