From f98f5f5d52defc12a53a1b801be8e85f135661ba Mon Sep 17 00:00:00 2001 From: Corentin Le Molgat Date: Tue, 18 Jul 2023 13:56:07 +0200 Subject: [PATCH] sat: export from google3 --- ortools/sat/sat_runner.cc | 2 ++ ortools/sat/subsolver.h | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/ortools/sat/sat_runner.cc b/ortools/sat/sat_runner.cc index 825f330c82f..429d495829e 100644 --- a/ortools/sat/sat_runner.cc +++ b/ortools/sat/sat_runner.cc @@ -161,8 +161,10 @@ bool LoadBooleanProblem(const std::string& filename, LOG(FATAL) << "Cannot load file '" << filename << "'."; } } else if (absl::EndsWith(filename, ".cnf") || + absl::EndsWith(filename, ".cnf.xz") || absl::EndsWith(filename, ".cnf.gz") || absl::EndsWith(filename, ".wcnf") || + absl::EndsWith(filename, ".wcnf.xz") || absl::EndsWith(filename, ".wcnf.gz")) { SatCnfReader reader(absl::GetFlag(FLAGS_wcnf_use_strong_slack)); if (absl::GetFlag(FLAGS_fu_malik) || absl::GetFlag(FLAGS_linear_scan) || diff --git a/ortools/sat/subsolver.h b/ortools/sat/subsolver.h index bc0d0b12882..d1b6bc3f10b 100644 --- a/ortools/sat/subsolver.h +++ b/ortools/sat/subsolver.h @@ -141,8 +141,7 @@ class SubSolver { // A simple wrapper to add a synchronization point in the list of subsolvers. class SynchronizationPoint : public SubSolver { public: - explicit SynchronizationPoint(const std::string& name, - std::function f) + explicit SynchronizationPoint(absl::string_view name, std::function f) : SubSolver(name, HELPER), f_(std::move(f)) {} bool TaskIsAvailable() final { return false; } std::function GenerateTask(int64_t /*task_id*/) final {