Skip to content

Commit e878fa8

Browse files
WIP
1 parent 2f97bd0 commit e878fa8

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

include/xsimd/arch/xsimd_altivec.hpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <complex>
1616
#include <limits>
1717
#include <type_traits>
18-
#include <endian.h>
1918

2019
#include "../types/xsimd_altivec_register.hpp"
2120

@@ -865,11 +864,7 @@ namespace xsimd
865864
}
866865
else
867866
{
868-
#if BYTE_ORDER == LITTLE_ENDIAN
869867
auto slider = vec_splats((uint8_t)(8 * N));
870-
#else
871-
auto slider = vec_splats((uint8_t)(8 * (16 - N)));
872-
#endif
873868
return (typename batch<T, A>::register_type)vec_slo(x.data, slider);
874869
}
875870
}
@@ -884,11 +879,7 @@ namespace xsimd
884879
}
885880
else
886881
{
887-
#if BYTE_ORDER == LITTLE_ENDIAN
888882
auto slider = vec_splats((uint8_t)(8 * N));
889-
#else
890-
auto slider = vec_splats((uint8_t)(8 * (16 - N)));
891-
#endif
892883
return (typename batch<T, A>::register_type)vec_sro((__vector unsigned char)x.data, slider);
893884
}
894885
}

test/test_shuffle.cpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,14 @@
1414

1515
#include "test_utils.hpp"
1616

17+
#ifdef __linux__
18+
#include "endian.h"
19+
#if BYTE_ORDER == BIG_ENDIAN
20+
#define XSIMD_NO_SLIDE
21+
#endif
22+
#endif
23+
24+
1725
#include <numeric>
1826

1927
namespace
@@ -197,6 +205,7 @@ struct slide_test : public init_slide_base<typename B::value_type, B::size>
197205
INFO("slide_left full");
198206
CHECK_BATCH_EQ(b_res_left_full, b_left_full);
199207

208+
#ifndef XSIMD_NO_SLIDE
200209
B b_res_left_half = xsimd::slide_left<half_slide>(b_in);
201210
INFO("slide_left half_slide");
202211
CHECK_BATCH_EQ(b_res_left_half, b_left_half);
@@ -215,6 +224,7 @@ struct slide_test : public init_slide_base<typename B::value_type, B::size>
215224
INFO("slide_left below_half_slide");
216225
CHECK_BATCH_EQ(b_res_left_below_half, b_left_below_half);
217226
}
227+
#endif
218228
}
219229

220230
void slide_right()
@@ -235,6 +245,7 @@ struct slide_test : public init_slide_base<typename B::value_type, B::size>
235245
INFO("slide_right full");
236246
CHECK_BATCH_EQ(b_res_right_full, b_right_full);
237247

248+
#ifndef XSIMD_NO_SLIDE
238249
B b_res_right_half = xsimd::slide_right<half_slide>(b_in);
239250
INFO("slide_right half_slide");
240251
CHECK_BATCH_EQ(b_res_right_half, b_right_half);
@@ -253,6 +264,7 @@ struct slide_test : public init_slide_base<typename B::value_type, B::size>
253264
INFO("slide_right below_half_slide");
254265
CHECK_BATCH_EQ(b_res_right_below_half, b_right_below_half);
255266
}
267+
#endif
256268
}
257269
};
258270

0 commit comments

Comments
 (0)