Skip to content

Commit

Permalink
disable eigen alignment
Browse files Browse the repository at this point in the history
  • Loading branch information
brad committed Oct 5, 2011
1 parent f5e0f3a commit 0407d28
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/dxfdata.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
#ifndef DXFDATA_H_
#define DXFDATA_H_
#ifndef EIGEN_DONT_ALIGN
#define EIGEN_DONT_ALIGN
#endif

#include <vector>
#include <Eigen/Dense>
Expand Down Expand Up @@ -30,7 +33,7 @@ class DxfData
}
};

std::vector<Vector2d, Eigen::aligned_allocator<Vector2d> > points;
std::vector<Vector2d> points;
std::vector<Path> paths;
std::vector<Dim> dims;

Expand Down
4 changes: 3 additions & 1 deletion src/linalg.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
#ifndef LINALG_H_
#define LINALG_H_

#ifndef EIGEN_DONT_ALIGN
#define EIGEN_DONT_ALIGN
#endif
#include <Eigen/Core>
#include <Eigen/Geometry>

Expand Down

1 comment on commit 0407d28

@donbright
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i haven't had time to test this specific patch, but it is very much the same thing I had to do in my branch .

the only thing I would say is maybe wrap it with an #ifdef so that it is still enabled on Mac OSX where Marius created it. (just disabled on Windows/Linux) , and maybe over time we can figure out how to get the SIMD stuff working on Linux and Windows?

Please sign in to comment.