From 61491f065faca3f93f359197f46e87a6eba287f4 Mon Sep 17 00:00:00 2001 From: Benedikt Mersch Date: Fri, 17 Jan 2025 10:39:12 +0100 Subject: [PATCH] Cosmetics --- src/mapmos/pybind/Deskew.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/mapmos/pybind/Deskew.cpp b/src/mapmos/pybind/Deskew.cpp index 08d02a5..0655fac 100644 --- a/src/mapmos/pybind/Deskew.cpp +++ b/src/mapmos/pybind/Deskew.cpp @@ -36,12 +36,13 @@ #include namespace mapmos { -static const auto tbb_control_settings = tbb::global_control( - tbb::global_control::max_allowed_parallelism, tbb::this_task_arena::max_concurrency()); std::vector Deskew(const std::vector &frame, const std::vector ×tamps, const Sophus::SE3d &relative_motion) { + static const auto tbb_control_settings = tbb::global_control( + tbb::global_control::max_allowed_parallelism, tbb::this_task_arena::max_concurrency()); + const std::vector &deskewed_frame = [&]() { const auto &omega = relative_motion.log(); const Sophus::SE3d &inverse_motion = relative_motion.inverse(); @@ -62,4 +63,5 @@ std::vector Deskew(const std::vector &frame, }(); return deskewed_frame; } + } // namespace mapmos