Skip to content

Commit aa54369

Browse files
authored
Merge pull request #563 from xtensor-stack/fix/test-sse2-windows
Activate SSE2 test on windows
2 parents 3639635 + f4f2945 commit aa54369

File tree

7 files changed

+22
-15
lines changed

7 files changed

+22
-15
lines changed

.appveyor.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,10 @@ environment:
99
global:
1010
MINICONDA: C:\xsimd-conda
1111
matrix:
12+
- JOB: "SSE2"
13+
CXXFLAGS: ""
14+
VCVARSALL: "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat"
15+
RUNTEST: ".\\test_xsimd"
1216
- JOB: "AVX2"
1317
CXXFLAGS: "/arch:AVX2"
1418
VCVARSALL: "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat"

include/xsimd/arch/generic/xsimd_generic_memory.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,10 +25,10 @@ namespace xsimd {
2525

2626
for (std::size_t j = 0 ; j < (size - i); ++j)
2727
{
28-
concat_buffer[j] = self_buffer[i + j];
28+
concat_buffer[j] = other_buffer[i + j];
2929
if(j < i)
3030
{
31-
concat_buffer[size - 1 - j] = other_buffer[i - 1 - j];
31+
concat_buffer[size - 1 - j] = self_buffer[i - 1 - j];
3232
}
3333
}
3434
return batch<T, A>::load_aligned(concat_buffer);

include/xsimd/arch/xsimd_neon.hpp

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1411,7 +1411,7 @@ namespace xsimd
14111411
{
14121412
if (n == I)
14131413
{
1414-
return vextq_u8(lhs, rhs, I);
1414+
return vextq_u8(rhs, lhs, I);
14151415
}
14161416
else
14171417
{
@@ -1424,7 +1424,7 @@ namespace xsimd
14241424
{
14251425
if (n == I)
14261426
{
1427-
return vextq_s8(lhs, rhs, I);
1427+
return vextq_s8(rhs, lhs, I);
14281428
}
14291429
else
14301430
{
@@ -1437,7 +1437,7 @@ namespace xsimd
14371437
{
14381438
if (n == I)
14391439
{
1440-
return vextq_u16(lhs, rhs, I);
1440+
return vextq_u16(rhs, lhs, I);
14411441
}
14421442
else
14431443
{
@@ -1450,7 +1450,7 @@ namespace xsimd
14501450
{
14511451
if (n == I)
14521452
{
1453-
return vextq_s16(lhs, rhs, I);
1453+
return vextq_s16(rhs, lhs, I);
14541454
}
14551455
else
14561456
{
@@ -1463,7 +1463,7 @@ namespace xsimd
14631463
{
14641464
if (n == I)
14651465
{
1466-
return vextq_u32(lhs, rhs, I);
1466+
return vextq_u32(rhs, lhs, I);
14671467
}
14681468
else
14691469
{
@@ -1476,7 +1476,7 @@ namespace xsimd
14761476
{
14771477
if (n == I)
14781478
{
1479-
return vextq_s32(lhs, rhs, I);
1479+
return vextq_s32(rhs, lhs, I);
14801480
}
14811481
else
14821482
{
@@ -1489,7 +1489,7 @@ namespace xsimd
14891489
{
14901490
if (n == I)
14911491
{
1492-
return vextq_u64(lhs, rhs, I);
1492+
return vextq_u64(rhs, lhs, I);
14931493
}
14941494
else
14951495
{
@@ -1502,7 +1502,7 @@ namespace xsimd
15021502
{
15031503
if (n == I)
15041504
{
1505-
return vextq_s64(lhs, rhs, I);
1505+
return vextq_s64(rhs, lhs, I);
15061506
}
15071507
else
15081508
{
@@ -1515,7 +1515,7 @@ namespace xsimd
15151515
{
15161516
if (n == I)
15171517
{
1518-
return vextq_f32(lhs, rhs, I);
1518+
return vextq_f32(rhs, lhs, I);
15191519
}
15201520
else
15211521
{

include/xsimd/arch/xsimd_neon64.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ namespace xsimd
713713
{
714714
if (n == I)
715715
{
716-
return vextq_f64(lhs, rhs, I);
716+
return vextq_f64(rhs, lhs, I);
717717
}
718718
else
719719
{

include/xsimd/config/xsimd_config.hpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,10 @@
222222
#define XSIMD_WITH_SSE4_2 1
223223
#endif
224224

225+
#if !defined(__clang__) && (defined(_M_X64) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2))
226+
#define XSIMD_WITH_SSE4_2 1
227+
#endif
228+
225229
#if XSIMD_WITH_SSE4_2
226230
#define XSIMD_WITH_SSE4_1 1
227231
#endif

test/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,6 @@ endif()
8989

9090
if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
9191
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /MP /bigobj")
92-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:AVX2")
9392
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244 /wd4267 /wd4005 /wd4146 /wd4800")
9493
set(CMAKE_EXE_LINKER_FLAGS /MANIFEST:NO)
9594
endif()

test/test_extract_pair.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ namespace xsimd
3434
/* Expected shuffle data */
3535
for (int i = 0 ; i < (num - index); ++i)
3636
{
37-
exped[i] = lhs_in[i + index];
37+
exped[i] = rhs_in[i + index];
3838
if(i < index)
3939
{
40-
exped[num - 1 - i] = rhs_in[index - 1 - i];
40+
exped[num - 1 - i] = lhs_in[index - 1 - i];
4141
}
4242
}
4343
vects.push_back(std::move(exped));

0 commit comments

Comments
 (0)