Implement multi_threaded implementation in Iterator

This commit is contained in:
Thomas Krijnen
2019-07-03 12:10:27 +02:00
parent ae2feb2848
commit 3ebca0516e
13 changed files with 434 additions and 177 deletions
+5 -1
View File
@@ -218,9 +218,13 @@ int main(int argc, char** argv) {
ifc_options.add_options()
("calculate-quantities", "Calculate or fix the physical quantity definitions "
"based on an interpretation of the geometry when exporting IFC");
size_t num_threads;
po::options_description geom_options("Geometry options");
geom_options.add_options()
("threads,j", po::value<size_t>(&num_threads)->default_value(1),
"Number of parallel processing threads for geometry interpretation.")
("plan",
"Specifies whether to include curves in the output result. Typically "
"these are representations of type Plan or Axis. Excluded by default.")
@@ -730,7 +734,7 @@ int main(int argc, char** argv) {
return EXIT_FAILURE;
}
IfcGeom::Iterator<real_t> context_iterator(settings, ifc_file, filter_funcs);
IfcGeom::Iterator<real_t> context_iterator(settings, ifc_file, filter_funcs, num_threads);
if (!context_iterator.initialize()) {
/// @todo It would be nice to know and print separate error prints for a case where we found no entities
/// and for a case we found no entities that satisfy our filtering criteria.