提交 e296ee8d 编写于 作者: T Tanner Gooding 提交者: Jan Kotas

Updating the JIT to support marshaling blittable generics. (#103)

* Adding some tests for marshalling generics.

* Updating the VM to allow marshalling blittable generic types.

* Adding comments for why certain blittable generics are blocked from being marshaled

* Removing the new IDS_EE_BADMARSHAL_BLITTABLE_GENERICS_RESTRICTION string in favor of fixing the text in IDS_EE_BADMARSHAL_GENERICS_RESTRICTION

* Updating CrossGen2 to handle marshalling blittable generics
上级 da1b7172
......@@ -627,7 +627,7 @@ BEGIN
IDS_EE_BADMARSHAL_NOTMARSHALABLE "The type definition of this field has layout information but has an invalid managed/unmanaged type combination or is unmarshalable."
IDS_EE_BADMARSHAL_BADMETADATA "Invalid marshaling metadata."
IDS_EE_BADMARSHAL_CUSTOMMARSHALER "Custom marshalers are only allowed on classes, strings, arrays, and boxed value types."
IDS_EE_BADMARSHAL_GENERICS_RESTRICTION "Generic types cannot be marshaled."
IDS_EE_BADMARSHAL_GENERICS_RESTRICTION "Non-blittable generic types cannot be marshaled."
IDS_EE_BADMARSHAL_STRING_OUT "Cannot marshal a string by-value with the [Out] attribute."
IDS_EE_BADMARSHALPARAM_STRINGBUILDER "Invalid managed/unmanaged type combination (StringBuilders must be paired with LPStr, LPWStr, or LPTStr)."
......
......@@ -334,13 +334,29 @@ public static partial class MarshalHelpers
return MarshallerKind.Invalid;
}
if (type.HasInstantiation)
bool isBlittable = MarshalUtils.IsBlittableType(type);
// Blittable generics are allowed to be marshalled with the following exceptions:
// * ByReference<T>: This represents an interior pointer and is not actually blittable
// * Nullable<T>: We don't want to be locked into the default behavior as we may want special handling later
// * Vector64<T>: Represents the __m64 ABI primitive which requires currently unimplemented handling
// * Vector128<T>: Represents the __m128 ABI primitive which requires currently unimplemented handling
// * Vector256<T>: Represents the __m256 ABI primitive which requires currently unimplemented handling
// * Vector<T>: Has a variable size (either __m128 or __m256) and isn't readily usable for inteorp scenarios
if (type.HasInstantiation && (!isBlittable
|| InteropTypes.IsSystemByReference(context, type)
|| InteropTypes.IsSystemNullable(context, type)
|| InteropTypes.IsSystemRuntimeIntrinsicsVector64T(context, type)
|| InteropTypes.IsSystemRuntimeIntrinsicsVector128T(context, type)
|| InteropTypes.IsSystemRuntimeIntrinsicsVector256T(context, type)
|| InteropTypes.IsSystemNumericsVectorT(context, type)))
{
// Generic types cannot be marshaled.
return MarshallerKind.Invalid;
}
if (MarshalUtils.IsBlittableType(type))
if (isBlittable)
{
if (nativeType != NativeTypeKind.Default && nativeType != NativeTypeKind.Struct)
return MarshallerKind.Invalid;
......
......@@ -108,6 +108,36 @@ public static bool IsSystemArgIterator(TypeSystemContext context, TypeDesc type)
return IsCoreNamedType(context, type, "System", "ArgIterator");
}
public static bool IsSystemByReference(TypeSystemContext context, TypeDesc type)
{
return IsCoreNamedType(context, type, "System", "ByReference`1");
}
public static bool IsSystemNullable(TypeSystemContext context, TypeDesc type)
{
return IsCoreNamedType(context, type, "System", "Nullable`1");
}
public static bool IsSystemRuntimeIntrinsicsVector64T(TypeSystemContext context, TypeDesc type)
{
return IsCoreNamedType(context, type, "System.Runtime.Intrinsics", "Vector64`1");
}
public static bool IsSystemRuntimeIntrinsicsVector128T(TypeSystemContext context, TypeDesc type)
{
return IsCoreNamedType(context, type, "System.Runtime.Intrinsics", "Vector128`1");
}
public static bool IsSystemRuntimeIntrinsicsVector256T(TypeSystemContext context, TypeDesc type)
{
return IsCoreNamedType(context, type, "System.Runtime.Intrinsics", "Vector256`1");
}
public static bool IsSystemNumericsVectorT(TypeSystemContext context, TypeDesc type)
{
return IsCoreNamedType(context, type, "System.Numerics", "Vector`1");
}
private static bool IsOrDerivesFromType(TypeDesc type, MetadataType targetType)
{
while (type != null)
......
......@@ -2796,7 +2796,25 @@ MarshalInfo::MarshalInfo(Module* pModule,
}
#endif // FEATURE_COMINTEROP
if (m_pMT->HasInstantiation())
// Blittable generics are allowed to be marshalled with the following exceptions:
// * ByReference<T>: This represents an interior pointer and is not actually blittable
// * Nullable<T>: We don't want to be locked into the default behavior as we may want special handling later
// * Vector64<T>: Represents the __m64 ABI primitive which requires currently unimplemented handling
// * Vector128<T>: Represents the __m128 ABI primitive which requires currently unimplemented handling
// * Vector256<T>: Represents the __m256 ABI primitive which requires currently unimplemented handling
// * Vector<T>: Has a variable size (either __m128 or __m256) and isn't readily usable for inteorp scenarios
if (m_pMT->HasInstantiation() && (!m_pMT->IsBlittable()
|| m_pMT->HasSameTypeDefAs(g_pByReferenceClass)
|| m_pMT->HasSameTypeDefAs(g_pNullableClass)
|| m_pMT->HasSameTypeDefAs(MscorlibBinder::GetClass(CLASS__VECTOR64T))
|| m_pMT->HasSameTypeDefAs(MscorlibBinder::GetClass(CLASS__VECTOR128T))
|| m_pMT->HasSameTypeDefAs(MscorlibBinder::GetClass(CLASS__VECTOR256T))
#ifndef CROSSGEN_COMPILE
// Crossgen scenarios block Vector<T> from even being loaded
|| m_pMT->HasSameTypeDefAs(MscorlibBinder::GetClass(CLASS__VECTORT))
#endif // !CROSSGEN_COMPILE
))
{
m_resID = IDS_EE_BADMARSHAL_GENERICS_RESTRICTION;
IfFailGoto(E_FAIL, lFail);
......@@ -2916,7 +2934,7 @@ MarshalInfo::MarshalInfo(Module* pModule,
if (m_ms != MARSHAL_SCENARIO_WINRT)
#endif // FEATURE_COMINTEROP
{
if (thElement.HasInstantiation())
if (thElement.HasInstantiation() && !thElement.IsBlittable())
{
m_resID = IDS_EE_BADMARSHAL_GENERICS_RESTRICTION;
IfFailGoto(E_FAIL, lFail);
......
......@@ -499,6 +499,14 @@ DEFINE_FIELD(MARSHAL, SYSTEM_MAX_DBCS_CHAR_SIZE, SystemMax
DEFINE_CLASS(NATIVELIBRARY, Interop, NativeLibrary)
DEFINE_METHOD(NATIVELIBRARY, LOADLIBRARYCALLBACKSTUB, LoadLibraryCallbackStub, SM_Str_AssemblyBase_Bool_UInt_RetIntPtr)
DEFINE_CLASS(VECTOR64T, Intrinsics, Vector64`1)
DEFINE_CLASS(VECTOR128T, Intrinsics, Vector128`1)
DEFINE_CLASS(VECTOR256T, Intrinsics, Vector256`1)
#ifndef CROSSGEN_COMPILE
DEFINE_CLASS(VECTORT, Numerics, Vector`1)
#endif // !CROSSGEN_COMPILE
DEFINE_CLASS(MEMBER, Reflection, MemberInfo)
......
......@@ -40,6 +40,7 @@
#endif // FEATURE_COMINTEROP
#define g_IntrinsicsNS g_RuntimeNS ".Intrinsics"
#define g_NumericsNS g_SystemNS ".Numerics"
#define g_InternalCompilerServicesNS "Internal.Runtime.CompilerServices"
#define g_CompilerServicesNS g_RuntimeNS ".CompilerServices"
......
......@@ -30,6 +30,7 @@ add_subdirectory(PInvoke/Miscellaneous/HandleRef)
add_subdirectory(PInvoke/Miscellaneous/ThisCall)
add_subdirectory(PInvoke/Miscellaneous/MultipleAssembliesWithSamePInvoke)
add_subdirectory(PInvoke/CriticalHandles)
add_subdirectory(PInvoke/Generics)
add_subdirectory(PInvoke/AsAny)
add_subdirectory(PInvoke/SafeHandles)
add_subdirectory(NativeCallable)
......
cmake_minimum_required (VERSION 2.6)
project (GenericsNative)
include ("${CLR_INTEROP_TEST_ROOT}/Interop.cmake")
if(CLR_CMAKE_TARGET_ARCH_I386)
add_definitions(-D_TARGET_X86_)
add_definitions(-D_TARGET_XARCH_)
elseif(CLR_CMAKE_TARGET_ARCH_AMD64)
add_definitions(-D_TARGET_AMD64_)
add_definitions(-D_TARGET_XARCH_)
elseif(CLR_CMAKE_TARGET_ARCH_ARM)
add_definitions(-D_TARGET_ARM_)
add_definitions(-D_TARGET_ARMARCH_)
elseif(CLR_CMAKE_TARGET_ARCH_ARM64)
add_definitions(-D_TARGET_ARM64_)
add_definitions(-D_TARGET_ARMARCH_)
endif()
set(SOURCES
GenericsNative.IUnknown.cpp
GenericsNative.NullableB.cpp
GenericsNative.NullableC.cpp
GenericsNative.NullableD.cpp
GenericsNative.NullableF.cpp
GenericsNative.NullableL.cpp
GenericsNative.NullableU.cpp
GenericsNative.Point1B.cpp
GenericsNative.Point1C.cpp
GenericsNative.Point1D.cpp
GenericsNative.Point1F.cpp
GenericsNative.Point1L.cpp
GenericsNative.Point1U.cpp
GenericsNative.Point2B.cpp
GenericsNative.Point2C.cpp
GenericsNative.Point2D.cpp
GenericsNative.Point2F.cpp
GenericsNative.Point2L.cpp
GenericsNative.Point2U.cpp
GenericsNative.Point3B.cpp
GenericsNative.Point3C.cpp
GenericsNative.Point3D.cpp
GenericsNative.Point3F.cpp
GenericsNative.Point3L.cpp
GenericsNative.Point3U.cpp
GenericsNative.Point4B.cpp
GenericsNative.Point4C.cpp
GenericsNative.Point4D.cpp
GenericsNative.Point4F.cpp
GenericsNative.Point4L.cpp
GenericsNative.Point4U.cpp
GenericsNative.SequentialClassB.cpp
GenericsNative.SequentialClassC.cpp
GenericsNative.SequentialClassD.cpp
GenericsNative.SequentialClassF.cpp
GenericsNative.SequentialClassL.cpp
GenericsNative.SequentialClassU.cpp
GenericsNative.SpanB.cpp
GenericsNative.SpanC.cpp
GenericsNative.SpanD.cpp
GenericsNative.SpanF.cpp
GenericsNative.SpanL.cpp
GenericsNative.SpanU.cpp
GenericsNative.Vector64B.cpp
GenericsNative.Vector64C.cpp
GenericsNative.Vector64D.cpp
GenericsNative.Vector64F.cpp
GenericsNative.Vector64L.cpp
GenericsNative.Vector64U.cpp
GenericsNative.Vector128B.cpp
GenericsNative.Vector128C.cpp
GenericsNative.Vector128D.cpp
GenericsNative.Vector128F.cpp
GenericsNative.Vector128L.cpp
GenericsNative.Vector128U.cpp
GenericsNative.Vector256B.cpp
GenericsNative.Vector256C.cpp
GenericsNative.Vector256D.cpp
GenericsNative.Vector256F.cpp
GenericsNative.Vector256L.cpp
GenericsNative.Vector256U.cpp
GenericsNative.VectorB.cpp
GenericsNative.VectorC.cpp
GenericsNative.VectorD.cpp
GenericsNative.VectorF.cpp
GenericsNative.VectorL.cpp
GenericsNative.VectorU.cpp
)
add_library (GenericsNative SHARED ${SOURCES})
install (TARGETS GenericsNative DESTINATION bin)
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
extern "C" DLL_EXPORT IUnknown* STDMETHODCALLTYPE GetIComInterface()
{
throw "P/Invoke for IComInterface<T> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetIComInterfaceOut(IUnknown** pValue)
{
throw "P/Invoke for IComInterface<T> should be unsupported.";
}
extern "C" DLL_EXPORT const IUnknown** STDMETHODCALLTYPE GetIComInterfacePtr()
{
throw "P/Invoke for IComInterface<T> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetIComInterfaces(IUnknown** pValues, int count)
{
throw "P/Invoke for IComInterface<T> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct NullableB
{
bool hasValue;
bool value;
};
static NullableB NullableBValue = { };
extern "C" DLL_EXPORT NullableB STDMETHODCALLTYPE GetNullableB(bool hasValue, bool value)
{
throw "P/Invoke for Nullable<bool> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetNullableBOut(bool hasValue, bool value, NullableB* pValue)
{
throw "P/Invoke for Nullable<bool> should be unsupported.";
}
extern "C" DLL_EXPORT const NullableB* STDMETHODCALLTYPE GetNullableBPtr(bool hasValue, bool value)
{
throw "P/Invoke for Nullable<bool> should be unsupported.";
}
extern "C" DLL_EXPORT NullableB STDMETHODCALLTYPE AddNullableB(NullableB lhs, NullableB rhs)
{
throw "P/Invoke for Nullable<bool> should be unsupported.";
}
extern "C" DLL_EXPORT NullableB STDMETHODCALLTYPE AddNullableBs(const NullableB* pValues, uint32_t count)
{
throw "P/Invoke for Nullable<bool> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct NullableC
{
bool hasValue;
char16_t value;
};
static NullableC NullableCValue = { };
extern "C" DLL_EXPORT NullableC STDMETHODCALLTYPE GetNullableC(bool hasValue, char16_t value)
{
throw "P/Invoke for Nullable<char> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetNullableCOut(bool hasValue, char16_t value, NullableC* pValue)
{
throw "P/Invoke for Nullable<char> should be unsupported.";
}
extern "C" DLL_EXPORT const NullableC* STDMETHODCALLTYPE GetNullableCPtr(bool hasValue, char16_t value)
{
throw "P/Invoke for Nullable<char> should be unsupported.";
}
extern "C" DLL_EXPORT NullableC STDMETHODCALLTYPE AddNullableC(NullableC lhs, NullableC rhs)
{
throw "P/Invoke for Nullable<char> should be unsupported.";
}
extern "C" DLL_EXPORT NullableC STDMETHODCALLTYPE AddNullableCs(const NullableC* pValues, uint32_t count)
{
throw "P/Invoke for Nullable<char> should be unsupported.";
}
// Licensed to the .NET Doundation under one or more agreements.
// The .NET Doundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct NullableD
{
bool hasValue;
double value;
};
static NullableD NullableDValue = { };
extern "C" DLL_EXPORT NullableD STDMETHODCALLTYPE GetNullableD(bool hasValue, double value)
{
throw "P/Invoke for Nullable<double> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetNullableDOut(bool hasValue, double value, NullableD* pValue)
{
throw "P/Invoke for Nullable<double> should be unsupported.";
}
extern "C" DLL_EXPORT const NullableD* STDMETHODCALLTYPE GetNullableDPtr(bool hasValue, double value)
{
throw "P/Invoke for Nullable<double> should be unsupported.";
}
extern "C" DLL_EXPORT NullableD STDMETHODCALLTYPE AddNullableD(NullableD lhs, NullableD rhs)
{
throw "P/Invoke for Nullable<double> should be unsupported.";
}
extern "C" DLL_EXPORT NullableD STDMETHODCALLTYPE AddNullableDs(const NullableD* pValues, uint32_t count)
{
throw "P/Invoke for Nullable<double> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct NullableF
{
bool hasValue;
float value;
};
static NullableF NullableFValue = { };
extern "C" DLL_EXPORT NullableF STDMETHODCALLTYPE GetNullableF(bool hasValue, float value)
{
throw "P/Invoke for Nullable<float> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetNullableFOut(bool hasValue, float value, NullableF* pValue)
{
throw "P/Invoke for Nullable<float> should be unsupported.";
}
extern "C" DLL_EXPORT const NullableF* STDMETHODCALLTYPE GetNullableFPtr(bool hasValue, float value)
{
throw "P/Invoke for Nullable<float> should be unsupported.";
}
extern "C" DLL_EXPORT NullableF STDMETHODCALLTYPE AddNullableF(NullableF lhs, NullableF rhs)
{
throw "P/Invoke for Nullable<float> should be unsupported.";
}
extern "C" DLL_EXPORT NullableF STDMETHODCALLTYPE AddNullableFs(const NullableF* pValues, uint32_t count)
{
throw "P/Invoke for Nullable<float> should be unsupported.";
}
// Licensed to the .NET Doundation under one or more agreements.
// The .NET Doundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct NullableL
{
bool hasValue;
int64_t value;
};
static NullableL NullableLValue = { };
extern "C" DLL_EXPORT NullableL STDMETHODCALLTYPE GetNullableL(bool hasValue, int64_t value)
{
throw "P/Invoke for Nullable<long> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetNullableLOut(bool hasValue, int64_t value, NullableL* pValue)
{
throw "P/Invoke for Nullable<long> should be unsupported.";
}
extern "C" DLL_EXPORT const NullableL* STDMETHODCALLTYPE GetNullableLPtr(bool hasValue, int64_t value)
{
throw "P/Invoke for Nullable<long> should be unsupported.";
}
extern "C" DLL_EXPORT NullableL STDMETHODCALLTYPE AddNullableL(NullableL lhs, NullableL rhs)
{
throw "P/Invoke for Nullable<long> should be unsupported.";
}
extern "C" DLL_EXPORT NullableL STDMETHODCALLTYPE AddNullableLs(const NullableL* pValues, uint32_t count)
{
throw "P/Invoke for Nullable<long> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct NullableU
{
bool hasValue;
uint32_t value;
};
static NullableU NullableUValue = { };
extern "C" DLL_EXPORT NullableU STDMETHODCALLTYPE GetNullableU(bool hasValue, uint32_t value)
{
throw "P/Invoke for Nullable<uint> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetNullableUOut(bool hasValue, uint32_t value, NullableU* pValue)
{
throw "P/Invoke for Nullable<uint> should be unsupported.";
}
extern "C" DLL_EXPORT const NullableU* STDMETHODCALLTYPE GetNullableUPtr(bool hasValue, uint32_t value)
{
throw "P/Invoke for Nullable<uint> should be unsupported.";
}
extern "C" DLL_EXPORT NullableU STDMETHODCALLTYPE AddNullableU(NullableU lhs, NullableU rhs)
{
throw "P/Invoke for Nullable<uint> should be unsupported.";
}
extern "C" DLL_EXPORT NullableU STDMETHODCALLTYPE AddNullableUs(const NullableU* pValues, uint32_t count)
{
throw "P/Invoke for Nullable<uint> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct Point1B
{
bool e00;
};
static Point1B Point1BValue = { };
extern "C" DLL_EXPORT Point1B STDMETHODCALLTYPE GetPoint1B(bool e00)
{
throw "P/Invoke for Point1<bool> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetPoint1BOut(bool e00, Point1B* pValue)
{
throw "P/Invoke for Point1<bool> should be unsupported.";
}
extern "C" DLL_EXPORT const Point1B* STDMETHODCALLTYPE GetPoint1BPtr(bool e00)
{
throw "P/Invoke for Point1<bool> should be unsupported.";
}
extern "C" DLL_EXPORT Point1B STDMETHODCALLTYPE AddPoint1B(Point1B lhs, Point1B rhs)
{
throw "P/Invoke for Point1<bool> should be unsupported.";
}
extern "C" DLL_EXPORT Point1B STDMETHODCALLTYPE AddPoint1Bs(const Point1B* pValues, uint32_t count)
{
throw "P/Invoke for Point1<bool> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct Point1C
{
char16_t e00;
};
static Point1C Point1CValue = { };
extern "C" DLL_EXPORT Point1C STDMETHODCALLTYPE GetPoint1C(char16_t e00)
{
throw "P/Invoke for Point1<char> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetPoint1COut(char16_t e00, Point1C* pValue)
{
throw "P/Invoke for Point1<char> should be unsupported.";
}
extern "C" DLL_EXPORT const Point1C* STDMETHODCALLTYPE GetPoint1CPtr(char16_t e00)
{
throw "P/Invoke for Point1<char> should be unsupported.";
}
extern "C" DLL_EXPORT Point1C STDMETHODCALLTYPE AddPoint1C(Point1C lhs, Point1C rhs)
{
throw "P/Invoke for Point1<char> should be unsupported.";
}
extern "C" DLL_EXPORT Point1C STDMETHODCALLTYPE AddPoint1Cs(const Point1C* pValues, uint32_t count)
{
throw "P/Invoke for Point1<char> should be unsupported.";
}
// Licensed to the .NET Doundation under one or more agreements.
// The .NET Doundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct Point1D
{
double e00;
};
static Point1D Point1DValue = { };
extern "C" DLL_EXPORT Point1D STDMETHODCALLTYPE GetPoint1D(double e00)
{
return { e00 };
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetPoint1DOut(double e00, Point1D* pValue)
{
*pValue = GetPoint1D(e00);
}
extern "C" DLL_EXPORT const Point1D* STDMETHODCALLTYPE GetPoint1DPtr(double e00)
{
GetPoint1DOut(e00, &Point1DValue);
return &Point1DValue;
}
extern "C" DLL_EXPORT Point1D STDMETHODCALLTYPE AddPoint1D(Point1D lhs, Point1D rhs)
{
return { lhs.e00 + rhs.e00 };
}
extern "C" DLL_EXPORT Point1D STDMETHODCALLTYPE AddPoint1Ds(const Point1D* pValues, uint32_t count)
{
Point1D result = { };
if (pValues != nullptr)
{
for (uint32_t i = 0; i < count; i++)
{
result = AddPoint1D(result, pValues[i]);
}
}
return result;
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct Point1F
{
float e00;
};
static Point1F Point1FValue = { };
extern "C" DLL_EXPORT Point1F STDMETHODCALLTYPE GetPoint1F(float e00)
{
return { e00 };
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetPoint1FOut(float e00, Point1F* pValue)
{
*pValue = GetPoint1F(e00);
}
extern "C" DLL_EXPORT const Point1F* STDMETHODCALLTYPE GetPoint1FPtr(float e00)
{
GetPoint1FOut(e00, &Point1FValue);
return &Point1FValue;
}
extern "C" DLL_EXPORT Point1F STDMETHODCALLTYPE AddPoint1F(Point1F lhs, Point1F rhs)
{
return { lhs.e00 + rhs.e00 };
}
extern "C" DLL_EXPORT Point1F STDMETHODCALLTYPE AddPoint1Fs(const Point1F* pValues, uint32_t count)
{
Point1F result = { };
if (pValues != nullptr)
{
for (uint32_t i = 0; i < count; i++)
{
result = AddPoint1F(result, pValues[i]);
}
}
return result;
}
// Licensed to the .NET Doundation under one or more agreements.
// The .NET Doundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct Point1L
{
int64_t e00;
};
static Point1L Point1LValue = { };
extern "C" DLL_EXPORT Point1L STDMETHODCALLTYPE GetPoint1L(int64_t e00)
{
return { e00 };
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetPoint1LOut(int64_t e00, Point1L* pValue)
{
*pValue = GetPoint1L(e00);
}
extern "C" DLL_EXPORT const Point1L* STDMETHODCALLTYPE GetPoint1LPtr(int64_t e00)
{
GetPoint1LOut(e00, &Point1LValue);
return &Point1LValue;
}
extern "C" DLL_EXPORT Point1L STDMETHODCALLTYPE AddPoint1L(Point1L lhs, Point1L rhs)
{
return { lhs.e00 + rhs.e00 };
}
extern "C" DLL_EXPORT Point1L STDMETHODCALLTYPE AddPoint1Ls(const Point1L* pValues, uint32_t count)
{
Point1L result = { };
if (pValues != nullptr)
{
for (uint32_t i = 0; i < count; i++)
{
result = AddPoint1L(result, pValues[i]);
}
}
return result;
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct Point1U
{
uint32_t e00;
};
static Point1U Point1UValue = { };
extern "C" DLL_EXPORT Point1U STDMETHODCALLTYPE GetPoint1U(uint32_t e00)
{
return { e00 };
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetPoint1UOut(uint32_t e00, Point1U* pValue)
{
*pValue = GetPoint1U(e00);
}
extern "C" DLL_EXPORT const Point1U* STDMETHODCALLTYPE GetPoint1UPtr(uint32_t e00)
{
GetPoint1UOut(e00, &Point1UValue);
return &Point1UValue;
}
extern "C" DLL_EXPORT Point1U STDMETHODCALLTYPE AddPoint1U(Point1U lhs, Point1U rhs)
{
return { lhs.e00 + rhs.e00 };
}
extern "C" DLL_EXPORT Point1U STDMETHODCALLTYPE AddPoint1Us(const Point1U* pValues, uint32_t count)
{
Point1U result = { };
if (pValues != nullptr)
{
for (uint32_t i = 0; i < count; i++)
{
result = AddPoint1U(result, pValues[i]);
}
}
return result;
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct Point2B
{
bool e00;
bool e01;
};
static Point2B Point2BValue = { };
extern "C" DLL_EXPORT Point2B STDMETHODCALLTYPE GetPoint2B(bool e00, bool e01)
{
throw "P/Invoke for Point2<bool> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetPoint2BOut(bool e00, bool e01, Point2B* pValue)
{
throw "P/Invoke for Point2<bool> should be unsupported.";
}
extern "C" DLL_EXPORT const Point2B* STDMETHODCALLTYPE GetPoint2BPtr(bool e00, bool e01)
{
throw "P/Invoke for Point2<bool> should be unsupported.";
}
extern "C" DLL_EXPORT Point2B STDMETHODCALLTYPE AddPoint2B(Point2B lhs, Point2B rhs)
{
throw "P/Invoke for Point2<bool> should be unsupported.";
}
extern "C" DLL_EXPORT Point2B STDMETHODCALLTYPE AddPoint2Bs(const Point2B* pValues, uint32_t count)
{
throw "P/Invoke for Point2<bool> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct Point2C
{
char16_t e00;
char16_t e01;
};
static Point2C Point2CValue = { };
extern "C" DLL_EXPORT Point2C STDMETHODCALLTYPE GetPoint2C(char16_t e00, char16_t e01)
{
throw "P/Invoke for Point2<char> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetPoint2COut(char16_t e00, char16_t e01, Point2C* pValue)
{
throw "P/Invoke for Point2<char> should be unsupported.";
}
extern "C" DLL_EXPORT const Point2C* STDMETHODCALLTYPE GetPoint2CPtr(char16_t e00, char16_t e01)
{
throw "P/Invoke for Point2<char> should be unsupported.";
}
extern "C" DLL_EXPORT Point2C STDMETHODCALLTYPE AddPoint2C(Point2C lhs, Point2C rhs)
{
throw "P/Invoke for Point2<char> should be unsupported.";
}
extern "C" DLL_EXPORT Point2C STDMETHODCALLTYPE AddPoint2Cs(const Point2C* pValues, uint32_t count)
{
throw "P/Invoke for Point2<char> should be unsupported.";
}
// Licensed to the .NET Doundation under one or more agreements.
// The .NET Doundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct Point2D
{
double e00;
double e01;
};
static Point2D Point2DValue = { };
extern "C" DLL_EXPORT Point2D STDMETHODCALLTYPE GetPoint2D(double e00, double e01)
{
return { e00, e01 };
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetPoint2DOut(double e00, double e01, Point2D* pValue)
{
*pValue = GetPoint2D(e00, e01);
}
extern "C" DLL_EXPORT const Point2D* STDMETHODCALLTYPE GetPoint2DPtr(double e00, double e01)
{
GetPoint2DOut(e00, e01, &Point2DValue);
return &Point2DValue;
}
extern "C" DLL_EXPORT Point2D STDMETHODCALLTYPE AddPoint2D(Point2D lhs, Point2D rhs)
{
return {
lhs.e00 + rhs.e00,
lhs.e01 + rhs.e01
};
}
extern "C" DLL_EXPORT Point2D STDMETHODCALLTYPE AddPoint2Ds(const Point2D* pValues, uint32_t count)
{
Point2D result = { };
if (pValues != nullptr)
{
for (uint32_t i = 0; i < count; i++)
{
result = AddPoint2D(result, pValues[i]);
}
}
return result;
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct Point2F
{
float e00;
float e01;
};
static Point2F Point2FValue = { };
extern "C" DLL_EXPORT Point2F STDMETHODCALLTYPE GetPoint2F(float e00, float e01)
{
return { e00, e01 };
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetPoint2FOut(float e00, float e01, Point2F* pValue)
{
*pValue = GetPoint2F(e00, e01);
}
extern "C" DLL_EXPORT const Point2F* STDMETHODCALLTYPE GetPoint2FPtr(float e00, float e01)
{
GetPoint2FOut(e00, e01, &Point2FValue);
return &Point2FValue;
}
extern "C" DLL_EXPORT Point2F STDMETHODCALLTYPE AddPoint2F(Point2F lhs, Point2F rhs)
{
return {
lhs.e00 + rhs.e00,
lhs.e01 + rhs.e01
};
}
extern "C" DLL_EXPORT Point2F STDMETHODCALLTYPE AddPoint2Fs(const Point2F* pValues, uint32_t count)
{
Point2F result = { };
if (pValues != nullptr)
{
for (uint32_t i = 0; i < count; i++)
{
result = AddPoint2F(result, pValues[i]);
}
}
return result;
}
// Licensed to the .NET Doundation under one or more agreements.
// The .NET Doundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct Point2L
{
int64_t e00;
int64_t e01;
};
static Point2L Point2LValue = { };
extern "C" DLL_EXPORT Point2L STDMETHODCALLTYPE GetPoint2L(int64_t e00, int64_t e01)
{
return { e00, e01 };
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetPoint2LOut(int64_t e00, int64_t e01, Point2L* pValue)
{
*pValue = GetPoint2L(e00, e01);
}
extern "C" DLL_EXPORT const Point2L* STDMETHODCALLTYPE GetPoint2LPtr(int64_t e00, int64_t e01)
{
GetPoint2LOut(e00, e01, &Point2LValue);
return &Point2LValue;
}
extern "C" DLL_EXPORT Point2L STDMETHODCALLTYPE AddPoint2L(Point2L lhs, Point2L rhs)
{
return {
lhs.e00 + rhs.e00,
lhs.e01 + rhs.e01
};
}
extern "C" DLL_EXPORT Point2L STDMETHODCALLTYPE AddPoint2Ls(const Point2L* pValues, uint32_t count)
{
Point2L result = { };
if (pValues != nullptr)
{
for (uint32_t i = 0; i < count; i++)
{
result = AddPoint2L(result, pValues[i]);
}
}
return result;
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct Point2U
{
uint32_t e00;
uint32_t e01;
};
static Point2U Point2UValue = { };
extern "C" DLL_EXPORT Point2U STDMETHODCALLTYPE GetPoint2U(uint32_t e00, uint32_t e01)
{
return { e00, e01 };
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetPoint2UOut(uint32_t e00, uint32_t e01, Point2U* pValue)
{
*pValue = GetPoint2U(e00, e01);
}
extern "C" DLL_EXPORT const Point2U* STDMETHODCALLTYPE GetPoint2UPtr(uint32_t e00, uint32_t e01)
{
GetPoint2UOut(e00, e01, &Point2UValue);
return &Point2UValue;
}
extern "C" DLL_EXPORT Point2U STDMETHODCALLTYPE AddPoint2U(Point2U lhs, Point2U rhs)
{
return {
lhs.e00 + rhs.e00,
lhs.e01 + rhs.e01
};
}
extern "C" DLL_EXPORT Point2U STDMETHODCALLTYPE AddPoint2Us(const Point2U* pValues, uint32_t count)
{
Point2U result = { };
if (pValues != nullptr)
{
for (uint32_t i = 0; i < count; i++)
{
result = AddPoint2U(result, pValues[i]);
}
}
return result;
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct Point3B
{
bool e00;
bool e01;
bool e02;
};
static Point3B Point3BValue = { };
extern "C" DLL_EXPORT Point3B STDMETHODCALLTYPE GetPoint3B(bool e00, bool e01, bool e02)
{
throw "P/Invoke for Point3<bool> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetPoint3BOut(bool e00, bool e01, bool e02, Point3B* pValue)
{
throw "P/Invoke for Point3<bool> should be unsupported.";
}
extern "C" DLL_EXPORT const Point3B* STDMETHODCALLTYPE GetPoint3BPtr(bool e00, bool e01, bool e02)
{
throw "P/Invoke for Point3<bool> should be unsupported.";
}
extern "C" DLL_EXPORT Point3B STDMETHODCALLTYPE AddPoint3B(Point3B lhs, Point3B rhs)
{
throw "P/Invoke for Point3<bool> should be unsupported.";
}
extern "C" DLL_EXPORT Point3B STDMETHODCALLTYPE AddPoint3Bs(const Point3B* pValues, uint32_t count)
{
throw "P/Invoke for Point3<bool> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct Point3C
{
char16_t e00;
char16_t e01;
char16_t e02;
};
static Point3C Point3CValue = { };
extern "C" DLL_EXPORT Point3C STDMETHODCALLTYPE GetPoint3C(char16_t e00, char16_t e01, char16_t e02)
{
throw "P/Invoke for Point3<char> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetPoint3COut(char16_t e00, char16_t e01, char16_t e02, Point3C* pValue)
{
throw "P/Invoke for Point3<char> should be unsupported.";
}
extern "C" DLL_EXPORT const Point3C* STDMETHODCALLTYPE GetPoint3CPtr(char16_t e00, char16_t e01, char16_t e02)
{
throw "P/Invoke for Point3<char> should be unsupported.";
}
extern "C" DLL_EXPORT Point3C STDMETHODCALLTYPE AddPoint3C(Point3C lhs, Point3C rhs)
{
throw "P/Invoke for Point3<char> should be unsupported.";
}
extern "C" DLL_EXPORT Point3C STDMETHODCALLTYPE AddPoint3Cs(const Point3C* pValues, uint32_t count)
{
throw "P/Invoke for Point3<char> should be unsupported.";
}
// Licensed to the .NET Doundation under one or more agreements.
// The .NET Doundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct Point3D
{
double e00;
double e01;
double e02;
};
static Point3D Point3DValue = { };
extern "C" DLL_EXPORT Point3D STDMETHODCALLTYPE GetPoint3D(double e00, double e01, double e02)
{
return { e00, e01, e02 };
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetPoint3DOut(double e00, double e01, double e02, Point3D* pValue)
{
*pValue = GetPoint3D(e00, e01, e02);
}
extern "C" DLL_EXPORT const Point3D* STDMETHODCALLTYPE GetPoint3DPtr(double e00, double e01, double e02)
{
GetPoint3DOut(e00, e01, e02, &Point3DValue);
return &Point3DValue;
}
extern "C" DLL_EXPORT Point3D STDMETHODCALLTYPE AddPoint3D(Point3D lhs, Point3D rhs)
{
return {
lhs.e00 + rhs.e00,
lhs.e01 + rhs.e01,
lhs.e02 + rhs.e02
};
}
extern "C" DLL_EXPORT Point3D STDMETHODCALLTYPE AddPoint3Ds(const Point3D* pValues, uint32_t count)
{
Point3D result = { };
if (pValues != nullptr)
{
for (uint32_t i = 0; i < count; i++)
{
result = AddPoint3D(result, pValues[i]);
}
}
return result;
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct Point3F
{
float e00;
float e01;
float e02;
};
static Point3F Point3FValue = { };
extern "C" DLL_EXPORT Point3F STDMETHODCALLTYPE GetPoint3F(float e00, float e01, float e02)
{
return { e00, e01, e02 };
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetPoint3FOut(float e00, float e01, float e02, Point3F* pValue)
{
*pValue = GetPoint3F(e00, e01, e02);
}
extern "C" DLL_EXPORT const Point3F* STDMETHODCALLTYPE GetPoint3FPtr(float e00, float e01, float e02)
{
GetPoint3FOut(e00, e01, e02, &Point3FValue);
return &Point3FValue;
}
extern "C" DLL_EXPORT Point3F STDMETHODCALLTYPE AddPoint3F(Point3F lhs, Point3F rhs)
{
return {
lhs.e00 + rhs.e00,
lhs.e01 + rhs.e01,
lhs.e02 + rhs.e02
};
}
extern "C" DLL_EXPORT Point3F STDMETHODCALLTYPE AddPoint3Fs(const Point3F* pValues, uint32_t count)
{
Point3F result = { };
if (pValues != nullptr)
{
for (uint32_t i = 0; i < count; i++)
{
result = AddPoint3F(result, pValues[i]);
}
}
return result;
}
// Licensed to the .NET Doundation under one or more agreements.
// The .NET Doundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct Point3L
{
int64_t e00;
int64_t e01;
int64_t e02;
};
static Point3L Point3LValue = { };
extern "C" DLL_EXPORT Point3L STDMETHODCALLTYPE GetPoint3L(int64_t e00, int64_t e01, int64_t e02)
{
return { e00, e01, e02 };
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetPoint3LOut(int64_t e00, int64_t e01, int64_t e02, Point3L* pValue)
{
*pValue = GetPoint3L(e00, e01, e02);
}
extern "C" DLL_EXPORT const Point3L* STDMETHODCALLTYPE GetPoint3LPtr(int64_t e00, int64_t e01, int64_t e02)
{
GetPoint3LOut(e00, e01, e02, &Point3LValue);
return &Point3LValue;
}
extern "C" DLL_EXPORT Point3L STDMETHODCALLTYPE AddPoint3L(Point3L lhs, Point3L rhs)
{
return {
lhs.e00 + rhs.e00,
lhs.e01 + rhs.e01,
lhs.e02 + rhs.e02
};
}
extern "C" DLL_EXPORT Point3L STDMETHODCALLTYPE AddPoint3Ls(const Point3L* pValues, uint32_t count)
{
Point3L result = { };
if (pValues != nullptr)
{
for (uint32_t i = 0; i < count; i++)
{
result = AddPoint3L(result, pValues[i]);
}
}
return result;
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct Point3U
{
uint32_t e00;
uint32_t e01;
uint32_t e02;
};
static Point3U Point3UValue = { };
extern "C" DLL_EXPORT Point3U STDMETHODCALLTYPE GetPoint3U(uint32_t e00, uint32_t e01, uint32_t e02)
{
return { e00, e01, e02 };
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetPoint3UOut(uint32_t e00, uint32_t e01, uint32_t e02, Point3U* pValue)
{
*pValue = GetPoint3U(e00, e01, e02);
}
extern "C" DLL_EXPORT const Point3U* STDMETHODCALLTYPE GetPoint3UPtr(uint32_t e00, uint32_t e01, uint32_t e02)
{
GetPoint3UOut(e00, e01, e02, &Point3UValue);
return &Point3UValue;
}
extern "C" DLL_EXPORT Point3U STDMETHODCALLTYPE AddPoint3U(Point3U lhs, Point3U rhs)
{
return {
lhs.e00 + rhs.e00,
lhs.e01 + rhs.e01,
lhs.e02 + rhs.e02
};
}
extern "C" DLL_EXPORT Point3U STDMETHODCALLTYPE AddPoint3Us(const Point3U* pValues, uint32_t count)
{
Point3U result = { };
if (pValues != nullptr)
{
for (uint32_t i = 0; i < count; i++)
{
result = AddPoint3U(result, pValues[i]);
}
}
return result;
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct Point4B
{
bool e00;
bool e01;
bool e02;
bool e03;
};
static Point4B Point4BValue = { };
extern "C" DLL_EXPORT Point4B STDMETHODCALLTYPE GetPoint4B(bool e00, bool e01, bool e02, bool e03)
{
throw "P/Invoke for Point4<bool> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetPoint4BOut(bool e00, bool e01, bool e02, bool e03, Point4B* pValue)
{
throw "P/Invoke for Point4<bool> should be unsupported.";
}
extern "C" DLL_EXPORT const Point4B* STDMETHODCALLTYPE GetPoint4BPtr(bool e00, bool e01, bool e02, bool e03)
{
throw "P/Invoke for Point4<bool> should be unsupported.";
}
extern "C" DLL_EXPORT Point4B STDMETHODCALLTYPE AddPoint4B(Point4B lhs, Point4B rhs)
{
throw "P/Invoke for Point4<bool> should be unsupported.";
}
extern "C" DLL_EXPORT Point4B STDMETHODCALLTYPE AddPoint4Bs(const Point4B* pValues, uint32_t count)
{
throw "P/Invoke for Point4<bool> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct Point4C
{
char16_t e00;
char16_t e01;
char16_t e02;
char16_t e03;
};
static Point4C Point4CValue = { };
extern "C" DLL_EXPORT Point4C STDMETHODCALLTYPE GetPoint4C(char16_t e00, char16_t e01, char16_t e02, char16_t e03)
{
throw "P/Invoke for Point4<char> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetPoint4COut(char16_t e00, char16_t e01, char16_t e02, char16_t e03, Point4C* pValue)
{
throw "P/Invoke for Point4<char> should be unsupported.";
}
extern "C" DLL_EXPORT const Point4C* STDMETHODCALLTYPE GetPoint4CPtr(char16_t e00, char16_t e01, char16_t e02, char16_t e03)
{
throw "P/Invoke for Point4<char> should be unsupported.";
}
extern "C" DLL_EXPORT Point4C STDMETHODCALLTYPE AddPoint4C(Point4C lhs, Point4C rhs)
{
throw "P/Invoke for Point4<char> should be unsupported.";
}
extern "C" DLL_EXPORT Point4C STDMETHODCALLTYPE AddPoint4Cs(const Point4C* pValues, uint32_t count)
{
throw "P/Invoke for Point4<char> should be unsupported.";
}
// Licensed to the .NET Doundation under one or more agreements.
// The .NET Doundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct Point4D
{
double e00;
double e01;
double e02;
double e03;
};
static Point4D Point4DValue = { };
extern "C" DLL_EXPORT Point4D STDMETHODCALLTYPE GetPoint4D(double e00, double e01, double e02, double e03)
{
return { e00, e01, e02, e03 };
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetPoint4DOut(double e00, double e01, double e02, double e03, Point4D* pValue)
{
*pValue = GetPoint4D(e00, e01, e02, e03);
}
extern "C" DLL_EXPORT const Point4D* STDMETHODCALLTYPE GetPoint4DPtr(double e00, double e01, double e02, double e03)
{
GetPoint4DOut(e00, e01, e02, e03, &Point4DValue);
return &Point4DValue;
}
extern "C" DLL_EXPORT Point4D STDMETHODCALLTYPE AddPoint4D(Point4D lhs, Point4D rhs)
{
return {
lhs.e00 + rhs.e00,
lhs.e01 + rhs.e01,
lhs.e02 + rhs.e02,
lhs.e03 + rhs.e03
};
}
extern "C" DLL_EXPORT Point4D STDMETHODCALLTYPE AddPoint4Ds(const Point4D* pValues, uint32_t count)
{
Point4D result = { };
if (pValues != nullptr)
{
for (uint32_t i = 0; i < count; i++)
{
result = AddPoint4D(result, pValues[i]);
}
}
return result;
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct Point4F
{
float e00;
float e01;
float e02;
float e03;
};
static Point4F Point4FValue = { };
extern "C" DLL_EXPORT Point4F STDMETHODCALLTYPE GetPoint4F(float e00, float e01, float e02, float e03)
{
return { e00, e01, e02, e03 };
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetPoint4FOut(float e00, float e01, float e02, float e03, Point4F* pValue)
{
*pValue = GetPoint4F(e00, e01, e02, e03);
}
extern "C" DLL_EXPORT const Point4F* STDMETHODCALLTYPE GetPoint4FPtr(float e00, float e01, float e02, float e03)
{
GetPoint4FOut(e00, e01, e02, e03, &Point4FValue);
return &Point4FValue;
}
extern "C" DLL_EXPORT Point4F STDMETHODCALLTYPE AddPoint4F(Point4F lhs, Point4F rhs)
{
return {
lhs.e00 + rhs.e00,
lhs.e01 + rhs.e01,
lhs.e02 + rhs.e02,
lhs.e03 + rhs.e03
};
}
extern "C" DLL_EXPORT Point4F STDMETHODCALLTYPE AddPoint4Fs(const Point4F* pValues, uint32_t count)
{
Point4F result = { };
if (pValues != nullptr)
{
for (uint32_t i = 0; i < count; i++)
{
result = AddPoint4F(result, pValues[i]);
}
}
return result;
}
// Licensed to the .NET Doundation under one or more agreements.
// The .NET Doundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct Point4L
{
int64_t e00;
int64_t e01;
int64_t e02;
int64_t e03;
};
static Point4L Point4LValue = { };
extern "C" DLL_EXPORT Point4L STDMETHODCALLTYPE GetPoint4L(int64_t e00, int64_t e01, int64_t e02, int64_t e03)
{
return { e00, e01, e02, e03 };
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetPoint4LOut(int64_t e00, int64_t e01, int64_t e02, int64_t e03, Point4L* pValue)
{
*pValue = GetPoint4L(e00, e01, e02, e03);
}
extern "C" DLL_EXPORT const Point4L* STDMETHODCALLTYPE GetPoint4LPtr(int64_t e00, int64_t e01, int64_t e02, int64_t e03)
{
GetPoint4LOut(e00, e01, e02, e03, &Point4LValue);
return &Point4LValue;
}
extern "C" DLL_EXPORT Point4L STDMETHODCALLTYPE AddPoint4L(Point4L lhs, Point4L rhs)
{
return {
lhs.e00 + rhs.e00,
lhs.e01 + rhs.e01,
lhs.e02 + rhs.e02,
lhs.e03 + rhs.e03
};
}
extern "C" DLL_EXPORT Point4L STDMETHODCALLTYPE AddPoint4Ls(const Point4L* pValues, uint32_t count)
{
Point4L result = { };
if (pValues != nullptr)
{
for (uint32_t i = 0; i < count; i++)
{
result = AddPoint4L(result, pValues[i]);
}
}
return result;
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct Point4U
{
uint32_t e00;
uint32_t e01;
uint32_t e02;
uint32_t e03;
};
static Point4U Point4UValue = { };
extern "C" DLL_EXPORT Point4U STDMETHODCALLTYPE GetPoint4U(uint32_t e00, uint32_t e01, uint32_t e02, uint32_t e03)
{
return { e00, e01, e02, e03 };
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetPoint4UOut(uint32_t e00, uint32_t e01, uint32_t e02, uint32_t e03, Point4U* pValue)
{
*pValue = GetPoint4U(e00, e01, e02, e03);
}
extern "C" DLL_EXPORT const Point4U* STDMETHODCALLTYPE GetPoint4UPtr(uint32_t e00, uint32_t e01, uint32_t e02, uint32_t e03)
{
GetPoint4UOut(e00, e01, e02, e03, &Point4UValue);
return &Point4UValue;
}
extern "C" DLL_EXPORT Point4U STDMETHODCALLTYPE AddPoint4U(Point4U lhs, Point4U rhs)
{
return {
lhs.e00 + rhs.e00,
lhs.e01 + rhs.e01,
lhs.e02 + rhs.e02,
lhs.e03 + rhs.e03
};
}
extern "C" DLL_EXPORT Point4U STDMETHODCALLTYPE AddPoint4Us(const Point4U* pValues, uint32_t count)
{
Point4U result = { };
if (pValues != nullptr)
{
for (uint32_t i = 0; i < count; i++)
{
result = AddPoint4U(result, pValues[i]);
}
}
return result;
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct SequentialClassB
{
bool value;
};
static SequentialClassB SequentialClassBValue = { };
extern "C" DLL_EXPORT SequentialClassB* STDMETHODCALLTYPE GetSequentialClassB(bool value)
{
throw "P/Invoke for SequentialClass<bool> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetSequentialClassBOut(bool value, SequentialClassB** pValue)
{
throw "P/Invoke for SequentialClass<bool> should be unsupported.";
}
extern "C" DLL_EXPORT const SequentialClassB** STDMETHODCALLTYPE GetSequentialClassBPtr(bool value)
{
throw "P/Invoke for SequentialClass<bool> should be unsupported.";
}
extern "C" DLL_EXPORT SequentialClassB* STDMETHODCALLTYPE AddSequentialClassB(SequentialClassB* lhs, SequentialClassB* rhs)
{
throw "P/Invoke for SequentialClass<bool> should be unsupported.";
}
extern "C" DLL_EXPORT SequentialClassB* STDMETHODCALLTYPE AddSequentialClassBs(const SequentialClassB** pValues, uint32_t count)
{
throw "P/Invoke for SequentialClass<bool> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct SequentialClassC
{
char16_t value;
};
static SequentialClassC SequentialClassCValue = { };
extern "C" DLL_EXPORT SequentialClassC* STDMETHODCALLTYPE GetSequentialClassC(char16_t value)
{
throw "P/Invoke for SequentialClass<char> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetSequentialClassCOut(char16_t value, SequentialClassC** pValue)
{
throw "P/Invoke for SequentialClass<char> should be unsupported.";
}
extern "C" DLL_EXPORT const SequentialClassC** STDMETHODCALLTYPE GetSequentialClassCPtr(char16_t value)
{
throw "P/Invoke for SequentialClass<char> should be unsupported.";
}
extern "C" DLL_EXPORT SequentialClassC* STDMETHODCALLTYPE AddSequentialClassC(SequentialClassC* lhs, SequentialClassC* rhs)
{
throw "P/Invoke for SequentialClass<char> should be unsupported.";
}
extern "C" DLL_EXPORT SequentialClassC* STDMETHODCALLTYPE AddSequentialClassCs(const SequentialClassC** pValues, uint32_t count)
{
throw "P/Invoke for SequentialClass<char> should be unsupported.";
}
// Licensed to the .NET Doundation under one or more agreements.
// The .NET Doundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct SequentialClassD
{
double value;
};
static SequentialClassD SequentialClassDValue = { };
extern "C" DLL_EXPORT SequentialClassD* STDMETHODCALLTYPE GetSequentialClassD(double value)
{
throw "P/Invoke for SequentialClass<double> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetSequentialClassDOut(double value, SequentialClassD** pValue)
{
throw "P/Invoke for SequentialClass<double> should be unsupported.";
}
extern "C" DLL_EXPORT const SequentialClassD** STDMETHODCALLTYPE GetSequentialClassDPtr(double value)
{
throw "P/Invoke for SequentialClass<double> should be unsupported.";
}
extern "C" DLL_EXPORT SequentialClassD* STDMETHODCALLTYPE AddSequentialClassD(SequentialClassD* lhs, SequentialClassD* rhs)
{
throw "P/Invoke for SequentialClass<double> should be unsupported.";
}
extern "C" DLL_EXPORT SequentialClassD* STDMETHODCALLTYPE AddSequentialClassDs(const SequentialClassD** pValues, uint32_t count)
{
throw "P/Invoke for SequentialClass<double> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct SequentialClassF
{
float value;
};
static SequentialClassF SequentialClassFValue = { };
extern "C" DLL_EXPORT SequentialClassF* STDMETHODCALLTYPE GetSequentialClassF(float value)
{
throw "P/Invoke for SequentialClass<float> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetSequentialClassFOut(float value, SequentialClassF** pValue)
{
throw "P/Invoke for SequentialClass<float> should be unsupported.";
}
extern "C" DLL_EXPORT const SequentialClassF** STDMETHODCALLTYPE GetSequentialClassFPtr(float value)
{
throw "P/Invoke for SequentialClass<float> should be unsupported.";
}
extern "C" DLL_EXPORT SequentialClassF* STDMETHODCALLTYPE AddSequentialClassF(SequentialClassF* lhs, SequentialClassF* rhs)
{
throw "P/Invoke for SequentialClass<float> should be unsupported.";
}
extern "C" DLL_EXPORT SequentialClassF* STDMETHODCALLTYPE AddSequentialClassFs(const SequentialClassF** pValues, uint32_t count)
{
throw "P/Invoke for SequentialClass<float> should be unsupported.";
}
// Licensed to the .NET Doundation under one or more agreements.
// The .NET Doundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct SequentialClassL
{
int64_t value;
};
static SequentialClassL SequentialClassLValue = { };
extern "C" DLL_EXPORT SequentialClassL* STDMETHODCALLTYPE GetSequentialClassL(int64_t value)
{
throw "P/Invoke for SequentialClass<long> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetSequentialClassLOut(int64_t value, SequentialClassL** pValue)
{
throw "P/Invoke for SequentialClass<long> should be unsupported.";
}
extern "C" DLL_EXPORT const SequentialClassL** STDMETHODCALLTYPE GetSequentialClassLPtr(int64_t value)
{
throw "P/Invoke for SequentialClass<long> should be unsupported.";
}
extern "C" DLL_EXPORT SequentialClassL* STDMETHODCALLTYPE AddSequentialClassL(SequentialClassL* lhs, SequentialClassL* rhs)
{
throw "P/Invoke for SequentialClass<long> should be unsupported.";
}
extern "C" DLL_EXPORT SequentialClassL* STDMETHODCALLTYPE AddSequentialClassLs(const SequentialClassL** pValues, uint32_t count)
{
throw "P/Invoke for SequentialClass<long> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct SequentialClassU
{
uint32_t value;
};
static SequentialClassU SequentialClassUValue = { };
extern "C" DLL_EXPORT SequentialClassU* STDMETHODCALLTYPE GetSequentialClassU(uint32_t value)
{
throw "P/Invoke for SequentialClass<uint> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetSequentialClassUOut(uint32_t value, SequentialClassU** pValue)
{
throw "P/Invoke for SequentialClass<uint> should be unsupported.";
}
extern "C" DLL_EXPORT const SequentialClassU** STDMETHODCALLTYPE GetSequentialClassUPtr(uint32_t value)
{
throw "P/Invoke for SequentialClass<uint> should be unsupported.";
}
extern "C" DLL_EXPORT SequentialClassU* STDMETHODCALLTYPE AddSequentialClassU(SequentialClassU* lhs, SequentialClassU* rhs)
{
throw "P/Invoke for SequentialClass<uint> should be unsupported.";
}
extern "C" DLL_EXPORT SequentialClassU* STDMETHODCALLTYPE AddSequentialClassUs(const SequentialClassU** pValues, uint32_t count)
{
throw "P/Invoke for SequentialClass<uint> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct ByReferenceB
{
intptr_t value;
};
struct SpanB
{
ByReferenceB pointer;
int32_t length;
};
static SpanB SpanBValue = { };
extern "C" DLL_EXPORT SpanB STDMETHODCALLTYPE GetSpanB(bool e00)
{
throw "P/Invoke for Span<bool> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetSpanBOut(bool e00, SpanB* pValue)
{
throw "P/Invoke for Span<bool> should be unsupported.";
}
extern "C" DLL_EXPORT const SpanB* STDMETHODCALLTYPE GetSpanBPtr(bool e00)
{
throw "P/Invoke for Span<bool> should be unsupported.";
}
extern "C" DLL_EXPORT SpanB STDMETHODCALLTYPE AddSpanB(SpanB lhs, SpanB rhs)
{
throw "P/Invoke for Span<bool> should be unsupported.";
}
extern "C" DLL_EXPORT SpanB STDMETHODCALLTYPE AddSpanBs(const SpanB* pValues, uint32_t count)
{
throw "P/Invoke for Span<bool> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct ByReferenceC
{
intptr_t value;
};
struct SpanC
{
ByReferenceC pointer;
int32_t length;
};
static SpanC SpanCValue = { };
extern "C" DLL_EXPORT SpanC STDMETHODCALLTYPE GetSpanC(char16_t e00)
{
throw "P/Invoke for Span<char> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetSpanCOut(char16_t e00, SpanC* pValue)
{
throw "P/Invoke for Span<char> should be unsupported.";
}
extern "C" DLL_EXPORT const SpanC* STDMETHODCALLTYPE GetSpanCPtr(char16_t e00)
{
throw "P/Invoke for Span<char> should be unsupported.";
}
extern "C" DLL_EXPORT SpanC STDMETHODCALLTYPE AddSpanC(SpanC lhs, SpanC rhs)
{
throw "P/Invoke for Span<char> should be unsupported.";
}
extern "C" DLL_EXPORT SpanC STDMETHODCALLTYPE AddSpanCs(const SpanC* pValues, uint32_t count)
{
throw "P/Invoke for Span<char> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct ByReferenceD
{
intptr_t value;
};
struct SpanD
{
ByReferenceD pointer;
int32_t length;
};
static SpanD SpanDValue = { };
extern "C" DLL_EXPORT SpanD STDMETHODCALLTYPE GetSpanD(double e00)
{
throw "P/Invoke for Span<double> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetSpanDOut(double e00, SpanD* pValue)
{
throw "P/Invoke for Span<double> should be unsupported.";
}
extern "C" DLL_EXPORT const SpanD* STDMETHODCALLTYPE GetSpanDPtr(double e00)
{
throw "P/Invoke for Span<double> should be unsupported.";
}
extern "C" DLL_EXPORT SpanD STDMETHODCALLTYPE AddSpanD(SpanD lhs, SpanD rhs)
{
throw "P/Invoke for Span<double> should be unsupported.";
}
extern "C" DLL_EXPORT SpanD STDMETHODCALLTYPE AddSpanDs(const SpanD* pValues, uint32_t count)
{
throw "P/Invoke for Span<double> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct ByReferenceF
{
intptr_t value;
};
struct SpanF
{
ByReferenceF pointer;
int32_t length;
};
static SpanF SpanFValue = { };
extern "C" DLL_EXPORT SpanF STDMETHODCALLTYPE GetSpanF(float e00)
{
throw "P/Invoke for Span<float> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetSpanFOut(float e00, SpanF* pValue)
{
throw "P/Invoke for Span<float> should be unsupported.";
}
extern "C" DLL_EXPORT const SpanF* STDMETHODCALLTYPE GetSpanFPtr(float e00)
{
throw "P/Invoke for Span<float> should be unsupported.";
}
extern "C" DLL_EXPORT SpanF STDMETHODCALLTYPE AddSpanF(SpanF lhs, SpanF rhs)
{
throw "P/Invoke for Span<float> should be unsupported.";
}
extern "C" DLL_EXPORT SpanF STDMETHODCALLTYPE AddSpanFs(const SpanF* pValues, uint32_t count)
{
throw "P/Invoke for Span<float> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct ByReferenceL
{
intptr_t value;
};
struct SpanL
{
ByReferenceL pointer;
int32_t length;
};
static SpanL SpanLValue = { };
extern "C" DLL_EXPORT SpanL STDMETHODCALLTYPE GetSpanL(int64_t e00)
{
throw "P/Invoke for Span<long> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetSpanLOut(int64_t e00, SpanL* pValue)
{
throw "P/Invoke for Span<long> should be unsupported.";
}
extern "C" DLL_EXPORT const SpanL* STDMETHODCALLTYPE GetSpanLPtr(int64_t e00)
{
throw "P/Invoke for Span<long> should be unsupported.";
}
extern "C" DLL_EXPORT SpanL STDMETHODCALLTYPE AddSpanL(SpanL lhs, SpanL rhs)
{
throw "P/Invoke for Span<long> should be unsupported.";
}
extern "C" DLL_EXPORT SpanL STDMETHODCALLTYPE AddSpanLs(const SpanL* pValues, uint32_t count)
{
throw "P/Invoke for Span<long> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
struct ByReferenceU
{
intptr_t value;
};
struct SpanU
{
ByReferenceU pointer;
int32_t length;
};
static SpanU SpanUValue = { };
extern "C" DLL_EXPORT SpanU STDMETHODCALLTYPE GetSpanU(uint32_t e00)
{
throw "P/Invoke for Span<uint> should be unsupported.";
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetSpanUOut(uint32_t e00, SpanU* pValue)
{
throw "P/Invoke for Span<uint> should be unsupported.";
}
extern "C" DLL_EXPORT const SpanU* STDMETHODCALLTYPE GetSpanUPtr(uint32_t e00)
{
throw "P/Invoke for Span<uint> should be unsupported.";
}
extern "C" DLL_EXPORT SpanU STDMETHODCALLTYPE AddSpanU(SpanU lhs, SpanU rhs)
{
throw "P/Invoke for Span<uint> should be unsupported.";
}
extern "C" DLL_EXPORT SpanU STDMETHODCALLTYPE AddSpanUs(const SpanU* pValues, uint32_t count)
{
throw "P/Invoke for Span<uint> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
#if defined(_TARGET_XARCH_)
#include <emmintrin.h>
typedef __m128i Vector128B;
#elif defined(_TARGET_ARMARCH_)
#if defined(_MSC_VER)
#if defined(_TARGET_ARM64_)
#include <arm64_neon.h>
#else
#include <arm_neon.h>
#endif
#elif defined(_TARGET_ARM64_)
#include <arm_neon.h>
#else
typedef struct {
bool e00;
bool e01;
bool e02;
bool e03;
bool e04;
bool e05;
bool e06;
bool e07;
bool e08;
bool e09;
bool e10;
bool e11;
bool e12;
bool e13;
bool e14;
bool e15;
} int8x16_t;
#endif
typedef int8x16_t Vector128B;
#else
#error Unsupported target architecture
#endif
static Vector128B Vector128BValue = { };
extern "C" DLL_EXPORT Vector128B STDMETHODCALLTYPE GetVector128B(bool e00, bool e01, bool e02, bool e03, bool e04, bool e05, bool e06, bool e07, bool e08, bool e09, bool e10, bool e11, bool e12, bool e13, bool e14, bool e15)
{
union {
bool value[16];
Vector128B result;
};
value[0] = e00;
value[1] = e01;
value[2] = e02;
value[3] = e03;
value[4] = e04;
value[5] = e05;
value[6] = e06;
value[7] = e07;
value[8] = e08;
value[9] = e09;
value[10] = e10;
value[11] = e11;
value[12] = e12;
value[13] = e13;
value[14] = e14;
value[15] = e15;
return result;
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVector128BOut(bool e00, bool e01, bool e02, bool e03, bool e04, bool e05, bool e06, bool e07, bool e08, bool e09, bool e10, bool e11, bool e12, bool e13, bool e14, bool e15, Vector128B* pValue)
{
Vector128B value = GetVector128B(e00, e01, e02, e03, e04, e05, e06, e07, e08, e09, e10, e11, e12, e13, e14, e15);
#if defined(_TARGET_XARCH_)
_mm_storeu_si128(pValue, value);
#else
*pValue = value;
#endif
}
extern "C" DLL_EXPORT const Vector128B* STDMETHODCALLTYPE GetVector128BPtr(bool e00, bool e01, bool e02, bool e03, bool e04, bool e05, bool e06, bool e07, bool e08, bool e09, bool e10, bool e11, bool e12, bool e13, bool e14, bool e15)
{
GetVector128BOut(e00, e01, e02, e03, e04, e05, e06, e07, e08, e09, e10, e11, e12, e13, e14, e15, &Vector128BValue);
return &Vector128BValue;
}
extern "C" DLL_EXPORT Vector128B STDMETHODCALLTYPE AddVector128B(Vector128B lhs, Vector128B rhs)
{
throw "P/Invoke for Vector128<bool> should be unsupported.";
}
extern "C" DLL_EXPORT Vector128B STDMETHODCALLTYPE AddVector128Bs(const Vector128B* pValues, uint32_t count)
{
throw "P/Invoke for Vector128<bool> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
#if defined(_TARGET_XARCH_)
#include <emmintrin.h>
typedef __m128i Vector128C;
#elif defined(_TARGET_ARMARCH_)
#if defined(_MSC_VER)
#if defined(_TARGET_ARM64_)
#include <arm64_neon.h>
#else
#include <arm_neon.h>
#endif
#elif defined(_TARGET_ARM64_)
#include <arm_neon.h>
#else
typedef struct {
char16_t e00;
char16_t e01;
char16_t e02;
char16_t e03;
char16_t e04;
char16_t e05;
char16_t e06;
char16_t e07;
} int16x8_t;
#endif
typedef int16x8_t Vector128C;
#else
#error Unsupported target architecture
#endif
static Vector128C Vector128CValue = { };
extern "C" DLL_EXPORT Vector128C STDMETHODCALLTYPE GetVector128C(char16_t e00, char16_t e01, char16_t e02, char16_t e03, char16_t e04, char16_t e05, char16_t e06, char16_t e07)
{
union {
char16_t value[8];
Vector128C result;
};
value[0] = e00;
value[1] = e01;
value[2] = e02;
value[3] = e03;
value[4] = e04;
value[5] = e05;
value[6] = e06;
value[7] = e07;
return result;
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVector128COut(char16_t e00, char16_t e01, char16_t e02, char16_t e03, char16_t e04, char16_t e05, char16_t e06, char16_t e07, Vector128C* pValue)
{
Vector128C value = GetVector128C(e00, e01, e02, e03, e04, e05, e06, e07);
#if defined(_TARGET_XARCH_)
_mm_storeu_si128(pValue, value);
#else
*pValue = value;
#endif
}
extern "C" DLL_EXPORT const Vector128C* STDMETHODCALLTYPE GetVector128CPtr(char16_t e00, char16_t e01, char16_t e02, char16_t e03, char16_t e04, char16_t e05, char16_t e06, char16_t e07)
{
GetVector128COut(e00, e01, e02, e03, e04, e05, e06, e07, &Vector128CValue);
return &Vector128CValue;
}
extern "C" DLL_EXPORT Vector128C STDMETHODCALLTYPE AddVector128C(Vector128C lhs, Vector128C rhs)
{
throw "P/Invoke for Vector128<char> should be unsupported.";
}
extern "C" DLL_EXPORT Vector128C STDMETHODCALLTYPE AddVector128Cs(const Vector128C* pValues, uint32_t count)
{
throw "P/Invoke for Vector128<char> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
#if defined(_TARGET_XARCH_)
#include <emmintrin.h>
typedef __m128d Vector128D;
#elif defined(_TARGET_ARMARCH_)
#if defined(_MSC_VER)
#if defined(_TARGET_ARM64_)
#include <arm64_neon.h>
#else
#include <arm_neon.h>
typedef __n128 float64x2_t;
#endif
#elif defined(_TARGET_ARM64_)
#include <arm_neon.h>
#else
typedef struct {
double e00;
double e01;
} float64x2_t;
#endif
typedef float64x2_t Vector128D;
#else
#error Unsupported target architecture
#endif
static Vector128D Vector128DValue = { };
extern "C" DLL_EXPORT Vector128D STDMETHODCALLTYPE GetVector128D(double e00, double e01)
{
union {
double value[2];
Vector128D result;
};
value[0] = e00;
value[1] = e01;
return result;
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVector128DOut(double e00, double e01, Vector128D* pValue)
{
Vector128D value = GetVector128D(e00, e01);
#if defined(_TARGET_XARCH_)
_mm_storeu_pd((double*)pValue, value);
#else
*pValue = value;
#endif
}
extern "C" DLL_EXPORT const Vector128D* STDMETHODCALLTYPE GetVector128DPtr(double e00, double e01)
{
GetVector128DOut(e00, e01, &Vector128DValue);
return &Vector128DValue;
}
extern "C" DLL_EXPORT Vector128D STDMETHODCALLTYPE AddVector128D(Vector128D lhs, Vector128D rhs)
{
throw "P/Invoke for Vector128<double> should be unsupported.";
}
extern "C" DLL_EXPORT Vector128D STDMETHODCALLTYPE AddVector128Ds(const Vector128D* pValues, uint32_t count)
{
throw "P/Invoke for Vector128<double> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
#if defined(_TARGET_XARCH_)
#include <xmmintrin.h>
typedef __m128 Vector128F;
#elif defined(_TARGET_ARMARCH_)
#if defined(_MSC_VER)
#if defined(_TARGET_ARM64_)
#include <arm64_neon.h>
#else
#include <arm_neon.h>
#endif
#elif defined(_TARGET_ARM64_)
#include <arm_neon.h>
#else
typedef struct {
float e00;
float e01;
float e02;
float e03;
} float32x4_t;
#endif
typedef float32x4_t Vector128F;
#else
#error Unsupported target architecture
#endif
static Vector128F Vector128FValue = { };
extern "C" DLL_EXPORT Vector128F STDMETHODCALLTYPE GetVector128F(float e00, float e01, float e02, float e03)
{
union {
float value[4];
Vector128F result;
};
value[0] = e00;
value[1] = e01;
value[2] = e02;
value[3] = e03;
return result;
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVector128FOut(float e00, float e01, float e02, float e03, Vector128F* pValue)
{
Vector128F value = GetVector128F(e00, e01, e02, e03);
#if defined(_TARGET_XARCH_)
_mm_storeu_ps((float*)pValue, value);
#else
*pValue = value;
#endif
}
extern "C" DLL_EXPORT const Vector128F* STDMETHODCALLTYPE GetVector128FPtr(float e00, float e01, float e02, float e03)
{
GetVector128FOut(e00, e01, e02, e03, &Vector128FValue);
return &Vector128FValue;
}
extern "C" DLL_EXPORT Vector128F STDMETHODCALLTYPE AddVector128F(Vector128F lhs, Vector128F rhs)
{
throw "P/Invoke for Vector128<float> should be unsupported.";
}
extern "C" DLL_EXPORT Vector128F STDMETHODCALLTYPE AddVector128Fs(const Vector128F* pValues, uint32_t count)
{
throw "P/Invoke for Vector128<float> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
#if defined(_TARGET_XARCH_)
#include <emmintrin.h>
typedef __m128i Vector128L;
#elif defined(_TARGET_ARMARCH_)
#if defined(_MSC_VER)
#if defined(_TARGET_ARM64_)
#include <arm64_neon.h>
#else
#include <arm_neon.h>
#endif
#elif defined(_TARGET_ARM64_)
#include <arm_neon.h>
#else
typedef struct {
int64_t e00;
int64_t e01;
} int64x2_t;
#endif
typedef int64x2_t Vector128L;
#else
#error Unsupported target architecture
#endif
static Vector128L Vector128LValue = { };
extern "C" DLL_EXPORT Vector128L STDMETHODCALLTYPE GetVector128L(int64_t e00, int64_t e01)
{
union {
int64_t value[2];
Vector128L result;
};
value[0] = e00;
value[1] = e01;
return result;
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVector128LOut(int64_t e00, int64_t e01, Vector128L* pValue)
{
Vector128L value = GetVector128L(e00, e01);
#if defined(_TARGET_XARCH_)
_mm_storeu_si128(pValue, value);
#else
*pValue = value;
#endif
}
extern "C" DLL_EXPORT const Vector128L* STDMETHODCALLTYPE GetVector128LPtr(int64_t e00, int64_t e01)
{
GetVector128LOut(e00, e01, &Vector128LValue);
return &Vector128LValue;
}
extern "C" DLL_EXPORT Vector128L STDMETHODCALLTYPE AddVector128L(Vector128L lhs, Vector128L rhs)
{
throw "P/Invoke for Vector128<long> should be unsupported.";
}
extern "C" DLL_EXPORT Vector128L STDMETHODCALLTYPE AddVector128Ls(const Vector128L* pValues, uint32_t count)
{
throw "P/Invoke for Vector128<long> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
#if defined(_TARGET_XARCH_)
#include <emmintrin.h>
typedef __m128i Vector128U;
#elif defined(_TARGET_ARMARCH_)
#if defined(_MSC_VER)
#if defined(_TARGET_ARM64_)
#include <arm64_neon.h>
#else
#include <arm_neon.h>
#endif
#elif defined(_TARGET_ARM64_)
#include <arm_neon.h>
#else
typedef struct {
uint32_t e00;
uint32_t e01;
uint32_t e02;
uint32_t e03;
} uint32x4_t;
#endif
typedef uint32x4_t Vector128U;
#else
#error Unsupported target architecture
#endif
static Vector128U Vector128UValue = { };
extern "C" DLL_EXPORT Vector128U STDMETHODCALLTYPE GetVector128U(uint32_t e00, uint32_t e01, uint32_t e02, uint32_t e03)
{
union {
uint32_t value[4];
Vector128U result;
};
value[0] = e00;
value[1] = e01;
value[2] = e02;
value[3] = e03;
return result;
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVector128UOut(uint32_t e00, uint32_t e01, uint32_t e02, uint32_t e03, Vector128U* pValue)
{
Vector128U value = GetVector128U(e00, e01, e02, e03);
#if defined(_TARGET_XARCH_)
_mm_storeu_si128(pValue, value);
#else
*pValue = value;
#endif
}
extern "C" DLL_EXPORT const Vector128U* STDMETHODCALLTYPE GetVector128UPtr(uint32_t e00, uint32_t e01, uint32_t e02, uint32_t e03)
{
GetVector128UOut(e00, e01, e02, e03, &Vector128UValue);
return &Vector128UValue;
}
extern "C" DLL_EXPORT Vector128U STDMETHODCALLTYPE AddVector128U(Vector128U lhs, Vector128U rhs)
{
throw "P/Invoke for Vector128<uint> should be unsupported.";
}
extern "C" DLL_EXPORT Vector128U STDMETHODCALLTYPE AddVector128Us(const Vector128U* pValues, uint32_t count)
{
throw "P/Invoke for Vector128<uint> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
#if defined(_TARGET_XARCH_)
#include <immintrin.h>
typedef __m256i Vector256B;
#elif defined(_TARGET_ARMARCH_)
typedef struct {
bool e00;
bool e01;
bool e02;
bool e03;
bool e04;
bool e05;
bool e06;
bool e07;
bool e08;
bool e09;
bool e10;
bool e11;
bool e12;
bool e13;
bool e14;
bool e15;
bool e16;
bool e17;
bool e18;
bool e19;
bool e20;
bool e21;
bool e22;
bool e23;
bool e24;
bool e25;
bool e26;
bool e27;
bool e28;
bool e29;
bool e30;
bool e31;
} Vector256B;
#else
#error Unsupported target architecture
#endif
static Vector256B Vector256BValue = { };
extern "C" DLL_EXPORT Vector256B STDMETHODCALLTYPE GetVector256B(bool e00, bool e01, bool e02, bool e03, bool e04, bool e05, bool e06, bool e07, bool e08, bool e09, bool e10, bool e11, bool e12, bool e13, bool e14, bool e15, bool e16, bool e17, bool e18, bool e19, bool e20, bool e21, bool e22, bool e23, bool e24, bool e25, bool e26, bool e27, bool e28, bool e29, bool e30, bool e31)
{
union {
bool value[32];
Vector256B result;
};
value[0] = e00;
value[1] = e01;
value[2] = e02;
value[3] = e03;
value[4] = e04;
value[5] = e05;
value[6] = e06;
value[7] = e07;
value[8] = e08;
value[9] = e09;
value[10] = e10;
value[11] = e11;
value[12] = e12;
value[13] = e13;
value[14] = e14;
value[15] = e15;
value[16] = e16;
value[17] = e17;
value[18] = e18;
value[19] = e19;
value[20] = e20;
value[21] = e21;
value[22] = e22;
value[23] = e23;
value[24] = e24;
value[25] = e25;
value[26] = e26;
value[27] = e27;
value[28] = e28;
value[29] = e29;
value[30] = e30;
value[31] = e31;
return result;
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVector256BOut(bool e00, bool e01, bool e02, bool e03, bool e04, bool e05, bool e06, bool e07, bool e08, bool e09, bool e10, bool e11, bool e12, bool e13, bool e14, bool e15, bool e16, bool e17, bool e18, bool e19, bool e20, bool e21, bool e22, bool e23, bool e24, bool e25, bool e26, bool e27, bool e28, bool e29, bool e30, bool e31, Vector256B* pValue)
{
Vector256B value = GetVector256B(e00, e01, e02, e03, e04, e05, e06, e07, e08, e09, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31);
#if defined(_TARGET_XARCH_)
_mm_storeu_si128(((__m128i*)pValue) + 0, *(((__m128i*)&value) + 0));
_mm_storeu_si128(((__m128i*)pValue) + 1, *(((__m128i*)&value) + 1));
#else
*pValue = value;
#endif
}
extern "C" DLL_EXPORT const Vector256B* STDMETHODCALLTYPE GetVector256BPtr(bool e00, bool e01, bool e02, bool e03, bool e04, bool e05, bool e06, bool e07, bool e08, bool e09, bool e10, bool e11, bool e12, bool e13, bool e14, bool e15, bool e16, bool e17, bool e18, bool e19, bool e20, bool e21, bool e22, bool e23, bool e24, bool e25, bool e26, bool e27, bool e28, bool e29, bool e30, bool e31)
{
GetVector256BOut(e00, e01, e02, e03, e04, e05, e06, e07, e08, e09, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, &Vector256BValue);
return &Vector256BValue;
}
extern "C" DLL_EXPORT Vector256B STDMETHODCALLTYPE AddVector256B(Vector256B lhs, Vector256B rhs)
{
throw "P/Invoke for Vector256<bool> should be unsupported.";
}
extern "C" DLL_EXPORT Vector256B STDMETHODCALLTYPE AddVector256Bs(const Vector256B* pValues, uint32_t count)
{
throw "P/Invoke for Vector256<bool> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
#if defined(_TARGET_XARCH_)
#include <immintrin.h>
typedef __m256i Vector256C;
#elif defined(_TARGET_ARMARCH_)
typedef struct {
char16_t e00;
char16_t e01;
char16_t e02;
char16_t e03;
char16_t e04;
char16_t e05;
char16_t e06;
char16_t e07;
char16_t e08;
char16_t e09;
char16_t e10;
char16_t e11;
char16_t e12;
char16_t e13;
char16_t e14;
char16_t e15;
} Vector256C;
#else
#error Unsupported target architecture
#endif
static Vector256C Vector256CValue = { };
extern "C" DLL_EXPORT Vector256C STDMETHODCALLTYPE GetVector256C(char16_t e00, char16_t e01, char16_t e02, char16_t e03, char16_t e04, char16_t e05, char16_t e06, char16_t e07, char16_t e08, char16_t e09, char16_t e10, char16_t e11, char16_t e12, char16_t e13, char16_t e14, char16_t e15)
{
union {
char16_t value[16];
Vector256C result;
};
value[0] = e00;
value[1] = e01;
value[2] = e02;
value[3] = e03;
value[4] = e04;
value[5] = e05;
value[6] = e06;
value[7] = e07;
value[8] = e08;
value[9] = e09;
value[10] = e10;
value[11] = e11;
value[12] = e12;
value[13] = e13;
value[14] = e14;
value[15] = e15;
return result;
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVector256COut(char16_t e00, char16_t e01, char16_t e02, char16_t e03, char16_t e04, char16_t e05, char16_t e06, char16_t e07, char16_t e08, char16_t e09, char16_t e10, char16_t e11, char16_t e12, char16_t e13, char16_t e14, char16_t e15, Vector256C* pValue)
{
Vector256C value = GetVector256C(e00, e01, e02, e03, e04, e05, e06, e07, e08, e09, e10, e11, e12, e13, e14, e15);
#if defined(_TARGET_XARCH_)
_mm_storeu_si128(((__m128i*)pValue) + 0, *(((__m128i*)&value) + 0));
_mm_storeu_si128(((__m128i*)pValue) + 1, *(((__m128i*)&value) + 1));
#else
*pValue = value;
#endif
}
extern "C" DLL_EXPORT const Vector256C* STDMETHODCALLTYPE GetVector256CPtr(char16_t e00, char16_t e01, char16_t e02, char16_t e03, char16_t e04, char16_t e05, char16_t e06, char16_t e07, char16_t e08, char16_t e09, char16_t e10, char16_t e11, char16_t e12, char16_t e13, char16_t e14, char16_t e15)
{
GetVector256COut(e00, e01, e02, e03, e04, e05, e06, e07, e08, e09, e10, e11, e12, e13, e14, e15, &Vector256CValue);
return &Vector256CValue;
}
extern "C" DLL_EXPORT Vector256C STDMETHODCALLTYPE AddVector256C(Vector256C lhs, Vector256C rhs)
{
throw "P/Invoke for Vector256<char> should be unsupported.";
}
extern "C" DLL_EXPORT Vector256C STDMETHODCALLTYPE AddVector256Cs(const Vector256C* pValues, uint32_t count)
{
throw "P/Invoke for Vector256<char> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
#if defined(_TARGET_XARCH_)
#include <immintrin.h>
typedef __m256d Vector256D;
#elif defined(_TARGET_ARMARCH_)
typedef struct {
double e00;
double e01;
double e02;
double e03;
} Vector256D;
#else
#error Unsupported target architecture
#endif
static Vector256D Vector256DValue = { };
extern "C" DLL_EXPORT Vector256D STDMETHODCALLTYPE GetVector256D(double e00, double e01, double e02, double e03)
{
union {
double value[4];
Vector256D result;
};
value[0] = e00;
value[1] = e01;
value[2] = e02;
value[3] = e03;
return result;
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVector256DOut(double e00, double e01, double e02, double e03, Vector256D* pValue)
{
Vector256D value = GetVector256D(e00, e01, e02, e03);
#if defined(_TARGET_XARCH_)
_mm_storeu_pd((double*)(((__m128d*)pValue) + 0), *(((__m128d*)&value) + 0));
_mm_storeu_pd((double*)(((__m128d*)pValue) + 1), *(((__m128d*)&value) + 1));
#else
*pValue = value;
#endif
}
extern "C" DLL_EXPORT const Vector256D* STDMETHODCALLTYPE GetVector256DPtr(double e00, double e01, double e02, double e03)
{
GetVector256DOut(e00, e01, e02, e03, &Vector256DValue);
return &Vector256DValue;
}
extern "C" DLL_EXPORT Vector256D STDMETHODCALLTYPE AddVector256D(Vector256D lhs, Vector256D rhs)
{
throw "P/Invoke for Vector256<double> should be unsupported.";
}
extern "C" DLL_EXPORT Vector256D STDMETHODCALLTYPE AddVector256Ds(const Vector256D* pValues, uint32_t count)
{
throw "P/Invoke for Vector256<double> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
#if defined(_TARGET_XARCH_)
#include <immintrin.h>
typedef __m256 Vector256F;
#elif defined(_TARGET_ARMARCH_)
typedef struct {
float e00;
float e01;
float e02;
float e03;
float e04;
float e05;
float e06;
float e07;
} Vector256F;
#else
#error Unsupported target architecture
#endif
static Vector256F Vector256FValue = { };
extern "C" DLL_EXPORT Vector256F STDMETHODCALLTYPE GetVector256F(float e00, float e01, float e02, float e03, float e04, float e05, float e06, float e07)
{
union {
float value[8];
Vector256F result;
};
value[0] = e00;
value[1] = e01;
value[2] = e02;
value[3] = e03;
value[4] = e04;
value[5] = e05;
value[6] = e06;
value[7] = e07;
return result;
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVector256FOut(float e00, float e01, float e02, float e03, float e04, float e05, float e06, float e07, Vector256F* pValue)
{
Vector256F value = GetVector256F(e00, e01, e02, e03, e04, e05, e06, e07);
#if defined(_TARGET_XARCH_)
_mm_storeu_ps((float*)(((__m128*)pValue) + 0), *(((__m128*)&value) + 0));
_mm_storeu_ps((float*)(((__m128*)pValue) + 1), *(((__m128*)&value) + 1));
#else
*pValue = value;
#endif
}
extern "C" DLL_EXPORT const Vector256F* STDMETHODCALLTYPE GetVector256FPtr(float e00, float e01, float e02, float e03, float e04, float e05, float e06, float e07)
{
GetVector256FOut(e00, e01, e02, e03, e04, e05, e06, e07, &Vector256FValue);
return &Vector256FValue;
}
extern "C" DLL_EXPORT Vector256F STDMETHODCALLTYPE AddVector256F(Vector256F lhs, Vector256F rhs)
{
throw "P/Invoke for Vector256<float> should be unsupported.";
}
extern "C" DLL_EXPORT Vector256F STDMETHODCALLTYPE AddVector256Fs(const Vector256F* pValues, uint32_t count)
{
throw "P/Invoke for Vector256<float> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
#if defined(_TARGET_XARCH_)
#include <immintrin.h>
typedef __m256i Vector256L;
#elif defined(_TARGET_ARMARCH_)
typedef struct {
int64_t e00;
int64_t e01;
int64_t e02;
int64_t e03;
} Vector256L;
#else
#error Unsupported target architecture
#endif
static Vector256L Vector256LValue = { };
extern "C" DLL_EXPORT Vector256L STDMETHODCALLTYPE GetVector256L(int64_t e00, int64_t e01, int64_t e02, int64_t e03)
{
union {
int64_t value[4];
Vector256L result;
};
value[0] = e00;
value[1] = e01;
value[2] = e02;
value[3] = e03;
return result;
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVector256LOut(int64_t e00, int64_t e01, int64_t e02, int64_t e03, Vector256L* pValue)
{
Vector256L value = GetVector256L(e00, e01, e02, e03);
#if defined(_TARGET_XARCH_)
_mm_storeu_si128(((__m128i*)pValue) + 0, *(((__m128i*)&value) + 0));
_mm_storeu_si128(((__m128i*)pValue) + 1, *(((__m128i*)&value) + 1));
#else
*pValue = value;
#endif
}
extern "C" DLL_EXPORT const Vector256L* STDMETHODCALLTYPE GetVector256LPtr(int64_t e00, int64_t e01, int64_t e02, int64_t e03)
{
GetVector256LOut(e00, e01, e02, e03, &Vector256LValue);
return &Vector256LValue;
}
extern "C" DLL_EXPORT Vector256L STDMETHODCALLTYPE AddVector256L(Vector256L lhs, Vector256L rhs)
{
throw "P/Invoke for Vector256<long> should be unsupported.";
}
extern "C" DLL_EXPORT Vector256L STDMETHODCALLTYPE AddVector256Ls(const Vector256L* pValues, uint32_t count)
{
throw "P/Invoke for Vector256<long> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
#if defined(_TARGET_XARCH_)
#include <immintrin.h>
typedef __m256i Vector256U;
#elif defined(_TARGET_ARMARCH_)
typedef struct {
uint32_t e00;
uint32_t e01;
uint32_t e02;
uint32_t e03;
uint32_t e04;
uint32_t e05;
uint32_t e06;
uint32_t e07;
} Vector256U;
#else
#error Unsupported target architecture
#endif
static Vector256U Vector256UValue = { };
extern "C" DLL_EXPORT Vector256U STDMETHODCALLTYPE GetVector256U(uint32_t e00, uint32_t e01, uint32_t e02, uint32_t e03, uint32_t e04, uint32_t e05, uint32_t e06, uint32_t e07)
{
union {
uint32_t value[8];
Vector256U result;
};
value[0] = e00;
value[1] = e01;
value[2] = e02;
value[3] = e03;
value[4] = e04;
value[5] = e05;
value[6] = e06;
value[7] = e07;
return result;
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVector256UOut(uint32_t e00, uint32_t e01, uint32_t e02, uint32_t e03, uint32_t e04, uint32_t e05, uint32_t e06, uint32_t e07, Vector256U* pValue)
{
Vector256U value = GetVector256U(e00, e01, e02, e03, e04, e05, e06, e07);
#if defined(_TARGET_XARCH_)
_mm_storeu_si128(((__m128i*)pValue) + 0, *(((__m128i*)&value) + 0));
_mm_storeu_si128(((__m128i*)pValue) + 1, *(((__m128i*)&value) + 1));
#else
*pValue = value;
#endif
}
extern "C" DLL_EXPORT const Vector256U* STDMETHODCALLTYPE GetVector256UPtr(uint32_t e00, uint32_t e01, uint32_t e02, uint32_t e03, uint32_t e04, uint32_t e05, uint32_t e06, uint32_t e07)
{
GetVector256UOut(e00, e01, e02, e03, e04, e05, e06, e07, &Vector256UValue);
return &Vector256UValue;
}
extern "C" DLL_EXPORT Vector256U STDMETHODCALLTYPE AddVector256U(Vector256U lhs, Vector256U rhs)
{
throw "P/Invoke for Vector256<uint> should be unsupported.";
}
extern "C" DLL_EXPORT Vector256U STDMETHODCALLTYPE AddVector256Us(const Vector256U* pValues, uint32_t count)
{
throw "P/Invoke for Vector256<uint> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
#if defined(_TARGET_XARCH_)
#include <mmintrin.h>
typedef __m64 Vector64B;
#elif defined(_TARGET_ARMARCH_)
#if defined(_MSC_VER)
#if defined(_TARGET_ARM64_)
#include <arm64_neon.h>
#else
#include <arm_neon.h>
#endif
#elif defined(_TARGET_ARM64_)
#include <arm_neon.h>
#else
typedef struct {
int8_t e00;
int8_t e01;
int8_t e02;
int8_t e03;
int8_t e04;
int8_t e05;
int8_t e06;
int8_t e07;
} int8x8_t;
#endif
typedef int8x8_t Vector64B;
#else
#error Unsupported target architecture
#endif
static Vector64B Vector64BValue = { };
extern "C" DLL_EXPORT Vector64B STDMETHODCALLTYPE GetVector64B(bool e00, bool e01, bool e02, bool e03, bool e04, bool e05, bool e06, bool e07)
{
union {
bool value[8];
Vector64B result;
};
value[0] = e00;
value[1] = e01;
value[2] = e02;
value[3] = e03;
value[4] = e04;
value[5] = e05;
value[6] = e06;
value[7] = e07;
return result;
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVector64BOut(bool e00, bool e01, bool e02, bool e03, bool e04, bool e05, bool e06, bool e07, Vector64B* pValue)
{
*pValue = GetVector64B(e00, e01, e02, e03, e04, e05, e06, e07);
#if defined(_MSC_VER) && defined(_TARGET_X86_)
_mm_empty();
#endif // _MSC_VER && _TARGET_X86_
}
extern "C" DLL_EXPORT const Vector64B* STDMETHODCALLTYPE GetVector64BPtr(bool e00, bool e01, bool e02, bool e03, bool e04, bool e05, bool e06, bool e07)
{
GetVector64BOut(e00, e01, e02, e03, e04, e05, e06, e07, &Vector64BValue);
return &Vector64BValue;
}
extern "C" DLL_EXPORT Vector64B STDMETHODCALLTYPE AddVector64B(Vector64B lhs, Vector64B rhs)
{
throw "P/Invoke for Vector64<bool> should be unsupported.";
}
extern "C" DLL_EXPORT Vector64B STDMETHODCALLTYPE AddVector64Bs(const Vector64B* pValues, uint32_t count)
{
throw "P/Invoke for Vector64<bool> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
#if defined(_TARGET_XARCH_)
#include <mmintrin.h>
typedef __m64 Vector64C;
#elif defined(_TARGET_ARMARCH_)
#if defined(_MSC_VER)
#if defined(_TARGET_ARM64_)
#include <arm64_neon.h>
#else
#include <arm_neon.h>
#endif
#elif defined(_TARGET_ARM64_)
#include <arm_neon.h>
#else
typedef struct {
int16_t e00;
int16_t e01;
int16_t e02;
int16_t e03;
} int16x4_t;
#endif
typedef int16x4_t Vector64C;
#else
#error Unsupported target architecture
#endif
static Vector64C Vector64CValue = { };
extern "C" DLL_EXPORT Vector64C STDMETHODCALLTYPE GetVector64C(char16_t e00, char16_t e01, char16_t e02, char16_t e03)
{
union {
char16_t value[4];
Vector64C result;
};
value[0] = e00;
value[1] = e01;
value[2] = e02;
value[3] = e03;
return result;
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVector64COut(char16_t e00, char16_t e01, char16_t e02, char16_t e03, Vector64C* pValue)
{
*pValue = GetVector64C(e00, e01, e02, e03);
#if defined(_MSC_VER) && defined(_TARGET_X86_)
_mm_empty();
#endif // _MSC_VER && _TARGET_X86_
}
extern "C" DLL_EXPORT const Vector64C* STDMETHODCALLTYPE GetVector64CPtr(char16_t e00, char16_t e01, char16_t e02, char16_t e03)
{
GetVector64COut(e00, e01, e02, e03, &Vector64CValue);
return &Vector64CValue;
}
extern "C" DLL_EXPORT Vector64C STDMETHODCALLTYPE AddVector64C(Vector64C lhs, Vector64C rhs)
{
throw "P/Invoke for Vector64<char> should be unsupported.";
}
extern "C" DLL_EXPORT Vector64C STDMETHODCALLTYPE AddVector64Cs(const Vector64C* pValues, uint32_t count)
{
throw "P/Invoke for Vector64<char> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
#if defined(_TARGET_XARCH_)
#include <mmintrin.h>
typedef __m64 Vector64D;
#elif defined(_TARGET_ARMARCH_)
#if defined(_MSC_VER)
#if defined(_TARGET_ARM64_)
#include <arm64_neon.h>
#else
#include <arm_neon.h>
#endif
typedef __n64 float64x1_t;
#elif defined(_TARGET_ARM64_)
#include <arm_neon.h>
#else
typedef struct {
double e00;
} float64x1_t;
#endif
typedef float64x1_t Vector64D;
#else
#error Unsupported target architecture
#endif
static Vector64D Vector64DValue = { };
extern "C" DLL_EXPORT Vector64D STDMETHODCALLTYPE GetVector64D(double e00)
{
union {
double value[1];
Vector64D result;
};
value[0] = e00;
return result;
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVector64DOut(double e00, Vector64D* pValue)
{
*pValue = GetVector64D(e00);
#if defined(_MSC_VER) && defined(_TARGET_X86_)
_mm_empty();
#endif // _MSC_VER && _TARGET_X86_
}
extern "C" DLL_EXPORT const Vector64D* STDMETHODCALLTYPE GetVector64DPtr(double e00)
{
GetVector64DOut(e00, &Vector64DValue);
return &Vector64DValue;
}
extern "C" DLL_EXPORT Vector64D STDMETHODCALLTYPE AddVector64D(Vector64D lhs, Vector64D rhs)
{
throw "P/Invoke for Vector64<double> should be unsupported.";
}
extern "C" DLL_EXPORT Vector64D STDMETHODCALLTYPE AddVector64Ds(const Vector64D* pValues, uint32_t count)
{
throw "P/Invoke for Vector64<double> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
#if defined(_TARGET_XARCH_)
#include <mmintrin.h>
typedef __m64 Vector64F;
#elif defined(_TARGET_ARMARCH_)
#if defined(_MSC_VER)
#if defined(_TARGET_ARM64_)
#include <arm64_neon.h>
#else
#include <arm_neon.h>
#endif
#elif defined(_TARGET_ARM64_)
#include <arm_neon.h>
#else
typedef struct {
float e00;
float e01;
} float32x2_t;
#endif
typedef float32x2_t Vector64F;
#else
#error Unsupported target architecture
#endif
static Vector64F Vector64FValue = { };
extern "C" DLL_EXPORT Vector64F STDMETHODCALLTYPE GetVector64F(float e00, float e01)
{
union {
float value[2];
Vector64F result;
};
value[0] = e00;
value[1] = e01;
return result;
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVector64FOut(float e00, float e01, Vector64F* pValue)
{
*pValue = GetVector64F(e00, e01);
#if defined(_MSC_VER) && defined(_TARGET_X86_)
_mm_empty();
#endif // _MSC_VER && _TARGET_X86_
}
extern "C" DLL_EXPORT const Vector64F* STDMETHODCALLTYPE GetVector64FPtr(float e00, float e01)
{
GetVector64FOut(e00, e01, &Vector64FValue);
return &Vector64FValue;
}
extern "C" DLL_EXPORT Vector64F STDMETHODCALLTYPE AddVector64F(Vector64F lhs, Vector64F rhs)
{
throw "P/Invoke for Vector64<float> should be unsupported.";
}
extern "C" DLL_EXPORT Vector64F STDMETHODCALLTYPE AddVector64Fs(const Vector64F* pValues, uint32_t count)
{
throw "P/Invoke for Vector64<float> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
#if defined(_TARGET_XARCH_)
#include <mmintrin.h>
typedef __m64 Vector64L;
#elif defined(_TARGET_ARMARCH_)
#if defined(_MSC_VER)
#if defined(_TARGET_ARM64_)
#include <arm64_neon.h>
#else
#include <arm_neon.h>
#endif
#elif defined(_TARGET_ARM64_)
#include <arm_neon.h>
#else
typedef struct {
int64_t e00;
} int64x1_t;
#endif
typedef int64x1_t Vector64L;
#else
#error Unsupported target architecture
#endif
static Vector64L Vector64LValue = { };
extern "C" DLL_EXPORT Vector64L STDMETHODCALLTYPE GetVector64L(int64_t e00)
{
union {
int64_t value[1];
Vector64L result;
};
value[0] = e00;
return result;
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVector64LOut(int64_t e00, Vector64L* pValue)
{
*pValue = GetVector64L(e00);
#if defined(_MSC_VER) && defined(_TARGET_X86_)
_mm_empty();
#endif // _MSC_VER && _TARGET_X86_
}
extern "C" DLL_EXPORT const Vector64L* STDMETHODCALLTYPE GetVector64LPtr(int64_t e00)
{
GetVector64LOut(e00, &Vector64LValue);
return &Vector64LValue;
}
extern "C" DLL_EXPORT Vector64L STDMETHODCALLTYPE AddVector64L(Vector64L lhs, Vector64L rhs)
{
throw "P/Invoke for Vector64<long> should be unsupported.";
}
extern "C" DLL_EXPORT Vector64L STDMETHODCALLTYPE AddVector64Ls(const Vector64L* pValues, uint32_t count)
{
throw "P/Invoke for Vector64<long> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
#if defined(_TARGET_XARCH_)
#include <mmintrin.h>
typedef __m64 Vector64U;
#elif defined(_TARGET_ARMARCH_)
#if defined(_MSC_VER)
#if defined(_TARGET_ARM64_)
#include <arm64_neon.h>
#else
#include <arm_neon.h>
#endif
#elif defined(_TARGET_ARM64_)
#include <arm_neon.h>
#else
typedef struct {
uint32_t e00;
uint32_t e01;
} uint32x2_t;
#endif
typedef uint32x2_t Vector64U;
#else
#error Unsupported target architecture
#endif
static Vector64U Vector64UValue = { };
extern "C" DLL_EXPORT Vector64U STDMETHODCALLTYPE GetVector64U(uint32_t e00, uint32_t e01)
{
union {
uint32_t value[2];
Vector64U result;
};
value[0] = e00;
value[1] = e01;
return result;
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVector64UOut(uint32_t e00, uint32_t e01, Vector64U* pValue)
{
*pValue = GetVector64U(e00, e01);
#if defined(_MSC_VER) && defined(_TARGET_X86_)
_mm_empty();
#endif // _MSC_VER && _TARGET_X86_
}
extern "C" DLL_EXPORT const Vector64U* STDMETHODCALLTYPE GetVector64UPtr(uint32_t e00, uint32_t e01)
{
GetVector64UOut(e00, e01, &Vector64UValue);
return &Vector64UValue;
}
extern "C" DLL_EXPORT Vector64U STDMETHODCALLTYPE AddVector64U(Vector64U lhs, Vector64U rhs)
{
throw "P/Invoke for Vector64<uint> should be unsupported.";
}
extern "C" DLL_EXPORT Vector64U STDMETHODCALLTYPE AddVector64Us(const Vector64U* pValues, uint32_t count)
{
throw "P/Invoke for Vector64<uint> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
typedef struct {
bool e00;
bool e01;
bool e02;
bool e03;
bool e04;
bool e05;
bool e06;
bool e07;
bool e08;
bool e09;
bool e10;
bool e11;
bool e12;
bool e13;
bool e14;
bool e15;
} VectorB128;
typedef struct {
bool e00;
bool e01;
bool e02;
bool e03;
bool e04;
bool e05;
bool e06;
bool e07;
bool e08;
bool e09;
bool e10;
bool e11;
bool e12;
bool e13;
bool e14;
bool e15;
bool e16;
bool e17;
bool e18;
bool e19;
bool e20;
bool e21;
bool e22;
bool e23;
bool e24;
bool e25;
bool e26;
bool e27;
bool e28;
bool e29;
bool e30;
bool e31;
} VectorB256;
static VectorB128 VectorB128Value = { };
static VectorB256 VectorB256Value = { };
extern "C" DLL_EXPORT VectorB128 STDMETHODCALLTYPE GetVectorB128(bool e00, bool e01, bool e02, bool e03, bool e04, bool e05, bool e06, bool e07, bool e08, bool e09, bool e10, bool e11, bool e12, bool e13, bool e14, bool e15)
{
bool value[16] = { e00, e01, e02, e03, e04, e05, e06, e07, e08, e09, e10, e11, e12, e13, e14, e15 };
return *reinterpret_cast<VectorB128*>(value);
}
extern "C" DLL_EXPORT VectorB256 STDMETHODCALLTYPE GetVectorB256(bool e00, bool e01, bool e02, bool e03, bool e04, bool e05, bool e06, bool e07, bool e08, bool e09, bool e10, bool e11, bool e12, bool e13, bool e14, bool e15, bool e16, bool e17, bool e18, bool e19, bool e20, bool e21, bool e22, bool e23, bool e24, bool e25, bool e26, bool e27, bool e28, bool e29, bool e30, bool e31)
{
bool value[32] = { e00, e01, e02, e03, e04, e05, e06, e07, e08, e09, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31 };
return *reinterpret_cast<VectorB256*>(value);
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVectorB128Out(bool e00, bool e01, bool e02, bool e03, bool e04, bool e05, bool e06, bool e07, bool e08, bool e09, bool e10, bool e11, bool e12, bool e13, bool e14, bool e15, VectorB128* pValue)
{
*pValue = GetVectorB128(e00, e01, e02, e03, e04, e05, e06, e07, e08, e09, e10, e11, e12, e13, e14, e15);
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVectorB256Out(bool e00, bool e01, bool e02, bool e03, bool e04, bool e05, bool e06, bool e07, bool e08, bool e09, bool e10, bool e11, bool e12, bool e13, bool e14, bool e15, bool e16, bool e17, bool e18, bool e19, bool e20, bool e21, bool e22, bool e23, bool e24, bool e25, bool e26, bool e27, bool e28, bool e29, bool e30, bool e31, VectorB256* pValue)
{
*pValue = GetVectorB256(e00, e01, e02, e03, e04, e05, e06, e07, e08, e09, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31);
}
extern "C" DLL_EXPORT const VectorB128* STDMETHODCALLTYPE GetVectorB128Ptr(bool e00, bool e01, bool e02, bool e03, bool e04, bool e05, bool e06, bool e07, bool e08, bool e09, bool e10, bool e11, bool e12, bool e13, bool e14, bool e15)
{
GetVectorB128Out(e00, e01, e02, e03, e04, e05, e06, e07, e08, e09, e10, e11, e12, e13, e14, e15, &VectorB128Value);
return &VectorB128Value;
}
extern "C" DLL_EXPORT const VectorB256* STDMETHODCALLTYPE GetVectorB256Ptr(bool e00, bool e01, bool e02, bool e03, bool e04, bool e05, bool e06, bool e07, bool e08, bool e09, bool e10, bool e11, bool e12, bool e13, bool e14, bool e15, bool e16, bool e17, bool e18, bool e19, bool e20, bool e21, bool e22, bool e23, bool e24, bool e25, bool e26, bool e27, bool e28, bool e29, bool e30, bool e31)
{
GetVectorB256Out(e00, e01, e02, e03, e04, e05, e06, e07, e08, e09, e10, e11, e12, e13, e14, e15, e16, e17, e18, e19, e20, e21, e22, e23, e24, e25, e26, e27, e28, e29, e30, e31, &VectorB256Value);
return &VectorB256Value;
}
extern "C" DLL_EXPORT VectorB128 STDMETHODCALLTYPE AddVectorB128(VectorB128 lhs, VectorB128 rhs)
{
throw "P/Invoke for Vector<char> should be unsupported.";
}
extern "C" DLL_EXPORT VectorB256 STDMETHODCALLTYPE AddVectorB256(VectorB256 lhs, VectorB256 rhs)
{
throw "P/Invoke for Vector<char> should be unsupported.";
}
extern "C" DLL_EXPORT VectorB128 STDMETHODCALLTYPE AddVectorB128s(const VectorB128* pValues, uint32_t count)
{
throw "P/Invoke for Vector<char> should be unsupported.";
}
extern "C" DLL_EXPORT VectorB256 STDMETHODCALLTYPE AddVectorB256s(const VectorB256* pValues, uint32_t count)
{
throw "P/Invoke for Vector<char> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
typedef struct {
char16_t e00;
char16_t e01;
char16_t e02;
char16_t e03;
char16_t e04;
char16_t e05;
char16_t e06;
char16_t e07;
} VectorC128;
typedef struct {
char16_t e00;
char16_t e01;
char16_t e02;
char16_t e03;
char16_t e04;
char16_t e05;
char16_t e06;
char16_t e07;
char16_t e08;
char16_t e09;
char16_t e10;
char16_t e11;
char16_t e12;
char16_t e13;
char16_t e14;
char16_t e15;
} VectorC256;
static VectorC128 VectorC128Value = { };
static VectorC256 VectorC256Value = { };
extern "C" DLL_EXPORT VectorC128 STDMETHODCALLTYPE GetVectorC128(char16_t e00, char16_t e01, char16_t e02, char16_t e03, char16_t e04, char16_t e05, char16_t e06, char16_t e07)
{
char16_t value[8] = { e00, e01, e02, e03, e04, e05, e06, e07 };
return *reinterpret_cast<VectorC128*>(value);
}
extern "C" DLL_EXPORT VectorC256 STDMETHODCALLTYPE GetVectorC256(char16_t e00, char16_t e01, char16_t e02, char16_t e03, char16_t e04, char16_t e05, char16_t e06, char16_t e07, char16_t e08, char16_t e09, char16_t e10, char16_t e11, char16_t e12, char16_t e13, char16_t e14, char16_t e15)
{
char16_t value[16] = { e00, e01, e02, e03, e04, e05, e06, e07, e08, e09, e10, e11, e12, e13, e14, e15 };
return *reinterpret_cast<VectorC256*>(value);
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVectorC128Out(char16_t e00, char16_t e01, char16_t e02, char16_t e03, char16_t e04, char16_t e05, char16_t e06, char16_t e07, VectorC128* pValue)
{
*pValue = GetVectorC128(e00, e01, e02, e03, e04, e05, e06, e07);
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVectorC256Out(char16_t e00, char16_t e01, char16_t e02, char16_t e03, char16_t e04, char16_t e05, char16_t e06, char16_t e07, char16_t e08, char16_t e09, char16_t e10, char16_t e11, char16_t e12, char16_t e13, char16_t e14, char16_t e15, VectorC256* pValue)
{
*pValue = GetVectorC256(e00, e01, e02, e03, e04, e05, e06, e07, e08, e09, e10, e11, e12, e13, e14, e15);
}
extern "C" DLL_EXPORT const VectorC128* STDMETHODCALLTYPE GetVectorC128Ptr(char16_t e00, char16_t e01, char16_t e02, char16_t e03, char16_t e04, char16_t e05, char16_t e06, char16_t e07)
{
GetVectorC128Out(e00, e01, e02, e03, e04, e05, e06, e07, &VectorC128Value);
return &VectorC128Value;
}
extern "C" DLL_EXPORT const VectorC256* STDMETHODCALLTYPE GetVectorC256Ptr(char16_t e00, char16_t e01, char16_t e02, char16_t e03, char16_t e04, char16_t e05, char16_t e06, char16_t e07, char16_t e08, char16_t e09, char16_t e10, char16_t e11, char16_t e12, char16_t e13, char16_t e14, char16_t e15)
{
GetVectorC256Out(e00, e01, e02, e03, e04, e05, e06, e07, e08, e09, e10, e11, e12, e13, e14, e15, &VectorC256Value);
return &VectorC256Value;
}
extern "C" DLL_EXPORT VectorC128 STDMETHODCALLTYPE AddVectorC128(VectorC128 lhs, VectorC128 rhs)
{
throw "P/Invoke for Vector<char> should be unsupported.";
}
extern "C" DLL_EXPORT VectorC256 STDMETHODCALLTYPE AddVectorC256(VectorC256 lhs, VectorC256 rhs)
{
throw "P/Invoke for Vector<char> should be unsupported.";
}
extern "C" DLL_EXPORT VectorC128 STDMETHODCALLTYPE AddVectorC128s(const VectorC128* pValues, uint32_t count)
{
throw "P/Invoke for Vector<char> should be unsupported.";
}
extern "C" DLL_EXPORT VectorC256 STDMETHODCALLTYPE AddVectorC256s(const VectorC256* pValues, uint32_t count)
{
throw "P/Invoke for Vector<char> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
typedef struct {
double e00;
double e01;
} VectorD128;
typedef struct {
double e00;
double e01;
double e02;
double e03;
} VectorD256;
static VectorD128 VectorD128Value = { };
static VectorD256 VectorD256Value = { };
extern "C" DLL_EXPORT VectorD128 STDMETHODCALLTYPE GetVectorD128(double e00, double e01)
{
double value[2] = { e00, e01 };
return *reinterpret_cast<VectorD128*>(value);
}
extern "C" DLL_EXPORT VectorD256 STDMETHODCALLTYPE GetVectorD256(double e00, double e01, double e02, double e03)
{
double value[4] = { e00, e01, e02, e03 };
return *reinterpret_cast<VectorD256*>(value);
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVectorD128Out(double e00, double e01, VectorD128* pValue)
{
*pValue = GetVectorD128(e00, e01);
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVectorD256Out(double e00, double e01, double e02, double e03, VectorD256* pValue)
{
*pValue = GetVectorD256(e00, e01, e02, e03);
}
extern "C" DLL_EXPORT const VectorD128* STDMETHODCALLTYPE GetVectorD128Ptr(double e00, double e01)
{
GetVectorD128Out(e00, e01, &VectorD128Value);
return &VectorD128Value;
}
extern "C" DLL_EXPORT const VectorD256* STDMETHODCALLTYPE GetVectorD256Ptr(double e00, double e01, double e02, double e03)
{
GetVectorD256Out(e00, e01, e02, e03, &VectorD256Value);
return &VectorD256Value;
}
extern "C" DLL_EXPORT VectorD128 STDMETHODCALLTYPE AddVectorD128(VectorD128 lhs, VectorD128 rhs)
{
throw "P/Invoke for Vector<char> should be unsupported.";
}
extern "C" DLL_EXPORT VectorD256 STDMETHODCALLTYPE AddVectorD256(VectorD256 lhs, VectorD256 rhs)
{
throw "P/Invoke for Vector<char> should be unsupported.";
}
extern "C" DLL_EXPORT VectorD128 STDMETHODCALLTYPE AddVectorD128s(const VectorD128* pValues, double count)
{
throw "P/Invoke for Vector<char> should be unsupported.";
}
extern "C" DLL_EXPORT VectorD256 STDMETHODCALLTYPE AddVectorD256s(const VectorD256* pValues, double count)
{
throw "P/Invoke for Vector<char> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
typedef struct {
float e00;
float e01;
float e02;
float e03;
} VectorF128;
typedef struct {
float e00;
float e01;
float e02;
float e03;
float e04;
float e05;
float e06;
float e07;
} VectorF256;
static VectorF128 VectorF128Value = { };
static VectorF256 VectorF256Value = { };
extern "C" DLL_EXPORT VectorF128 STDMETHODCALLTYPE GetVectorF128(float e00, float e01, float e02, float e03)
{
float value[4] = { e00, e01, e02, e03 };
return *reinterpret_cast<VectorF128*>(value);
}
extern "C" DLL_EXPORT VectorF256 STDMETHODCALLTYPE GetVectorF256(float e00, float e01, float e02, float e03, float e04, float e05, float e06, float e07)
{
float value[8] = { e00, e01, e02, e03, e04, e05, e06, e07 };
return *reinterpret_cast<VectorF256*>(value);
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVectorF128Out(float e00, float e01, float e02, float e03, VectorF128* pValue)
{
*pValue = GetVectorF128(e00, e01, e02, e03);
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVectorF256Out(float e00, float e01, float e02, float e03, float e04, float e05, float e06, float e07, VectorF256* pValue)
{
*pValue = GetVectorF256(e00, e01, e02, e03, e04, e05, e06, e07);
}
extern "C" DLL_EXPORT const VectorF128* STDMETHODCALLTYPE GetVectorF128Ptr(float e00, float e01, float e02, float e03)
{
GetVectorF128Out(e00, e01, e02, e03, &VectorF128Value);
return &VectorF128Value;
}
extern "C" DLL_EXPORT const VectorF256* STDMETHODCALLTYPE GetVectorF256Ptr(float e00, float e01, float e02, float e03, float e04, float e05, float e06, float e07)
{
GetVectorF256Out(e00, e01, e02, e03, e04, e05, e06, e07, &VectorF256Value);
return &VectorF256Value;
}
extern "C" DLL_EXPORT VectorF128 STDMETHODCALLTYPE AddVectorF128(VectorF128 lhs, VectorF128 rhs)
{
throw "P/Invoke for Vector<char> should be unsupported.";
}
extern "C" DLL_EXPORT VectorF256 STDMETHODCALLTYPE AddVectorF256(VectorF256 lhs, VectorF256 rhs)
{
throw "P/Invoke for Vector<char> should be unsupported.";
}
extern "C" DLL_EXPORT VectorF128 STDMETHODCALLTYPE AddVectorF128s(const VectorF128* pValues, float count)
{
throw "P/Invoke for Vector<char> should be unsupported.";
}
extern "C" DLL_EXPORT VectorF256 STDMETHODCALLTYPE AddVectorF256s(const VectorF256* pValues, float count)
{
throw "P/Invoke for Vector<char> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
typedef struct {
int64_t e00;
int64_t e01;
} VectorL128;
typedef struct {
int64_t e00;
int64_t e01;
int64_t e02;
int64_t e03;
} VectorL256;
static VectorL128 VectorL128Value = { };
static VectorL256 VectorL256Value = { };
extern "C" DLL_EXPORT VectorL128 STDMETHODCALLTYPE GetVectorL128(int64_t e00, int64_t e01)
{
int64_t value[2] = { e00, e01 };
return *reinterpret_cast<VectorL128*>(value);
}
extern "C" DLL_EXPORT VectorL256 STDMETHODCALLTYPE GetVectorL256(int64_t e00, int64_t e01, int64_t e02, int64_t e03)
{
int64_t value[4] = { e00, e01, e02, e03 };
return *reinterpret_cast<VectorL256*>(value);
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVectorL128Out(int64_t e00, int64_t e01, VectorL128* pValue)
{
*pValue = GetVectorL128(e00, e01);
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVectorL256Out(int64_t e00, int64_t e01, int64_t e02, int64_t e03, VectorL256* pValue)
{
*pValue = GetVectorL256(e00, e01, e02, e03);
}
extern "C" DLL_EXPORT const VectorL128* STDMETHODCALLTYPE GetVectorL128Ptr(int64_t e00, int64_t e01)
{
GetVectorL128Out(e00, e01, &VectorL128Value);
return &VectorL128Value;
}
extern "C" DLL_EXPORT const VectorL256* STDMETHODCALLTYPE GetVectorL256Ptr(int64_t e00, int64_t e01, int64_t e02, int64_t e03)
{
GetVectorL256Out(e00, e01, e02, e03, &VectorL256Value);
return &VectorL256Value;
}
extern "C" DLL_EXPORT VectorL128 STDMETHODCALLTYPE AddVectorL128(VectorL128 lhs, VectorL128 rhs)
{
throw "P/Invoke for Vector<char> should be unsupported.";
}
extern "C" DLL_EXPORT VectorL256 STDMETHODCALLTYPE AddVectorL256(VectorL256 lhs, VectorL256 rhs)
{
throw "P/Invoke for Vector<char> should be unsupported.";
}
extern "C" DLL_EXPORT VectorL128 STDMETHODCALLTYPE AddVectorL128s(const VectorL128* pValues, int64_t count)
{
throw "P/Invoke for Vector<char> should be unsupported.";
}
extern "C" DLL_EXPORT VectorL256 STDMETHODCALLTYPE AddVectorL256s(const VectorL256* pValues, int64_t count)
{
throw "P/Invoke for Vector<char> should be unsupported.";
}
// 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.
#include <stdio.h>
#include <stdint.h>
#include <xplatform.h>
#include <platformdefines.h>
typedef struct {
uint32_t e00;
uint32_t e01;
uint32_t e02;
uint32_t e03;
} VectorU128;
typedef struct {
uint32_t e00;
uint32_t e01;
uint32_t e02;
uint32_t e03;
uint32_t e04;
uint32_t e05;
uint32_t e06;
uint32_t e07;
} VectorU256;
static VectorU128 VectorU128Value = { };
static VectorU256 VectorU256Value = { };
extern "C" DLL_EXPORT VectorU128 STDMETHODCALLTYPE GetVectorU128(uint32_t e00, uint32_t e01, uint32_t e02, uint32_t e03)
{
uint32_t value[4] = { e00, e01, e02, e03 };
return *reinterpret_cast<VectorU128*>(value);
}
extern "C" DLL_EXPORT VectorU256 STDMETHODCALLTYPE GetVectorU256(uint32_t e00, uint32_t e01, uint32_t e02, uint32_t e03, uint32_t e04, uint32_t e05, uint32_t e06, uint32_t e07)
{
uint32_t value[8] = { e00, e01, e02, e03, e04, e05, e06, e07 };
return *reinterpret_cast<VectorU256*>(value);
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVectorU128Out(uint32_t e00, uint32_t e01, uint32_t e02, uint32_t e03, VectorU128* pValue)
{
*pValue = GetVectorU128(e00, e01, e02, e03);
}
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVectorU256Out(uint32_t e00, uint32_t e01, uint32_t e02, uint32_t e03, uint32_t e04, uint32_t e05, uint32_t e06, uint32_t e07, VectorU256* pValue)
{
*pValue = GetVectorU256(e00, e01, e02, e03, e04, e05, e06, e07);
}
extern "C" DLL_EXPORT const VectorU128* STDMETHODCALLTYPE GetVectorU128Ptr(uint32_t e00, uint32_t e01, uint32_t e02, uint32_t e03)
{
GetVectorU128Out(e00, e01, e02, e03, &VectorU128Value);
return &VectorU128Value;
}
extern "C" DLL_EXPORT const VectorU256* STDMETHODCALLTYPE GetVectorU256Ptr(uint32_t e00, uint32_t e01, uint32_t e02, uint32_t e03, uint32_t e04, uint32_t e05, uint32_t e06, uint32_t e07)
{
GetVectorU256Out(e00, e01, e02, e03, e04, e05, e06, e07, &VectorU256Value);
return &VectorU256Value;
}
extern "C" DLL_EXPORT VectorU128 STDMETHODCALLTYPE AddVectorU128(VectorU128 lhs, VectorU128 rhs)
{
throw "P/Invoke for Vector<char> should be unsupported.";
}
extern "C" DLL_EXPORT VectorU256 STDMETHODCALLTYPE AddVectorU256(VectorU256 lhs, VectorU256 rhs)
{
throw "P/Invoke for Vector<char> should be unsupported.";
}
extern "C" DLL_EXPORT VectorU128 STDMETHODCALLTYPE AddVectorU128s(const VectorU128* pValues, uint32_t count)
{
throw "P/Invoke for Vector<char> should be unsupported.";
}
extern "C" DLL_EXPORT VectorU256 STDMETHODCALLTYPE AddVectorU256s(const VectorU256* pValues, uint32_t count)
{
throw "P/Invoke for Vector<char> should be unsupported.";
}
// Licensed to the .NET Doundation under one or more agreements.
// The .NET Doundation 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.InteropServices;
using TestLibrary;
unsafe partial class GenericsNative
{
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterface")]
[return: MarshalAs(UnmanagedType.Interface)]
public static extern IComInterface<bool> GetIComInterfaceB();
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterfaceOut")]
public static extern void GetIComInterfaceBOut([MarshalAs(UnmanagedType.Interface)] out IComInterface<bool> value);
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterfacePtr")]
[return: MarshalAs(UnmanagedType.Interface)]
public static extern ref readonly IComInterface<bool> GetIComInterfaceBRef();
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterfaces")]
public static extern void GetIComInterfaceBs([MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.Interface, SizeParamIndex = 1)] IComInterface<bool>[] pValues, int count);
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterfaces")]
public static extern void GetIComInterfaceBs([MarshalAs(UnmanagedType.Interface)] ref IComInterface<bool> pValues, int count);
}
unsafe partial class GenericsTest
{
private static void TestIComInterfaceB()
{
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceB());
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceBOut(out GenericsNative.IComInterface<bool> value2));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceBRef());
GenericsNative.IComInterface<bool>[] values = new GenericsNative.IComInterface<bool>[3];
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceBs(values, values.Length));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceBs(ref values[0], values.Length));
}
}
// Licensed to the .NET Doundation under one or more agreements.
// The .NET Doundation 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.InteropServices;
using TestLibrary;
unsafe partial class GenericsNative
{
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterface")]
[return: MarshalAs(UnmanagedType.Interface)]
public static extern IComInterface<char> GetIComInterfaceC();
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterfaceOut")]
public static extern void GetIComInterfaceCOut([MarshalAs(UnmanagedType.Interface)] out IComInterface<char> value);
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterfacePtr")]
[return: MarshalAs(UnmanagedType.Interface)]
public static extern ref readonly IComInterface<char> GetIComInterfaceCRef();
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterfaces")]
public static extern void GetIComInterfaceCs([MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.Interface, SizeParamIndex = 1)] IComInterface<char>[] pValues, int count);
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterfaces")]
public static extern void GetIComInterfaceCs([MarshalAs(UnmanagedType.Interface)] ref IComInterface<char> pValues, int count);
}
unsafe partial class GenericsTest
{
private static void TestIComInterfaceC()
{
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceC());
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceCOut(out GenericsNative.IComInterface<char> value2));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceCRef());
GenericsNative.IComInterface<char>[] values = new GenericsNative.IComInterface<char>[3];
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceCs(values, values.Length));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceCs(ref values[0], values.Length));
}
}
// Licensed to the .NET Doundation under one or more agreements.
// The .NET Doundation 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.InteropServices;
using TestLibrary;
unsafe partial class GenericsNative
{
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterface")]
[return: MarshalAs(UnmanagedType.Interface)]
public static extern IComInterface<double> GetIComInterfaceD();
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterfaceOut")]
public static extern void GetIComInterfaceDOut([MarshalAs(UnmanagedType.Interface)] out IComInterface<double> value);
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterfacePtr")]
[return: MarshalAs(UnmanagedType.Interface)]
public static extern ref readonly IComInterface<double> GetIComInterfaceDRef();
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterfaces")]
public static extern void GetIComInterfaceDs([MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.Interface, SizeParamIndex = 1)] IComInterface<double>[] pValues, int count);
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterfaces")]
public static extern void GetIComInterfaceDs([MarshalAs(UnmanagedType.Interface)] ref IComInterface<double> pValues, int count);
}
unsafe partial class GenericsTest
{
private static void TestIComInterfaceD()
{
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceD());
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceDOut(out GenericsNative.IComInterface<double> value2));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceDRef());
GenericsNative.IComInterface<double>[] values = new GenericsNative.IComInterface<double>[3];
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceDs(values, values.Length));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceDs(ref values[0], values.Length));
}
}
// Licensed to the .NET Doundation under one or more agreements.
// The .NET Doundation 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.InteropServices;
using TestLibrary;
unsafe partial class GenericsNative
{
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterface")]
[return: MarshalAs(UnmanagedType.Interface)]
public static extern IComInterface<float> GetIComInterfaceF();
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterfaceOut")]
public static extern void GetIComInterfaceFOut([MarshalAs(UnmanagedType.Interface)] out IComInterface<float> value);
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterfacePtr")]
[return: MarshalAs(UnmanagedType.Interface)]
public static extern ref readonly IComInterface<float> GetIComInterfaceFRef();
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterfaces")]
public static extern void GetIComInterfaceFs([MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.Interface, SizeParamIndex = 1)] IComInterface<float>[] pValues, int count);
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterfaces")]
public static extern void GetIComInterfaceFs([MarshalAs(UnmanagedType.Interface)] ref IComInterface<float> pValues, int count);
}
unsafe partial class GenericsTest
{
private static void TestIComInterfaceF()
{
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceF());
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceFOut(out GenericsNative.IComInterface<float> value2));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceFRef());
GenericsNative.IComInterface<float>[] values = new GenericsNative.IComInterface<float>[3];
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceFs(values, values.Length));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceFs(ref values[0], values.Length));
}
}
// Licensed to the .NET Doundation under one or more agreements.
// The .NET Doundation 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.InteropServices;
using TestLibrary;
unsafe partial class GenericsNative
{
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterface")]
[return: MarshalAs(UnmanagedType.Interface)]
public static extern IComInterface<long> GetIComInterfaceL();
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterfaceOut")]
public static extern void GetIComInterfaceLOut([MarshalAs(UnmanagedType.Interface)] out IComInterface<long> value);
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterfacePtr")]
[return: MarshalAs(UnmanagedType.Interface)]
public static extern ref readonly IComInterface<long> GetIComInterfaceLRef();
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterfaces")]
public static extern void GetIComInterfaceLs([MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.Interface, SizeParamIndex = 1)] IComInterface<long>[] pValues, int count);
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterfaces")]
public static extern void GetIComInterfaceLs([MarshalAs(UnmanagedType.Interface)] ref IComInterface<long> pValues, int count);
}
unsafe partial class GenericsTest
{
private static void TestIComInterfaceL()
{
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceL());
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceLOut(out GenericsNative.IComInterface<long> value2));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceLRef());
GenericsNative.IComInterface<long>[] values = new GenericsNative.IComInterface<long>[3];
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceLs(values, values.Length));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceLs(ref values[0], values.Length));
}
}
// Licensed to the .NET Doundation under one or more agreements.
// The .NET Doundation 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.InteropServices;
using TestLibrary;
unsafe partial class GenericsNative
{
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterface")]
[return: MarshalAs(UnmanagedType.Interface)]
public static extern IComInterface<uint> GetIComInterfaceU();
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterfaceOut")]
public static extern void GetIComInterfaceUOut([MarshalAs(UnmanagedType.Interface)] out IComInterface<uint> value);
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterfacePtr")]
[return: MarshalAs(UnmanagedType.Interface)]
public static extern ref readonly IComInterface<uint> GetIComInterfaceURef();
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterfaces")]
public static extern void GetIComInterfaceUs([MarshalAs(UnmanagedType.LPArray, ArraySubType = UnmanagedType.Interface, SizeParamIndex = 1)] IComInterface<uint>[] pValues, int count);
[DllImport(nameof(GenericsNative), EntryPoint = "GetIComInterfaces")]
public static extern void GetIComInterfaceUs([MarshalAs(UnmanagedType.Interface)] ref IComInterface<uint> pValues, int count);
}
unsafe partial class GenericsTest
{
private static void TestIComInterfaceU()
{
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceU());
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceUOut(out GenericsNative.IComInterface<uint> value2));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceURef());
GenericsNative.IComInterface<uint>[] values = new GenericsNative.IComInterface<uint>[3];
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceUs(values, values.Length));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetIComInterfaceUs(ref values[0], values.Length));
}
}
// Licensed to the .NET Doundation under one or more agreements.
// The .NET Doundation 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.InteropServices;
using TestLibrary;
unsafe partial class GenericsNative
{
[DllImport(nameof(GenericsNative))]
public static extern bool? GetNullableB(bool hasValue, bool value);
[DllImport(nameof(GenericsNative))]
public static extern void GetNullableBOut(bool hasValue, bool value, bool?* pValue);
[DllImport(nameof(GenericsNative))]
public static extern void GetNullableBOut(bool hasValue, bool value, out bool? pValue);
[DllImport(nameof(GenericsNative))]
public static extern bool?* GetNullableBPtr(bool hasValue, bool value);
[DllImport(nameof(GenericsNative), EntryPoint = "GetNullableBPtr")]
public static extern ref readonly bool? GetNullableBRef(bool hasValue, bool value);
[DllImport(nameof(GenericsNative))]
public static extern bool? AddNullableB(bool? lhs, bool? rhs);
[DllImport(nameof(GenericsNative))]
public static extern bool? AddNullableBs(bool?* pValues, int count);
[DllImport(nameof(GenericsNative))]
public static extern bool? AddNullableBs([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] bool?[] pValues, int count);
[DllImport(nameof(GenericsNative))]
public static extern bool? AddNullableBs(in bool? pValues, int count);
}
unsafe partial class GenericsTest
{
private static void TestNullableB()
{
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetNullableB(true, false));
Assert.Throws<MarshalDirectiveException>(() => {
bool? value2;
GenericsNative.GetNullableBOut(true, false, &value2);
});
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetNullableBOut(true, false, out bool? value3));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetNullableBPtr(true, false));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetNullableBRef(true, false));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.AddNullableB(default, default));
bool?[] values = new bool?[] {
default,
default,
default,
default,
default
};
Assert.Throws<MarshalDirectiveException>(() => {
fixed (bool?* pValues = &values[0])
{
GenericsNative.AddNullableBs(pValues, values.Length);
}
});
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.AddNullableBs(values, values.Length));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.AddNullableBs(in values[0], values.Length));
}
}
// Licensed to the .NET Doundation under one or more agreements.
// The .NET Doundation 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.InteropServices;
using TestLibrary;
unsafe partial class GenericsNative
{
[DllImport(nameof(GenericsNative))]
public static extern char? GetNullableC(bool hasValue, char value);
[DllImport(nameof(GenericsNative))]
public static extern void GetNullableCOut(bool hasValue, char value, char?* pValue);
[DllImport(nameof(GenericsNative))]
public static extern void GetNullableCOut(bool hasValue, char value, out char? pValue);
[DllImport(nameof(GenericsNative))]
public static extern char?* GetNullableCPtr(bool hasValue, char value);
[DllImport(nameof(GenericsNative), EntryPoint = "GetNullableCPtr")]
public static extern ref readonly char? GetNullableCRef(bool hasValue, char value);
[DllImport(nameof(GenericsNative))]
public static extern char? AddNullableC(char? lhs, char? rhs);
[DllImport(nameof(GenericsNative))]
public static extern char? AddNullableCs(char?* pValues, int count);
[DllImport(nameof(GenericsNative))]
public static extern char? AddNullableCs([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] char?[] pValues, int count);
[DllImport(nameof(GenericsNative))]
public static extern char? AddNullableCs(in char? pValues, int count);
}
unsafe partial class GenericsTest
{
private static void TestNullableC()
{
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetNullableC(true, '1'));
Assert.Throws<MarshalDirectiveException>(() => {
char? value2;
GenericsNative.GetNullableCOut(true, '1', &value2);
});
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetNullableCOut(true, '1', out char? value3));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetNullableCPtr(true, '1'));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetNullableCRef(true, '1'));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.AddNullableC(default, default));
char?[] values = new char?[] {
default,
default,
default,
default,
default
};
Assert.Throws<MarshalDirectiveException>(() => {
fixed (char?* pValues = &values[0])
{
GenericsNative.AddNullableCs(pValues, values.Length);
}
});
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.AddNullableCs(values, values.Length));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.AddNullableCs(in values[0], values.Length));
}
}
// Licensed to the .NET Doundation under one or more agreements.
// The .NET Doundation 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.InteropServices;
using TestLibrary;
unsafe partial class GenericsNative
{
[DllImport(nameof(GenericsNative))]
public static extern double? GetNullableD(bool hasValue, double value);
[DllImport(nameof(GenericsNative))]
public static extern void GetNullableDOut(bool hasValue, double value, double?* pValue);
[DllImport(nameof(GenericsNative))]
public static extern void GetNullableDOut(bool hasValue, double value, out double? pValue);
[DllImport(nameof(GenericsNative))]
public static extern double?* GetNullableDPtr(bool hasValue, double value);
[DllImport(nameof(GenericsNative), EntryPoint = "GetNullableDPtr")]
public static extern ref readonly double? GetNullableDRef(bool hasValue, double value);
[DllImport(nameof(GenericsNative))]
public static extern double? AddNullableD(double? lhs, double? rhs);
[DllImport(nameof(GenericsNative))]
public static extern double? AddNullableDs(double?* pValues, int count);
[DllImport(nameof(GenericsNative))]
public static extern double? AddNullableDs([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] double?[] pValues, int count);
[DllImport(nameof(GenericsNative))]
public static extern double? AddNullableDs(in double? pValues, int count);
}
unsafe partial class GenericsTest
{
private static void TestNullableD()
{
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetNullableD(true, 1.0));
Assert.Throws<MarshalDirectiveException>(() => {
double? value2;
GenericsNative.GetNullableDOut(true, 1.0, &value2);
});
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetNullableDOut(true, 1.0, out double? value3));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetNullableDPtr(true, 1.0));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetNullableDRef(true, 1.0));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.AddNullableD(default, default));
double?[] values = new double?[] {
default,
default,
default,
default,
default
};
Assert.Throws<MarshalDirectiveException>(() => {
fixed (double?* pValues = &values[0])
{
GenericsNative.AddNullableDs(pValues, values.Length);
}
});
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.AddNullableDs(values, values.Length));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.AddNullableDs(in values[0], values.Length));
}
}
// 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.InteropServices;
using TestLibrary;
unsafe partial class GenericsNative
{
[DllImport(nameof(GenericsNative))]
public static extern float? GetNullableF(bool hasValue, float value);
[DllImport(nameof(GenericsNative))]
public static extern void GetNullableFOut(bool hasValue, float value, float?* pValue);
[DllImport(nameof(GenericsNative))]
public static extern void GetNullableFOut(bool hasValue, float value, out float? pValue);
[DllImport(nameof(GenericsNative))]
public static extern float?* GetNullableFPtr(bool hasValue, float value);
[DllImport(nameof(GenericsNative), EntryPoint = "GetNullableFPtr")]
public static extern ref readonly float? GetNullableFRef(bool hasValue, float value);
[DllImport(nameof(GenericsNative))]
public static extern float? AddNullableF(float? lhs, float? rhs);
[DllImport(nameof(GenericsNative))]
public static extern float? AddNullableFs(float?* pValues, int count);
[DllImport(nameof(GenericsNative))]
public static extern float? AddNullableFs([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] float?[] pValues, int count);
[DllImport(nameof(GenericsNative))]
public static extern float? AddNullableFs(in float? pValues, int count);
}
unsafe partial class GenericsTest
{
private static void TestNullableF()
{
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetNullableF(true, 1.0f));
Assert.Throws<MarshalDirectiveException>(() => {
float? value2;
GenericsNative.GetNullableFOut(true, 1.0f, &value2);
});
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetNullableFOut(true, 1.0f, out float? value3));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetNullableFPtr(true, 1.0f));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetNullableFRef(true, 1.0f));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.AddNullableF(default, default));
float?[] values = new float?[] {
default,
default,
default,
default,
default
};
Assert.Throws<MarshalDirectiveException>(() => {
fixed (float?* pValues = &values[0])
{
GenericsNative.AddNullableFs(pValues, values.Length);
}
});
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.AddNullableFs(values, values.Length));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.AddNullableFs(in values[0], values.Length));
}
}
// 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.InteropServices;
using TestLibrary;
unsafe partial class GenericsNative
{
[DllImport(nameof(GenericsNative))]
public static extern long? GetNullableL(bool hasValue, long value);
[DllImport(nameof(GenericsNative))]
public static extern void GetNullableLOut(bool hasValue, long value, long?* pValue);
[DllImport(nameof(GenericsNative))]
public static extern void GetNullableLOut(bool hasValue, long value, out long? pValue);
[DllImport(nameof(GenericsNative))]
public static extern long?* GetNullableLPtr(bool hasValue, long value);
[DllImport(nameof(GenericsNative), EntryPoint = "GetNullableLPtr")]
public static extern ref readonly long? GetNullableLRef(bool hasValue, long value);
[DllImport(nameof(GenericsNative))]
public static extern long? AddNullableL(long? lhs, long? rhs);
[DllImport(nameof(GenericsNative))]
public static extern long? AddNullableLs(long?* pValues, int count);
[DllImport(nameof(GenericsNative))]
public static extern long? AddNullableLs([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] long?[] pValues, int count);
[DllImport(nameof(GenericsNative))]
public static extern long? AddNullableLs(in long? pValues, int count);
}
unsafe partial class GenericsTest
{
private static void TestNullableL()
{
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetNullableL(true, 1L));
Assert.Throws<MarshalDirectiveException>(() => {
long? value2;
GenericsNative.GetNullableLOut(true, 1L, &value2);
});
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetNullableLOut(true, 1L, out long? value3));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetNullableLPtr(true, 1L));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetNullableLRef(true, 1L));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.AddNullableL(default, default));
long?[] values = new long?[] {
default,
default,
default,
default,
default
};
Assert.Throws<MarshalDirectiveException>(() => {
fixed (long?* pValues = &values[0])
{
GenericsNative.AddNullableLs(pValues, values.Length);
}
});
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.AddNullableLs(values, values.Length));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.AddNullableLs(in values[0], values.Length));
}
}
// 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.InteropServices;
using TestLibrary;
unsafe partial class GenericsNative
{
[DllImport(nameof(GenericsNative))]
public static extern uint? GetNullableU(bool hasValue, uint value);
[DllImport(nameof(GenericsNative))]
public static extern void GetNullableUOut(bool hasValue, uint value, uint?* pValue);
[DllImport(nameof(GenericsNative))]
public static extern void GetNullableUOut(bool hasValue, uint value, out uint? pValue);
[DllImport(nameof(GenericsNative))]
public static extern uint?* GetNullableUPtr(bool hasValue, uint value);
[DllImport(nameof(GenericsNative), EntryPoint = "GetNullableUPtr")]
public static extern ref readonly uint? GetNullableURef(bool hasValue, uint value);
[DllImport(nameof(GenericsNative))]
public static extern uint? AddNullableU(uint? lhs, uint? rhs);
[DllImport(nameof(GenericsNative))]
public static extern uint? AddNullableUs(uint?* pValues, int count);
[DllImport(nameof(GenericsNative))]
public static extern uint? AddNullableUs([MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1)] uint?[] pValues, int count);
[DllImport(nameof(GenericsNative))]
public static extern uint? AddNullableUs(in uint? pValues, int count);
}
unsafe partial class GenericsTest
{
private static void TestNullableU()
{
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetNullableU(true, 1u));
Assert.Throws<MarshalDirectiveException>(() => {
uint? value2;
GenericsNative.GetNullableUOut(true, 1u, &value2);
});
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetNullableUOut(true, 1u, out uint? value3));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetNullableUPtr(true, 1u));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.GetNullableURef(true, 1u));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.AddNullableU(default, default));
uint?[] values = new uint?[] {
default,
default,
default,
default,
default
};
Assert.Throws<MarshalDirectiveException>(() => {
fixed (uint?* pValues = &values[0])
{
GenericsNative.AddNullableUs(pValues, values.Length);
}
});
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.AddNullableUs(values, values.Length));
Assert.Throws<MarshalDirectiveException>(() => GenericsNative.AddNullableUs(in values[0], values.Length));
}
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册