-
- Downloads
Solve a big issue with data alignment and dynamic allocation:
* add a WithAlignedOperatorNew class with overloaded operator new * make Matrix (and Quaternion, Transform, Hyperplane, etc.) use it if needed such that "*(new Vector4) = xpr" does not failed anymore. * Please: make sure your classes having fixed size Eigen's vector or matrice attributes inherit WithAlignedOperatorNew * add a ei_new_allocator STL memory allocator to use with STL containers. This allocator really calls operator new on your types (unlike GCC's new_allocator). Example: std::vector<Vector4f> data(10); will segfault if the vectorization is enabled, instead use: std::vector<Vector4f,ei_new_allocator<Vector4f> > data(10); NOTE: you only have to worry if you deal with fixed-size matrix types with "sizeof(matrix_type)%16==0"...
Showing
- Eigen/src/Core/Matrix.h 3 additions, 0 deletionsEigen/src/Core/Matrix.h
- Eigen/src/Core/util/Memory.h 124 additions, 0 deletionsEigen/src/Core/util/Memory.h
- Eigen/src/Geometry/Hyperplane.h 6 additions, 0 deletionsEigen/src/Geometry/Hyperplane.h
- Eigen/src/Geometry/Quaternion.h 3 additions, 0 deletionsEigen/src/Geometry/Quaternion.h
- Eigen/src/Geometry/Scaling.h 3 additions, 0 deletionsEigen/src/Geometry/Scaling.h
- Eigen/src/Geometry/Transform.h 3 additions, 0 deletionsEigen/src/Geometry/Transform.h
- Eigen/src/Geometry/Translation.h 3 additions, 0 deletionsEigen/src/Geometry/Translation.h
- demos/CMakeLists.txt 1 addition, 0 deletionsdemos/CMakeLists.txt
- test/CMakeLists.txt 1 addition, 0 deletionstest/CMakeLists.txt
- test/dynalloc.cpp 138 additions, 0 deletionstest/dynalloc.cpp
- test/nomalloc.cpp 9 additions, 10 deletionstest/nomalloc.cpp
Loading
Please register or sign in to comment