[ginkgo] Update to 1.4.0 (#19731)

* [ginkgo] add release 1.4.0

* [ginkgo] x-add-version

* Update ports/ginkgo/usage

* [ginkgo] download large patch on demand

* [ginkgo] x-add-version
This commit is contained in:
Tobias Ribizel 2021-08-26 18:34:31 +02:00 committed by GitHub
parent dd3d6df500
commit 410a157896
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 24 additions and 210 deletions

View File

@ -1,86 +0,0 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index e75f7d6..63685f2 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -20,6 +20,12 @@ include(cmake/hip_path.cmake)
include(cmake/autodetect_executors.cmake)
include(cmake/build_type_helpers.cmake)
+if (MSVC)
+ add_compile_options(/bigobj)
+elseif (MINGW OR CYGWIN)
+ add_compile_options("-Wa,-mbig-obj")
+endif()
+
# Ginkgo configuration options
option(GINKGO_DEVEL_TOOLS "Add development tools to the build system" OFF)
option(GINKGO_BUILD_TESTS "Generate build files for unit tests" ON)
diff --git a/cmake/GinkgoConfig.cmake.in b/cmake/GinkgoConfig.cmake.in
index 0348f95..3b8be0f 100644
--- a/cmake/GinkgoConfig.cmake.in
+++ b/cmake/GinkgoConfig.cmake.in
@@ -129,8 +129,6 @@ set(GINKGO_OPENMP_LIBRARIES @OpenMP_CXX_LIBRARIES@)
set(GINKGO_OPENMP_FLAGS "@OpenMP_CXX_FLAGS@")
# Provide useful HIP helper functions
-include(${CMAKE_CURRENT_LIST_DIR}/hip_helpers.cmake)
-include(${CMAKE_CURRENT_LIST_DIR}/windows_helpers.cmake)
# NOTE: we do not export benchmarks, examples, tests or devel tools
# so `third_party` libraries are currently unneeded.
diff --git a/cmake/install_helpers.cmake b/cmake/install_helpers.cmake
index ba7ea3f..7cc3ba8 100644
--- a/cmake/install_helpers.cmake
+++ b/cmake/install_helpers.cmake
@@ -14,16 +14,11 @@ function(ginkgo_install_library name subdir)
# dll is considered as runtime
install(TARGETS "${name}"
EXPORT Ginkgo
- LIBRARY DESTINATION ${GINKGO_INSTALL_LIBRARY_DIR}
- ARCHIVE DESTINATION ${GINKGO_INSTALL_LIBRARY_DIR}
- RUNTIME DESTINATION ${GINKGO_INSTALL_LIBRARY_DIR}
)
else ()
# install .so and .a files
install(TARGETS "${name}"
EXPORT Ginkgo
- LIBRARY DESTINATION ${GINKGO_INSTALL_LIBRARY_DIR}
- ARCHIVE DESTINATION ${GINKGO_INSTALL_LIBRARY_DIR}
)
endif ()
endfunction()
@@ -37,9 +32,8 @@ function(ginkgo_install)
DESTINATION "${GINKGO_INSTALL_INCLUDE_DIR}"
FILES_MATCHING PATTERN "*.hpp"
)
- install(DIRECTORY "${Ginkgo_BINARY_DIR}/include/"
- DESTINATION "${GINKGO_INSTALL_INCLUDE_DIR}"
- FILES_MATCHING PATTERN "*.hpp"
+ install(FILES "${Ginkgo_BINARY_DIR}/include/ginkgo/config.hpp"
+ DESTINATION "${GINKGO_INSTALL_INCLUDE_DIR}/ginkgo"
)
if (GINKGO_HAVE_PAPI_SDE)
install(FILES "${Ginkgo_SOURCE_DIR}/third_party/papi_sde/papi_sde_interface.h"
@@ -70,8 +64,6 @@ function(ginkgo_install)
install(FILES
"${Ginkgo_BINARY_DIR}/GinkgoConfig.cmake"
"${Ginkgo_BINARY_DIR}/GinkgoConfigVersion.cmake"
- "${Ginkgo_SOURCE_DIR}/cmake/hip_helpers.cmake"
- "${Ginkgo_SOURCE_DIR}/cmake/windows_helpers.cmake"
DESTINATION "${GINKGO_INSTALL_CONFIG_DIR}"
)
install(EXPORT Ginkgo
diff --git a/cmake/windows_helpers.cmake b/cmake/windows_helpers.cmake
index 5f517a5..46d31ba 100644
--- a/cmake/windows_helpers.cmake
+++ b/cmake/windows_helpers.cmake
@@ -14,9 +14,7 @@ function(ginkgo_switch_windows_link lang from to)
endfunction()
macro(ginkgo_switch_to_windows_static lang)
- ginkgo_switch_windows_link(${lang} "MD" "MT")
endmacro()
macro(ginkgo_switch_to_windows_dynamic lang)
- ginkgo_switch_windows_link(${lang} "MT" "MD")
endmacro()

View File

@ -1,12 +1,17 @@
vcpkg_download_distfile(WINDOWS_SYMBOLS_PATCH
URLS https://github.com/ginkgo-project/ginkgo/commit/7481b2fffb51d73492ef9017045450b29b820f81.diff
FILENAME 7481b2fffb51d73492ef9017045450b29b820f81.diff
SHA512 f81c57aacc30680383ccfb21ca08987d8ea19a23c0c7bbc5ae590c3c7eca4eed72cea84410357e080e5bb35f08f6b57834b3cdace6d91cc3fde0a1930aa4270a
)
vcpkg_from_github(
OUT_SOURCE_PATH SOURCE_PATH
REPO ginkgo-project/ginkgo
REF v1.3.0
SHA512 40db39666730a2120d0c5e197518f784aab71655781c037fb83302a346f6bf717e5c58491e9b29b9adacb492328e11bc60960f99323c220d53505ecab6489871
REF v1.4.0
SHA512 9bfcb2c415c7a1a70cf8e49f20adf62d02cab83bb23b6fcecfeaeeb322b2d4e1ad8d8fa6582735073753f9a05eac8688b9bd1ff1d4203957c1a80702d117e807
HEAD_REF master
PATCHES
cmake-fixes.patch
windows-iterator.patch
${WINDOWS_SYMBOLS_PATCH}
)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
@ -23,6 +28,8 @@ vcpkg_cmake_configure(
-DGINKGO_BUILD_TESTS=OFF
-DGINKGO_BUILD_EXAMPLES=OFF
-DGINKGO_BUILD_HIP=OFF
-DGINKGO_BUILD_DPCPP=OFF
-DGINKGO_BUILD_HWLOC=OFF
-DGINKGO_BUILD_BENCHMARKS=OFF
-DGINKGO_DEVEL_TOOLS=OFF
-DGINKGO_SKIP_DEPENDENCY_UPDATE=ON
@ -36,5 +43,6 @@ vcpkg_cmake_config_fixup(CONFIG_PATH lib/cmake/Ginkgo)
vcpkg_fixup_pkgconfig()
file(INSTALL "${SOURCE_PATH}/LICENSE" DESTINATION "${CURRENT_PACKAGES_DIR}/share/ginkgo" RENAME copyright)
file(INSTALL "${CMAKE_CURRENT_LIST_DIR}/usage" DESTINATION "${CURRENT_PACKAGES_DIR}/share/ginkgo")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/include")
file(REMOVE_RECURSE "${CURRENT_PACKAGES_DIR}/debug/share")

4
ports/ginkgo/usage Normal file
View File

@ -0,0 +1,4 @@
The package ginkgo provides CMake targets:
find_package(Ginkgo CONFIG REQUIRED)
target_link_libraries(main PRIVATE Ginkgo::ginkgo)

View File

@ -1,7 +1,7 @@
{
"name": "ginkgo",
"version-semver": "1.3.0",
"description": "Ginkgo is a high-performance linear algebra library for manycore systems, with a focus on sparse solution of linear systems. Note that the OpenMP feature is not available on Windows, and the CUDA feature on Windows requires the CUDACXX environment variable to point to the CUDA nvcc.exe compiler with VCPKG_KEEP_ENV_VARS set to CUDACXX to pass its value through to the vcpkg environment.",
"version-semver": "1.4.0",
"description": "Ginkgo is a high-performance linear algebra library for manycore systems, with a focus on sparse solution of linear systems. Note that the OpenMP feature is not available on Windows.",
"dependencies": [
{
"name": "vcpkg-cmake",

View File

@ -1,117 +0,0 @@
diff --git a/core/base/iterator_factory.hpp b/core/base/iterator_factory.hpp
index b7efd21dfe..5e4bddeb17 100644
--- a/core/base/iterator_factory.hpp
+++ b/core/base/iterator_factory.hpp
@@ -110,7 +110,7 @@ class IteratorFactory {
~Reference() {}
- Reference(IteratorFactory &parent, array_index_type array_index)
+ Reference(IteratorFactory *parent, array_index_type array_index)
: parent_(parent), arr_index_(array_index)
{}
@@ -143,10 +143,10 @@ class IteratorFactory {
{
// In C++11, it is legal for a nested class to access private
// members of the parent class.
- parent_.dominant_values_[arr_index_] =
- std::move(other.parent_.dominant_values_[other.arr_index_]);
- parent_.secondary_values_[arr_index_] =
- std::move(other.parent_.secondary_values_[other.arr_index_]);
+ parent_->dominant_values_[arr_index_] =
+ std::move(other.parent_->dominant_values_[other.arr_index_]);
+ parent_->secondary_values_[arr_index_] =
+ std::move(other.parent_->secondary_values_[other.arr_index_]);
return *this;
}
@@ -174,25 +174,25 @@ class IteratorFactory {
return left.dominant < right.dominant();
}
- ToSortType &dominant() { return parent_.dominant_values_[arr_index_]; }
+ ToSortType &dominant() { return parent_->dominant_values_[arr_index_]; }
const ToSortType &dominant() const
{
- return parent_.dominant_values_[arr_index_];
+ return parent_->dominant_values_[arr_index_];
}
SecondaryType &secondary()
{
- return parent_.secondary_values_[arr_index_];
+ return parent_->secondary_values_[arr_index_];
}
const SecondaryType &secondary() const
{
- return parent_.secondary_values_[arr_index_];
+ return parent_->secondary_values_[arr_index_];
}
private:
- IteratorFactory &parent_;
+ IteratorFactory *parent_;
array_index_type arr_index_;
};
@@ -214,9 +214,11 @@ class IteratorFactory {
using reference = Reference;
using iterator_category = std::random_access_iterator_tag;
+ Iterator() = default;
+
~Iterator() {}
- Iterator(IteratorFactory &parent, difference_type array_index)
+ Iterator(IteratorFactory *parent, difference_type array_index)
: parent_(parent), arr_index_(array_index)
{}
@@ -298,12 +300,12 @@ class IteratorFactory {
}
// Comparable operators
- bool operator==(const Iterator &other)
+ bool operator==(const Iterator &other) const
{
return arr_index_ == other.arr_index_;
}
- bool operator!=(const Iterator &other)
+ bool operator!=(const Iterator &other) const
{
return arr_index_ != other.arr_index_;
}
@@ -329,8 +331,8 @@ class IteratorFactory {
}
private:
- IteratorFactory &parent_;
- difference_type arr_index_;
+ IteratorFactory *parent_{};
+ difference_type arr_index_{};
};
public:
@@ -363,7 +365,7 @@ class IteratorFactory {
* Creates an iterator pointing to the beginning of both arrays
* @returns an iterator pointing to the beginning of both arrays
*/
- Iterator begin() { return {*this, 0}; }
+ Iterator begin() { return {this, 0}; }
/**
* Creates an iterator pointing to the (excluding) end of both arrays
@@ -371,7 +373,7 @@ class IteratorFactory {
*/
Iterator end()
{
- return {*this, static_cast<typename Iterator::difference_type>(size_)};
+ return {this, static_cast<typename Iterator::difference_type>(size_)};
}
private:

View File

@ -2309,7 +2309,7 @@
"port-version": 0
},
"ginkgo": {
"baseline": "1.3.0",
"baseline": "1.4.0",
"port-version": 0
},
"gl2ps": {

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "da56f7ca349bebb4061a04d4d3b3d9b8fde9a1c8",
"version-semver": "1.4.0",
"port-version": 0
},
{
"git-tree": "b204eef5f779c05c2160e28cc07f411258ddcbfc",
"version-semver": "1.3.0",