Sparse ten_J and ten_J_colind memory

PiperOrigin-RevId: 868834376
Change-Id: Iec92d9e09e3134666895e54a78cb02439d74a4de
This commit is contained in:
Google DeepMind
2026-02-11 14:04:45 -08:00
committed by Copybara-Service
parent b466829482
commit 336e1026a4
21 changed files with 43 additions and 118 deletions
+2
View File
@@ -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));