22 void casadi_tri_project(
const T1* x,
const casadi_int* sp_x, T1* y, casadi_int lower) {
23 casadi_int ncol_x, j, k;
24 const casadi_int *colind_x, *row_x;
26 colind_x = sp_x+2; row_x = sp_x + 2 + ncol_x+1;
28 for (j=0; j<ncol_x; ++j) {
29 for (k=colind_x[j]; k<colind_x[j+1]; ++k) {
31 if (row_x[k]>=j) *y++ = x ? x[k] : 0;
33 if (row_x[k]<=j) *y++ = x ? x[k] : 0;