Multithreaded mesh compilation.

PiperOrigin-RevId: 651358120
Change-Id: Id6272aac84ec6ac1b709d2f4a44b7593307bd158
This commit is contained in:
Yuval Tassa
2024-07-11 04:20:59 -07:00
committed by Copybara-Service
parent e7301edd20
commit 3d1d1d0718
7 changed files with 173 additions and 38 deletions
+3 -3
View File
@@ -235,9 +235,9 @@ mjModel* LoadModel(const char* file, mj::Simulate& sim) {
auto load_interval = mj::Simulate::Clock::now() - load_start;
double load_seconds = Seconds(load_interval).count();
// if no error and load took more than 1/2 seconds, report load time
if (!loadError[0] && load_seconds > 0.5) {
mju::sprintf_arr(loadError, "Model loaded in %.1g seconds", load_seconds);
// if no error and load took more than 1/4 seconds, report load time
if (!loadError[0] && load_seconds > 0.25) {
mju::sprintf_arr(loadError, "Model loaded in %.2g seconds", load_seconds);
}
mju::strcpy_arr(sim.load_error, loadError);