MCPcopy Create free account
hub / github.com/chrxh/alien / processJobs

Method processJobs

source/EngineImpl/EngineWorker.cpp:516–534  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

514}
515
516void EngineWorker::processJobs()
517{
518 std::unique_lock<std::mutex> asyncJobsLock(_mutexForAsyncJobs);
519 if (_updateGpuSettingsJob) {
520 _simulationCudaFacade->setGpuConstants(*_updateGpuSettingsJob);
521 _updateGpuSettingsJob = std::nullopt;
522 }
523 if (!_applyForceJobs.empty()) {
524 for (auto const& applyForceJob : _applyForceJobs) {
525 _simulationCudaFacade->applyForce(
526 {{applyForceJob.start.x, applyForceJob.start.y},
527 {applyForceJob.end.x, applyForceJob.end.y},
528 {applyForceJob.force.x, applyForceJob.force.y},
529 applyForceJob.radius,
530 false});
531 }
532 _applyForceJobs.clear();
533 }
534}
535
536void EngineWorker::syncSimulationWithRenderingIfDesired()
537{

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected