Closed FantasyVR closed 7 years ago
I know this issue. Since we cannot test our library on Windows and Linux using 32bit and 64bit builds, we put the note "Please use a 64-bit target on a 64-bit operating system." in the build instructions in the readme file.
Is there any reason why you want to perform a 32bit build on a 64bit system?
I just haven't noticed that note. However, using sligned allocator and EIGEN_MAKE_ALIGNED_OPERATOR_NEW
can solve the alignment problems of 32bit build. So I thought it might be helpful for them who confront with this kind of problems.
In fact we once had this support of 32bit builds on 64bit systems. However, no one had the time to maintain it and after a while it didn't work anymore. Then we decided that anyway it is not necessary to make a 32bit build on a 64bit system and skipped the support.
When I run CosseratRodsDemo on Windows 10 with Visual Studion 2015, it crashed sometimes. I figure out that it has to do with alignment.
Acoording to this page, if one uses STL container with Eigen, she/he should use an aligned allocator. So the solution is that all of the
std::vector<Vector3r>
andstd::vector<Quaternionr>
inParticleData.h
should be replaced bystd::vector<Vector3r, Eigen::allocator<Vector3r>
andstd::vector<Quaternionr, Eigen::allocator<Quaternionr>
respectively.Acoording to this issue, if a class has Eigen members, you should put a EIGEN_MAKE_ALIGNED_OPERATOR_NEW macro in a public part of your class. Thus, we should put a EIGEN_MAKE_ALIGNED_OPERATOR_NEW macro in class
BendTwistConstraint
, because it has aQuaternionr m_restDarbouxVector
.