PointCloudLibrary / PointCloudLibrary/pcl
[custom] EIGEN_ALIGN16 bad idea
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 11.1k
- Forks
- 4.7k
- Avg merge
- 4d 10h
- Merged PRs (30d)
- 6
Description
the use of EIGEN_ALIGN16
seems to be a very bad idea. In particular for cache efficiency and multithreading.
I would either eliminate that and all similar ones or substitute them with something configurable at compile time
giving also the option to use, compile-time-configurable directives like
alignas(std::hardware_destructive_interference_size) (and here the topic of moving to C++17 goes on)
why are the definitions of the points so relying on alignment and they make use of union??
isn't this too hard coding and anti-OOP?
#define PCL_ADD_UNION_POINT4D
union EIGEN_ALIGN16 {
float data[4];
struct {
float x;
float y;
float z;
};
};
i see it is probably "required" by Eigen
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the point definitions and the PCL_ADD_UNION_POINT4D macro shown in the issue, then review how their EIGEN_ALIGN16 and union usage relate to Eigen requirements. Done would require an agreed approach for configurable or removed alignment that preserves the relevant point behavior and addresses cache efficiency and multithreading concerns.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- computer-vision, performance
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100