dspsv function
void
dspsv()
Implementation
void dspsv(
final String UPLO,
final int N,
final int NRHS,
final Array<double> AP_,
final Array<int> IPIV_,
final Matrix<double> B_,
final int LDB,
final Box<int> INFO,
) {
final IPIV = IPIV_.having();
final AP = AP_.having();
final B = B_.having(ld: LDB);
// Test the input parameters.
INFO.value = 0;
if (!lsame(UPLO, 'U') && !lsame(UPLO, 'L')) {
INFO.value = -1;
} else if (N < 0) {
INFO.value = -2;
} else if (NRHS < 0) {
INFO.value = -3;
} else if (LDB < max(1, N)) {
INFO.value = -7;
}
if (INFO.value != 0) {
xerbla('DSPSV', -INFO.value);
return;
}
// Compute the factorization A = U*D*U**T or A = L*D*L**T.
dsptrf(UPLO, N, AP, IPIV, INFO);
if (INFO.value == 0) {
// Solve the system A*X = B, overwriting B with X.
dsptrs(UPLO, N, NRHS, AP, IPIV, B, LDB, INFO);
}
}