Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
amdis
amdis-core
Commits
b3f31e95
Commit
b3f31e95
authored
Mar 28, 2019
by
Praetorius, Simon
Browse files
Merge branch 'feature/transposed_plus_add' into 'master'
add operator+= to transposed view See merge request
!29
parents
e9eced48
4bc83a8c
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/amdis/common/Transposed.hpp
View file @
b3f31e95
...
...
@@ -65,6 +65,18 @@ namespace AMDiS
return
matrix_
.
N
();
}
template
<
class
Mat
>
TransposedMatrix
&
operator
+=
(
Mat
const
&
mat
)
{
assert
(
mat
.
N
()
==
N
());
assert
(
mat
.
M
()
==
M
());
for
(
size_type
i
=
0
;
i
<
N
();
++
i
)
for
(
size_type
j
=
0
;
j
<
M
();
++
j
)
(
*
this
)[
i
][
j
]
+=
mat
[
i
][
j
];
return
*
this
;
}
private:
Matrix
&
matrix_
;
};
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a 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