Skip to main content

xgeev

Function xgeev 

Source
pub fn xgeev<TA: DataTypeLike, TW: DataTypeLike, TV: DataTypeLike>(
    ctx: &Context,
    params: &Params,
    n: usize,
    a: MatrixMut<'_, TA>,
    eigenvalues: &mut DeviceMemory<TW>,
    right_vectors: Option<MatrixMut<'_, TV>>,
    workspace: ByteWorkspaceMut<'_>,
    dev_info: &mut DeviceMemory<i32>,
) -> Result<()>
Expand description

Computes the eigenvalues and, optionally, the left and/or right eigenvectors of an n-by-n real non-symmetric or complex non-Hermitian matrix A. The right eigenvector v(j) of A satisfies

where w(j) is its eigenvalue. The left eigenvalue u(j) of A satisfies

where $u(j)^{H}$ denotes the conjugate-transpose of u(j).

The computed eigenvectors are normalized to have Euclidean norm equal to 1 and largest component real.

If A is real-valued, there are two options to return the eigenvalues in W. The first option sets all data types to real-valued types. Then W holds 2*n entries. The first n entries hold the real parts and the last n entries hold the imaginary parts. The LAPACK interface with separate arrays for the real parts WR and the imaginary parts WI can be recovered by setting pointers WR = W and WI = W+n. The second option uses a complex data type for W. Then W is n entries long; each real eigenvalue is stored as a complex number and for each complex conjugate pair, both eigenvalues are returned. The computation is still executed fully in real arithmetic.

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

If the reported info value is -i, the ith parameter is invalid. If info == 0, the QR algorithm converged; W contains the computed eigenvalues of A, and any requested left or right eigenvectors have been computed. If info == i with i > 0, the QR algorithm failed to compute all eigenvalues and no eigenvectors were computed. The elements i + 1:n of W contain eigenvalues that converged.

  • geev only supports the computation of right eigenvectors. Therefore, jobvl must be EigenMode::NoVector.

  • geev uses balancing to improve the conditioning of the eigenvalues and eigenvectors.

  • geev is a hybrid CPU-GPU algorithm. Best performance is attained with pinned host memory.

Currently, xgeev supports only the default algorithm.

Table of algorithms supported by xgeev

AlgorithmNotes
AlgorithmMode::DefaultDefault algorithm.

List of input arguments for xgeev_buffer_size and xgeev:

The generic operation has five data types: data_type_a is the data type of matrix A, data_type_w is the data type of W, data_type_vl is the data type of matrix VL, data_type_vr is the data type of matrix VR, and compute_type is the compute type of the operation. xgeev only supports the following four combinations:

Valid combination of data type and compute type

ยงErrors

Returns an error if cuSOLVER has not been initialized, if the matrix dimensions, leading dimensions, or requested eigenvector modes are invalid, or if cuSOLVER reports an internal failure.