Skip to content

Commit 36cc7aa

Browse files
gcc ver
1 parent b7a286e commit 36cc7aa

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

.github/workflows/cross-ppc.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ jobs:
1010
strategy:
1111
matrix:
1212
target:
13-
- { platform: 'ppc', dir: 'powerpc-linux-gnu', flags: '-maltivec', full: 'OFF' }
13+
- { platform: 'ppc', dir: 'powerpc-linux-gnu', flags: '-maltivec -mvsx', full: 'OFF' }
1414
sys:
15-
- { compiler: 'gcc', version: '10' }
15+
- { compiler: 'gcc', version: '12' }
1616
steps:
1717
- name: Setup compiler
1818
if: ${{ matrix.sys.compiler == 'gcc' }}

include/xsimd/arch/xsimd_altivec.hpp

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ namespace xsimd
7171
template <class A>
7272
XSIMD_INLINE batch<float, A> abs(batch<float, A> const& self, requires_arch<altivec>) noexcept
7373
{
74-
return vec_abs(self);
74+
return vec_abs(self.data);
7575
}
7676

7777
// add
@@ -401,14 +401,14 @@ namespace xsimd
401401
}
402402
#endif
403403
// ge
404-
template <class A, class T, class = typename std::enable_if<std::is_integral<T>::value, void>::type>
404+
template <class A, class T, class = typename std::enable_if<std::is_scalar<T>::value, void>::type>
405405
XSIMD_INLINE batch_bool<T, A> ge(batch<T, A> const& self, batch<T, A> const& other, requires_arch<altivec>) noexcept
406406
{
407407
return vec_cmpge(self.data, other.data);
408408
}
409409

410410
// gt
411-
template <class A, class T, class = typename std::enable_if<std::is_integral<T>::value, void>::type>
411+
template <class A, class T, class = typename std::enable_if<std::is_scalar<T>::value, void>::type>
412412
XSIMD_INLINE batch_bool<T, A> gt(batch<T, A> const& self, batch<T, A> const& other, requires_arch<altivec>) noexcept
413413
{
414414
return vec_cmpgt(self.data, other.data);
@@ -440,7 +440,7 @@ namespace xsimd
440440
}
441441

442442
// insert
443-
template <class A, class T, size_t I, class = typename std::enable_if<std::is_integral<T>::value, void>::type>
443+
template <class A, class T, size_t I, class = typename std::enable_if<std::is_scalar<T>::value, void>::type>
444444
XSIMD_INLINE batch<T, A> insert(batch<T, A> const& self, T val, index<I> pos, requires_arch<altivec>) noexcept
445445
{
446446
return vec_insert(val, self.data, pos);
@@ -488,14 +488,14 @@ namespace xsimd
488488
#endif
489489

490490
// le
491-
template <class A, class T, class = typename std::enable_if<std::is_integral<T>::value, void>::type>
491+
template <class A, class T, class = typename std::enable_if<std::is_scalar<T>::value, void>::type>
492492
XSIMD_INLINE batch_bool<T, A> le(batch<T, A> const& self, batch<T, A> const& other, requires_arch<altivec>) noexcept
493493
{
494494
return vec_cmple(self.data, other.data);
495495
}
496496

497497
// lt
498-
template <class A, class T, class = typename std::enable_if<std::is_integral<T>::value, void>::type>
498+
template <class A, class T, class = typename std::enable_if<std::is_scalar<T>::value, void>::type>
499499
XSIMD_INLINE batch_bool<T, A> lt(batch<T, A> const& self, batch<T, A> const& other, requires_arch<altivec>) noexcept
500500
{
501501
return vec_cmplt(self.data, other.data);
@@ -595,7 +595,8 @@ namespace xsimd
595595
template <class A, class T, typename std::enable_if<std::is_scalar<T>::value, void>::type>
596596
XSIMD_INLINE batch<T, A> mul(batch<T, A> const& self, batch<T, A> const& other, requires_arch<altivec>) noexcept
597597
{
598-
return vec_mul(self.data, other.data);
598+
return self.data * other.data;
599+
//return vec_mul(self.data, other.data);
599600
}
600601
#if 0
601602

0 commit comments

Comments
 (0)