Skip to content

Commit

Permalink
Limit EXR threading for texturing
Browse files Browse the repository at this point in the history
  • Loading branch information
servantftechnicolor committed Aug 18, 2023
1 parent 2cef56e commit 1015bb1
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/software/pipeline/main_texturing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,13 @@ int aliceVision_main(int argc, char* argv[])
{
return EXIT_FAILURE;
}

// set maxThreads
HardwareContext hwc = cmdline.getHardwareContext();
omp_set_num_threads(hwc.getMaxThreads());
oiio::attribute("threads", std::min(4, static_cast<int>(hwc.getMaxThreads())));
oiio::attribute("exr_threads", std::min(4, static_cast<int>(hwc.getMaxThreads())));

// set bump mapping file type
bumpMappingParams.bumpMappingFileType = (bumpMappingParams.bumpType == mesh::EBumpMappingType::Normal) ? normalFileType : heightFileType;

Expand Down

0 comments on commit 1015bb1

Please sign in to comment.