Rate This Document
Findability
Accuracy
Completeness
Readability

KmlBlockBandedMatrixSolve

This is a custom KML_LAPACK interface for solving block-banded matrices with a block size of 5 and returning the matrix factorization result. This interface does not include pivoting, so the matrix must be diagonally dominant.

Interface Definition

void KmlBlockBandedMatrixSolve_(int *n, double *a, double *x, int *batchSize, int *info);

Parameters

Parameter

Type

Description

Input/Output

n

Integer

Matrix size. It must be at least 20 and a multiple of 5.

Input

a

Double-precision floating-point

Elements of matrix A.

Input/Output

x

Double-precision floating-point

When used as an input, it is the right-hand side (RHS). When used as an output, it is the solution vector.

Input/Output

batchSize

Integer

Batch size, where 0 < batchSize ≤ 8.

Input

info

Integer

  • info = 0: successful exit.
  • info < 0: The value of the (−info)-th parameter is invalid.

Input/Output

Examples

int n = 25;
int batchSize = 8;
int blockSize = 25;
int info = 0;
double *a = (double *)malloc(sizeof(double) * blockSize * batchSize * n);
double *x = (double *)malloc(sizeof(double) * n * batchSize);
double *exact_x = (double *)malloc(sizeof(double) * n * batchSize);
/* Fill in data */
KmlBlockBandedMatrixSolve_(&n, aa, xx, &batchSize, &info);