P4 to Git Change 1620765 by skudchad@skudchad_test2_win_opencl on 2018/10/17 16:58:04

SWDEV-145570 - [HIP] Track last used event and use last enqueued command in a stream rather than creating a new event

	ReviewBoardURL = http://ocltc.amd.com/reviews/r/15996/diff/

Affected files ...

... //depot/stg/opencl/drivers/opencl/api/hip/hip_context.cpp#15 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_event.cpp#7 edit
... //depot/stg/opencl/drivers/opencl/api/hip/hip_stream.cpp#14 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/command.cpp#90 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/commandqueue.cpp#28 edit
... //depot/stg/opencl/drivers/opencl/runtime/platform/commandqueue.hpp#20 edit


[ROCm/clr commit: 19caea543c]
This commit is contained in:
foreman
2018-10-18 13:41:32 -04:00
parent 0b565d02f2
commit 8f7e75cd2c
3 changed files with 34 additions and 2 deletions
@@ -163,6 +163,8 @@ class HostQueue : public CommandQueue {
private:
ConcurrentLinkedQueue<Command*> queue_; //!< The queue.
Command* lastEnqueueCommand_; //!< The last submitted command
//! Await commands and execute them as they become ready.
void loop(device::VirtualDevice* virtualDevice);
@@ -204,6 +206,12 @@ class HostQueue : public CommandQueue {
//! Return the current queue as the HostQueue
virtual HostQueue* asHostQueue() { return this; }
//! Get last enqueued command
Command* getLastQueuedCommand(bool retain);
//! Set last enqueued command
void setLastQueuedCommand(Command* lastCommand);
};