early-access version 2853
This commit is contained in:
26
externals/vcpkg/ports/eigen3/fix-vectorized-reductions-half.patch
vendored
Executable file
26
externals/vcpkg/ports/eigen3/fix-vectorized-reductions-half.patch
vendored
Executable 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,
|
||||
37
externals/vcpkg/ports/eigen3/portfile.cmake
vendored
Executable file
37
externals/vcpkg/ports/eigen3/portfile.cmake
vendored
Executable file
@@ -0,0 +1,37 @@
|
||||
vcpkg_buildpath_length_warning(37)
|
||||
|
||||
vcpkg_from_gitlab(
|
||||
GITLAB_URL https://gitlab.com
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO libeigen/eigen
|
||||
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.
|
||||
fix-vectorized-reductions-half.patch # Remove this patch in the next update
|
||||
)
|
||||
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
-DBUILD_TESTING=OFF
|
||||
-DEIGEN_BUILD_PKGCONFIG=ON
|
||||
OPTIONS_RELEASE
|
||||
-DCMAKEPACKAGE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/share/eigen3
|
||||
-DPKGCONFIG_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/lib/pkgconfig
|
||||
OPTIONS_DEBUG
|
||||
-DCMAKEPACKAGE_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/share/eigen3
|
||||
-DPKGCONFIG_INSTALL_DIR=${CURRENT_PACKAGES_DIR}/debug/lib/pkgconfig
|
||||
)
|
||||
|
||||
vcpkg_cmake_install()
|
||||
vcpkg_cmake_config_fixup()
|
||||
vcpkg_fixup_pkgconfig()
|
||||
|
||||
file(GLOB INCLUDES "${CURRENT_PACKAGES_DIR}/include/eigen3/*")
|
||||
# Copy the eigen header files to conventional location for user-wide MSBuild integration
|
||||
file(COPY ${INCLUDES} DESTINATION "${CURRENT_PACKAGES_DIR}/include")
|
||||
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include" "${CURRENT_PACKAGES_DIR}/debug/share")
|
||||
|
||||
file(INSTALL "${SOURCE_PATH}/COPYING.README" DESTINATION "${CURRENT_PACKAGES_DIR}/share/${PORT}" RENAME copyright)
|
||||
37
externals/vcpkg/ports/eigen3/remove_configure_checks.patch
vendored
Executable file
37
externals/vcpkg/ports/eigen3/remove_configure_checks.patch
vendored
Executable file
@@ -0,0 +1,37 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index f3e69b845..12fb2188d 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -66,12 +66,14 @@ option(EIGEN_TEST_CXX11 "Enable testing with C++11 and C++11 features (e.g. Tens
|
||||
|
||||
|
||||
macro(ei_add_cxx_compiler_flag FLAG)
|
||||
+ if(FALSE) # Since eigen3 is header only and vcpkg does not build tests this can be disabled by default.
|
||||
string(REGEX REPLACE "-" "" SFLAG1 ${FLAG})
|
||||
string(REGEX REPLACE "\\+" "p" SFLAG ${SFLAG1})
|
||||
check_cxx_compiler_flag(${FLAG} COMPILER_SUPPORT_${SFLAG})
|
||||
if(COMPILER_SUPPORT_${SFLAG})
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${FLAG}")
|
||||
endif()
|
||||
+ endif()
|
||||
endmacro()
|
||||
|
||||
check_cxx_compiler_flag("-std=c++11" EIGEN_COMPILER_SUPPORT_CPP11)
|
||||
@@ -142,7 +144,7 @@ endif()
|
||||
|
||||
set(EIGEN_TEST_MAX_SIZE "320" CACHE STRING "Maximal matrix/vector size, default is 320")
|
||||
|
||||
-if(NOT MSVC)
|
||||
+if(NOT MSVC AND FALSE)
|
||||
# We assume that other compilers are partly compatible with GNUCC
|
||||
|
||||
# clang outputs some warnings for unknown flags that are not caught by check_cxx_compiler_flag
|
||||
@@ -330,7 +332,7 @@ if(NOT MSVC)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
-else()
|
||||
+elseif(FALSE)
|
||||
|
||||
# C4127 - conditional expression is constant
|
||||
# C4714 - marked as __forceinline not inlined (I failed to deactivate it selectively)
|
||||
18
externals/vcpkg/ports/eigen3/vcpkg.json
vendored
Executable file
18
externals/vcpkg/ports/eigen3/vcpkg.json
vendored
Executable file
@@ -0,0 +1,18 @@
|
||||
{
|
||||
"name": "eigen3",
|
||||
"version": "3.4.0",
|
||||
"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",
|
||||
"dependencies": [
|
||||
{
|
||||
"name": "vcpkg-cmake",
|
||||
"host": true
|
||||
},
|
||||
{
|
||||
"name": "vcpkg-cmake-config",
|
||||
"host": true
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user