 |
Ginkgo
Generated from remotes/origin/develop branch based on develop. Ginkgo version 1.12.0
A numerical linear algebra library targeting many-core architectures
|
5 #ifndef GKO_PUBLIC_CORE_MATRIX_DEVICE_DENSE_HPP_
6 #define GKO_PUBLIC_CORE_MATRIX_DEVICE_DENSE_HPP_
8 #include <ginkgo/core/base/dim.hpp>
23 template <
typename ValueType>
31 : size{size}, stride{stride}, data{data}
43 return data[row * stride + col];
53 #endif // GKO_PUBLIC_CORE_MATRIX_DEVICE_DENSE_HPP_
Non-owning view of a matrix::Dense to be used inside device kernels.
Definition: device_views.hpp:24
std::size_t size_type
Integral type used for allocation quantities.
Definition: types.hpp:90
The Ginkgo namespace.
Definition: abstract_factory.hpp:20
constexpr ValueType & operator()(size_type row, size_type col) const
Subscript operator accessing the given row and column.
Definition: device_views.hpp:41
constexpr dense< const ValueType > as_const() const
Returns a const view of the same data.
Definition: device_views.hpp:35
constexpr dense(dim< 2 > size, size_type stride, ValueType *data)
Constructs a dense view from size, stride and data.
Definition: device_views.hpp:30