Skip to content

Commit

Permalink
Use temporary clone in conversions with given result
Browse files Browse the repository at this point in the history
  • Loading branch information
fritzgoebel committed Nov 4, 2020
1 parent 0e17307 commit a80b222
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions core/matrix/dense.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,8 @@ void Dense<ValueType>::make_complex(Dense<to_complex<ValueType>> *result) const

GKO_ASSERT_EQUAL_DIMENSIONS(this, result);

exec->run(dense::make_make_complex(this, result));
exec->run(dense::make_make_complex(
this, make_temporary_clone(exec, result).get()));
}


Expand All @@ -844,7 +845,8 @@ void Dense<ValueType>::get_real(Dense<remove_complex<ValueType>> *result) const

GKO_ASSERT_EQUAL_DIMENSIONS(this, result);

exec->run(dense::make_get_real(this, result));
exec->run(
dense::make_get_real(this, make_temporary_clone(exec, result).get()));
}


Expand All @@ -869,7 +871,8 @@ void Dense<ValueType>::get_imag(Dense<remove_complex<ValueType>> *result) const

GKO_ASSERT_EQUAL_DIMENSIONS(this, result);

exec->run(dense::make_get_imag(this, result));
exec->run(
dense::make_get_imag(this, make_temporary_clone(exec, result).get()));
}


Expand Down

0 comments on commit a80b222

Please sign in to comment.