Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@ environment:
global:
MINICONDA: C:\xsimd-conda
matrix:
- JOB: "SSE2"
CXXFLAGS: ""
VCVARSALL: "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat"
RUNTEST: ".\\test_xsimd"
- JOB: "AVX2"
CXXFLAGS: "/arch:AVX2"
VCVARSALL: "C:\\Program Files (x86)\\Microsoft Visual Studio 14.0\\VC\\vcvarsall.bat"
Expand Down
4 changes: 2 additions & 2 deletions include/xsimd/arch/generic/xsimd_generic_memory.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ namespace xsimd {

for (std::size_t j = 0 ; j < (size - i); ++j)
{
concat_buffer[j] = self_buffer[i + j];
concat_buffer[j] = other_buffer[i + j];
if(j < i)
{
concat_buffer[size - 1 - j] = other_buffer[i - 1 - j];
concat_buffer[size - 1 - j] = self_buffer[i - 1 - j];
}
}
return batch<T, A>::load_aligned(concat_buffer);
Expand Down
18 changes: 9 additions & 9 deletions include/xsimd/arch/xsimd_neon.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -1411,7 +1411,7 @@ namespace xsimd
{
if (n == I)
{
return vextq_u8(lhs, rhs, I);
return vextq_u8(rhs, lhs, I);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, vextq_xx is indeed different from _mm_alignr_xx 👍

}
else
{
Expand All @@ -1424,7 +1424,7 @@ namespace xsimd
{
if (n == I)
{
return vextq_s8(lhs, rhs, I);
return vextq_s8(rhs, lhs, I);
}
else
{
Expand All @@ -1437,7 +1437,7 @@ namespace xsimd
{
if (n == I)
{
return vextq_u16(lhs, rhs, I);
return vextq_u16(rhs, lhs, I);
}
else
{
Expand All @@ -1450,7 +1450,7 @@ namespace xsimd
{
if (n == I)
{
return vextq_s16(lhs, rhs, I);
return vextq_s16(rhs, lhs, I);
}
else
{
Expand All @@ -1463,7 +1463,7 @@ namespace xsimd
{
if (n == I)
{
return vextq_u32(lhs, rhs, I);
return vextq_u32(rhs, lhs, I);
}
else
{
Expand All @@ -1476,7 +1476,7 @@ namespace xsimd
{
if (n == I)
{
return vextq_s32(lhs, rhs, I);
return vextq_s32(rhs, lhs, I);
}
else
{
Expand All @@ -1489,7 +1489,7 @@ namespace xsimd
{
if (n == I)
{
return vextq_u64(lhs, rhs, I);
return vextq_u64(rhs, lhs, I);
}
else
{
Expand All @@ -1502,7 +1502,7 @@ namespace xsimd
{
if (n == I)
{
return vextq_s64(lhs, rhs, I);
return vextq_s64(rhs, lhs, I);
}
else
{
Expand All @@ -1515,7 +1515,7 @@ namespace xsimd
{
if (n == I)
{
return vextq_f32(lhs, rhs, I);
return vextq_f32(rhs, lhs, I);
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion include/xsimd/arch/xsimd_neon64.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -713,7 +713,7 @@ namespace xsimd
{
if (n == I)
{
return vextq_f64(lhs, rhs, I);
return vextq_f64(rhs, lhs, I);
}
else
{
Expand Down
4 changes: 4 additions & 0 deletions include/xsimd/config/xsimd_config.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,10 @@
#define XSIMD_WITH_SSE4_2 1
#endif

#if !defined(__clang__) && (defined(_M_X64) || (defined(_M_IX86_FP) && _M_IX86_FP >= 2))
#define XSIMD_WITH_SSE4_2 1
#endif

#if XSIMD_WITH_SSE4_2
#define XSIMD_WITH_SSE4_1 1
#endif
Expand Down
1 change: 0 additions & 1 deletion test/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ endif()

if(CMAKE_CXX_COMPILER_ID MATCHES MSVC)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /EHsc /MP /bigobj")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /arch:AVX2")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244 /wd4267 /wd4005 /wd4146 /wd4800")
set(CMAKE_EXE_LINKER_FLAGS /MANIFEST:NO)
endif()
Expand Down
4 changes: 2 additions & 2 deletions test/test_extract_pair.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ namespace xsimd
/* Expected shuffle data */
for (int i = 0 ; i < (num - index); ++i)
{
exped[i] = lhs_in[i + index];
exped[i] = rhs_in[i + index];
if(i < index)
{
exped[num - 1 - i] = rhs_in[index - 1 - i];
exped[num - 1 - i] = lhs_in[index - 1 - i];
}
}
vects.push_back(std::move(exped));
Expand Down