Move island-specific sparse matrices from arena to stack.

PiperOrigin-RevId: 923850345
Change-Id: I9683d7554b15b7cd8c45a8dce7814640aa266452
This commit is contained in:
Yuval Tassa
2026-05-30 03:07:31 -07:00
committed by Copybara-Service
parent 5d782a2bb8
commit 96bf8aea81
11 changed files with 122 additions and 402 deletions
-11
View File
@@ -364,12 +364,6 @@ struct mjData_ {
// computed by mj_island (dofs sorted by island)
mjtNum* ifrc_smooth; // net unconstrained force (nidof x 1)
mjtNum* iacc_smooth; // unconstrained acceleration (nidof x 1)
int* iM_rownnz; // inertia: non-zeros in each row (nidof x 1)
int* iM_rowadr; // inertia: address of each row in iM_colind (nidof x 1)
int* iM_colind; // inertia: column indices of non-zeros (nC x 1)
mjtNum* iM; // total inertia (sparse) (nC x 1)
mjtNum* iLD; // L'*D*L factorization of M (sparse) (nC x 1)
mjtNum* iLDiagInv; // 1/diag(D) (nidof x 1)
mjtNum* iacc; // acceleration (nidof x 1)
// computed by mj_island (island constraint structure)
@@ -384,11 +378,6 @@ struct mjData_ {
// computed by mj_island (constraints sorted by island)
int* iefc_type; // constraint type (mjtConstraint) (nefc x 1)
int* iefc_id; // id of object of specified type (nefc x 1)
int* iefc_J_rownnz; // number of non-zeros in constraint Jacobian row (nefc x 1)
int* iefc_J_rowadr; // row start address in colind array (nefc x 1)
int* iefc_J_rowsuper; // number of subsequent rows in supernode (nefc x 1)
int* iefc_J_colind; // column indices in constraint Jacobian (nJ x 1)
mjtNum* iefc_J; // constraint Jacobian (nJ x 1)
mjtNum* iefc_frictionloss; // frictionloss (friction) (nefc x 1)
mjtNum* iefc_D; // constraint mass (nefc x 1)
mjtNum* iefc_R; // inverse constraint mass (nefc x 1)
-11
View File
@@ -969,12 +969,6 @@
X ( int, map_idof2dof, MJ_M(nv), 1 ) \
X ( mjtNum, ifrc_smooth, MJ_D(nidof), 1 ) \
X ( mjtNum, iacc_smooth, MJ_D(nidof), 1 ) \
XNV( int, iM_rownnz, MJ_D(nidof), 1 ) \
XNV( int, iM_rowadr, MJ_D(nidof), 1 ) \
XNV( int, iM_colind, MJ_M(nC), 1 ) \
XNV( mjtNum, iM, MJ_M(nC), 1 ) \
XNV( mjtNum, iLD, MJ_M(nC), 1 ) \
X ( mjtNum, iLDiagInv, MJ_D(nidof), 1 ) \
X ( mjtNum, iacc, MJ_D(nidof), 1 ) \
X ( int, efc_island, MJ_D(nefc), 1 ) \
X ( int, island_ne, MJ_D(nisland), 1 ) \
@@ -985,11 +979,6 @@
X ( int, map_iefc2efc, MJ_D(nefc), 1 ) \
X ( int, iefc_type, MJ_D(nefc), 1 ) \
X ( int, iefc_id, MJ_D(nefc), 1 ) \
XNV( int, iefc_J_rownnz, MJ_D(nefc), 1 ) \
XNV( int, iefc_J_rowadr, MJ_D(nefc), 1 ) \
XNV( int, iefc_J_rowsuper, MJ_D(nefc), 1 ) \
XNV( int, iefc_J_colind, MJ_D(nJ), 1 ) \
XNV( mjtNum, iefc_J, MJ_D(nJ), 1 ) \
X ( mjtNum, iefc_frictionloss, MJ_D(nefc), 1 ) \
X ( mjtNum, iefc_D, MJ_D(nefc), 1 ) \
X ( mjtNum, iefc_R, MJ_D(nefc), 1 ) \