Skip to content

Commit 9619dfc

Browse files
committed
Indicate no-aliasing when realizing RHS into a buffer.
1 parent 78e6a6c commit 9619dfc

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

include/irlba/parallel.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -356,7 +356,7 @@ class ParallelSparseMatrix {
356356
if constexpr(std::is_same<Right_, EigenVector_>::value) {
357357
return rhs;
358358
} else {
359-
work.buffer = rhs;
359+
work.buffer.noalias() = rhs;
360360
return work.buffer;
361361
}
362362
}();
@@ -374,7 +374,7 @@ class ParallelSparseMatrix {
374374
if constexpr(std::is_same<Right_, EigenVector_>::value) {
375375
return rhs;
376376
} else {
377-
work.buffer = rhs;
377+
work.buffer.noalias() = rhs;
378378
return work.buffer;
379379
}
380380
}();

include/irlba/wrappers.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ class Centered {
247247
if constexpr(std::is_same<Right_, EigenVector_>::value) {
248248
return rhs;
249249
} else {
250-
work.buffer = rhs;
250+
work.buffer.noalias() = rhs;
251251
return work.buffer;
252252
}
253253
}();
@@ -266,7 +266,7 @@ class Centered {
266266
if constexpr(std::is_same<Right_, EigenVector_>::value) {
267267
return rhs;
268268
} else {
269-
work.buffer = rhs;
269+
work.buffer.noalias() = rhs;
270270
return work.buffer;
271271
}
272272
}();

0 commit comments

Comments
 (0)