mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-20 13:11:34 +08:00
Minor refactor of CommandQueue class
Change-Id: Iab64ad133fe96402d9577b64380472729f0190a8 Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
a0f2723589
commit
52fbf6473b
@ -54,22 +54,8 @@ CommandQueue *CommandQueue::create(Context *context,
|
||||
CommandQueue::CommandQueue() : CommandQueue(nullptr, nullptr, 0) {
|
||||
}
|
||||
|
||||
CommandQueue::CommandQueue(Context *context,
|
||||
Device *deviceId,
|
||||
const cl_queue_properties *properties) : taskCount(0),
|
||||
taskLevel(0),
|
||||
virtualEvent(nullptr),
|
||||
context(context),
|
||||
device(deviceId),
|
||||
priority(QueuePriority::MEDIUM),
|
||||
throttle(QueueThrottle::MEDIUM),
|
||||
perfCountersEnabled(false),
|
||||
perfCountersConfig(UINT32_MAX),
|
||||
perfCountersUserRegistersNumber(0),
|
||||
perfConfigurationData(nullptr),
|
||||
perfCountersRegsCfgHandle(0),
|
||||
perfCountersRegsCfgPending(false),
|
||||
commandStream(nullptr) {
|
||||
CommandQueue::CommandQueue(Context *context, Device *deviceId, const cl_queue_properties *properties)
|
||||
: context(context), device(deviceId) {
|
||||
if (context) {
|
||||
context->incRefInternal();
|
||||
}
|
||||
@ -84,7 +70,7 @@ CommandQueue::CommandQueue(Context *context,
|
||||
}
|
||||
}
|
||||
|
||||
processProperties();
|
||||
processProperties(properties);
|
||||
}
|
||||
|
||||
CommandQueue::~CommandQueue() {
|
||||
|
@ -393,17 +393,17 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
|
||||
MOCKABLE_VIRTUAL bool setupDebugSurface(Kernel *kernel);
|
||||
|
||||
// taskCount of last task
|
||||
uint32_t taskCount;
|
||||
uint32_t taskCount = 0;
|
||||
|
||||
// current taskLevel. Used for determining if a PIPE_CONTROL is needed.
|
||||
uint32_t taskLevel;
|
||||
uint32_t taskLevel = 0;
|
||||
|
||||
std::unique_ptr<FlushStampTracker> flushStamp;
|
||||
|
||||
std::atomic<uint32_t> latestTaskCountWaited{(uint32_t)-1};
|
||||
std::atomic<uint32_t> latestTaskCountWaited{std::numeric_limits<uint32_t>::max()};
|
||||
|
||||
// virtual event that holds last Enqueue information
|
||||
Event *virtualEvent;
|
||||
Event *virtualEvent = nullptr;
|
||||
|
||||
protected:
|
||||
void *enqueueReadMemObjForMap(TransferProperties &transferProperties, EventsRequest &eventsRequest, cl_int &errcodeRet);
|
||||
@ -418,26 +418,26 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
|
||||
AuxTranslationDirection auxTranslationDirection);
|
||||
|
||||
void obtainNewTimestampPacketNodes(size_t numberOfNodes, TimestampPacketContainer &previousNodes);
|
||||
void processProperties();
|
||||
void processProperties(const cl_queue_properties *properties);
|
||||
|
||||
Context *context = nullptr;
|
||||
Device *device = nullptr;
|
||||
EngineControl *engine = nullptr;
|
||||
|
||||
cl_command_queue_properties commandQueueProperties;
|
||||
cl_command_queue_properties commandQueueProperties = 0;
|
||||
|
||||
QueuePriority priority;
|
||||
QueueThrottle throttle;
|
||||
QueuePriority priority = QueuePriority::MEDIUM;
|
||||
QueueThrottle throttle = QueueThrottle::MEDIUM;
|
||||
uint32_t engineId = 0;
|
||||
|
||||
bool perfCountersEnabled;
|
||||
cl_uint perfCountersConfig;
|
||||
uint32_t perfCountersUserRegistersNumber;
|
||||
InstrPmRegsCfg *perfConfigurationData;
|
||||
uint32_t perfCountersRegsCfgHandle;
|
||||
bool perfCountersRegsCfgPending;
|
||||
bool perfCountersEnabled = false;
|
||||
cl_uint perfCountersConfig = std::numeric_limits<uint32_t>::max();
|
||||
uint32_t perfCountersUserRegistersNumber = 0;
|
||||
InstrPmRegsCfg *perfConfigurationData = nullptr;
|
||||
uint32_t perfCountersRegsCfgHandle = 0;
|
||||
bool perfCountersRegsCfgPending = false;
|
||||
|
||||
LinearStream *commandStream;
|
||||
LinearStream *commandStream = nullptr;
|
||||
|
||||
bool mapDcFlushRequired = false;
|
||||
bool isSpecialCommandQueue = false;
|
||||
|
@ -12,5 +12,6 @@ bool processExtraTokens(Device *&device, const cl_queue_properties *property) {
|
||||
return false;
|
||||
}
|
||||
|
||||
void CommandQueue::processProperties() {}
|
||||
void CommandQueue::processProperties(const cl_queue_properties *properties) {
|
||||
}
|
||||
} // namespace OCLRT
|
||||
|
Reference in New Issue
Block a user