diff --git a/core/matrix/csr.cpp b/core/matrix/csr.cpp index cb6c388b297..96f72059ce5 100644 --- a/core/matrix/csr.cpp +++ b/core/matrix/csr.cpp @@ -485,25 +485,8 @@ void Csr::read(device_mat_data&& data) auto arrays = data.empty_out(); this->row_ptrs_.resize_and_reset(size[0] + 1); this->set_size(size); - // Need to copy instead of move, as move into view data is not supported. - if (this->values_.is_owning()) { - this->values_ = std::move(arrays.values); - } else { - if (this->values_.get_size() == arrays.values.get_size()) { - this->values_ = arrays.values; - } else { - GKO_INVALID_STATE("Input values view is of incorrect size!"); - } - } - if (this->col_idxs_.is_owning()) { - this->col_idxs_ = std::move(arrays.col_idxs); - } else { - if (this->col_idxs_.get_size() == arrays.col_idxs.get_size()) { - this->col_idxs_ = arrays.col_idxs; - } else { - GKO_INVALID_STATE("Input col_idxs view is of incorrect size!"); - } - } + this->values_ = std::move(arrays.values); + this->col_idxs_ = std::move(arrays.col_idxs); const auto row_idxs = std::move(arrays.row_idxs); auto local_row_idxs = make_temporary_clone(exec, &row_idxs); exec->run(csr::make_convert_idxs_to_ptrs(local_row_idxs->get_const_data(),