From 0336114a8882f3a512a225e9d4faf6c2c46eaa85 Mon Sep 17 00:00:00 2001 From: Yuval Tassa Date: Sat, 28 Dec 2024 16:04:20 -0800 Subject: [PATCH] Add `restrict` to output variable in `mj_solveLDs`. PiperOrigin-RevId: 710358020 Change-Id: Ia63048161d7622f21954e98346b7ff4e37ecb342 --- src/engine/engine_core_smooth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/engine/engine_core_smooth.c b/src/engine/engine_core_smooth.c index ca16cb30..869ea13e 100644 --- a/src/engine/engine_core_smooth.c +++ b/src/engine/engine_core_smooth.c @@ -1578,7 +1578,7 @@ void mj_solveLD(const mjModel* m, mjtNum* restrict x, int n, // in-place sparse backsubstitution: x = inv(L'*D*L)*x // like mj_solveLD, but using the CSR representation of L -void mj_solveLDs(mjtNum* x, const mjtNum* qLDs, const mjtNum* qLDiagInv, int nv, +void mj_solveLDs(mjtNum* restrict x, const mjtNum* qLDs, const mjtNum* qLDiagInv, int nv, const int* rownnz, const int* rowadr, const int* diag, const int* colind) { // x <- L^-T x for (int i=nv-2; i >= 0; i--) {