Skip to content

Commit

Permalink
Update compute_squared_norm2
Browse files Browse the repository at this point in the history
  • Loading branch information
yanjen committed Mar 7, 2023
1 parent d815378 commit 973dadf
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions core/matrix/dense.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -498,12 +498,10 @@ void Dense<ValueType>::compute_squared_norm2(LinOp* result,
template <typename ValueType>
void Dense<ValueType>::compute_squared_norm2_impl(LinOp* result) const
{
GKO_ASSERT_EQUAL_DIMENSIONS(result, dim<2>(1, this->get_size()[1]));
auto exec = this->get_executor();
auto dense_res =
make_temporary_conversion<remove_complex<ValueType>>(result);
array<char> tmp{exec};
exec->run(dense::make_compute_squared_norm2(this, dense_res.get(), tmp));
this->compute_squared_norm2(make_temporary_output_clone(exec, result).get(),
tmp);
}


Expand Down

0 comments on commit 973dadf

Please sign in to comment.