do not use a global variable to define the number of available threads

* python/spot/impl.i: Make parallel_policy implicitly contractible.
* spot/graph/graph.hh (sort_edges_srcfirst_): Pass a parallel_policy
explicitly.
* spot/twa/twagraph.hh, spot/twa/twagraph.cc (merge_states): Likewise.
* spot/misc/common.cc: Remove file.
* spot/misc/common.hh (set_nthreads, get_nthreads): Remove, and
replace with...
(parallel_policy): ... this.
* spot/misc/Makefile.am, tests/python/mergedge.py, NEWS: Adjust.
This commit is contained in:
Alexandre Duret-Lutz 2022-08-12 14:56:45 +02:00
parent 2848951965
commit d1b8495510
9 changed files with 137 additions and 154 deletions

8
NEWS
View file

@ -38,9 +38,6 @@ New in spot 2.10.6.dev (not yet released)
Library:
- A global variable, together with its setters and getters to define the
maximal number of threads is added to common.hh/common.cc
- The new function suffix_operator_normal_form() implements
transformation of formulas to Suffix Operator Normal Form,
described in [cimatti.06.fmcad].
@ -117,6 +114,11 @@ New in spot 2.10.6.dev (not yet released)
to obtain a simple model checker (that returns true or false,
without counterexample).
- spot::parallel_policy is an object that can be passed to some
algorithm to specify how many threads can be used if Spot has been
compiled with --enable-pthread. Currently, only
twa_graph::merge_states() support it.
Python bindings:
- The to_str() method of automata can now export a parity game into