ezp
lightweight C++ wrapper for selected distributed solvers for linear systems
ezp::pgesv< DT, IT, ODER > Class Template Referencefinal
Inheritance diagram for ezp::pgesv< DT, IT, ODER >:
[legend]
Collaboration diagram for ezp::pgesv< DT, IT, ODER >:
[legend]

Public Member Functions

 pgesv (const IT rows, const IT cols)
 
auto det (full_mat< DT, IT > &&A)
 Computes the determinant of a matrix. More...
 
IT solve (full_mat< DT, IT > &&A, full_mat< DT, IT > &&B) override
 
IT solve (full_mat< DT, IT > &&B) override
 
template<full_container_t AT, full_container_t BT>
IT solve (AT &&A, BT &&B)
 
template<full_container_t AT>
IT solve (AT &&A, full_mat< DT, IT > &&B)
 
template<full_container_t BT>
IT solve (full_mat< DT, IT > &&A, BT &&B)
 
- Public Member Functions inherited from ezp::detail::full_solver< DT, IT, 'R' >
 full_solver (const IT rows, const IT cols)
 
IT solve (AT &&A, BT &&B)
 
IT solve (AT &&A, full_mat< DT, IT > &&B)
 
IT solve (full_mat< DT, IT > &&A, BT &&B)
 
- Public Member Functions inherited from ezp::detail::abstract_solver< DT, IT, full_mat< DT, IT > >
IT solve (CT &&B)
 
virtual IT solve (WT &&, full_mat< DT, IT > &&)=0
 

Additional Inherited Members

- Protected Member Functions inherited from ezp::detail::full_solver< DT, IT, 'R' >
auto init_storage (const IT n)
 
auto gather_pivot ()
 
- Protected Member Functions inherited from ezp::detail::abstract_solver< DT, IT, full_mat< DT, IT > >
auto to_full (CT &&custom)
 
- Protected Attributes inherited from ezp::detail::full_solver< DT, IT, 'R' >
full_system loc
 
blacs_context< IT > ctx
 
- Static Protected Attributes inherited from ezp::detail::abstract_solver< DT, IT, full_mat< DT, IT > >
static constexpr IT ZERO
 
static constexpr IT ONE
 

Member Function Documentation

◆ det()

template<data_t DT, index_t IT, char ODER = 'R'>
auto ezp::pgesv< DT, IT, ODER >::det ( full_mat< DT, IT > &&  A)
inline

Computes the determinant of a matrix.

This function calculates the determinant of a given matrix A using LU decomposition. The matrix is gathered from distributed memory into a global matrix on the root process. The determinant is computed by multiplying the diagonal elements of the LU-decomposed matrix and adjusting the sign based on the number of row swaps performed during the decomposition.

Template Parameters
DTThe data type of the matrix elements.
ITThe integer type used for indexing and pivoting.
Parameters
AA rvalue reference to a full_mat object representing the matrix.
Returns
The determinant of the matrix as a value of type DT.
Note
If the context (ctx) is invalid, the function returns 0 as the determinant by default.
This function assumes that the matrix A is square.
The computation is performed on the root process (rank 0), and the result is returned to all processes.

The documentation for this class was generated from the following file: