Skip to content

Matrix members scheduler

Tim Luchterhand requested to merge matrix_members_scheduler into master

Replaced some vector members with corresponding Matrix type for better cache coherence and simpler access. @ehebrard Please have a look at the last commit (70e68ba3) because I'm not sure if I can easily replace varmap with a Matrix. Access wise there is no difference. However, during the initialization of the Scheduler the method resize is called multiple times (when a task is added for example). Resizing a matrix has a different effect that resizing a vector. In the latter case you fill the outer parts that you added to the 'matrix' with NoVar. In contrast, resizing a matrix will change the position of the elements already present due to the strided memory access pattern. Thus, if an already initialized element used to be at (i, j) after resizing it is no longer there and elements that should be NoVar can take the one of the values previously inserted. varmap is the only member that I changed to Matrix where resizing and access + modification happens during initialization. I did a testrun with a two problems where I saved the resulting matrix at the end of the call to Scheduler::initialize for both implementations and there was no difference. But I'm wondering if that's always the case.

Merge request reports

Loading