|
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 |
|
|
16 | 16 | #include <ginkgo/core/base/range_accessors.hpp> |
17 | 17 | #include <ginkgo/core/base/types.hpp> |
18 | 18 | #include <ginkgo/core/base/utils.hpp> |
| 19 | +#include <ginkgo/core/matrix/device_views.hpp> |
19 | 20 | #include <ginkgo/core/matrix/permutation.hpp> |
20 | 21 | #include <ginkgo/core/matrix/scaled_permutation.hpp> |
21 | 22 |
|
@@ -177,14 +178,16 @@ class Dense |
177 | 178 |
|
178 | 179 | using value_type = ValueType; |
179 | 180 | using index_type = int64; |
180 | | - using transposed_type = Dense<ValueType>; |
181 | | - using mat_data = matrix_data<ValueType, int64>; |
182 | | - using mat_data32 = matrix_data<ValueType, int32>; |
183 | | - using device_mat_data = device_matrix_data<ValueType, int64>; |
184 | | - using device_mat_data32 = device_matrix_data<ValueType, int32>; |
| 181 | + using transposed_type = Dense<value_type>; |
| 182 | + using mat_data = matrix_data<value_type, int64>; |
| 183 | + using mat_data32 = matrix_data<value_type, int32>; |
| 184 | + using device_mat_data = device_matrix_data<value_type, int64>; |
| 185 | + using device_mat_data32 = device_matrix_data<value_type, int32>; |
185 | 186 | using absolute_type = remove_complex<Dense>; |
186 | 187 | using real_type = absolute_type; |
187 | 188 | using complex_type = to_complex<Dense>; |
| 189 | + using device_view = matrix::device_view::dense<value_type>; |
| 190 | + using const_device_view = matrix::device_view::dense<const value_type>; |
188 | 191 |
|
189 | 192 | using row_major_range = gko::range<gko::accessor::row_major<ValueType, 2>>; |
190 | 193 |
|
@@ -889,6 +892,10 @@ class Dense |
889 | 892 | return values_.get_size(); |
890 | 893 | } |
891 | 894 |
|
| 895 | + device_view get_device_view(); |
| 896 | + |
| 897 | + const_device_view get_const_device_view() const; |
| 898 | + |
892 | 899 | /** |
893 | 900 | * Returns a single element of the matrix. |
894 | 901 | * |
|
0 commit comments