Registered Member
|
version 3 GeneralBlockingPanelKernel.h contains lazy initialization of static int vars in manage_caching_sizes(). The init test is a check of m_l1CacheSize == 0. It's possible for the first thread in to set this value, but fail to set m_l2CacheSize before a second thread picks up the uninitialized value. When the uninitialized values are erroneously read, it can lead to infinite loops because it causes blocking sizes to get set to 0, which can then used for loop counter increments.
I believe the proper solution is either mutex protection or eager initialization during program startup time, neither of which seems to fit into the current design of the library. However, the code as it stands could be improved by using (m_l2CacheSize == 0) as the gating check instead. |
Moderator
|
In the meantime you can workaround by calling:
std::ptrdiff_t k, m, n; Eigen::computeProductBlockingSizes<double,double>(k, m, n); at the start of your program. Instead of mutex I guess we could directly use atomic test and set operations. |
Registered Member
|
I am really glad that I found your site.. Thanks so much for the helpful information.
|
Registered users: Bing [Bot], Google [Bot], Yahoo [Bot]