22 void casadi_trans(
const T1* x,
const casadi_int* sp_x, T1* y,
23 const casadi_int* sp_y, casadi_int* tmp) {
24 casadi_int ncol_x, nnz_x, ncol_y, k;
25 const casadi_int* row_x, *colind_y;
27 nnz_x = sp_x[2 + ncol_x];
28 row_x = sp_x + 2 + ncol_x+1;
31 for (k=0; k<ncol_y; ++k) tmp[k] = colind_y[k];
32 for (k=0; k<nnz_x; ++k) {
33 y[tmp[row_x[k]]++] = x[k];