opm-simulators
Loading...
Searching...
No Matches
bsr.h
1#pragma once
2
3#ifdef __cplusplus
4extern "C" {
5#endif
6
10typedef
11struct bsr_matrix
12{
13 // number or rows
14 int nrows;
15 // number or columns
16 int ncols;
17 // number or non-zero blocks
18 int nnz;
19 // block-size
20 int b;
21
22 // pointer ot row offsets
23 int *rowptr;
24 // pointer to column indices
25 int *colidx;
26 // pointer to double-precision values
27 double *dbl;
28 // pointer to single-precision values
29 float *flt;
30
32
38bsr_matrix* bsr_alloc();
39
45void bsr_free(bsr_matrix *A);
46
55void bsr_init(bsr_matrix *A, int nrows, int nnz, int b);
56
67void bsr_vmspmv3(bsr_matrix *A, const double *x, double *y);
68
79void bsr_vdspmv3(bsr_matrix *A, const double *x, double *y);
80
86void bsr_downcast(bsr_matrix *M);
87
93void bsr_info(bsr_matrix *A);
94
101void bsr_sparsity(const bsr_matrix *A, const char *name);
102
109void bsr_nonzeros(bsr_matrix *A, const char *name);
110
111#ifdef __cplusplus
112}
113#endif
Mixed-precision bsr matrix.
Definition bsr.h:12