22 void casadi_mv(
const T1* x,
const casadi_int* sp_x,
const T1* y, T1* z, casadi_int tr) {
23 casadi_int ncol_x, i, el;
24 const casadi_int *colind_x, *row_x;
25 if (!x || !y || !z)
return;
28 colind_x = sp_x+2; row_x = sp_x + 2 + ncol_x+1;
31 for (i=0; i<ncol_x; ++i) {
33 for (el=colind_x[i]; el<colind_x[i+1]; ++el) {
34 z[i] += x[el] * y[row_x[el]];
39 for (i=0; i<ncol_x; ++i) {
41 for (el=colind_x[i]; el<colind_x[i+1]; ++el) {
42 z[row_x[el]] += x[el] * y[i];