From 4e332c0e5ef5bebd59b53fcae57773ca66b31472 Mon Sep 17 00:00:00 2001 From: "Yu-Hsiang M. Tsai" Date: Wed, 18 Sep 2024 03:37:28 +0200 Subject: [PATCH] fix windows and icpx --- include/ginkgo/core/preconditioner/ic.hpp | 2 +- reference/test/reorder/mc64.cpp | 3 ++- reference/test/reorder/mc64_kernels.cpp | 7 ++++--- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/include/ginkgo/core/preconditioner/ic.hpp b/include/ginkgo/core/preconditioner/ic.hpp index f78e00eea09..fe0a62cf319 100644 --- a/include/ginkgo/core/preconditioner/ic.hpp +++ b/include/ginkgo/core/preconditioner/ic.hpp @@ -442,7 +442,7 @@ class Ic : public EnableLinOp>, public Transposable { generate_default_solver(const std::shared_ptr& exec, const std::shared_ptr& mtx) { - constexpr gko::remove_complex default_reduce_residual{1e-4}; + const gko::remove_complex default_reduce_residual{1e-4}; const unsigned int default_max_iters{ static_cast(mtx->get_size()[0])}; diff --git a/reference/test/reorder/mc64.cpp b/reference/test/reorder/mc64.cpp index 8b5c8d4aa38..2ba8735292d 100644 --- a/reference/test/reorder/mc64.cpp +++ b/reference/test/reorder/mc64.cpp @@ -86,12 +86,13 @@ TYPED_TEST(Mc64, HasSensibleDefaults) TYPED_TEST(Mc64, CanBeCreatedWithReorderingStrategy) { using reorder_type = typename TestFixture::reorder_type; + using real_type = typename TestFixture::real_type; auto mc64 = reorder_type::build() .with_strategy( gko::experimental::reorder::mc64_strategy::max_diagonal_sum) - .with_tolerance(1e-4) + .with_tolerance(real_type{1e-4}) .on(this->exec) ->generate(this->not_id3_mtx); diff --git a/reference/test/reorder/mc64_kernels.cpp b/reference/test/reorder/mc64_kernels.cpp index 937fe87daa4..56126ae1fb8 100644 --- a/reference/test/reorder/mc64_kernels.cpp +++ b/reference/test/reorder/mc64_kernels.cpp @@ -284,7 +284,7 @@ TYPED_TEST(Mc64, CreatesCorrectPermutationAndScalingExampleSum) gko::experimental::reorder::Mc64::build() .with_strategy( gko::experimental::reorder::mc64_strategy::max_diagonal_sum) - .with_tolerance(1e-4) + .with_tolerance(real_type{1e-4}) .on(this->ref); auto mc64 = mc64_factory->generate(this->mtx); @@ -304,11 +304,12 @@ TYPED_TEST(Mc64, CreatesCorrectPermutationAndScalingExampleProduct) { using index_type = typename TestFixture::index_type; using value_type = typename TestFixture::value_type; + using real_type = typename TestFixture::real_type; auto mc64_factory = gko::experimental::reorder::Mc64::build() .with_strategy( gko::experimental::reorder::mc64_strategy::max_diagonal_product) - .with_tolerance(1e-4) + .with_tolerance(real_type{1e-4}) .on(this->ref); auto mc64 = mc64_factory->generate(this->mtx); @@ -356,7 +357,7 @@ TYPED_TEST(Mc64, CreatesCorrectPermutationAndScalingLargeTrivialExampleProduct) gko::experimental::reorder::Mc64::build() .with_strategy( gko::experimental::reorder::mc64_strategy::max_diagonal_product) - .with_tolerance(1e-4) + .with_tolerance(real_type{1e-4}) .on(this->ref); auto mc64 = mc64_factory->generate(mtx); // get components