Skip to content

Commit 1e0878c

Browse files
authored
Make tests pass on AVX only host again (#62544)
Just anotate couple other methods which I need, based on #61259 methodology
1 parent 4c9b71b commit 1e0878c

File tree

3 files changed

+15
-15
lines changed

3 files changed

+15
-15
lines changed

src/tests/Interop/PInvoke/Generics/GenericsNative.Vector256B.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
static Vector256B Vector256BValue = { };
5757

58-
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)
58+
extern "C" DLL_EXPORT Vector256B STDMETHODCALLTYPE ENABLE_AVX 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)
5959
{
6060
union {
6161
bool value[32];
@@ -98,7 +98,7 @@ extern "C" DLL_EXPORT Vector256B STDMETHODCALLTYPE GetVector256B(bool e00, bool
9898
return result;
9999
}
100100

101-
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)
101+
extern "C" DLL_EXPORT void STDMETHODCALLTYPE ENABLE_AVX 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)
102102
{
103103
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);
104104

@@ -110,18 +110,18 @@ extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVector256BOut(bool e00, bool e01
110110
#endif
111111
}
112112

113-
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)
113+
extern "C" DLL_EXPORT const Vector256B* STDMETHODCALLTYPE ENABLE_AVX 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)
114114
{
115115
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);
116116
return &Vector256BValue;
117117
}
118118

119-
extern "C" DLL_EXPORT Vector256B STDMETHODCALLTYPE AddVector256B(Vector256B lhs, Vector256B rhs)
119+
extern "C" DLL_EXPORT Vector256B STDMETHODCALLTYPE ENABLE_AVX AddVector256B(Vector256B lhs, Vector256B rhs)
120120
{
121121
throw "P/Invoke for Vector256<bool> should be unsupported.";
122122
}
123123

124-
extern "C" DLL_EXPORT Vector256B STDMETHODCALLTYPE AddVector256Bs(const Vector256B* pValues, uint32_t count)
124+
extern "C" DLL_EXPORT Vector256B STDMETHODCALLTYPE ENABLE_AVX AddVector256Bs(const Vector256B* pValues, uint32_t count)
125125
{
126126
throw "P/Invoke for Vector256<bool> should be unsupported.";
127127
}

src/tests/Interop/PInvoke/Generics/GenericsNative.Vector256C.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@
3939

4040
static Vector256C Vector256CValue = { };
4141

42-
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)
42+
extern "C" DLL_EXPORT Vector256C STDMETHODCALLTYPE ENABLE_AVX 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)
4343
{
4444
union {
4545
char16_t value[16];
@@ -66,7 +66,7 @@ extern "C" DLL_EXPORT Vector256C STDMETHODCALLTYPE GetVector256C(char16_t e00, c
6666
return result;
6767
}
6868

69-
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)
69+
extern "C" DLL_EXPORT void STDMETHODCALLTYPE ENABLE_AVX 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)
7070
{
7171
Vector256C value = GetVector256C(e00, e01, e02, e03, e04, e05, e06, e07, e08, e09, e10, e11, e12, e13, e14, e15);
7272

@@ -78,18 +78,18 @@ extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVector256COut(char16_t e00, char
7878
#endif
7979
}
8080

81-
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)
81+
extern "C" DLL_EXPORT const Vector256C* STDMETHODCALLTYPE ENABLE_AVX 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)
8282
{
8383
GetVector256COut(e00, e01, e02, e03, e04, e05, e06, e07, e08, e09, e10, e11, e12, e13, e14, e15, &Vector256CValue);
8484
return &Vector256CValue;
8585
}
8686

87-
extern "C" DLL_EXPORT Vector256C STDMETHODCALLTYPE AddVector256C(Vector256C lhs, Vector256C rhs)
87+
extern "C" DLL_EXPORT Vector256C STDMETHODCALLTYPE ENABLE_AVX AddVector256C(Vector256C lhs, Vector256C rhs)
8888
{
8989
throw "P/Invoke for Vector256<char> should be unsupported.";
9090
}
9191

92-
extern "C" DLL_EXPORT Vector256C STDMETHODCALLTYPE AddVector256Cs(const Vector256C* pValues, uint32_t count)
92+
extern "C" DLL_EXPORT Vector256C STDMETHODCALLTYPE ENABLE_AVX AddVector256Cs(const Vector256C* pValues, uint32_t count)
9393
{
9494
throw "P/Invoke for Vector256<char> should be unsupported.";
9595
}

src/tests/Interop/PInvoke/Generics/GenericsNative.Vector256L.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
static Vector256L Vector256LValue = { };
2929

30-
extern "C" DLL_EXPORT Vector256L STDMETHODCALLTYPE GetVector256L(int64_t e00, int64_t e01, int64_t e02, int64_t e03)
30+
extern "C" DLL_EXPORT Vector256L STDMETHODCALLTYPE ENABLE_AVX GetVector256L(int64_t e00, int64_t e01, int64_t e02, int64_t e03)
3131
{
3232
union {
3333
int64_t value[4];
@@ -42,7 +42,7 @@ extern "C" DLL_EXPORT Vector256L STDMETHODCALLTYPE GetVector256L(int64_t e00, in
4242
return result;
4343
}
4444

45-
extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVector256LOut(int64_t e00, int64_t e01, int64_t e02, int64_t e03, Vector256L* pValue)
45+
extern "C" DLL_EXPORT void STDMETHODCALLTYPE ENABLE_AVX GetVector256LOut(int64_t e00, int64_t e01, int64_t e02, int64_t e03, Vector256L* pValue)
4646
{
4747
Vector256L value = GetVector256L(e00, e01, e02, e03);
4848

@@ -54,18 +54,18 @@ extern "C" DLL_EXPORT void STDMETHODCALLTYPE GetVector256LOut(int64_t e00, int64
5454
#endif
5555
}
5656

57-
extern "C" DLL_EXPORT const Vector256L* STDMETHODCALLTYPE GetVector256LPtr(int64_t e00, int64_t e01, int64_t e02, int64_t e03)
57+
extern "C" DLL_EXPORT const Vector256L* STDMETHODCALLTYPE ENABLE_AVX GetVector256LPtr(int64_t e00, int64_t e01, int64_t e02, int64_t e03)
5858
{
5959
GetVector256LOut(e00, e01, e02, e03, &Vector256LValue);
6060
return &Vector256LValue;
6161
}
6262

63-
extern "C" DLL_EXPORT Vector256L STDMETHODCALLTYPE AddVector256L(Vector256L lhs, Vector256L rhs)
63+
extern "C" DLL_EXPORT Vector256L STDMETHODCALLTYPE ENABLE_AVX AddVector256L(Vector256L lhs, Vector256L rhs)
6464
{
6565
throw "P/Invoke for Vector256<long> should be unsupported.";
6666
}
6767

68-
extern "C" DLL_EXPORT Vector256L STDMETHODCALLTYPE AddVector256Ls(const Vector256L* pValues, uint32_t count)
68+
extern "C" DLL_EXPORT Vector256L STDMETHODCALLTYPE ENABLE_AVX AddVector256Ls(const Vector256L* pValues, uint32_t count)
6969
{
7070
throw "P/Invoke for Vector256<long> should be unsupported.";
7171
}

0 commit comments

Comments
 (0)