From 48dfb81bf63c58735d8631f4c652e7c1fc07098c Mon Sep 17 00:00:00 2001 From: Joseph Mirabel <jmirabel@laas.fr> Date: Fri, 1 Apr 2016 18:21:22 +0200 Subject: [PATCH] Remove FCL_USE_NATIVE_EIGEN (keep only one option when Eigen is detected. --- CMakeLists.txt | 3 +-- include/hpp/fcl/ccd/taylor_vector.h | 2 +- include/hpp/fcl/config-fcl.hh.in | 1 - include/hpp/fcl/math/matrix_3f.h | 10 +++------- include/hpp/fcl/math/vec_3f.h | 8 +------- 5 files changed, 6 insertions(+), 18 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7ff31926..35823d20 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,10 +47,9 @@ set(PROJECT_URL "http://github.com/humanoid-path-planner/hpp-fcl") setup_project() set(FCL_HAVE_SSE FALSE CACHE BOOL "Enable SSE vectorization") -set(FCL_USE_NATIVE_EIGEN FALSE CACHE BOOL "Use native eigen matrix type when possible") add_optional_dependency("eigen3 >= 3.0.0") -set(FCL_HAVE_EIGEN ${EIGEN3_FOUND} CACHE BOOL "Use eigen wrappers") +set(FCL_HAVE_EIGEN ${EIGEN3_FOUND} CACHE BOOL "Use eigen matrix type when possible") if (EIGEN3_FOUND) if (FCL_HAVE_EIGEN) include_directories(${EIGEN3_INCLUDE_DIRS}) diff --git a/include/hpp/fcl/ccd/taylor_vector.h b/include/hpp/fcl/ccd/taylor_vector.h index e3ca9466..be570a38 100644 --- a/include/hpp/fcl/ccd/taylor_vector.h +++ b/include/hpp/fcl/ccd/taylor_vector.h @@ -41,7 +41,7 @@ #include <hpp/fcl/ccd/interval_vector.h> #include <hpp/fcl/ccd/taylor_model.h> -#if FCL_USE_NATIVE_EIGEN +#if FCL_HAVE_EIGEN #include <hpp/fcl/eigen/taylor_operator.h> #endif diff --git a/include/hpp/fcl/config-fcl.hh.in b/include/hpp/fcl/config-fcl.hh.in index 0b1506c7..e8a2448f 100644 --- a/include/hpp/fcl/config-fcl.hh.in +++ b/include/hpp/fcl/config-fcl.hh.in @@ -38,7 +38,6 @@ # include "config.h" #cmakedefine01 FCL_HAVE_EIGEN -#cmakedefine01 FCL_USE_NATIVE_EIGEN #cmakedefine01 FCL_HAVE_SSE #cmakedefine01 FCL_HAVE_OCTOMAP diff --git a/include/hpp/fcl/math/matrix_3f.h b/include/hpp/fcl/math/matrix_3f.h index a44118f6..b04d816b 100644 --- a/include/hpp/fcl/math/matrix_3f.h +++ b/include/hpp/fcl/math/matrix_3f.h @@ -40,7 +40,7 @@ #include <hpp/fcl/math/vec_3f.h> -#if ! FCL_USE_NATIVE_EIGEN +#if ! FCL_HAVE_EIGEN # include <hpp/fcl/math/matrix_3fx.h> #endif @@ -48,15 +48,11 @@ namespace fcl { #if FCL_HAVE_EIGEN -# if FCL_USE_NATIVE_EIGEN typedef Eigen::FclMatrix<FCL_REAL, 3> Matrix3f; -# else - typedef Matrix3fX<details::eigen_wrapper_m3<FCL_REAL> > Matrix3f; -# endif #elif FCL_HAVE_SSE -typedef Matrix3fX<details::sse_meta_f12> Matrix3f; + typedef Matrix3fX<details::sse_meta_f12> Matrix3f; #else -typedef Matrix3fX<details::Matrix3Data<FCL_REAL> > Matrix3f; + typedef Matrix3fX<details::Matrix3Data<FCL_REAL> > Matrix3f; #endif static inline std::ostream& operator << (std::ostream& o, const Matrix3f& m) diff --git a/include/hpp/fcl/math/vec_3f.h b/include/hpp/fcl/math/vec_3f.h index 0cf42198..f81e6da1 100644 --- a/include/hpp/fcl/math/vec_3f.h +++ b/include/hpp/fcl/math/vec_3f.h @@ -42,16 +42,14 @@ #include <hpp/fcl/data_types.h> #if FCL_HAVE_EIGEN -# if ! FCL_USE_NATIVE_EIGEN # include <hpp/fcl/eigen/math_details.h> -# endif #elif FCL_HAVE_SSE # include <hpp/fcl/simd/math_simd_details.h> #else # include <hpp/fcl/math/math_details.h> #endif -#if FCL_USE_NATIVE_EIGEN +#if FCL_HAVE_EIGEN # include <hpp/fcl/eigen/vec_3fx.h> #else # include <hpp/fcl/math/vec_3fx.h> @@ -66,11 +64,7 @@ namespace fcl { #if FCL_HAVE_EIGEN -# if FCL_USE_NATIVE_EIGEN typedef Eigen::FclMatrix<FCL_REAL, 1> Vec3f; -# else - typedef Vec3fX<details::eigen_wrapper_v3<FCL_REAL> > Vec3f; -# endif #elif FCL_HAVE_SSE typedef Vec3fX<details::sse_meta_f4> Vec3f; #else -- GitLab