Commit Graph

3 Commits

Author SHA1 Message Date
Alex Stewart df6e27e13b Fix calculation of Solver::Summary::num_threads_used.
- Previously we were only bounding num_threads_used based on whether
  CERES_NO_THREADS was defined, meaning that we could erroneously report
  a value larger than the number of threads actually used.

Change-Id: I7373c0c968f9be268c8b7ab0b9561ae31700fda6
2018-09-12 18:30:51 +01:00
Alex Stewart d7a95968ac Guard parallel_for_nothreads with CERES_NO_THREADS.
- Raised as issue #384.

Change-Id: I72954d93ce3f27b58b719b28b766c7c0e7a6faf6
2018-06-17 20:43:00 +01:00
Alex Stewart d856af0859 Add no-threads ParallelFor implementation.
- When Ceres was configured without any multithreading enabled (actually
  the default) it would fail to build due to undefined symbols for
  ParallelFor() as there was no implementation for that case.
- This adds a trivial single-threaded implementation for that case,
  taken from the C++11 threads implementation.

Change-Id: Ib3cfd620842b09f1acafe95b8b0ba3aee4587581
2018-05-02 13:50:37 +01:00