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
+1
View File
@@ -73,6 +73,7 @@ TEST_F(CoreSmoothTest, MjDataWorldBodyValuesAreInitialized) {
mj_rnePostConstraint(model, data);
{
MJDATA_POINTERS_PREAMBLE(model)
#define X(type, name, d0, d1) \
if constexpr (std::string_view(#d0) == "nbody") { \
absl::Span<type> values(data->name, model->d0 * d1); \
+1
View File
@@ -725,6 +725,7 @@ TEST_F(ForwardTest, NormalizeQuats) {
mj_step(model, data_n);
// expect everything to match
MJDATA_POINTERS_PREAMBLE(model)
#define X(type, name, nr, nc) \
for (int i = 0; i < model->nr; i++) \
for (int j = 0; j < nc; j++) \
+2
View File
@@ -71,6 +71,7 @@ TEST_F(ThreadTest, SingleAndMultiThreadedMatch) {
// compare the mjData's.
{
MJDATA_POINTERS_PREAMBLE((model))
#define X(type, name, nr, nc) \
EXPECT_EQ(std::memcmp(data->name, data_threaded->name, \
sizeof(type)*(model->nr)*(nc)), \
@@ -126,6 +127,7 @@ TEST_F(ThreadTest, IslandSingleAndMultiThreadedMatch) {
// compare the mjData's.
{
MJDATA_POINTERS_PREAMBLE((model))
#define X(type, name, nr, nc) \
EXPECT_EQ(std::memcmp(data->name, data_threaded->name, \
sizeof(type)*(model->nr)*(nc)), \