Implement hash map for mj_name2id using djb2 and linear probing.
PiperOrigin-RevId: 499485127 Change-Id: I5aed6549db18b92d7c8a3b7590e50a00ce13a439
This commit is contained in:
committed by
Copybara-Service
parent
5261cceb30
commit
f1007df013
@@ -438,6 +438,9 @@ mjModel* mj_makeModel(int nq, int nv, int nu, int na, int nbody, int njnt,
|
||||
m->nuser_actuator = nuser_actuator;
|
||||
m->nuser_sensor = nuser_sensor;
|
||||
m->nnames = nnames;
|
||||
m->nnames_map = nbody + njnt + ngeom + nsite + ncam + nlight + nmesh + nskin
|
||||
+ nhfield + ntex + nmat + npair + nexclude + neq + ntendon
|
||||
+ nu + nsensor + nnumeric + ntext + ntuple + nkey + nplugin;
|
||||
|
||||
#define X(name) \
|
||||
if ((m->name) < 0) { \
|
||||
|
||||
Reference in New Issue
Block a user