ginkgo/core/matrix/batch_identity.hpp Source File

ginkgo/core/matrix/batch_identity.hpp Source File#

Reference API: ginkgo/core/matrix/batch_identity.hpp Source File
Reference API
batch_identity.hpp
1// SPDX-FileCopyrightText: 2017 - 2024 The Ginkgo authors
2//
3// SPDX-License-Identifier: BSD-3-Clause
4
5#ifndef GKO_PUBLIC_CORE_MATRIX_BATCH_IDENTITY_HPP_
6#define GKO_PUBLIC_CORE_MATRIX_BATCH_IDENTITY_HPP_
7
8
9#include <ginkgo/core/base/batch_lin_op.hpp>
10#include <ginkgo/core/base/batch_multi_vector.hpp>
11#include <ginkgo/core/base/executor.hpp>
12#include <ginkgo/core/base/types.hpp>
13#include <ginkgo/core/base/utils.hpp>
14#include <ginkgo/core/matrix/identity.hpp>
15
16
17namespace gko {
18namespace batch {
19namespace matrix {
20
21
31template <typename ValueType = default_precision>
32class Identity final : public EnableBatchLinOp<Identity<ValueType>> {
34
35public:
36 using value_type = ValueType;
37 using index_type = int32;
39 using absolute_type = remove_complex<Identity>;
40 using complex_type = to_complex<Identity>;
41
51
66
72
90 static std::unique_ptr<Identity> create(
91 std::shared_ptr<const Executor> exec,
92 const batch_dim<2>& size = batch_dim<2>{});
93
94private:
95 Identity(std::shared_ptr<const Executor> exec,
96 const batch_dim<2>& size = batch_dim<2>{});
97
98 void apply_impl(const MultiVector<value_type>* b,
100
101 void apply_impl(const MultiVector<value_type>* alpha,
103 const MultiVector<value_type>* beta,
104 MultiVector<value_type>* x) const;
105};
106
107
108} // namespace matrix
109} // namespace batch
110} // namespace gko
111
112
113#endif // GKO_PUBLIC_CORE_MATRIX_BATCH_IDENTITY_HPP_
Definition polymorphic_object.hpp:668
Definition batch_lin_op.hpp:59
Definition batch_lin_op.hpp:252
Definition batch_multi_vector.hpp:59
Definition batch_identity.hpp:32
Identity * apply(ptr_param< const MultiVector< value_type > > alpha, ptr_param< const MultiVector< value_type > > b, ptr_param< const MultiVector< value_type > > beta, ptr_param< MultiVector< value_type > > x)
const Identity * apply(ptr_param< const MultiVector< value_type > > alpha, ptr_param< const MultiVector< value_type > > b, ptr_param< const MultiVector< value_type > > beta, ptr_param< MultiVector< value_type > > x) const
Identity * apply(ptr_param< const MultiVector< value_type > > b, ptr_param< MultiVector< value_type > > x)
static std::unique_ptr< Identity > create(std::shared_ptr< const Executor > exec, const batch_dim< 2 > &size=batch_dim< 2 >{})
const Identity * apply(ptr_param< const MultiVector< value_type > > b, ptr_param< MultiVector< value_type > > x) const
Definition identity.hpp:34
Definition utils_helper.hpp:41
The Ginkgo namespace.
Definition abstract_factory.hpp:20
std::int32_t int32
Definition types.hpp:106
typename detail::to_complex_s< T >::type to_complex
Definition math.hpp:279
typename detail::remove_complex_s< T >::type remove_complex
Definition math.hpp:260
Definition batch_dim.hpp:27