diff -ur omptl.old/omptl_algorithm omptl/omptl_algorithm --- omptl.old/omptl_algorithm 2012-04-22 16:29:41.000000000 +0200 +++ omptl/omptl_algorithm 2021-06-20 15:40:29.000000000 +0200 @@ -20,7 +20,7 @@ #define OMPTL_ALGORITHM 1 #include -#include +#include "omptl" namespace omptl { @@ -553,9 +553,9 @@ } // namespace omptl #ifdef _OPENMP - #include + #include "omptl_algorithm_par.h" #else - #include + #include "omptl_algorithm_ser.h" #endif #endif /* OMPTL_ALGORITHM */ diff -ur omptl.old/omptl_algorithm_par.h omptl/omptl_algorithm_par.h --- omptl.old/omptl_algorithm_par.h 2012-04-22 16:29:41.000000000 +0200 +++ omptl/omptl_algorithm_par.h 2021-06-20 15:40:50.000000000 +0200 @@ -21,8 +21,8 @@ #include #include -#include -#include +#include "omptl_tools.h" +#include "omptl_numeric" #include @@ -1700,7 +1700,7 @@ std::vector pivot_used(pivots.size(), false); // can't be bool due to parallel write - const unsigned max_depth = std::floor(std::tr1::log2(P)); + const unsigned max_depth = unsigned(std::floor(std::log2(P))); assert(1u << max_depth <= P); for (unsigned i = 0; i < max_depth; ++i) { diff -ur omptl.old/omptl_numeric omptl/omptl_numeric --- omptl.old/omptl_numeric 2012-04-22 16:29:41.000000000 +0200 +++ omptl/omptl_numeric 2021-06-20 15:40:29.000000000 +0200 @@ -19,7 +19,7 @@ #define OMPTL_NUMERIC 1 #include -#include +#include "omptl" namespace omptl { @@ -73,11 +73,11 @@ } // namespace omptl #ifdef _OPENMP - #include + #include "omptl_numeric_par.h" #else - #include + #include "omptl_numeric_ser.h" #endif -#include +#include "omptl_numeric_extensions.h" #endif /* OMPTL_NUMERIC */ diff -ur omptl.old/omptl_numeric_extensions.h omptl/omptl_numeric_extensions.h --- omptl.old/omptl_numeric_extensions.h 2012-04-22 16:29:41.000000000 +0200 +++ omptl/omptl_numeric_extensions.h 2021-06-20 15:40:29.000000000 +0200 @@ -51,9 +51,9 @@ } // namespace #ifdef _OPENMP - #include + #include "omptl_numeric_extensions_par.h" #else - #include + #include "omptl_numeric_extensions_ser.h" #endif namespace omptl diff -ur omptl.old/omptl_numeric_par.h omptl/omptl_numeric_par.h --- omptl.old/omptl_numeric_par.h 2012-04-22 16:29:41.000000000 +0200 +++ omptl/omptl_numeric_par.h 2021-06-20 15:40:29.000000000 +0200 @@ -23,8 +23,8 @@ #include #include -#include -#include +#include "omptl_algorithm" +#include "omptl_tools.h" namespace omptl { diff -ur omptl.old/omptl_tools.h omptl/omptl_tools.h --- omptl.old/omptl_tools.h 2012-04-22 16:29:41.000000000 +0200 +++ omptl/omptl_tools.h 2021-06-20 15:40:42.000000000 +0200 @@ -25,7 +25,7 @@ #include #include -#include +#include namespace omptl { diff -ur omptl.old/omptl_algorithm_par.h omptl/omptl_algorithm_par.h --- omptl.old/omptl_algorithm_par.h 2012-04-22 16:29:41.000000000 +0200 +++ omptl/omptl_algorithm_par.h 2022-06-09 13:50:05.000000000 +0200 @@ -20,6 +20,7 @@ #include #include #include +#include #include #include @@ -1309,14 +1310,14 @@ void random_shuffle(RandomAccessIterator first, RandomAccessIterator last, const unsigned P) { - std::random_shuffle(first, last); + std::shuffle(first, last, std::mt19937(std::random_device()())); } template void random_shuffle(RandomAccessIterator first, RandomAccessIterator last, RandomNumberGenerator& rgen, const unsigned P) { - std::random_shuffle(first, last, rgen); + std::shuffle(first, last, std::mt19937(std::random_device()())); } // Not (yet) parallelized, not straightforward due to possible dependencies diff -ur omptl.old/omptl_algorithm_ser.h omptl/omptl_algorithm_ser.h --- omptl.old/omptl_algorithm_ser.h 2012-04-22 16:29:41.000000000 +0200 +++ omptl/omptl_algorithm_ser.h 2022-06-09 13:50:41.000000000 +0200 @@ -14,7 +14,7 @@ // You should have received a copy of the GNU Lesser General Public // License along with this library; if not, write to the Free Software // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA - +#include namespace omptl { @@ -463,14 +463,14 @@ void random_shuffle(RandomAccessIterator first, RandomAccessIterator last, const unsigned P) { - return ::std::random_shuffle(first, last); + return ::std::shuffle(first, last, std::mt19937(std::random_device()())); } template void random_shuffle(RandomAccessIterator first, RandomAccessIterator last, RandomNumberGenerator &rgen, const unsigned P) { - return ::std::random_shuffle(first, last, rgen); + return ::std::shuffle(first, last, std::mt19937(std::random_device()())); } template