Multithreaded init phase, #4140
This commit is contained in:
parent
b6bf4aba05
commit
93f6bf89b9
@ -42,24 +42,65 @@ MyMutex* lcmsMutex = nullptr;
|
|||||||
int init (const Settings* s, Glib::ustring baseDir, Glib::ustring userSettingsDir, bool loadAll)
|
int init (const Settings* s, Glib::ustring baseDir, Glib::ustring userSettingsDir, bool loadAll)
|
||||||
{
|
{
|
||||||
settings = s;
|
settings = s;
|
||||||
ProfileStore::getInstance()->init (loadAll);
|
|
||||||
ICCStore::getInstance()->init (s->iccDirectory, Glib::build_filename (baseDir, "iccprofiles"), loadAll);
|
|
||||||
DCPStore::getInstance()->init (Glib::build_filename (baseDir, "dcpprofiles"), loadAll);
|
|
||||||
|
|
||||||
CameraConstantsStore::getInstance ()->init (baseDir, userSettingsDir);
|
|
||||||
ProcParams::init();
|
ProcParams::init();
|
||||||
Color::init ();
|
|
||||||
PerceptualToneCurve::init();
|
PerceptualToneCurve::init();
|
||||||
RawImageSource::init();
|
RawImageSource::init();
|
||||||
|
|
||||||
|
#ifdef _OPENMP
|
||||||
|
#pragma omp parallel sections
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
#ifdef _OPENMP
|
||||||
|
#pragma omp section
|
||||||
|
#endif
|
||||||
|
{
|
||||||
if (s->lensfunDbDirectory.empty() || Glib::path_is_absolute(s->lensfunDbDirectory)) {
|
if (s->lensfunDbDirectory.empty() || Glib::path_is_absolute(s->lensfunDbDirectory)) {
|
||||||
LFDatabase::init(s->lensfunDbDirectory);
|
LFDatabase::init(s->lensfunDbDirectory);
|
||||||
} else {
|
} else {
|
||||||
LFDatabase::init(Glib::build_filename(baseDir, s->lensfunDbDirectory));
|
LFDatabase::init(Glib::build_filename(baseDir, s->lensfunDbDirectory));
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
#ifdef _OPENMP
|
||||||
|
#pragma omp section
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
ProfileStore::getInstance()->init(loadAll);
|
||||||
|
}
|
||||||
|
#ifdef _OPENMP
|
||||||
|
#pragma omp section
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
ICCStore::getInstance()->init(s->iccDirectory, Glib::build_filename (baseDir, "iccprofiles"), loadAll);
|
||||||
|
}
|
||||||
|
#ifdef _OPENMP
|
||||||
|
#pragma omp section
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
DCPStore::getInstance()->init(Glib::build_filename (baseDir, "dcpprofiles"), loadAll);
|
||||||
|
}
|
||||||
|
#ifdef _OPENMP
|
||||||
|
#pragma omp section
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
CameraConstantsStore::getInstance()->init(baseDir, userSettingsDir);
|
||||||
|
}
|
||||||
|
#ifdef _OPENMP
|
||||||
|
#pragma omp section
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
dfm.init(s->darkFramesPath);
|
||||||
|
}
|
||||||
|
#ifdef _OPENMP
|
||||||
|
#pragma omp section
|
||||||
|
#endif
|
||||||
|
{
|
||||||
|
ffm.init(s->flatFieldsPath);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
Color::init ();
|
||||||
delete lcmsMutex;
|
delete lcmsMutex;
|
||||||
lcmsMutex = new MyMutex;
|
lcmsMutex = new MyMutex;
|
||||||
dfm.init( s->darkFramesPath );
|
|
||||||
ffm.init( s->flatFieldsPath );
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user