Skip to content

Commit

Permalink
Revert "Build: remove seemingly useless EIGEN_MAKE_ALIGNED_OPERATOR_NEW"
Browse files Browse the repository at this point in the history
This reverts commit 1e83c83.
  • Loading branch information
xiaoxq committed Jun 26, 2020
1 parent 1e83c83 commit 871f1d2
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 0 deletions.
2 changes: 2 additions & 0 deletions modules/perception/base/frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ namespace perception {
namespace base {

struct alignas(16) Frame {
EIGEN_MAKE_ALIGNED_OPERATOR_NEW

Frame() { sensor2world_pose.setIdentity(); }

void Reset() {
Expand Down
2 changes: 2 additions & 0 deletions modules/perception/base/object.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ namespace perception {
namespace base {

struct alignas(16) Object {
EIGEN_MAKE_ALIGNED_OPERATOR_NEW

Object();
std::string ToString() const;
void Reset();
Expand Down
3 changes: 3 additions & 0 deletions modules/perception/base/point_cloud.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ namespace base {

template <class PointT>
class PointCloud {
public:
EIGEN_MAKE_ALIGNED_OPERATOR_NEW

public:
using PointType = PointT;
// @brief default constructor
Expand Down
2 changes: 2 additions & 0 deletions modules/perception/lidar/common/lidar_frame.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ namespace perception {
namespace lidar {

struct LidarFrame {
EIGEN_MAKE_ALIGNED_OPERATOR_NEW

// point cloud
std::shared_ptr<base::AttributePointCloud<base::PointF>> cloud;
// world point cloud
Expand Down
2 changes: 2 additions & 0 deletions modules/perception/lidar/common/pcl_util.h
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@ struct PCLPointXYZIT {
float z;
uint8_t intensity;
double timestamp;
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
} EIGEN_ALIGN16;

struct PCLPointXYZL {
float x;
float y;
float z;
uint32_t label;
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
} EIGEN_ALIGN16;

inline bool LoadPCLPCD(const std::string& file_path,
Expand Down
3 changes: 3 additions & 0 deletions modules/perception/tool/benchmark/lidar/util/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ struct PointXYZIT {
float z;
uint8_t intensity;
double timestamp;
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
} EIGEN_ALIGN16;

typedef ::pcl::PointCloud<PointXYZIT> PointXYZITCloud;
Expand All @@ -50,6 +51,7 @@ struct PointXYZL {
float y;
float z;
uint32_t label;
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
} EIGEN_ALIGN16;

typedef ::pcl::PointCloud<PointXYZL> PointXYZLCloud;
Expand All @@ -69,6 +71,7 @@ struct PointXYZIL {
float z = 0.f;
float intensity = 0.f;
uint32_t label = 0;
EIGEN_MAKE_ALIGNED_OPERATOR_NEW
} EIGEN_ALIGN16;

} // namespace benchmark
Expand Down

0 comments on commit 871f1d2

Please sign in to comment.