PointCloudLibrary / PointCloudLibrary/pcl

[common] Provide explicit padding in point types

Open
#2,463 4 comments 2 reactions 1 assignee View on GitHub

@taketwo is already working on this.

Since Sep 28, 2018.

kind: todo module: common
Dominant language
C++
Stars
11.1k
Forks
4.7k
Avg merge
4d 10h
Merged PRs (30d)
6

Description

Your Environment

  • PCL Version: the master branch

Context

See the code
https://github.com/PointCloudLibrary/pcl/blob/9467b944ee3e30bb4cf8445d861c280f0fba1020/common/include/pcl/impl/point_types.hpp#L488-L493
https://github.com/PointCloudLibrary/pcl/blob/9467b944ee3e30bb4cf8445d861c280f0fba1020/common/include/pcl/impl/point_types.hpp#L449-L461

_PointXYZI is padded explicitly but _PointXYZL is padded implicitly by the compiler to make it 16 bytes aligned.

Expected Behavior

For consistency, we should pad _PointXYZL explicitly.

Current Behavior

_PointXYZL is padded implicitly by the compiler.

Code to Reproduce

See the code above.

Possible Solution

Pad _PointXYZL explicitly.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.