Skip to content

Commit 5ba475d

Browse files
fma
1 parent ec61a21 commit 5ba475d

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

include/xsimd/arch/xsimd_altivec.hpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -301,6 +301,19 @@ namespace xsimd
301301
}
302302
}
303303

304+
// fma
305+
template <class A>
306+
XSIMD_INLINE batch<float, A> fma(batch<float, A> const& x, batch<float, A> const& y, batch<float, A> const& z, requires_arch<altivec>) noexcept
307+
{
308+
return vec_madd(x, y, z);
309+
}
310+
311+
template <class A>
312+
XSIMD_INLINE batch<double, A> fma(batch<double, A> const& x, batch<double, A> const& y, batch<double, A> const& z, requires_arch<altivec>) noexcept
313+
{
314+
return vec_madd(x, y, z);
315+
}
316+
304317
// eq
305318
template <class A, class T, class = typename std::enable_if<std::is_scalar<T>::value, void>::type>
306319
XSIMD_INLINE batch_bool<T, A> eq(batch<T, A> const& self, batch<T, A> const& other, requires_arch<altivec>) noexcept
@@ -459,7 +472,6 @@ namespace xsimd
459472
XSIMD_INLINE batch<T, A> mul(batch<T, A> const& self, batch<T, A> const& other, requires_arch<altivec>) noexcept
460473
{
461474
return self.data * other.data;
462-
// return vec_mul(self.data, other.data);
463475
}
464476

465477
// neg

0 commit comments

Comments
 (0)