Remove mjMARKSTACK and mjFREESTACK macros.

PiperOrigin-RevId: 562844184
Change-Id: Id2f57f5d132c47094dad75c6dab7297d7aa73458
This commit is contained in:
Saran Tunyasuvunakool
2023-09-05 11:41:01 -07:00
committed by Copybara-Service
parent 329ed193ac
commit 4929077211
35 changed files with 239 additions and 258 deletions
+4 -4
View File
@@ -147,7 +147,7 @@ int mju_cholFactorSparse(mjtNum* mat, int n, mjtNum mindiag,
mjData* d) {
int rank = n;
mjMARKSTACK;
mj_markStack(d);
int* buf_ind = mj_stackAllocInt(d, n);
mjtNum* sparse_buf = mj_stackAllocNum(d, n);
@@ -198,7 +198,7 @@ int mju_cholFactorSparse(mjtNum* mat, int n, mjtNum mindiag,
}
}
mjFREESTACK;
mj_freeStack(d);
return rank;
}
@@ -253,7 +253,7 @@ void mju_cholSolveSparse(mjtNum* res, const mjtNum* mat, const mjtNum* vec, int
int mju_cholUpdateSparse(mjtNum* mat, mjtNum* x, int n, int flg_plus,
int* rownnz, int* rowadr, int* colind, int x_nnz, int* x_ind,
mjData* d) {
mjMARKSTACK;
mj_markStack(d);
int* buf_ind = mj_stackAllocInt(d, n);
mjtNum* sparse_buf = mj_stackAllocNum(d, n);
@@ -294,7 +294,7 @@ int mju_cholUpdateSparse(mjtNum* mat, mjtNum* x, int n, int flg_plus,
i = i - 1 + (new_x_nnz - i);
}
mjFREESTACK;
mj_freeStack(d);
return rank;
}