33#ifndef GKO_PUBLIC_CORE_BASE_DENSE_CACHE_HPP_
34#define GKO_PUBLIC_CORE_BASE_DENSE_CACHE_HPP_
40#include <ginkgo/core/base/executor.hpp>
47template <
typename ValueType>
66template <
typename ValueType>
68 DenseCache() =
default;
69 ~DenseCache() =
default;
70 DenseCache(
const DenseCache&) {}
72 DenseCache& operator=(
const DenseCache&) {
return *
this; }
73 DenseCache& operator=(DenseCache&&)
noexcept {
return *
this; }
74 mutable std::unique_ptr<matrix::Dense<ValueType>> vec{};
89 void init_from(
const matrix::Dense<ValueType>*
template_vec)
const;
100 void init(std::shared_ptr<const Executor> exec, dim<2> size)
const;
106 matrix::Dense<ValueType>& operator*()
const {
return *vec; }
112 matrix::Dense<ValueType>* operator->()
const {
return vec.get(); }
118 matrix::Dense<ValueType>* get()
const {
return vec.get(); }
Dense is a matrix format which explicitly stores all values of the matrix.
Definition dense.hpp:136
The Ginkgo namespace.
Definition abstract_factory.hpp:48
constexpr T one()
Returns the multiplicative identity for T.
Definition math.hpp:803