Provision for disabling TBB parallelization for debugging purposes.
This commit is contained in:
parent
74b95e9152
commit
5126c5018a
1 changed files with 8 additions and 1 deletions
|
@ -7,6 +7,7 @@
|
||||||
#include <utility>
|
#include <utility>
|
||||||
#include <boost/log/trivial.hpp>
|
#include <boost/log/trivial.hpp>
|
||||||
|
|
||||||
|
#include <tbb/task_scheduler_init.h>
|
||||||
#include <tbb/parallel_for.h>
|
#include <tbb/parallel_for.h>
|
||||||
#include <tbb/atomic.h>
|
#include <tbb/atomic.h>
|
||||||
|
|
||||||
|
@ -1054,6 +1055,12 @@ void PrintObject::_slice()
|
||||||
{
|
{
|
||||||
BOOST_LOG_TRIVIAL(info) << "Slicing objects...";
|
BOOST_LOG_TRIVIAL(info) << "Slicing objects...";
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
// Disable parallelization for debugging purposes.
|
||||||
|
static tbb::task_scheduler_init *tbb_init = nullptr;
|
||||||
|
tbb_init = new tbb::task_scheduler_init(1);
|
||||||
|
#endif
|
||||||
|
|
||||||
SlicingParameters slicing_params = this->slicing_parameters();
|
SlicingParameters slicing_params = this->slicing_parameters();
|
||||||
|
|
||||||
// 1) Initialize layers and their slice heights.
|
// 1) Initialize layers and their slice heights.
|
||||||
|
@ -1386,7 +1393,7 @@ PrintObject::_make_perimeters()
|
||||||
}
|
}
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (slice.extra_perimeters > 0)
|
if (slice.extra_perimeters > 0)
|
||||||
printf(" adding %d more perimeter(s) at layer %zu\n", slice.extra_perimeters, i);
|
printf(" adding %d more perimeter(s) at layer %zu\n", slice.extra_perimeters, layer_idx);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue