Commit 161fb715 authored by Sebastian Wolf's avatar Sebastian Wolf

Prevent Clang warning

parent c05c4992
Pipeline #684 failed with stages
in 3 minutes and 39 seconds
......@@ -233,16 +233,16 @@ namespace xerus {
norm += normPart;
}
} else { // _corePosition > 0
Tensor shuffledX = reshuffle(_delta, {1, 0, 2});
Tensor shuffledDelta = reshuffle(_delta, {1, 0, 2});
if(_corePosition == d-1) {
shuffledX.reinterpret_dimensions({shuffledX.dimensions[0], shuffledX.dimensions[1]}); // Remove dangling 1-mode
shuffledDelta.reinterpret_dimensions({shuffledDelta.dimensions[0], shuffledDelta.dimensions[1]}); // Remove dangling 1-mode
}
Tensor rightPart;
#pragma omp parallel for firstprivate(tmp, rightPart) reduction(+:norm)
for(size_t j = 0; j < N; ++j) {
// Current node
contract(tmp, positions[_corePosition][j], shuffledX, 1);
contract(tmp, positions[_corePosition][j], shuffledDelta, 1);
if(_corePosition < d-1) {
contract(rightPart, tmp, rightStack[_corePosition+1][j], 1);
......@@ -392,7 +392,7 @@ namespace xerus {
newX.round(0.001);
// Add initial measurments. NOTE: should happen after mean is calculated
// Add initial measurments. NOTE: must happen after mean is calculated
randomVectors.insert(randomVectors.end(), _measurments.initialRandomVectors.begin(), _measurments.initialRandomVectors.end());
solutions.insert(solutions.end(), _measurments.initialSolutions.begin(), _measurments.initialSolutions.end());
......
......@@ -493,9 +493,9 @@ namespace xerus {
} else { init = false; }
// Rebuild stack
for(long i = degree()-1-unchangedModes; i >= 0; --i) {
stack[i](k&0) = stack[i+1](k&1, l) * positions[j][i](l);
stack[i].reduce_representation();
for(long i = degree()-1-long(unchangedModes); i >= 0; --i) {
stack[size_t(i)](k&0) = stack[size_t(i+1)](k&1, l) * positions[j][size_t(i)](l);
stack[size_t(i)].reduce_representation();
}
error += misc::sqr(measuredValues[j] - stack.front()[0]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment