This program generates random but well-conditioned triangular matrices, and uses a crude norm-check to test the results of calling oski_MatTrisolve().
This program will test CSR by default. To test CSC, re-compile and define the compile-time macro, TEST_CSC, to a non-zero value.
|
Matrix parameter test lists. |
#define | NUM_UNIT_DIAG 2 |
#define | NUM_SHAPE 2 |
#define | NUM_SORT_INDS 2 |
#define | NUM_INDBASE 2 |
static const int | TL_unit_diag [NUM_UNIT_DIAG] = { 0, 1 } |
static const oski_inmatprop_t | TL_shape [NUM_SHAPE] |
static const int | TL_sort_inds [NUM_SORT_INDS] = { 0, 1 } |
static const int | TL_indbase [NUM_INDBASE] = { 0, 1 } |
Vector parameter test lists. |
#define | NUM_NUM_VECS 2 |
#define | NUM_USE_MINSTRIDE 2 |
#define | NUM_ORIENT 2 |
static const oski_index_t | TL_num_vecs [NUM_NUM_VECS] = { 1, 3 } |
static const int | TL_use_minstride [NUM_USE_MINSTRIDE] = { 0, 1 } |
static const oski_storage_t | TL_orient [NUM_ORIENT] |
Triangular solve kernel parameter test lists. |
#define | NUM_OP 3 |
#define | NUM_ALPHA 3 |
static const oski_matop_t | TL_op [NUM_OP] |
static const oski_value_t | TL_alpha [NUM_ALPHA] |
Functions |
static oski_matrix_t | GenTriMat (oski_index_t m, oski_inmatprop_t shape, int unitdiag, int sorted, int indbase) |
| Returns a handle to a newly allocated matrix.
|
static void | Check (const oski_vecview_t x_true, oski_vecview_t x) |
| Checks a solution computed by a triangular solve routine against the true solution , assuming the original triangular matrix had condition number bounded by 1.
|
static void | TestKernel (oski_index_t m, oski_matrix_t T, const oski_vecview_t x_true) |
static void | TestVec (oski_index_t m, oski_matrix_t T) |
static void | TestAll (oski_index_t m) |
int | main (int argc, char *argv[]) |