Registered Member
|
I want to use Map<MatrixXcd> to work on dynamically allocated memory. How can I allocate the memory under Visual Studio C++ so that it's aligned correctly and I can pass the Aligned flag to Map<MatrixXcd>?
|
Moderator
|
you could use our aligned_malloc/aligned_free internal routines (from internal namespace)
|
Registered Member
|
|
Registered Member
|
Another question: I have used "aligned_new<T>" and "aligned_delete<T>" to obtain what I want, but then when I create a standard Eigen::VectorXcd object, my program throws a heap corruption error (I'm using MS Visual Studio C++ 2010). Does it mean I can't mix "aligned_new" and standard Eigen routines?
-- EDIT -- This problem also occurs when I use aligned_malloc/aligned_free. |
Registered Member
|
Sorry, the problem was caused by an unrelated error in my code (writing past the end of allocated memory).
Thanks for the advice, the code works and is faster now. |
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]