Avoid allocation and copying in implicit solver's addJTBJSparse
PiperOrigin-RevId: 710679558 Change-Id: Ie75fdcd1127ff619c2668f568ab6a8a11e079dda
This commit is contained in:
committed by
Copybara-Service
parent
8cb253b6ca
commit
e42370c982
@@ -63,10 +63,10 @@ int mju_combineSparse(mjtNum* dst, const mjtNum* src, mjtNum a, mjtNum b,
|
||||
void mju_combineSparseInc(mjtNum* dst, const mjtNum* src, int n, mjtNum a, mjtNum b,
|
||||
int dst_nnz, int src_nnz, int* dst_ind, const int* src_ind);
|
||||
|
||||
// dst += src, only at common non-zero indices
|
||||
void mju_addToSparseInc(mjtNum* dst, const mjtNum* src,
|
||||
int nnzdst, const int* inddst,
|
||||
int nnzsrc, const int* indsrc);
|
||||
// dst += scl * src, only at common non-zero indices
|
||||
void mju_addToSclSparseInc(mjtNum* dst, const mjtNum* src,
|
||||
int nnzdst, const int* inddst,
|
||||
int nnzsrc, const int* indsrc, mjtNum scl);
|
||||
|
||||
// add to sparse matrix: dst = dst + scl*src, return nnz of result
|
||||
int mju_addToSparseMat(mjtNum* dst, const mjtNum* src, int n, int nrow, mjtNum scl,
|
||||
|
||||
Reference in New Issue
Block a user