mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[eigen3] Fix usage in Linux (#23869)
* [eigen3] Fix usage in Linux * version
This commit is contained in:
parent
9b064ff07b
commit
bcabf9be90
26
ports/eigen3/fix-vectorized-reductions-half.patch
Normal file
26
ports/eigen3/fix-vectorized-reductions-half.patch
Normal file
@ -0,0 +1,26 @@
|
||||
diff --git a/Eigen/src/Core/PartialReduxEvaluator.h b/Eigen/src/Core/PartialReduxEvaluator.h
|
||||
index 29abf35..4051fcf 100644
|
||||
--- a/Eigen/src/Core/PartialReduxEvaluator.h
|
||||
+++ b/Eigen/src/Core/PartialReduxEvaluator.h
|
||||
@@ -54,12 +54,19 @@ struct packetwise_redux_traits
|
||||
/* Value to be returned when size==0 , by default let's return 0 */
|
||||
template<typename PacketType,typename Func>
|
||||
EIGEN_DEVICE_FUNC
|
||||
-PacketType packetwise_redux_empty_value(const Func& ) { return pset1<PacketType>(0); }
|
||||
+PacketType packetwise_redux_empty_value(const Func& ) {
|
||||
+ const typename unpacket_traits<PacketType>::type zero(0);
|
||||
+ return pset1<PacketType>(zero);
|
||||
+}
|
||||
+
|
||||
|
||||
/* For products the default is 1 */
|
||||
template<typename PacketType,typename Scalar>
|
||||
EIGEN_DEVICE_FUNC
|
||||
-PacketType packetwise_redux_empty_value(const scalar_product_op<Scalar,Scalar>& ) { return pset1<PacketType>(1); }
|
||||
+PacketType packetwise_redux_empty_value(const scalar_product_op<Scalar,Scalar>& ) {
|
||||
+ return pset1<PacketType>(Scalar(1));
|
||||
+}
|
||||
+
|
||||
|
||||
/* Perform the actual reduction */
|
||||
template<typename Func, typename Evaluator,
|
@ -7,7 +7,9 @@ vcpkg_from_gitlab(
|
||||
REF 3.4.0
|
||||
SHA512 ba75ecb760e32acf4ceaf27115468e65d4f77c44f8d519b5a13e7940af2c03a304ad433368cb6d55431f307c5c39e2666ab41d34442db3cf441638e51f5c3b6a
|
||||
HEAD_REF master
|
||||
PATCHES remove_configure_checks.patch # This removes unnecessary configure checks. Eigen3 just installs headers not anything more.
|
||||
PATCHES
|
||||
remove_configure_checks.patch # This removes unnecessary configure checks. Eigen3 just installs headers not anything more.
|
||||
fix-vectorized-reductions-half.patch # Remove this patch in the next update
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "eigen3",
|
||||
"version": "3.4.0",
|
||||
"port-version": 1,
|
||||
"port-version": 2,
|
||||
"description": "C++ template library for linear algebra: matrices, vectors, numerical solvers, and related algorithms.",
|
||||
"homepage": "http://eigen.tuxfamily.org",
|
||||
"license": "MPL-2.0",
|
||||
|
@ -2026,7 +2026,7 @@
|
||||
},
|
||||
"eigen3": {
|
||||
"baseline": "3.4.0",
|
||||
"port-version": 1
|
||||
"port-version": 2
|
||||
},
|
||||
"elfio": {
|
||||
"baseline": "3.10",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "250d10d414a5542aaf832350264498ba727c4c03",
|
||||
"version": "3.4.0",
|
||||
"port-version": 2
|
||||
},
|
||||
{
|
||||
"git-tree": "4b40326590314e1f3a08c75e83a42d0738040b68",
|
||||
"version": "3.4.0",
|
||||
|
Loading…
x
Reference in New Issue
Block a user