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
@@ -1242,11 +1242,6 @@ STRUCTS: Mapping[str, StructDecl] = dict([
|
||||
type=ValueType(name='mjtSize'),
|
||||
doc='number of non-zeros in sparse actuator_moment matrix',
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='nJten',
|
||||
type=ValueType(name='mjtSize'),
|
||||
doc='number of non-zeros in sparse ten_J matrix',
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='ngravcomp',
|
||||
type=ValueType(name='mjtSize'),
|
||||
@@ -5834,7 +5829,7 @@ STRUCTS: Mapping[str, StructDecl] = dict([
|
||||
inner_type=ValueType(name='int'),
|
||||
),
|
||||
doc='column indices in sparse Jacobian',
|
||||
array_extent=('nJten',),
|
||||
array_extent=('ntendon', 'nv'),
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='ten_J',
|
||||
@@ -5842,7 +5837,7 @@ STRUCTS: Mapping[str, StructDecl] = dict([
|
||||
inner_type=ValueType(name='mjtNum'),
|
||||
),
|
||||
doc='tendon Jacobian',
|
||||
array_extent=('nJten',),
|
||||
array_extent=('ntendon', 'nv'),
|
||||
),
|
||||
StructFieldDecl(
|
||||
name='ten_length',
|
||||
|
||||
@@ -747,6 +747,7 @@ void MjDataWrapper::Serialize(std::ostream& output) const {
|
||||
|
||||
// Write buffer and arena contents
|
||||
{
|
||||
MJDATA_POINTERS_PREAMBLE((this->model_->get()))
|
||||
|
||||
#define X(type, name, nr, nc) \
|
||||
WriteBytes(output, ptr_->name, \
|
||||
@@ -826,6 +827,7 @@ MjDataWrapper MjDataWrapper::Deserialize(std::istream& input) {
|
||||
|
||||
// Read buffer and arena contents
|
||||
{
|
||||
MJDATA_POINTERS_PREAMBLE((&m))
|
||||
|
||||
#define X(type, name, nr, nc) \
|
||||
ReadBytes(input, d->name, sizeof(type) * (m.nr) * (nc));
|
||||
|
||||
Reference in New Issue
Block a user