File task_dispatcher.h
File List > projects > simtix > src > simtix > system > task_dispatcher.h
Go to the documentation of this file
#pragma once
#include <simtix/system.h>
#include <deque>
#include <vector>
namespace simtix {
namespace system {
class TaskDispatcherImpl {
public:
TaskDispatcherImpl() : status_(TaskDispatcher::Status::kIdle) {}
bool Launch(const opencl::Kernel &k);
protected:
// List of available SMs
std::vector<BaseSM *> sm_list_;
// Pending workgroups
std::deque<opencl::WorkGroup> pending_wg_;
// Pending completion info
std::deque<TaskDispatcher::CompletionInfo> pending_completion_info_;
opencl::Kernel running_kernel_;
// Current status of this task dispatcher
TaskDispatcher::Status status_;
friend class TaskDispatcher;
};
class TaskDispatcher::Impl : public TaskDispatcherImpl {
friend class TaskDispatcher;
};
} // namespace system
} // namespace simtix