Re: [eigen] Compiling Eigen2-based code in Eigen3 |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/eigen Archives
]
- To: eigen@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [eigen] Compiling Eigen2-based code in Eigen3
- From: Benoit Jacob <jacob.benoit.1@xxxxxxxxx>
- Date: Mon, 19 Jul 2010 10:06:40 -0400
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=sw0vyVKJaD0b5HqqMp8QC6hh/DwFW/gvZ8AtMiL50j4=; b=R6C4cUCQvMktwsKI10JZ75fNxmXh57PEdSkj8DM1tOzLU3AmqtEcNoaEdslkqKVCD8 zN5o7vOxXUJ7Iz0/zrk4NzM3ZMDhITRkE2U5MM73JSmC8EmXBmzDycJ5M82GTUwZicNb sJ0dMBRr+LRKHLDmbhmayxfHZfRcIua9nNUW0=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=irWMMZclLuohWlEO2B72+yyFkPH7vaaCzqFG65v4xNX2g3WeLkzNYwn5uVmYZhI9Gg 7n91Z7gDhpCi/Ncv9SjIY59kDpQwQbR+8gPm/NYlPbySs4VA5klozeUSJJHuS9s1/1RW W3ANyQ3eYIOMlNDWFyCTtkSD1k95pZw6KKajI=
2010/7/19 Jordi Pages <jordi.pages@xxxxxxxxxxxxxxxx>:
> Hi, I am using Eigen3 but I am also using ROS code that is written for
> Eigen2. The following type declaration is not compiling:
>
> Eigen::Map<Eigen::Vector4f, Eigen::ForceAligned> pp;
>
> According to the Eigen3 source code I think that Eigen::ForceAligned has
> been replaced by Eigen::Aligned, hasn't it? Nevertheless, I was wondering if
> the old enum { ForceAligned, AsRequested } in Constants.h should be also
> declared when using the pre-compilation flag EIGEN2_SUPPORT.
ForceAligned in Eigen2 wasn't the same thing as Aligned in Eigen3.
Actually, ForceAligned was very confusing, and didn't mean what it
seemed to. Eigen2 just didn't have any proper support for mapping
aligned buffers.
You should do something like:
#ifdef I_AM_USING_EIGEN3
#define ALIGNED_IF_EIGEN3 Aligned
#else
#define ALIGNED_IF_EIGEN3
#endif
Eigen::Map<Eigen::Vector4f, ALIGNED_IF_EIGEN3> pp;
Benoit
>
> Regards
>
> Jordi Pages, PhD
> Researcher
> Pal Robotics S.L.
>
> Tel: +34.93.414.53.47
> Fax: +34.93.209.11.09
> C/ Pujades 77-79 4º 4ª 08005 Barcelona, Spain.
> http://www.pal-robotics.com/
>
> AVISO DE CONFIDENCIALIDAD: Este mensaje y sus documentos adjuntos, pueden
> contener información privilegiada y/o confidencial que está dirigida
> exclusivamente a su destinatario.
> Si usted recibe este mensaje y no es el destinatario indicado, o el empleado
> encargado de su entrega a dicha persona, por favor, notifíquelo
> inmediatamente y remita el mensaje original a la dirección
> de correo electrónico indicada. Cualquier copia, uso o distribución no
> autorizados de esta comunicación queda estrictamente prohibida.
>
> CONFIDENTIALITY NOTICE: This e-mail and the accompanying document(s) may
> contain confidential information which is privileged and intended only for
> the individual or entity to whom they are addressed. If you are not the
> intended recipient, you are hereby notified that any disclosure, copying,
> distribution or use of this e-mail and/or accompanying document(s) is
> strictly prohibited. If you have received this e-mail in error, please
> immediately notify the sender at the above e-mail address.
>
>