diff options
author | Nathan Cassereau <84033440+ncassereau-idris@users.noreply.github.com> | 2022-06-01 08:52:47 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-01 08:52:47 +0200 |
commit | 1f307594244dd4c274b64d028823cbcfff302f37 (patch) | |
tree | f3302cde2a26a8b5c3869d722269e91c23a3ae5b /ot/lp/network_simplex_simple_omp.h | |
parent | 951209ac3f01c86b35d3beff4679ce47e47c0872 (diff) |
[MRG] numItermax in 64 bits in EMD solver (#380)
* Correct test_mm_convergence for cupy
* Fix bug where number of iterations is limited to 2^31
* Update RELEASES.md
* Replace size_t with long long
* Use uint64_t instead of long long
Diffstat (limited to 'ot/lp/network_simplex_simple_omp.h')
-rw-r--r-- | ot/lp/network_simplex_simple_omp.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/ot/lp/network_simplex_simple_omp.h b/ot/lp/network_simplex_simple_omp.h index dde84fd..5f19d73 100644 --- a/ot/lp/network_simplex_simple_omp.h +++ b/ot/lp/network_simplex_simple_omp.h @@ -244,7 +244,7 @@ namespace lemon_omp { /// mixed order in the internal data structure. /// In special cases, it could lead to better overall performance, /// but it is usually slower. Therefore it is disabled by default. - NetworkSimplexSimple(const GR& graph, bool arc_mixing, int nbnodes, ArcsType nb_arcs, size_t maxiters = 0, int numThreads=-1) : + NetworkSimplexSimple(const GR& graph, bool arc_mixing, int nbnodes, ArcsType nb_arcs, uint64_t maxiters = 0, int numThreads=-1) : _graph(graph), //_arc_id(graph), _arc_mixing(arc_mixing), _init_nb_nodes(nbnodes), _init_nb_arcs(nb_arcs), MAX(std::numeric_limits<Value>::max()), @@ -317,7 +317,7 @@ namespace lemon_omp { private: - size_t max_iter; + uint64_t max_iter; int num_threads; TEMPLATE_DIGRAPH_TYPEDEFS(GR); @@ -1563,7 +1563,7 @@ namespace lemon_omp { // Perform heuristic initial pivots if (!initialPivots()) return UNBOUNDED; - size_t iter_number = 0; + uint64_t iter_number = 0; // Execute the Network Simplex algorithm while (pivot.findEnteringArc()) { if ((++iter_number <= max_iter&&max_iter > 0) || max_iter<=0) { |