Add internal utility for zeroing int vectors.
Remove unnecessary branches in related functions. PiperOrigin-RevId: 562768873 Change-Id: I3964a7a953d95bcd4e29137a7b590be5ffa6e311
This commit is contained in:
committed by
Copybara-Service
parent
f976d6d228
commit
d5292976de
@@ -16,7 +16,6 @@
|
||||
|
||||
#include <math.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#include <mujoco/mjdata.h>
|
||||
#include <mujoco/mjmacro.h>
|
||||
@@ -592,7 +591,7 @@ void mju_factorLUSparse(mjtNum* LU, int n, int* scratch,
|
||||
int* remaining = scratch;
|
||||
|
||||
// set remaining = rownnz
|
||||
memcpy(remaining, rownnz, n*sizeof(int));
|
||||
mju_copyInt(remaining, rownnz, n);
|
||||
|
||||
// diagonal elements (i,i)
|
||||
for (int i=n-1; i >= 0; i--) {
|
||||
|
||||
Reference in New Issue
Block a user