Open jbergstroem opened 13 years ago
There's os.sysconf('SC_NPROCESSORS_ONLN')
for cores as well. The "biggest" issue is really how to do a proper randomization of the annealing process since it assumes you're using previous steps in the current process. Anyway, not a big problem either.
Some things such as annealing and reading image sizes could be parallelized on modern-day CPUs.
multiprocessing.cpu_count()
could help us figure out number of cores (>=python 2.6), but I'm not sure if multiprocessing is the right tool for doing the actual work? This is not a massively scalable web server, so I guess a couple of forks would do the job. Opinions? (fyi, multiprocessing is backported to 2.4,2.5 as well: http://pypi.python.org/pypi/multiprocessing/ )