pub unsafe extern "C" fn cusolverDnSsyevjBatched(
handle: cusolverDnHandle_t,
jobz: cusolverEigMode_t,
uplo: cublasFillMode_t,
n: c_int,
A: *mut f32,
lda: c_int,
W: *mut f32,
work: *mut f32,
lwork: c_int,
info: *mut c_int,
params: syevjInfo_t,
batchSize: c_int,
) -> cusolverStatus_tExpand description
The helper functions below can calculate the sizes needed for pre-allocated buffer.
The S and D data types are real valued single and double precision, respectively.
The C and Z data types are complex valued single and double precision, respectively.
This function computes eigenvalues and eigenvectors of a sequence of symmetric (Hermitian) $n \times n$ matrices: $$ A_{j}\Q_{j} = Q_{j}\\Lambda_{j} $$
where $\Lambda_{j}$ is a real $n \times n$ diagonal matrix. $Q_j$ is an $n \times n$ unitary matrix. The diagonal elements of $\Lambda_j$ are the eigenvalues of $A_j$ in either ascending order or non-sorting order.
syevjBatched performs syevj on each matrix. It requires that all matrices are of the same size n and are packed in contiguous way,
$$
\begin{split}A = \begin{pmatrix}
{A0} & {A1} & \cdots \\
\end{pmatrix}\end{split}
$$
Each matrix is column-major with leading dimension lda, so the formula for random access is $A_{k}\operatorname{(i,j)} = {A\lbrack\ i\ +\ lda\*j\ +\ lda\*n\*k\rbrack}$.
The parameter W also contains eigenvalues of each matrix in contiguous way,
$$
\begin{split}W = \begin{pmatrix}
{W0} & {W1} & \cdots \\
\end{pmatrix}\end{split}
$$
The formula for random access of W is $W_{k}\operatorname{(j)} = {W\lbrack\ j\ +\ n\*k\rbrack}$.
Except for tolerance and maximum sweeps, syevjBatched can either sort the eigenvalues in ascending order (default) or chose as-is (without sorting) by the function cusolverDnXsyevjSetSortEig. If the user packs several tiny matrices into diagonal blocks of one matrix, non-sorting option can separate spectrum of those tiny matrices.
syevjBatched cannot report residual and executed sweeps by function cusolverDnXsyevjGetResidual and cusolverDnXsyevjGetSweeps. Any call of the above two returns cusolverStatus_t::CUSOLVER_STATUS_NOT_SUPPORTED. The user needs to compute residual explicitly.
The user has to provide working space pointed by input parameter work. The input parameter lwork is the size of the working space, and it is returned by syevjBatched_bufferSize(). Please note that the size in bytes of the working space is equal to sizeof(<type>) * lwork.
The output parameter info is an integer array of size batchSize. If the function returns cusolverStatus_t::CUSOLVER_STATUS_INVALID_VALUE, the first element info\[0\] = -i (less than zero) indicates i-th parameter is wrong (not counting handle). Otherwise, if info\[i\] = n+1, syevjBatched does not converge on i-th matrix under given tolerance and maximum sweeps.
If jobz = cusolverEigMode_t::CUSOLVER_EIG_MODE_VECTOR, $A_j$ contains the orthonormal eigenvectors $V_j$.
Please visit cuSOLVER Library Samples - syevjBatched for a code example.