Skip to content

Commit

Permalink
fix for eigen on powerpc. see https://gitlab.com/libeigen/eigen/issue…
Browse files Browse the repository at this point in the history
  • Loading branch information
mrodozov committed Apr 22, 2020
1 parent f170747 commit ae3d561
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
13 changes: 13 additions & 0 deletions eigen-altivec-fix.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/Eigen/src/Core/arch/AltiVec/PacketMath.h b/Eigen/src/Core/arch/AltiVec/PacketMath.h
index 9464264..eda73ec 100755
--- a/Eigen/src/Core/arch/AltiVec/PacketMath.h
+++ b/Eigen/src/Core/arch/AltiVec/PacketMath.h
@@ -452,7 +452,7 @@ template<> EIGEN_STRONG_INLINE Packet4f pandnot<Packet4f>(const Packet4f& a, con
template<> EIGEN_STRONG_INLINE Packet4i pandnot<Packet4i>(const Packet4i& a, const Packet4i& b) { return vec_and(a, vec_nor(b, b)); }

template<> EIGEN_STRONG_INLINE Packet4f pselect(const Packet4f& mask, const Packet4f& a, const Packet4f& b) {
- return vec_sel(b, a, mask);
+ return vec_sel(b, a, reinterpret_cast<Packet4ui>(mask));
}

template<> EIGEN_STRONG_INLINE Packet4f pround<Packet4f>(const Packet4f& a) { return vec_round(a); }
2 changes: 2 additions & 0 deletions eigen.spec
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,11 @@
%define source_prefix eigen-git-mirror-%{tag}
Source: %{source0}
BuildRequires: cmake
Patch0: eigen-altivec-fix

%prep
%setup -n %{source_prefix}
%patch0 -p1

%build
mkdir build
Expand Down

0 comments on commit ae3d561

Please sign in to comment.