22 void casadi_mtimes(
const T1* x,
const casadi_int* sp_x,
const T1* y,
const casadi_int* sp_y, T1* z,
const casadi_int* sp_z, T1* w, casadi_int tr) {
23 casadi_int ncol_x, ncol_y, ncol_z, cc;
24 const casadi_int *colind_x, *row_x, *colind_y, *row_y, *colind_z, *row_z;
28 colind_x = sp_x+2; row_x = sp_x + 2 + ncol_x+1;
30 colind_y = sp_y+2; row_y = sp_y + 2 + ncol_y+1;
32 colind_z = sp_z+2; row_z = sp_z + 2 + ncol_z+1;
36 for (cc=0; cc<ncol_z; ++cc) {
39 for (kk=colind_y[cc]; kk<colind_y[cc+1]; ++kk) {
43 for (kk=colind_z[cc]; kk<colind_z[cc+1]; ++kk) {
45 casadi_int rr = row_z[kk];
47 for (kk1=colind_x[rr]; kk1<colind_x[rr+1]; ++kk1) {
48 z[kk] += x[kk1] * w[row_x[kk1]];
54 for (cc=0; cc<ncol_y; ++cc) {
57 for (kk=colind_z[cc]; kk<colind_z[cc+1]; ++kk) {
61 for (kk=colind_y[cc]; kk<colind_y[cc+1]; ++kk) {
63 casadi_int rr = row_y[kk];
65 for (kk1=colind_x[rr]; kk1<colind_x[rr+1]; ++kk1) {
66 w[row_x[kk1]] += x[kk1]*y[kk];
70 for (kk=colind_z[cc]; kk<colind_z[cc+1]; ++kk) {