Remove engine threading fallback.

PiperOrigin-RevId: 929825049
Change-Id: Iff959f8d22ed082ff470c3eec426351964c2e89d
This commit is contained in:
Kyle Bayes
2026-06-10 06:53:46 -07:00
committed by Copybara-Service
parent 6f6a72f66b
commit 118baada7c
-24
View File
@@ -24,10 +24,6 @@
#include <mujoco/mjmodel.h>
#include "engine/engine_memory.h"
#if defined(__cpp_lib_atomic_wait)
// ----------------------------- multithreaded implementation --------------------------------------
// context for thread pool stored on mjData
class ThreadPoolContext {
public:
@@ -191,23 +187,3 @@ int mju_numThread(const mjData* d) {
ThreadPoolContext* ctx = reinterpret_cast<ThreadPoolContext*>(d->threadpool);
return ctx ? ctx->ThreadCount() + 1 : 1;
}
#else
// -------------------------------------- fallback ------------------------------------------------
void mju_threadpool(mjData* d, int nthread) {
// No-op
}
void mju_dispatch(const mjModel* m, mjData* d, mjTaskFunc func, void* arg, int ntask) {
for (int i = 0; i < ntask; i++) {
func(m, d, arg, 0, i);
}
}
int mju_numThread(const mjData* d) {
return 1;
}
#endif // __cpp_lib_atomic_wait