mirror of
https://github.com/OPM/opm-simulators.git
synced 2025-02-25 18:55:30 -06:00
Switch loop ordering for better cache performance.
This commit is contained in:
@@ -243,8 +243,8 @@ namespace Opm
|
||||
// matrix data.
|
||||
std::fill(surfacevol, surfacevol + n*np, 0.0);
|
||||
for (int i = 0; i < n; ++i) {
|
||||
for (int row = 0; row < np; ++row) {
|
||||
for (int col = 0; col < np; ++col) {
|
||||
for (int col = 0; col < np; ++col) {
|
||||
for (int row = 0; row < np; ++row) {
|
||||
surfacevol[i*np + row] += A[i*np*np + row + col*np] * saturation[i*np + col];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user