Skip to content

Commit

Permalink
fix windows build
Browse files Browse the repository at this point in the history
  • Loading branch information
RSchwan committed Mar 2, 2024
1 parent b19285b commit de52a1f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
10 changes: 5 additions & 5 deletions include/piqp/dense/preconditioner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class RuizEquilibration
delta_iter.setZero();
delta_iter_lb.setZero();
delta_iter_ub.setZero();
for (isize i = 0; i < max_iter && std::max({
for (isize i = 0; i < max_iter && (std::max)({
(1 - delta_iter.array()).matrix().template lpNorm<Eigen::Infinity>(),
(1 - delta_iter_lb.head(n_lb).array()).matrix().template lpNorm<Eigen::Infinity>(),
(1 - delta_iter_ub.head(n_ub).array()).matrix().template lpNorm<Eigen::Infinity>()
Expand All @@ -105,10 +105,10 @@ class RuizEquilibration
// [ G 0 0 ]
for (isize k = 0; k < n; k++)
{
delta_iter(k) = std::max({data.P_utri.col(k).head(k).template lpNorm<Eigen::Infinity>(),
data.P_utri.row(k).tail(n - k).template lpNorm<Eigen::Infinity>(),
p > 0 ? data.AT.row(k).template lpNorm<Eigen::Infinity>() : T(0),
m > 0 ? data.GT.row(k).template lpNorm<Eigen::Infinity>() : T(0)});
delta_iter(k) = (std::max)({data.P_utri.col(k).head(k).template lpNorm<Eigen::Infinity>(),
data.P_utri.row(k).tail(n - k).template lpNorm<Eigen::Infinity>(),
p > 0 ? data.AT.row(k).template lpNorm<Eigen::Infinity>() : T(0),
m > 0 ? data.GT.row(k).template lpNorm<Eigen::Infinity>() : T(0)});
}
for (isize k = 0; k < p; k++)
{
Expand Down
2 changes: 1 addition & 1 deletion include/piqp/sparse/preconditioner.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class RuizEquilibration
Vec<T>& delta_iter_lb = delta_lb_inv; // we use the memory of delta_lb_inv as temporary storage
Vec<T>& delta_iter_ub = delta_ub_inv; // we use the memory of delta_ub_inv as temporary storage
delta_iter.setZero();
for (isize i = 0; i < max_iter && std::max({
for (isize i = 0; i < max_iter && (std::max)({
(1 - delta_iter.array()).matrix().template lpNorm<Eigen::Infinity>(),
(1 - delta_iter_lb.head(n_lb).array()).matrix().template lpNorm<Eigen::Infinity>(),
(1 - delta_iter_ub.head(n_ub).array()).matrix().template lpNorm<Eigen::Infinity>()
Expand Down
1 change: 1 addition & 0 deletions tests/src/io_utils_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
// This source code is licensed under the BSD 2-Clause License found in the
// LICENSE file in the root directory of this source tree.

#define GHC_WITH_EXCEPTIONS
#include "piqp/utils/filesystem.hpp"
#include "piqp/utils/io_utils.hpp"
#include "piqp/utils/random_utils.hpp"
Expand Down

0 comments on commit de52a1f

Please sign in to comment.