5#ifndef GKO_PUBLIC_CORE_MATRIX_PERMUTATION_HPP_
6#define GKO_PUBLIC_CORE_MATRIX_PERMUTATION_HPP_
14#include <ginkgo/core/base/array.hpp>
15#include <ginkgo/core/base/exception.hpp>
16#include <ginkgo/core/base/exception_helpers.hpp>
17#include <ginkgo/core/base/executor.hpp>
18#include <ginkgo/core/base/lin_op.hpp>
19#include <ginkgo/core/base/types.hpp>
20#include <ginkgo/core/base/utils.hpp>
92static constexpr mask_type row_permute = mask_type{1};
93GKO_DEPRECATED(
"permute mask is no longer supported")
94static constexpr mask_type column_permute = mask_type{1 << 2};
95GKO_DEPRECATED(
"permute mask is no longer supported")
96static constexpr mask_type inverse_permute = mask_type{1 << 3};
109template <
typename IndexType =
int32>
117 using index_type = IndexType;
145 GKO_DEPRECATED(
"use get_size()[0] instead")
148 GKO_DEPRECATED("permute mask is no longer supported")
149 mask_type get_permute_mask() const;
151 GKO_DEPRECATED("permute mask is no longer supported")
152 void set_permute_mask(mask_type permute_mask);
176 void write(
gko::
matrix_data<value_type, index_type>& data) const override;
205 array<IndexType> permutation_indices);
208 "
dim<2> is no longer supported
as a dimension parameter, use
size_type "
213 GKO_DEPRECATED("permute mask is no longer supported")
216 const mask_type& enabled_permute);
218 GKO_DEPRECATED("use the overload without dimensions")
221 array<IndexType> permutation_indices);
223 GKO_DEPRECATED("permute mask is no longer supported")
226 array<index_type> permutation_indices,
227 const mask_type& enabled_permute);
240 GKO_DEPRECATED("use
create_const without size and permute mask")
243 gko::detail::const_array_view<IndexType>&& perm_idxs,
244 mask_type enabled_permute = row_permute);
258 gko::detail::const_array_view<IndexType>&& perm_idxs);
264 array<IndexType> permutation_indices);
266 void apply_impl(const
LinOp* in,
LinOp* out) const override;
269 LinOp* out) const override;
272 array<index_type> permutation_;
Definition lin_op.hpp:878
Definition polymorphic_object.hpp:668
Definition executor.hpp:615
Definition lin_op.hpp:117
Definition lin_op.hpp:660
value_type * get_data() noexcept
Definition array.hpp:673
const value_type * get_const_data() const noexcept
Definition array.hpp:682
Definition permutation.hpp:111
static std::unique_ptr< Permutation > create(std::shared_ptr< const Executor > exec, size_type size=0)
size_type get_permutation_size() const noexcept
std::unique_ptr< Permutation > compose(ptr_param< const Permutation > other) const
index_type * get_permutation() noexcept
Definition permutation.hpp:124
static std::unique_ptr< const Permutation > create_const(std::shared_ptr< const Executor > exec, size_type size, gko::detail::const_array_view< IndexType > &&perm_idxs, mask_type enabled_permute=row_permute)
const index_type * get_const_permutation() const noexcept
Definition permutation.hpp:133
std::unique_ptr< Permutation > compute_inverse() const
Definition utils_helper.hpp:41
permute_mode operator|(permute_mode a, permute_mode b)
permute_mode operator&(permute_mode a, permute_mode b)
permute_mode operator^(permute_mode a, permute_mode b)
std::ostream & operator<<(std::ostream &stream, permute_mode mode)
permute_mode
Definition permutation.hpp:42
The Ginkgo namespace.
Definition abstract_factory.hpp:20
double default_precision
Definition types.hpp:171
std::size_t size_type
Definition types.hpp:89
std::uint64_t uint64
Definition types.hpp:135
std::decay_t< T > * as(U *obj)
Definition utils_helper.hpp:307
Definition matrix_data.hpp:126