Skip to content

Commit 04e3c68

Browse files
authored
Merge pull request #349 from jcarpent/devel
Enable scalar template specialization
2 parents f858aef + 6573554 commit 04e3c68

File tree

3 files changed

+32
-6
lines changed

3 files changed

+32
-6
lines changed

cmake

docker/ubuntu/Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
FROM ubuntu:22.04
2+
3+
RUN apt-get update -y && DEBIAN_FRONTEND=noninteractive apt-get install -qqy \
4+
build-essential \
5+
cmake \
6+
cmake-curses-gui \
7+
vim \
8+
gdb \
9+
git \
10+
libboost-all-dev \
11+
libeigen3-dev \
12+
liburdfdom-dev \
13+
python3-numpy
14+
15+
WORKDIR /src
16+
RUN git clone --recursive -j2 -b devel https://github.com/stack-of-tasks/eigenpy
17+
18+
ENV CTEST_OUTPUT_ON_FAILURE=ON
19+
ENV CTEST_PROGRESS_OUTPUT=ON
20+
ENV CTEST_PARALLEL_LEVEL=2
21+
22+
WORKDIR /src/eigenpy/build
23+
RUN cmake -DPYTHON_EXECUTABLE=$(which python3) -DCMAKE_BUILD_TYPE=Debug -DBUILD_TESTING=ON ..
24+
RUN make -sj2

include/eigenpy/details.hpp

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,12 @@
1919
namespace eigenpy {
2020

2121
template <typename EigenType,
22-
typename BaseType = typename get_eigen_base_type<EigenType>::type>
22+
typename BaseType = typename get_eigen_base_type<EigenType>::type,
23+
typename Scalar = typename EigenType::Scalar>
2324
struct expose_eigen_type_impl;
2425

25-
template <typename MatType>
26-
struct expose_eigen_type_impl<MatType, Eigen::MatrixBase<MatType> > {
26+
template <typename MatType, typename Scalar>
27+
struct expose_eigen_type_impl<MatType, Eigen::MatrixBase<MatType>, Scalar> {
2728
static void run() {
2829
if (check_registration<MatType>()) return;
2930

@@ -40,8 +41,9 @@ struct expose_eigen_type_impl<MatType, Eigen::MatrixBase<MatType> > {
4041
};
4142

4243
#ifdef EIGENPY_WITH_TENSOR_SUPPORT
43-
template <typename TensorType>
44-
struct expose_eigen_type_impl<TensorType, Eigen::TensorBase<TensorType> > {
44+
template <typename TensorType, typename Scalar>
45+
struct expose_eigen_type_impl<TensorType, Eigen::TensorBase<TensorType>,
46+
Scalar> {
4547
static void run() {
4648
if (check_registration<TensorType>()) return;
4749

0 commit comments

Comments
 (0)