From 3a9d5a3047904a0a87bf73fd8537bbd7c4534e6c Mon Sep 17 00:00:00 2001 From: Justin Carpentier <justin.carpentier@inria.fr> Date: Fri, 21 Feb 2020 18:19:31 +0100 Subject: [PATCH] core: rename EigenObjectAllocator into EigenAllocator --- include/eigenpy/details.hpp | 6 +++--- include/eigenpy/eigen-allocator.hpp | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/include/eigenpy/details.hpp b/include/eigenpy/details.hpp index f950ac85..b989d2fa 100644 --- a/include/eigenpy/details.hpp +++ b/include/eigenpy/details.hpp @@ -91,8 +91,8 @@ namespace eigenpy NumpyEquivalentType<Scalar>::type_code); } - // Allocate memory - EigenObjectAllocator<MatType>::copy(mat,pyArray); + // Copy data + EigenAllocator<MatType>::copy(mat,pyArray); // Create an instance (either np.array or np.matrix) return NumpyType::getInstance().make(pyArray).ptr(); @@ -271,7 +271,7 @@ namespace eigenpy void* storage = reinterpret_cast<bp::converter::rvalue_from_python_storage<MatType>*> (reinterpret_cast<void*>(memory))->storage.bytes; - EigenObjectAllocator<MatType>::allocate(pyArray,storage); + EigenAllocator<MatType>::allocate(pyArray,storage); memory->convertible = storage; } diff --git a/include/eigenpy/eigen-allocator.hpp b/include/eigenpy/eigen-allocator.hpp index ea201bb1..243c1d3d 100644 --- a/include/eigenpy/eigen-allocator.hpp +++ b/include/eigenpy/eigen-allocator.hpp @@ -92,7 +92,7 @@ namespace eigenpy details::cast_matrix_or_array<Scalar,NewScalar>::run(mat,MapNumpy<MatType,NewScalar>::map(pyArray)) template<typename MatType> - struct EigenObjectAllocator + struct EigenAllocator { typedef MatType Type; typedef typename MatType::Scalar Scalar; @@ -194,7 +194,7 @@ namespace eigenpy #if EIGEN_VERSION_AT_LEAST(3,2,0) template<typename MatType> - struct EigenObjectAllocator< eigenpy::Ref<MatType> > + struct EigenAllocator< eigenpy::Ref<MatType> > { typedef eigenpy::Ref<MatType> Type; typedef typename MatType::Scalar Scalar; @@ -207,7 +207,7 @@ namespace eigenpy static void copy(Type const & mat, PyArrayObject * pyArray) { - EigenObjectAllocator<MatType>::copy(mat,pyArray); + EigenAllocator<MatType>::copy(mat,pyArray); } }; #endif -- GitLab