Lines Matching refs:Worker
83 Worker *worker = new Worker(*this, i, object_begin, object_end);
84 workers_.emplace_back(std::unique_ptr<Worker>(worker));
141 for (auto &worker : workers_)
142 worker->start();
149 for (auto &worker : workers_)
150 worker->stop();
694 void Smoke::update_simulation(const Worker &worker)
696 sim_.update(worker.tick_interval_, worker.object_begin_, worker.object_end_);
699 void Smoke::draw_objects(Worker &worker)
702 auto cmd = data.worker_cmds[worker.index_];
707 inherit_info.framebuffer = worker.fb_;
723 for (int i = worker.object_begin_; i < worker.object_end_; i++) {
760 for (auto &worker : workers_)
761 worker->update_simulation();
775 for (auto &worker : workers_)
776 worker->draw_objects(framebuffers_[back.image_index]);
802 for (auto &worker : workers_)
803 worker->wait_idle();
823 Smoke::Worker::Worker(Smoke &smoke, int index, int object_begin, int object_end)
830 void Smoke::Worker::start()
833 thread_ = std::thread(Smoke::Worker::thread_loop, this);
836 void Smoke::Worker::stop()
847 void Smoke::Worker::update_simulation()
864 void Smoke::Worker::draw_objects(VkFramebuffer fb)
885 void Smoke::Worker::wait_idle()
894 void Smoke::Worker::update_loop()