Initialise the number of threads to the number of cores in the machine (#170).
authorCarl Hetherington <cth@carlh.net>
Wed, 3 Jul 2013 23:22:48 +0000 (00:22 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 3 Jul 2013 23:22:48 +0000 (00:22 +0100)
ChangeLog
src/lib/config.cc

index 733625063f53584256b68072043c8e99aaf7520f..1d8f3fb42d021ec32c8b5d6c359385fa930a2338 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2013-07-04  Carl Hetherington  <cth@carlh.net>
+
+       * Try to initialise the number of threads to the number
+       of cores in the machine (#170).
+
+       * Pass _FILE_OFFSET_BITS=64 so that fopen() doesn't refuse
+       to open files of >2GB; fixes failure to re-start jobs
+       where the MXF has grown larger than 2GB on 32-bit machines.
+
 2013-07-01  Carl Hetherington  <cth@carlh.net>
 
        * Version 0.106 released.
index 7d8e823351656fdff8c019f31ce963d7510315b1..d2d7fa2fd1da001059a72a440b46e5b88ee11d62 100644 (file)
@@ -36,13 +36,14 @@ using std::vector;
 using std::ifstream;
 using std::string;
 using std::ofstream;
+using std::max;
 using boost::shared_ptr;
 
 Config* Config::_instance = 0;
 
 /** Construct default configuration */
 Config::Config ()
-       : _num_local_encoding_threads (2)
+       : _num_local_encoding_threads (max (2U, boost::thread::hardware_concurrency()))
        , _server_port (6192)
        , _reference_scaler (Scaler::from_id (N_("bicubic")))
        , _tms_path (N_("."))