Skip to content

Commit

Permalink
Fixed _mm256_set_m128 is only availble on gcc8+. issue#5072 (#5075)
Browse files Browse the repository at this point in the history
  • Loading branch information
whyb authored Oct 10, 2023
1 parent c8f92b9 commit b4f8fa6
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/layer/x86/shufflechannel_x86.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,9 @@ int ShuffleChannel_x86::forward(const Mat& bottom_blob, Mat& top_blob, const Opt
for (int i = 0; i < size; i++)
{
__m256 _p0 = _mm256_loadu_ps(ptr0);
// macro `_mm256_loadu2_m128` is declared in Intel® Intrinsics Guide but somehow missed in <immintrin.h>
// __m256 _p1 = _mm256_loadu2_m128(ptr2, ptr1);
__m256 _p1 = _mm256_set_m128(_mm_loadu_ps(ptr2), _mm_loadu_ps(ptr1));

__m256 _p1 = _mm256_castps128_ps256(_mm_loadu_ps(ptr1));
_p1 = _mm256_insertf128_ps(_p1, _mm_loadu_ps(ptr2), 1);

__m256 _lo = _mm256_unpacklo_ps(_p0, _p1);
__m256 _hi = _mm256_unpackhi_ps(_p0, _p1);
Expand Down

0 comments on commit b4f8fa6

Please sign in to comment.