diff --git a/core/base/batch_multi_vector.cpp b/core/base/batch_multi_vector.cpp index 6796b77e932..88a203300de 100644 --- a/core/base/batch_multi_vector.cpp +++ b/core/base/batch_multi_vector.cpp @@ -368,7 +368,7 @@ void read_impl(MatrixType* mtx, const std::vector& data) auto tmp = MatrixType::create(mtx->get_executor()->get_master(), batch_size); for (size_type b = 0; b < num_batch_items; ++b) { - assert(data[b].size() == common_size); + assert(data[b].size == common_size); tmp->create_view_for_item(b)->read(data[b]); } diff --git a/include/ginkgo/core/base/batch_multi_vector.hpp b/include/ginkgo/core/base/batch_multi_vector.hpp index 206b3c23723..77171569320 100644 --- a/include/ginkgo/core/base/batch_multi_vector.hpp +++ b/include/ginkgo/core/base/batch_multi_vector.hpp @@ -226,8 +226,8 @@ class MultiVector * significantly more memory efficient than the non-constant version, * so always prefer this version. */ - const value_type* get_const_values_for_item( - size_type batch_id) const noexcept + const value_type* get_const_values_for_item(size_type batch_id) const + noexcept { GKO_ASSERT(batch_id < this->get_num_batch_items()); return values_.get_const_data() +