在PCL版本中关闭Eigen Alignment [英] Turn off Eigen Alignment in the PCL build

查看:580
本文介绍了在PCL版本中关闭Eigen Alignment的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我遇到一个问题,即特征对齐"会导致我使用的操作系统QNX出现严重问题.基本上,操作系统无法以这种方式处理内存,并且会导致非常有趣的段错误.在此处看到我的其他问题.

So I have an issue where Eigen Alignment causes serious issues with the operating system I use, QNX. Basically the OS cannot deal with the memory that way and causes very interesting seg faults. See my other question here.

无论如何,出于这个原因,我希望在构建PCL之前先禁用PCL中使用的本征比对. 关于如何执行此操作,我有一些想法.

Any way, for this reason I wish to disable the Eigen Alignment used in PCL before I build it. I have a couple of ideas about how i might do this.

EIGEN在PCL中包含文件

因此PCL具有其大部分模块的结构,如下所示(这是功能模块的示例):

So PCL has the structure for most of its modules like this (this is an example of the features module):

pcl/include/pcl/features/

,并且在此文件夹中存在一个eigen.h文件.这似乎是包含eigen库的位置.我可以在每个宏中放入#define EIGEN_DONT_ALIGN宏.当然,由于模块很多,PCL中有许多文件.一个潜在的问题是,模块在其包含文件中包含诸如EIGEN_MAKE_ALIGNED_OPERATOR_NEW之类的东西.这会与我关闭它的努力作斗争吗?也有这些标准本征包含,但其他文件也直接包含本征,我应该怎么做?

and in this folder there exists a eigen.h file. This seems to be where the eigen libraries are included from. I could put the macro #define EIGEN_DONT_ALIGN in each of these. Of course this is many many files in PCL, as there are a lot of modules. One potential problem with this is that the modules then have things like EIGEN_MAKE_ALIGNED_OPERATOR_NEW in a bunch of their include files. Is this going to combat my efforts to turn it off? Also there are these standrard eigen includes but other files also include Eigen directly, what should i do about those?

在本征中关闭本征对齐

有没有办法做到这一点?我进行了快速搜索,似乎没有办法关闭此功能来安装仅标头库?

Is there a way to do this? I have had a quick search and it doesn't seem like there is a way to install the header only library with this turned off?

其他想法

我很高兴听到其他有关如何处理此问题的建议?

I would be happy to hear any other suggestions with how to deal with this?

推荐答案

@Anycorn的答案已过时:从3.3(或3.2?)开始,不建议使用此宏,请参见

The answer by @Anycorn is outdated: starting from 3.3 (or 3.2 ?), this macro is deprecated, see this bug report, and the current state of the page describing the various macros.

您现在应该使用EIGEN_MAX_ALIGN_BYTES=0.

这篇关于在PCL版本中关闭Eigen Alignment的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆