Skip to main content

xtrtri

Function xtrtri 

Source
pub fn xtrtri<TA: DataTypeLike>(
    ctx: &Context,
    fill_mode: FillMode,
    diagonal_type: DiagonalType,
    n: usize,
    a: MatrixMut<'_, TA>,
    workspace: ByteWorkspaceMut<'_>,
    dev_info: &mut DeviceMemory<i32>,
) -> Result<()>
Expand description

Use the matching buffer-size helper to calculate the sizes needed for pre-allocated workspace.

Computes the inverse of a triangular matrix through the generic cuSOLVER routine.

A is an $n \times n$ triangular matrix, only lower or upper part is meaningful. fill_mode indicates which part of the matrix is used. The other triangular part is left unchanged.

If fill_mode is FillMode::Lower, only the lower triangular part of A is processed and replaced by the lower triangular inverse.

If fill_mode is FillMode::Upper, only the upper triangular part of A is processed and replaced by the upper triangular inverse.

Provide device and host workspace through workspace. Use xtrtri_buffer_size to determine the required sizes for workspace.device and workspace.host.

If matrix inversion fails, dev_info = i shows A(i, i) = 0.

If the reported info value is -i, the ith parameter is invalid.

List of input arguments for xtrtri_buffer_size and xtrtri:

Valid data types

AlgorithmNotes
data typeMeaning
DataType::F32STRTRI
DataType::F64DTRTRI
DataType::ComplexF32CTRTRI
DataType::ComplexF64ZTRTRI

ยงErrors

Returns an error if cuSOLVER has not been initialized, if the matrix dimensions or leading dimension are invalid, if the data type is not supported, or if cuSOLVER reports an internal failure.