//Maximum number of parallel instances
#define MAX_INSTANCES 16U
-//Maximum number of CPU cores for auto-detection
-#define MAX_CPU_COUNT 4U
-
////////////////////////////////////////////////////////////
#define CHANGE_BACKGROUND_COLOR(WIDGET, COLOR) \
//Init progress indicator
m_progressIndicator = new QMovie(":/images/Working.gif");
+ m_progressIndicator->setCacheMode(QMovie::CacheAll);
+ m_progressIndicator->setSpeed(50);
label_headerWorking->setMovie(m_progressIndicator);
progressBar->setValue(0);
if(maximumInstances < 1)
{
lamexp_cpu_t cpuFeatures = lamexp_detect_cpu_features();
- maximumInstances = qBound(1U, static_cast<unsigned int>(cpuFeatures.count), MAX_CPU_COUNT);
+ maximumInstances = (cpuFeatures.count > 4) ? ((cpuFeatures.count / 2) + 2) : cpuFeatures.count;
}
unsigned int parallelThreadCount = qBound(1U, maximumInstances, static_cast<unsigned int>(m_pendingJobs.count()));
progressDialog.close();
return true;
-}
+}
\ No newline at end of file
{
GetSystemInfo(&systemInfo);
}
- features.count = systemInfo.dwNumberOfProcessors;
+ features.count = qBound(1UL, systemInfo.dwNumberOfProcessors, 64UL);
#else
GetNativeSystemInfo(&systemInfo);
features.count = systemInfo.dwNumberOfProcessors;