23 void casadi_trilsolve(
const casadi_int* sp_a,
const T1* nz_a, T1* x,
int tr,
int unity,
26 casadi_int nrow, ncol, r, c, k, rhs;
27 const casadi_int *colind, *row;
32 row = colind + ncol + 1;
34 for (rhs = 0; rhs < nrhs; ++rhs) {
38 for (c = ncol; c-- > 0; ) {
39 for (k = colind[c + 1]; k-- > colind[c]; ) {
40 x[c] += nz_a[k] * x[row[k]];
45 for (c = 0; c < ncol; ++c) {
46 for (k = colind[c]; k < colind[c+1]; ++k) {
47 x[row[k]] += nz_a[k] * x[c];
54 for (c = ncol; c-- > 0; ) {
55 for (k = colind[c + 1]; k-- > colind[c]; ) {
60 x[c] -= nz_a[k] * x[r];
66 for (c = 0; c < ncol; ++c) {
67 for (k = colind[c]; k < colind[c+1]; ++k) {
72 x[r] -= nz_a[k] * x[c];