13 #include "oneapi/tbb/parallel_for.h"
18 #if defined(USE_VTUNE_PAUSE)
19 #include "ittnotify.h"
28 struct ExecutionContext {
31 void populate(
int n_thr) { m_fitters.
populate(n_thr - m_fitters.size()); }
35 auto retfitr = [](
mkfit::MkFitter* mkfp) { g_exe_ctx.m_fitters.ReturnToPool(mkfp); };
51 int theEnd = simtracks.size();
54 #ifdef USE_VTUNE_PAUSE
59 double time =
dtime();
62 [&](
const tbb::blocked_range<int>&
i) {
63 std::unique_ptr<MkFitter, decltype(retfitr)> mkfp(g_exe_ctx.m_fitters.GetFromPool(), retfitr);
64 mkfp->setNhits(Nhits);
65 for (
int it = i.begin(); it < i.end(); ++it) {
67 int end = itrack +
NN;
81 mkfp->inputTracksForFit(simtracks, itrack, end);
86 mkfp->fitTracksWithInterSlurp(ev.
layerHits_, end - itrack);
88 mkfp->outputFittedTracks(rectracks, itrack, end);
92 time =
dtime() - time;
94 #ifdef USE_VTUNE_PAUSE
constexpr Matriplex::idx_t NN
ExecutionContext g_exe_ctx
constexpr int numThreadsFinder
std::vector< HitVec > layerHits_
void populate(int threads=Config::numThreadsFinder)
constexpr int numSeedsPerTask
double runFittingTestPlex(Event &ev, std::vector< Track > &rectracks)