Skip to content

Commit

Permalink
Review updates
Browse files Browse the repository at this point in the history
Co-authored-by: Marcel Koch <marcel.koch@kit.edu>
  • Loading branch information
pratikvn and MarcelKoch committed Oct 17, 2023
1 parent aee0630 commit 1496c41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
3 changes: 3 additions & 0 deletions core/base/batch_utilities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,9 @@ template <typename ValueType, typename IndexType>
void assert_same_sparsity_in_batched_data(
const std::vector<gko::matrix_data<ValueType, IndexType>>& data)
{
if (data.empty()) {
return;
}
auto num_nnz = data.at(0).nonzeros.size();
auto base_data = data.at(0);
base_data.ensure_row_major_order();
Expand Down
13 changes: 2 additions & 11 deletions core/matrix/batch_ell.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,7 @@ const Ell<ValueType, IndexType>* Ell<ValueType, IndexType>::apply(
ptr_param<const MultiVector<ValueType>> b,
ptr_param<MultiVector<ValueType>> x) const
{
this->validate_application_parameters(b.get(), x.get());
auto exec = this->get_executor();
this->apply_impl(make_temporary_clone(exec, b).get(),
make_temporary_clone(exec, x).get());
this->apply(b, x);
return this;
}

Expand Down Expand Up @@ -180,13 +177,7 @@ const Ell<ValueType, IndexType>* Ell<ValueType, IndexType>::apply(
ptr_param<const MultiVector<ValueType>> beta,
ptr_param<MultiVector<ValueType>> x) const
{
this->validate_application_parameters(alpha.get(), b.get(), beta.get(),
x.get());
auto exec = this->get_executor();
this->apply_impl(make_temporary_clone(exec, alpha).get(),
make_temporary_clone(exec, b).get(),
make_temporary_clone(exec, beta).get(),
make_temporary_clone(exec, x).get());
this->apply(alpha, b, beta, x);
return this;
}

Expand Down

0 comments on commit 1496c41

Please sign in to comment.