cleanup tbb includes for deprecations
This commit is contained in:
parent
fa63b64c8a
commit
cfb6fc5b6d
|
@ -209,6 +209,11 @@ endif()
|
||||||
|
|
||||||
find_package(TBB REQUIRED)
|
find_package(TBB REQUIRED)
|
||||||
include_directories(${TBB_INCLUDE_DIR})
|
include_directories(${TBB_INCLUDE_DIR})
|
||||||
|
message(STATUS "TBB_INTERFACE_VERSION: ${TBB_INTERFACE_VERSION}")
|
||||||
|
if (TBB_INTERFACE_VERSION LESS 11004)
|
||||||
|
# enable global_control header for earlier TBB versions (Ubuntu 16.04, 18.04)
|
||||||
|
add_definitions(-DTBB_PREVIEW_GLOBAL_CONTROL)
|
||||||
|
endif()
|
||||||
|
|
||||||
find_package(OpenCV REQUIRED core imgproc calib3d highgui)
|
find_package(OpenCV REQUIRED core imgproc calib3d highgui)
|
||||||
include_directories(${OpenCV_INCLUDE_DIR})
|
include_directories(${OpenCV_INCLUDE_DIR})
|
||||||
|
|
|
@ -44,7 +44,7 @@
|
||||||
# TBB_INSTALL_DIR or $ENV{TBB21_INSTALL_DIR} or $ENV{TBB_INSTALL_DIR}
|
# TBB_INSTALL_DIR or $ENV{TBB21_INSTALL_DIR} or $ENV{TBB_INSTALL_DIR}
|
||||||
|
|
||||||
# This module defines
|
# This module defines
|
||||||
# TBB_INCLUDE_DIRS, where to find task_scheduler_init.h, etc.
|
# TBB_INCLUDE_DIRS, where to find tbb_stddef.h, etc.
|
||||||
# TBB_LIBRARY_DIRS, where to find libtbb, libtbbmalloc
|
# TBB_LIBRARY_DIRS, where to find libtbb, libtbbmalloc
|
||||||
# TBB_DEBUG_LIBRARY_DIRS, where to find libtbb_debug, libtbbmalloc_debug
|
# TBB_DEBUG_LIBRARY_DIRS, where to find libtbb_debug, libtbbmalloc_debug
|
||||||
# TBB_INSTALL_DIR, the base TBB install directory
|
# TBB_INSTALL_DIR, the base TBB install directory
|
||||||
|
@ -184,7 +184,7 @@ set (TBB_INC_SEARCH_DIR ${_TBB_INSTALL_DIR}/include)
|
||||||
# Jiri: tbbvars now sets the CPATH environment variable to the directory
|
# Jiri: tbbvars now sets the CPATH environment variable to the directory
|
||||||
# containing the headers.
|
# containing the headers.
|
||||||
find_path(TBB_INCLUDE_DIR
|
find_path(TBB_INCLUDE_DIR
|
||||||
tbb/task_scheduler_init.h
|
tbb/tbb_stddef.h
|
||||||
PATHS ${TBB_INC_SEARCH_DIR} ENV CPATH
|
PATHS ${TBB_INC_SEARCH_DIR} ENV CPATH
|
||||||
)
|
)
|
||||||
mark_as_advanced(TBB_INCLUDE_DIR)
|
mark_as_advanced(TBB_INCLUDE_DIR)
|
||||||
|
|
|
@ -40,7 +40,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <basalt/calibration/calibration.hpp>
|
#include <basalt/calibration/calibration.hpp>
|
||||||
|
|
||||||
#include <tbb/concurrent_unordered_map.h>
|
#include <tbb/concurrent_unordered_map.h>
|
||||||
#include <tbb/tbb.h>
|
|
||||||
|
|
||||||
namespace basalt {
|
namespace basalt {
|
||||||
|
|
||||||
|
|
|
@ -49,8 +49,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <basalt/image/image_pyr.h>
|
#include <basalt/image/image_pyr.h>
|
||||||
#include <basalt/utils/keypoints.h>
|
#include <basalt/utils/keypoints.h>
|
||||||
|
|
||||||
#include <tbb/parallel_for.h>
|
|
||||||
|
|
||||||
namespace basalt {
|
namespace basalt {
|
||||||
|
|
||||||
template <typename Scalar, template <typename> typename Pattern>
|
template <typename Scalar, template <typename> typename Pattern>
|
||||||
|
|
|
@ -40,8 +40,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <basalt/calibration/calibration.hpp>
|
#include <basalt/calibration/calibration.hpp>
|
||||||
#include <basalt/camera/stereographic_param.hpp>
|
#include <basalt/camera/stereographic_param.hpp>
|
||||||
|
|
||||||
#include <tbb/tbb.h>
|
|
||||||
|
|
||||||
namespace basalt {
|
namespace basalt {
|
||||||
|
|
||||||
template <typename Scalar>
|
template <typename Scalar>
|
||||||
|
|
|
@ -43,7 +43,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include <basalt/optimization/accumulator.h>
|
#include <basalt/optimization/accumulator.h>
|
||||||
|
|
||||||
#include <tbb/tbb.h>
|
#include <tbb/blocked_range.h>
|
||||||
|
|
||||||
namespace basalt {
|
namespace basalt {
|
||||||
|
|
||||||
|
|
|
@ -38,6 +38,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <basalt/calibration/calibration_helper.h>
|
#include <basalt/calibration/calibration_helper.h>
|
||||||
#include <basalt/optimization/poses_linearize.h>
|
#include <basalt/optimization/poses_linearize.h>
|
||||||
|
|
||||||
|
#include <tbb/parallel_reduce.h>
|
||||||
|
|
||||||
namespace basalt {
|
namespace basalt {
|
||||||
|
|
||||||
class PosesOptimization {
|
class PosesOptimization {
|
||||||
|
@ -308,7 +310,6 @@ class PosesOptimization {
|
||||||
Eigen::aligned_vector<AprilgridCornersData> aprilgrid_corners_measurements;
|
Eigen::aligned_vector<AprilgridCornersData> aprilgrid_corners_measurements;
|
||||||
|
|
||||||
Eigen::aligned_vector<Eigen::Vector4d> aprilgrid_corner_pos_3d;
|
Eigen::aligned_vector<Eigen::Vector4d> aprilgrid_corner_pos_3d;
|
||||||
|
};
|
||||||
}; // namespace basalt
|
|
||||||
|
|
||||||
} // namespace basalt
|
} // namespace basalt
|
||||||
|
|
|
@ -44,7 +44,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include <basalt/utils/test_utils.h>
|
#include <basalt/utils/test_utils.h>
|
||||||
|
|
||||||
#include <tbb/tbb.h>
|
#include <tbb/blocked_range.h>
|
||||||
|
#include <tbb/tbb_stddef.h>
|
||||||
|
|
||||||
namespace basalt {
|
namespace basalt {
|
||||||
|
|
||||||
|
|
|
@ -45,6 +45,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include <basalt/serialization/headers_serialization.h>
|
#include <basalt/serialization/headers_serialization.h>
|
||||||
|
|
||||||
|
#include <tbb/parallel_reduce.h>
|
||||||
|
|
||||||
#include <chrono>
|
#include <chrono>
|
||||||
|
|
||||||
namespace basalt {
|
namespace basalt {
|
||||||
|
|
|
@ -35,14 +35,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include <basalt/calibration/cam_calib.h>
|
#include <basalt/calibration/cam_calib.h>
|
||||||
|
|
||||||
#include <tbb/tbb.h>
|
|
||||||
|
|
||||||
#include <CLI/CLI.hpp>
|
#include <CLI/CLI.hpp>
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
tbb::task_scheduler_init init(
|
|
||||||
tbb::task_scheduler_init::default_num_threads());
|
|
||||||
|
|
||||||
std::string dataset_path;
|
std::string dataset_path;
|
||||||
std::string dataset_type;
|
std::string dataset_type;
|
||||||
std::string aprilgrid_path;
|
std::string aprilgrid_path;
|
||||||
|
|
|
@ -37,14 +37,9 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include <basalt/calibration/cam_imu_calib.h>
|
#include <basalt/calibration/cam_imu_calib.h>
|
||||||
|
|
||||||
#include <tbb/tbb.h>
|
|
||||||
|
|
||||||
#include <CLI/CLI.hpp>
|
#include <CLI/CLI.hpp>
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
tbb::task_scheduler_init init(
|
|
||||||
tbb::task_scheduler_init::default_num_threads());
|
|
||||||
|
|
||||||
std::string dataset_path;
|
std::string dataset_path;
|
||||||
std::string dataset_type;
|
std::string dataset_type;
|
||||||
std::string aprilgrid_path;
|
std::string aprilgrid_path;
|
||||||
|
|
|
@ -37,6 +37,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include <basalt/utils/apriltag.h>
|
#include <basalt/utils/apriltag.h>
|
||||||
|
|
||||||
|
#include <tbb/parallel_for.h>
|
||||||
|
|
||||||
#include <opengv/absolute_pose/CentralAbsoluteAdapter.hpp>
|
#include <opengv/absolute_pose/CentralAbsoluteAdapter.hpp>
|
||||||
#include <opengv/absolute_pose/methods.hpp>
|
#include <opengv/absolute_pose/methods.hpp>
|
||||||
|
|
||||||
|
|
|
@ -41,7 +41,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <sophus/se3.hpp>
|
#include <sophus/se3.hpp>
|
||||||
|
|
||||||
#include <tbb/concurrent_unordered_map.h>
|
#include <tbb/concurrent_unordered_map.h>
|
||||||
#include <tbb/tbb.h>
|
|
||||||
|
|
||||||
#include <pangolin/display/image_view.h>
|
#include <pangolin/display/image_view.h>
|
||||||
#include <pangolin/gl/gldraw.h>
|
#include <pangolin/gl/gldraw.h>
|
||||||
|
|
|
@ -41,7 +41,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <sophus/se3.hpp>
|
#include <sophus/se3.hpp>
|
||||||
|
|
||||||
#include <tbb/concurrent_unordered_map.h>
|
#include <tbb/concurrent_unordered_map.h>
|
||||||
#include <tbb/tbb.h>
|
|
||||||
|
|
||||||
#include <pangolin/display/image_view.h>
|
#include <pangolin/display/image_view.h>
|
||||||
#include <pangolin/gl/gldraw.h>
|
#include <pangolin/gl/gldraw.h>
|
||||||
|
|
|
@ -41,7 +41,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <sophus/se3.hpp>
|
#include <sophus/se3.hpp>
|
||||||
|
|
||||||
#include <tbb/concurrent_unordered_map.h>
|
#include <tbb/concurrent_unordered_map.h>
|
||||||
#include <tbb/tbb.h>
|
|
||||||
|
|
||||||
#include <pangolin/display/image_view.h>
|
#include <pangolin/display/image_view.h>
|
||||||
#include <pangolin/gl/gldraw.h>
|
#include <pangolin/gl/gldraw.h>
|
||||||
|
|
|
@ -41,7 +41,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <sophus/se3.hpp>
|
#include <sophus/se3.hpp>
|
||||||
|
|
||||||
#include <tbb/concurrent_unordered_map.h>
|
#include <tbb/concurrent_unordered_map.h>
|
||||||
#include <tbb/tbb.h>
|
|
||||||
|
|
||||||
#include <pangolin/display/image_view.h>
|
#include <pangolin/display/image_view.h>
|
||||||
#include <pangolin/gl/gldraw.h>
|
#include <pangolin/gl/gldraw.h>
|
||||||
|
|
|
@ -42,8 +42,8 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
#include <sophus/se3.hpp>
|
#include <sophus/se3.hpp>
|
||||||
|
|
||||||
#include <tbb/concurrent_unordered_map.h>
|
#include <tbb/concurrent_queue.h>
|
||||||
#include <tbb/tbb.h>
|
#include <tbb/global_control.h>
|
||||||
|
|
||||||
#include <pangolin/display/image_view.h>
|
#include <pangolin/display/image_view.h>
|
||||||
#include <pangolin/gl/gldraw.h>
|
#include <pangolin/gl/gldraw.h>
|
||||||
|
@ -137,8 +137,11 @@ int main(int argc, char** argv) {
|
||||||
app.add_option("--num-threads", num_threads, "Number of threads.");
|
app.add_option("--num-threads", num_threads, "Number of threads.");
|
||||||
app.add_option("--step-by-step", step_by_step, "Path to config file.");
|
app.add_option("--step-by-step", step_by_step, "Path to config file.");
|
||||||
|
|
||||||
|
// global thread limit is in effect until global_control object is destroyed
|
||||||
|
std::unique_ptr<tbb::global_control> tbb_global_control;
|
||||||
if (num_threads > 0) {
|
if (num_threads > 0) {
|
||||||
tbb::task_scheduler_init init(num_threads);
|
tbb_global_control = std::make_unique<tbb::global_control>(
|
||||||
|
tbb::global_control::max_allowed_parallelism, num_threads);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -45,8 +45,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <basalt/utils/filesystem.h>
|
#include <basalt/utils/filesystem.h>
|
||||||
#include <basalt/calibration/calibration.hpp>
|
#include <basalt/calibration/calibration.hpp>
|
||||||
|
|
||||||
#include <tbb/tbb.h>
|
|
||||||
|
|
||||||
#include <CLI/CLI.hpp>
|
#include <CLI/CLI.hpp>
|
||||||
|
|
||||||
basalt::Calibration<double> calib;
|
basalt::Calibration<double> calib;
|
||||||
|
@ -86,9 +84,6 @@ double compute_error(
|
||||||
}
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv) {
|
int main(int argc, char **argv) {
|
||||||
tbb::task_scheduler_init init(
|
|
||||||
tbb::task_scheduler_init::default_num_threads());
|
|
||||||
|
|
||||||
std::string dataset_path;
|
std::string dataset_path;
|
||||||
std::string calibration_path;
|
std::string calibration_path;
|
||||||
std::string mocap_calibration_path;
|
std::string mocap_calibration_path;
|
||||||
|
|
|
@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <sophus/se3.hpp>
|
#include <sophus/se3.hpp>
|
||||||
|
|
||||||
#include <tbb/concurrent_unordered_map.h>
|
#include <tbb/concurrent_unordered_map.h>
|
||||||
#include <tbb/tbb.h>
|
#include <tbb/global_control.h>
|
||||||
|
|
||||||
#include <pangolin/display/image_view.h>
|
#include <pangolin/display/image_view.h>
|
||||||
#include <pangolin/gl/gldraw.h>
|
#include <pangolin/gl/gldraw.h>
|
||||||
|
@ -222,8 +222,11 @@ int main(int argc, char** argv) {
|
||||||
"Save trajectory. Supported formats <tum, euroc, kitti>");
|
"Save trajectory. Supported formats <tum, euroc, kitti>");
|
||||||
app.add_option("--use-imu", use_imu, "Use IMU.");
|
app.add_option("--use-imu", use_imu, "Use IMU.");
|
||||||
|
|
||||||
|
// global thread limit is in effect until global_control object is destroyed
|
||||||
|
std::unique_ptr<tbb::global_control> tbb_global_control;
|
||||||
if (num_threads > 0) {
|
if (num_threads > 0) {
|
||||||
tbb::task_scheduler_init init(num_threads);
|
tbb_global_control = std::make_unique<tbb::global_control>(
|
||||||
|
tbb::global_control::max_allowed_parallelism, num_threads);
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -41,7 +41,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
#include <sophus/se3.hpp>
|
#include <sophus/se3.hpp>
|
||||||
|
|
||||||
#include <tbb/concurrent_unordered_map.h>
|
#include <tbb/concurrent_unordered_map.h>
|
||||||
#include <tbb/tbb.h>
|
|
||||||
|
|
||||||
#include <pangolin/display/image_view.h>
|
#include <pangolin/display/image_view.h>
|
||||||
#include <pangolin/gl/gldraw.h>
|
#include <pangolin/gl/gldraw.h>
|
||||||
|
|
|
@ -1,5 +1,4 @@
|
||||||
|
|
||||||
|
|
||||||
#include <basalt/optimization/spline_optimize.h>
|
#include <basalt/optimization/spline_optimize.h>
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
@ -8,9 +7,6 @@
|
||||||
#include "test_utils.h"
|
#include "test_utils.h"
|
||||||
|
|
||||||
TEST(SplineOpt, SplineOptTest) {
|
TEST(SplineOpt, SplineOptTest) {
|
||||||
tbb::task_scheduler_init init(
|
|
||||||
tbb::task_scheduler_init::default_num_threads());
|
|
||||||
|
|
||||||
int num_knots = 15;
|
int num_knots = 15;
|
||||||
|
|
||||||
basalt::CalibAccelBias<double> accel_bias_full;
|
basalt::CalibAccelBias<double> accel_bias_full;
|
||||||
|
|
Loading…
Reference in New Issue