Sparse ten_J and ten_J_colind memory
PiperOrigin-RevId: 868834376 Change-Id: Iec92d9e09e3134666895e54a78cb02439d74a4de
This commit is contained in:
committed by
Copybara-Service
parent
b466829482
commit
336e1026a4
@@ -325,8 +325,8 @@ struct mjData_ {
|
||||
int* ten_wrapnum; // number of wrap points in path (ntendon x 1)
|
||||
int* ten_J_rownnz; // number of non-zeros in Jacobian row (ntendon x 1)
|
||||
int* ten_J_rowadr; // row start address in colind array (ntendon x 1)
|
||||
int* ten_J_colind; // column indices in sparse Jacobian (nJten x 1)
|
||||
mjtNum* ten_J; // tendon Jacobian (nJten x 1)
|
||||
int* ten_J_colind; // column indices in sparse Jacobian (ntendon x nv)
|
||||
mjtNum* ten_J; // tendon Jacobian (ntendon x nv)
|
||||
mjtNum* ten_length; // tendon lengths (ntendon x 1)
|
||||
int* wrap_obj; // geom id; -1: site; -2: pulley (nwrap x 2)
|
||||
mjtNum* wrap_xpos; // Cartesian 3D points in all paths (nwrap x 6)
|
||||
|
||||
@@ -754,7 +754,6 @@ struct mjModel_ {
|
||||
// sizes set after mjModel construction
|
||||
mjtSize nnames_map; // number of slots in the names hash map
|
||||
mjtSize nJmom; // number of non-zeros in sparse actuator_moment matrix
|
||||
mjtSize nJten; // number of non-zeros in sparse ten_J matrix
|
||||
mjtSize ngravcomp; // number of bodies with nonzero gravcomp
|
||||
mjtSize nemax; // number of potential equality-constraint rows
|
||||
mjtSize njmax; // number of available rows in constraint Jacobian (legacy)
|
||||
|
||||
@@ -240,7 +240,6 @@
|
||||
X( npaths ) \
|
||||
X( nnames_map ) \
|
||||
X( nJmom ) \
|
||||
X( nJten ) \
|
||||
X( ngravcomp ) \
|
||||
X( nemax ) \
|
||||
X( njmax ) \
|
||||
@@ -799,6 +798,11 @@
|
||||
|
||||
//-------------------------------- mjData ----------------------------------------------------------
|
||||
|
||||
// define symbols needed in MJDATA_POINTERS (corresponding to number of columns)
|
||||
#define MJDATA_POINTERS_PREAMBLE( m ) \
|
||||
int nv = m->nv;
|
||||
|
||||
|
||||
// pointer fields of mjData
|
||||
// XNV means that the field is not required to construct mjvScene
|
||||
// (by default we define XNV to be the same as X)
|
||||
@@ -851,8 +855,8 @@
|
||||
X ( int, ten_wrapnum, ntendon, 1 ) \
|
||||
X ( int, ten_J_rownnz, ntendon, 1 ) \
|
||||
X ( int, ten_J_rowadr, ntendon, 1 ) \
|
||||
X ( int, ten_J_colind, nJten, 1 ) \
|
||||
X ( mjtNum, ten_J, nJten, 1 ) \
|
||||
X ( int, ten_J_colind, ntendon, MJ_M(nv) ) \
|
||||
X ( mjtNum, ten_J, ntendon, MJ_M(nv) ) \
|
||||
X ( mjtNum, ten_length, ntendon, 1 ) \
|
||||
X ( int, wrap_obj, nwrap, 2 ) \
|
||||
X ( mjtNum, wrap_xpos, nwrap, 6 ) \
|
||||
|
||||
Reference in New Issue
Block a user