Skip to content

Commit

Permalink
fixed the segmentation fault on shared_ptr input
Browse files Browse the repository at this point in the history
  • Loading branch information
yhmtsai committed Mar 14, 2023
1 parent f050721 commit da1c3ee
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions benchmark/utils/formats.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -213,9 +213,9 @@ void check_ell_admissibility(const gko::matrix_data<etype, itype>& data)
template <typename MatrixType, typename... Args>
auto create_matrix_type(Args&&... args)
{
return [&](std::shared_ptr<const gko::Executor> exec)
return [=](std::shared_ptr<const gko::Executor> exec)
-> std::unique_ptr<MatrixType> {
return MatrixType::create(std::move(exec), std::forward<Args>(args)...);
return MatrixType::create(std::move(exec), args...);
};
}

Expand Down

0 comments on commit da1c3ee

Please sign in to comment.