|
Ginkgo
Generated from pipelines/1330831941 branch based on master. Ginkgo version 1.8.0
A numerical linear algebra library targeting many-core architectures
|
5 #ifndef GKO_PUBLIC_CORE_PRECONDITIONER_BATCH_JACOBI_HPP_
6 #define GKO_PUBLIC_CORE_PRECONDITIONER_BATCH_JACOBI_HPP_
9 #include <ginkgo/core/base/array.hpp>
10 #include <ginkgo/core/base/batch_lin_op.hpp>
11 #include <ginkgo/core/base/batch_multi_vector.hpp>
12 #include <ginkgo/core/base/exception_helpers.hpp>
13 #include <ginkgo/core/base/lin_op.hpp>
14 #include <ginkgo/core/base/types.hpp>
15 #include <ginkgo/core/matrix/batch_csr.hpp>
16 #include <ginkgo/core/matrix/batch_dense.hpp>
17 #include <ginkgo/core/matrix/csr.hpp>
22 namespace preconditioner {
49 template <
typename ValueType = default_precision,
typename IndexType =
int32>
57 using value_type = ValueType;
58 using index_type = IndexType;
197 explicit Jacobi(std::shared_ptr<const Executor> exec);
200 std::shared_ptr<const BatchLinOp> system_matrix);
202 void generate_precond(
const BatchLinOp*
const system_matrix);
222 #endif // GKO_PUBLIC_CORE_PRECONDITIONER_BATCH_JACOBI_HPP_
The EnableBatchLinOp mixin can be used to provide sensible default implementations of the majority of...
Definition: batch_lin_op.hpp:251
CSR is a matrix format which stores only the nonzero coefficients by compressing each row of the matr...
Definition: matrix.hpp:27
size_type get_num_blocks() const noexcept
Returns the number of blocks in an individual batch entry.
Definition: batch_jacobi.hpp:109
Definition: batch_lin_op.hpp:60
uint32 get_max_block_size() const noexcept
Returns the max block size.
Definition: batch_jacobi.hpp:99
Definition: batch_jacobi.hpp:193
std::size_t size_type
Integral type used for allocation quantities.
Definition: types.hpp:108
Csr is a general sparse matrix format that stores the column indices for each nonzero entry and a cum...
Definition: batch_csr.hpp:48
const index_type * get_const_blocks_cumulative_offsets() const noexcept
Returns the cumulative blocks storage array.
Definition: batch_jacobi.hpp:89
#define GKO_FACTORY_PARAMETER_SCALAR(_name, _default)
Creates a scalar factory parameter in the factory parameters structure.
Definition: abstract_factory.hpp:445
The Ginkgo namespace.
Definition: abstract_factory.hpp:20
const index_type * get_const_map_block_to_row() const noexcept
Returns the mapping between the blocks and the row id.
Definition: batch_jacobi.hpp:78
std::uint32_t uint32
32-bit unsigned integral type.
Definition: types.hpp:148
A block-Jacobi preconditioner is a block-diagonal linear operator, obtained by inverting the diagonal...
Definition: batch_jacobi.hpp:50
const value_type * get_const_blocks() const noexcept
Returns the pointer to the memory used for storing the block data.
Definition: batch_jacobi.hpp:129
uint32 max_block_size
Maximal size of diagonal blocks.
Definition: batch_jacobi.hpp:162
size_type get_num_stored_elements() const noexcept
Returns the number of elements explicitly stored in the dense blocks.
Definition: batch_jacobi.hpp:143
#define GKO_ENABLE_BUILD_METHOD(_factory_name)
Defines a build method for the factory, simplifying its construction by removing the repetitive typin...
Definition: abstract_factory.hpp:394
#define GKO_CREATE_FACTORY_PARAMETERS(_parameters_name, _factory_name)
This Macro will generate a new type containing the parameters for the factory _factory_name.
Definition: abstract_factory.hpp:280
#define GKO_ENABLE_BATCH_LIN_OP_FACTORY(_batch_lin_op, _parameters_name, _factory_name)
This macro will generate a default implementation of a BatchLinOpFactory for the BatchLinOp subclass ...
Definition: batch_lin_op.hpp:359
const value_type * get_const_data() const noexcept
Returns a constant pointer to the block of memory used to store the elements of the array.
Definition: array.hpp:683
#define GKO_FACTORY_PARAMETER_VECTOR(_name,...)
Creates a vector factory parameter in the factory parameters structure.
Definition: abstract_factory.hpp:461
const index_type * get_const_block_pointers() const noexcept
Returns the block pointers.
Definition: batch_jacobi.hpp:67
size_type get_size() const noexcept
Returns the number of elements in the array.
Definition: array.hpp:657
This mixin inherits from (a subclass of) PolymorphicObject and provides a base implementation of a ne...
Definition: polymorphic_object.hpp:662