Change mj_encode return type to 64-bit (mjtSize)
This supports encoding files larger than 2GB. PiperOrigin-RevId: 939828697 Change-Id: If60d36c61475ced20b4eb58408ffb37e25bf3db7
This commit is contained in:
committed by
Copybara-Service
parent
1e04c568e8
commit
d83ef0b6b9
@@ -2053,8 +2053,8 @@ mjfEncode
|
||||
|
||||
.. code-block:: C
|
||||
|
||||
typedef int (*mjfEncode)(const mjSpec* s, const mjModel* m, const mjVFS* vfs,
|
||||
mjResource* resource);
|
||||
typedef mjtSize (*mjfEncode)(const mjSpec* s, const mjModel* m, const mjVFS* vfs,
|
||||
mjResource* resource);
|
||||
|
||||
|
||||
This callback populates the :ref:`mjResource<mjResource>` `data` member with bytes representing the
|
||||
|
||||
@@ -10,6 +10,11 @@ General
|
||||
- Added Nesterov momentum extrapolation with adaptive gradient restart (O'Donoghue-Candès) to the PGS solver,
|
||||
significantly improving convergence. Overall PGS now requires ~2x fewer iterations.
|
||||
|
||||
.. admonition:: Breaking API changes
|
||||
:class: attention
|
||||
|
||||
- Return type of :ref:`mj_encode` and the :ref:`mjfEncode` callback changed from ``int`` to ``mjtSize`` (64-bit).
|
||||
|
||||
Version 3.10.0 (June 22, 2026)
|
||||
------------------------------
|
||||
|
||||
|
||||
@@ -3231,9 +3231,9 @@ mjSpec* mj_parseXML(const char* filename, const mjVFS* vfs, char* error, int err
|
||||
mjSpec* mj_parseXMLString(const char* xml, const mjVFS* vfs, char* error, int error_sz);
|
||||
mjSpec* mj_parse(const char* filename, const char* content_type,
|
||||
const mjVFS* vfs, char* error, int error_sz);
|
||||
int mj_encode(const mjSpec* s, const mjModel* m, const char* filename,
|
||||
const char* content_type, const mjVFS* vfs, char* error,
|
||||
int error_sz);
|
||||
mjtSize mj_encode(const mjSpec* s, const mjModel* m, const char* filename,
|
||||
const char* content_type, const mjVFS* vfs, char* error,
|
||||
int error_sz);
|
||||
mjModel* mj_compile(mjSpec* s, const mjVFS* vfs);
|
||||
int mj_copyBack(mjSpec* s, const mjModel* m);
|
||||
int mj_recompile(mjSpec* s, const mjVFS* vfs, mjModel* m, mjData* d);
|
||||
|
||||
Reference in New Issue
Block a user