From b8a4edad2a292d4563cb0e0b8109a50c6f688eec Mon Sep 17 00:00:00 2001 From: jcarpent <jcarpent@laas.fr> Date: Sat, 16 Dec 2017 17:49:23 +0100 Subject: [PATCH] [All] Remove unecessary UnalignedEquivalent types --- src/eigenpy.hpp | 9 +-------- src/fwd.hpp | 22 +--------------------- unittest/matrix.cpp | 2 +- 3 files changed, 3 insertions(+), 30 deletions(-) diff --git a/src/eigenpy.hpp b/src/eigenpy.hpp index 9acb8977..cd01d8bc 100644 --- a/src/eigenpy.hpp +++ b/src/eigenpy.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2014, Nicolas Mansard, LAAS-CNRS + * Copyright 2014-2017, Nicolas Mansard and Justin Carpentier, LAAS-CNRS * * This file is part of eigenpy. * eigenpy is free software: you can redistribute it and/or @@ -22,13 +22,6 @@ namespace eigenpy { - typedef UnalignedEquivalent<Eigen::MatrixXd>::type MatrixXd_fx; - typedef UnalignedEquivalent<Eigen::Matrix3d>::type Matrix3d_fx; - typedef UnalignedEquivalent<Eigen::Matrix4d>::type Matrix4d_fx; - typedef UnalignedEquivalent<Eigen::VectorXd>::type VectorXd_fx; - typedef UnalignedEquivalent<Eigen::Vector3d>::type Vector3d_fx; - typedef UnalignedEquivalent<Eigen::Vector4d>::type Vector4d_fx; - /* Enable Eigen-Numpy serialization for a set of standard MatrixBase instance. */ void enableEigenPy(); diff --git a/src/fwd.hpp b/src/fwd.hpp index 378046ed..ab9cf717 100644 --- a/src/fwd.hpp +++ b/src/fwd.hpp @@ -1,5 +1,5 @@ /* - * Copyright 2014, Nicolas Mansard, LAAS-CNRS + * Copyright 2014-2017, Nicolas Mansard and Justin Carpentier, LAAS-CNRS * * This file is part of eigenpy. * eigenpy is free software: you can redistribute it and/or @@ -24,24 +24,4 @@ #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION #endif -namespace eigenpy -{ - template<typename D, typename Scalar = typename D::Scalar> - struct UnalignedEquivalent - { - typedef Eigen::MatrixBase<D> MatType; - typedef Eigen::Matrix<Scalar, - D::RowsAtCompileTime, - D::ColsAtCompileTime, -#ifndef EIGENPY_ALIGNED - D::Options | Eigen::DontAlign, -#else - D::Options, -#endif - D::MaxRowsAtCompileTime, - D::MaxColsAtCompileTime> type; - }; - -} // namespace eigenpy - #endif // ifndef __eigenpy_fwd_hpp__ diff --git a/unittest/matrix.cpp b/unittest/matrix.cpp index a1f30d5f..8eff2946 100644 --- a/unittest/matrix.cpp +++ b/unittest/matrix.cpp @@ -53,7 +53,7 @@ Eigen::Matrix3d naturals(bool verbose) } template<typename MatType> -Eigen::MatrixXd reflex(const typename eigenpy::UnalignedEquivalent<MatType>::type & M, bool verbose) +Eigen::MatrixXd reflex(const MatType & M, bool verbose) { if(verbose) std::cout << "EigenMat = " << M << std::endl; -- GitLab