Skip to content

Commit f2246a4

Browse files
WIP
1 parent ad8177b commit f2246a4

File tree

2 files changed

+5
-43
lines changed

2 files changed

+5
-43
lines changed

.github/workflows/cross-ppc.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
mkdir _build
3737
cd _build && cmake .. -DBUILD_TESTS=ON -DDOWNLOAD_DOCTEST=ON -DBUILD_BENCHMARK=${{ matrix.target.full }} -DBUILD_EXAMPLES=${{ matrix.target.full }} -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS="${{ matrix.target.flags }}" -DCMAKE_CXX_FLAGS="${{ matrix.target.flags }}" -DCMAKE_TOOLCHAIN_FILE=${{ github.workspace }}/.github/toolchains/${{ matrix.sys.compiler }}-${{ matrix.target.dir }}.cmake
3838
- name: Build
39-
run: cmake --build _build --verbose
39+
run: cmake --build _build --verbose -j1
4040
- name: Testing xsimd
4141
run: |
4242
qemu-${{ matrix.target.platform }} -cpu 7400 -L /usr/${{ matrix.target.dir}}/ ./test/test_xsimd

include/xsimd/arch/xsimd_altivec.hpp

Lines changed: 4 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -567,53 +567,15 @@ namespace xsimd
567567
{
568568
return _mm_castsi128_pd(_mm_cmpeq_epi32(_mm_castpd_si128(self), _mm_castpd_si128(other)));
569569
}
570+
#endif
570571

571572
// first
572-
template <class A>
573-
XSIMD_INLINE float first(batch<float, A> const& self, requires_arch<altivec>) noexcept
574-
{
575-
return _mm_cvtss_f32(self);
576-
}
577-
578-
template <class A>
579-
XSIMD_INLINE double first(batch<double, A> const& self, requires_arch<altivec>) noexcept
580-
{
581-
return _mm_cvtsd_f64(self);
582-
}
583-
584-
template <class A, class T, class = typename std::enable_if<std::is_integral<T>::value, void>::type>
573+
template <class A, class T, class = typename std::enable_if<std::is_scalar<T>::value, void>::type>
585574
XSIMD_INLINE T first(batch<T, A> const& self, requires_arch<altivec>) noexcept
586575
{
587-
XSIMD_IF_CONSTEXPR(sizeof(T) == 1)
588-
{
589-
return static_cast<T>(_mm_cvtsi128_si32(self) & 0xFF);
590-
}
591-
else XSIMD_IF_CONSTEXPR(sizeof(T) == 2)
592-
{
593-
return static_cast<T>(_mm_cvtsi128_si32(self) & 0xFFFF);
594-
}
595-
else XSIMD_IF_CONSTEXPR(sizeof(T) == 4)
596-
{
597-
return static_cast<T>(_mm_cvtsi128_si32(self));
598-
}
599-
else XSIMD_IF_CONSTEXPR(sizeof(T) == 8)
600-
{
601-
#if defined(__x86_64__)
602-
return static_cast<T>(_mm_cvtsi128_si64(self));
603-
#else
604-
__m128i m;
605-
_mm_storel_epi64(&m, self);
606-
int64_t i;
607-
std::memcpy(&i, &m, sizeof(i));
608-
return i;
609-
#endif
610-
}
611-
else
612-
{
613-
assert(false && "unsupported arch/op combination");
614-
return {};
615-
}
576+
return vec_extract(self, 0);
616577
}
578+
#if 0
617579

618580
// from_mask
619581
template <class A>

0 commit comments

Comments
 (0)