|
1 | | -// SPDX-FileCopyrightText: 2017 - 2025 The Ginkgo authors |
| 1 | +// SPDX-FileCopyrightText: 2017 - 2026 The Ginkgo authors |
2 | 2 | // |
3 | 3 | // SPDX-License-Identifier: BSD-3-Clause |
4 | 4 |
|
@@ -204,7 +204,8 @@ void Vector<ValueType>::read_distributed_impl( |
204 | 204 | auto rank = this->get_communicator().rank(); |
205 | 205 | local_.fill(zero<ValueType>()); |
206 | 206 | exec->run(vector::make_build_local( |
207 | | - data, make_temporary_clone(exec, partition).get(), rank, &local_)); |
| 207 | + data, make_temporary_clone(exec, partition).get(), rank, |
| 208 | + local_.get_device_view())); |
208 | 209 | } |
209 | 210 |
|
210 | 211 |
|
@@ -345,8 +346,9 @@ Vector<ValueType>::compute_absolute() const |
345 | 346 | absolute_type::create(exec, this->get_communicator(), this->get_size(), |
346 | 347 | this->get_local_vector()->get_size()); |
347 | 348 |
|
348 | | - exec->run(vector::make_outplace_absolute_dense(this->get_local_vector(), |
349 | | - &result->local_)); |
| 349 | + exec->run(vector::make_outplace_absolute_dense( |
| 350 | + this->get_local_vector()->get_const_device_view(), |
| 351 | + result->local_.get_device_view())); |
350 | 352 |
|
351 | 353 | return result; |
352 | 354 | } |
@@ -551,7 +553,7 @@ void Vector<ValueType>::compute_norm2(ptr_param<LinOp> result, |
551 | 553 | const auto comm = this->get_communicator(); |
552 | 554 | auto dense_res = make_temporary_clone(exec, as<NormVector>(result)); |
553 | 555 | this->compute_squared_norm2(dense_res.get(), tmp); |
554 | | - exec->run(vector::make_compute_sqrt(dense_res.get())); |
| 556 | + exec->run(vector::make_compute_sqrt(dense_res->get_device_view())); |
555 | 557 | } |
556 | 558 |
|
557 | 559 |
|
@@ -607,8 +609,9 @@ void Vector<ValueType>::compute_squared_norm2(ptr_param<LinOp> result, |
607 | 609 | auto exec = this->get_executor(); |
608 | 610 | const auto comm = this->get_communicator(); |
609 | 611 | auto dense_res = make_temporary_clone(exec, as<NormVector>(result)); |
610 | | - exec->run(vector::make_compute_squared_norm2(this->get_local_vector(), |
611 | | - dense_res.get(), tmp)); |
| 612 | + exec->run(vector::make_compute_squared_norm2( |
| 613 | + this->get_local_vector()->get_const_device_view(), |
| 614 | + dense_res->get_device_view(), tmp)); |
612 | 615 | exec->synchronize(); |
613 | 616 | auto norm_sum_op = gko::experimental::mpi::sum<remove_complex<ValueType>>(); |
614 | 617 | if (mpi::requires_host_buffer(exec, comm)) { |
|
0 commit comments