Add missing aligned operators new#5116
Add missing aligned operators new#5116themightyoarfish wants to merge 1 commit intoPointCloudLibrary:masterfrom
Conversation
| getModelType () const override { return (SACMODEL_NORMAL_SPHERE); } | ||
|
|
||
| PCL_MAKE_ALIGNED_OPERATOR_NEW | ||
| PCL_MAKE_ALIGNED_OPERATOR_NEW |
There was a problem hiding this comment.
| PCL_MAKE_ALIGNED_OPERATOR_NEW | |
| PCL_MAKE_ALIGNED_OPERATOR_NEW; |
|
I am confused why you added the macro to some of these classes (e.g. sac_model_perpendicular_plane.h, sac_model_parallel_plane.h, sac_model_parallel_line.h). The only Eigen member they have is |
|
I don't see how Vector3f is not a fixed-sized vectorizable type.
|
They have to a byte size that is multiple of 16 bytes. |
|
Hmm ok, then I am confused why adding the operator to `sac_model_parallel_plane.h` makes my alignment errors during point cloud deallocation go away.
|
|
I guess that once again means that changing the alignment just randomly hides the problem that is actually somewhere else. It's unfortunate that I seem to be the only person for whom this issue recurs time and again. |
|
The problem arose with this code when |
Still sounds a lot like a missing AVX(2) flags that could cause this. |
|
@themightyoarfish I went over the classes again, and 3 classes might indeed need the macro: voxel_grid_occlusion_estimation.h, voxel_grid.h, and uniform_sampling.h (I will check again to make sure). So if you are interested, we could continue this pull request with those three classes (and formatting improvements if you like)? |
This PR adds missing
PCL_MAKE_ALIGNED_OPERATOR_NEWin some classes with Eigen members. I did not comb through all classes, only those that seemed to be likely candidates to me. This fixes alignment crashes for me when using the parallel plane segmentation, for instance.There is no consistency across the codebase where to place the macro exactly, so I just put it close to the constructor up top.
I also added a few semicolons; some formatters get confused if it's missing.