![]() |
Ginkgo Generated from branch based on main. Ginkgo version 1.10.0
A numerical linear algebra library targeting many-core architectures
|
A block-Jacobi preconditioner is a block-diagonal linear operator, obtained by inverting the diagonal blocks (stored in a dense row major fashion) of the source operator. More...
#include <ginkgo/core/preconditioner/batch_jacobi.hpp>
Classes | |
class | Factory |
struct | parameters_type |
Public Types | |
using | value_type = ValueType |
using | index_type = IndexType |
using | matrix_type = batch::matrix::Csr<ValueType, IndexType> |
Public Types inherited from gko::EnablePolymorphicAssignment< Jacobi< default_precision, int32 > > | |
using | result_type |
Public Types inherited from gko::ConvertibleTo< Jacobi< default_precision, int32 > > | |
using | result_type |
Public Member Functions | |
const index_type * | get_const_block_pointers () const noexcept |
Returns the block pointers. | |
const index_type * | get_const_map_block_to_row () const noexcept |
Returns the mapping between the blocks and the row id. | |
const index_type * | get_const_blocks_cumulative_offsets () const noexcept |
Returns the cumulative blocks storage array. | |
uint32 | get_max_block_size () const noexcept |
Returns the max block size. | |
size_type | get_num_blocks () const noexcept |
Returns the number of blocks in an individual batch entry. | |
const value_type * | get_const_blocks () const noexcept |
Returns the pointer to the memory used for storing the block data. | |
size_type | get_num_stored_elements () const noexcept |
Returns the number of elements explicitly stored in the dense blocks. | |
const parameters_type & | get_parameters () const |
Public Member Functions inherited from gko::EnableAbstractPolymorphicObject< Jacobi< default_precision, int32 >, BatchLinOp > | |
std::unique_ptr< Jacobi< default_precision, int32 > > | create_default (std::shared_ptr< const Executor > exec) const |
std::unique_ptr< Jacobi< default_precision, int32 > > | clone (std::shared_ptr< const Executor > exec) const |
Jacobi< default_precision, int32 > * | copy_from (const PolymorphicObject *other) |
Jacobi< default_precision, int32 > * | move_from (ptr_param< PolymorphicObject > other) |
Jacobi< default_precision, int32 > * | clear () |
Public Member Functions inherited from gko::EnablePolymorphicAssignment< Jacobi< default_precision, int32 > > | |
void | convert_to (result_type *result) const override |
void | move_to (result_type *result) override |
Static Public Member Functions | |
static auto | build () -> decltype(Factory::create()) |
Friends | |
class | EnableBatchLinOp< Jacobi > |
class | EnablePolymorphicObject< Jacobi, BatchLinOp > |
A block-Jacobi preconditioner is a block-diagonal linear operator, obtained by inverting the diagonal blocks (stored in a dense row major fashion) of the source operator.
With the batched preconditioners, it is required that all items in the batch have the same sparsity pattern. The detection of the blocks and the block pointers require that the sparsity pattern of all the items be the same. Other cases is undefined behaviour. The input batch matrix must be in batch::Csr matrix format or must be convertible to batch::Csr matrix format. The block detection algorithm and the conversion to dense blocks kernels require this assumption.
ValueType | value precision of matrix elements |
IndexType | index precision of matrix elements |
|
inlinenoexcept |
Returns the block pointers.
|
inlinenoexcept |
Returns the pointer to the memory used for storing the block data.
Element (i, j) of the block, which belongs to the batch entry with index = "batch_id" and has local id = "block_id" within its batch entry is stored at the address = get_const_blocks() + detail::get_global_block_offset(batch_id, num_blocks, block_id, cumulative_blocks_storage) + i * detail::get_stride(block_id, block_pointers) + j
|
inlinenoexcept |
Returns the cumulative blocks storage array.
|
inlinenoexcept |
Returns the mapping between the blocks and the row id.
|
inlinenoexcept |
Returns the max block size.
|
inlinenoexcept |
Returns the number of blocks in an individual batch entry.
|
inlinenoexcept |
Returns the number of elements explicitly stored in the dense blocks.