Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
xerus
xerus
Commits
f2536156
Commit
f2536156
authored
Aug 14, 2018
by
Michael Goette
Browse files
fixed bug in offset_add in src/xerus/tensor.cpp
parent
14e7ffa1
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/xerus/tensor.cpp
View file @
f2536156
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment