5#ifndef GKO_PUBLIC_CORE_BASE_DENSE_CACHE_HPP_
6#define GKO_PUBLIC_CORE_BASE_DENSE_CACHE_HPP_
11#include <ginkgo/core/base/executor.hpp>
18template <
typename ValueType>
37template <
typename ValueType>
39 DenseCache() =
default;
40 ~DenseCache() =
default;
41 DenseCache(
const DenseCache&) {}
42 DenseCache(DenseCache&&) noexcept {}
43 DenseCache& operator=(
const DenseCache&) {
return *
this; }
44 DenseCache& operator=(DenseCache&&) noexcept {
return *
this; }
45 mutable std::unique_ptr<matrix::Dense<ValueType>> vec{};
60 void init_from(
const matrix::Dense<ValueType>* template_vec)
const;
71 void init(std::shared_ptr<const Executor> exec, dim<2> size)
const;
77 matrix::Dense<ValueType>& operator*()
const {
return *vec; }
83 matrix::Dense<ValueType>* operator->()
const {
return vec.get(); }
89 matrix::Dense<ValueType>* get()
const {
return vec.get(); }
Dense is a matrix format which explicitly stores all values of the matrix.
Definition dense.hpp:117
The matrix namespace.
Definition dense_cache.hpp:15
The Ginkgo namespace.
Definition abstract_factory.hpp:20