Commit f2536156 authored by Michael Goette's avatar Michael Goette

fixed bug in offset_add in src/xerus/tensor.cpp

parent 14e7ffa1
......@@ -998,10 +998,10 @@ namespace xerus {
inPosition += blockSize;
outPosition += stepSizes[index];
while(i%multStep == 0) {
outPosition -= dimensions[index]*stepSizes[index]; // "reset" current index to 0
outPosition -= _other.dimensions[index]*stepSizes[index]; // "reset" current index to 0
--index; // Advance to next index
outPosition += stepSizes[index]; // increase next index
multStep *= dimensions[index]; // next stepSize
multStep *= _other.dimensions[index]; // next stepSize
}
misc::add_scaled(outPosition, _other.factor, inPosition, blockSize);
......
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