Skip to content

Commit 50e81a2

Browse files
committed
Tensor<Tensor>::{add,neg}_to fixups for null elements
1 parent 8008ced commit 50e81a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/TiledArray/tensor/tensor.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1918,7 +1918,7 @@ class Tensor {
19181918
typename = std::enable_if_t<detail::is_numeric_v<Scalar>>>
19191919
Tensor& add_to(const Scalar value) {
19201920
return inplace_unary(
1921-
[value](numeric_type& MADNESS_RESTRICT res) { res += value; });
1921+
[value](value_type& MADNESS_RESTRICT res) { res += value; });
19221922
}
19231923

19241924
// Subtraction operations
@@ -2240,7 +2240,7 @@ class Tensor {
22402240
// early exit for empty this
22412241
if (empty()) return *this;
22422242

2243-
return inplace_unary([](numeric_type& MADNESS_RESTRICT l) { l = -l; });
2243+
return inplace_unary([](value_type& MADNESS_RESTRICT l) { l = -l; });
22442244
}
22452245

22462246
/// Create a complex conjugated copy of this tensor

0 commit comments

Comments
 (0)