mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-13 04:09:10 +08:00
Fixes to support old and new versions of the compilers for built-ins. Cast to non-const when using vector_pair with certain built-ins.
This commit is contained in:
parent
5908aeeaba
commit
8523d447a1
@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
#include "MatrixProductCommon.h"
|
#include "MatrixProductCommon.h"
|
||||||
|
|
||||||
#if __GNUC__ > 10 || \
|
#if __GNUC__ > 10 || __clang_major__ > 11 || \
|
||||||
(__GNUC__ == 10 && (__GNUC_MINOR__ > 2 || \
|
(__GNUC__ == 10 && (__GNUC_MINOR__ > 2 || \
|
||||||
(__GNUC_MINOR__ == 2 && \
|
(__GNUC_MINOR__ == 2 && \
|
||||||
__GNUC_PATCHLEVEL__ >= 1)))
|
__GNUC_PATCHLEVEL__ >= 1)))
|
||||||
|
@ -12,6 +12,10 @@
|
|||||||
|
|
||||||
#pragma GCC target("cpu=power10")
|
#pragma GCC target("cpu=power10")
|
||||||
|
|
||||||
|
#if !__has_builtin(__builtin_vsx_assemble_pair)
|
||||||
|
#define __builtin_vsx_assemble_pair __builtin_mma_assemble_pair
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace Eigen {
|
namespace Eigen {
|
||||||
|
|
||||||
namespace internal {
|
namespace internal {
|
||||||
@ -193,13 +197,13 @@ EIGEN_STRONG_INLINE void pgerMMA<Packet2d, PacketBlock<Packet2d, 2>, true>(__vec
|
|||||||
template<>
|
template<>
|
||||||
EIGEN_STRONG_INLINE void pgerMMA<Packet2d, __vector_pair, false>(__vector_quad *acc, const __vector_pair& a, const Packet2d& b)
|
EIGEN_STRONG_INLINE void pgerMMA<Packet2d, __vector_pair, false>(__vector_quad *acc, const __vector_pair& a, const Packet2d& b)
|
||||||
{
|
{
|
||||||
__builtin_mma_xvf64gerpp(acc, a, (__vector unsigned char)b);
|
__builtin_mma_xvf64gerpp(acc, (__vector_pair)a, (__vector unsigned char)b);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
EIGEN_STRONG_INLINE void pgerMMA<Packet2d, __vector_pair, true>(__vector_quad *acc, const __vector_pair& a, const Packet2d& b)
|
EIGEN_STRONG_INLINE void pgerMMA<Packet2d, __vector_pair, true>(__vector_quad *acc, const __vector_pair& a, const Packet2d& b)
|
||||||
{
|
{
|
||||||
__builtin_mma_xvf64gernp(acc, a, (__vector unsigned char)b);
|
__builtin_mma_xvf64gernp(acc, (__vector_pair)a, (__vector unsigned char)b);
|
||||||
}
|
}
|
||||||
|
|
||||||
template<>
|
template<>
|
||||||
@ -231,7 +235,7 @@ EIGEN_STRONG_INLINE void ploadRhsMMA<double, PacketBlock<Packet2d, 2> >(const do
|
|||||||
template<>
|
template<>
|
||||||
EIGEN_STRONG_INLINE void ploadRhsMMA<double, __vector_pair>(const double *rhs, __vector_pair &rhsV)
|
EIGEN_STRONG_INLINE void ploadRhsMMA<double, __vector_pair>(const double *rhs, __vector_pair &rhsV)
|
||||||
{
|
{
|
||||||
__builtin_mma_assemble_pair(&rhsV, (__vector unsigned char)(*(((Packet2d *)rhs) + 1)), (__vector unsigned char)(*((Packet2d *)rhs)));
|
__builtin_vsx_assemble_pair(&rhsV, (__vector unsigned char)(*(((Packet2d *)rhs) + 1)), (__vector unsigned char)(*((Packet2d *)rhs)));
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename Scalar, typename Packet, typename DataMapper, typename Index, const Index accRows>
|
template<typename Scalar, typename Packet, typename DataMapper, typename Index, const Index accRows>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user