Rework sparse addM function to support compressed sparse matrices.
Note: - M is still a nv x nv uncompressed sparse matrix. - NNZ precounting still needs to be implemented using the combineSparseCount helper function. PiperOrigin-RevId: 554452710 Change-Id: I14adf58fc3acd4ed82d864d7c2e9e96ee6b0377d
This commit is contained in:
committed by
Copybara-Service
parent
6d7b49ccf5
commit
2d7d5319f7
@@ -116,9 +116,14 @@ MJAPI void mj_mulM2(const mjModel* m, const mjData* d, mjtNum* res, const mjtNum
|
||||
MJAPI void mj_addM(const mjModel* m, mjData* d, mjtNum* dst,
|
||||
int* rownnz, int* rowadr, int* colind);
|
||||
|
||||
// add inertia matrix to sparse uncompressed destination matrix
|
||||
// create inertia matrix M (uncompressed)
|
||||
MJAPI void mj_createMSparse(const mjModel* m, mjData* d, mjtNum* M,
|
||||
int* M_rownnz, int* M_rowadr, int* M_colind);
|
||||
|
||||
// add inertia matrix to sparse destination matrix
|
||||
MJAPI void mj_addMSparse(const mjModel* m, mjData* d, mjtNum* dst,
|
||||
int* rownnz, int* rowadr, int* colind);
|
||||
int* rownnz, int* rowadr, int* colind, mjtNum* M,
|
||||
int* M_rownnz, int* M_rowadr, int* M_colind);
|
||||
|
||||
// add inertia matrix to dense destination matrix
|
||||
MJAPI void mj_addMDense(const mjModel* m, mjData* d, mjtNum* dst);
|
||||
|
||||
Reference in New Issue
Block a user