zppsv function

void zppsv(
  1. String UPLO,
  2. int N,
  3. int NRHS,
  4. Array<Complex> AP_,
  5. Matrix<Complex> B_,
  6. int LDB,
  7. Box<int> INFO,
)

Implementation

void zppsv(
  final String UPLO,
  final int N,
  final int NRHS,
  final Array<Complex> AP_,
  final Matrix<Complex> B_,
  final int LDB,
  final Box<int> INFO,
) {
  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 = -6;
  }
  if (INFO.value != 0) {
    xerbla('ZPPSV', -INFO.value);
    return;
  }

  // Compute the Cholesky factorization A = U**H *U or A = L*L**H.

  zpptrf(UPLO, N, AP, INFO);
  if (INFO.value == 0) {
    // Solve the system A*X = B, overwriting B with X.

    zpptrs(UPLO, N, NRHS, AP, B, LDB, INFO);
  }
}