Fix type errors in compiler and tests.
In preparation for a float32 build of MuJoCo. PiperOrigin-RevId: 644407674 Change-Id: I60069f0f865ef89fbf613f5a2ca0c336cc63461e
This commit is contained in:
committed by
Copybara-Service
parent
c8cc2d51b0
commit
8e2f830fd2
+15
-12
@@ -214,18 +214,21 @@ mjtNum CompareModel(const mjModel* m1, const mjModel* m2,
|
||||
#undef X
|
||||
if (maxdif > 0) return maxdif;
|
||||
|
||||
// compare arrays
|
||||
#define X(type, name, nr, nc) \
|
||||
for (int r = 0; r < m1->nr; r++) { \
|
||||
for (int c = 0; c < nc; c++) { \
|
||||
dif = Compare(m1->name[r * nc + c], m2->name[r * nc + c]); \
|
||||
if (dif > maxdif) { \
|
||||
maxdif = dif; \
|
||||
field = #name; \
|
||||
field += " row: " + std::to_string(r); \
|
||||
field += " col: " + std::to_string(c); \
|
||||
} \
|
||||
} \
|
||||
// compare arrays, apart from bvh-related ones, as those are sensitive to
|
||||
// numerical differences when meshes are perfectly symmetric.
|
||||
#define X(type, name, nr, nc) \
|
||||
if (strncmp(#name, "bvh_", 4)) { \
|
||||
for (int r = 0; r < m1->nr; r++) { \
|
||||
for (int c = 0; c < nc; c++) { \
|
||||
dif = Compare(m1->name[r * nc + c], m2->name[r * nc + c]); \
|
||||
if (dif > maxdif) { \
|
||||
maxdif = dif; \
|
||||
field = #name; \
|
||||
field += " row: " + std::to_string(r); \
|
||||
field += " col: " + std::to_string(c); \
|
||||
} \
|
||||
} \
|
||||
} \
|
||||
} // NOLINT
|
||||
MJMODEL_POINTERS
|
||||
#undef X
|
||||
|
||||
Reference in New Issue
Block a user