mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00
Move AsyncEventsHandler to ClExecutionEnvironment
Related-To: NEO-4207 Change-Id: If859f995aae57ac03de13d57cc5a38c97303bbb4 Signed-off-by: Andrzej Swierczynski <andrzej.swierczynski@intel.com>
This commit is contained in:

committed by
sys_ocldev

parent
ef64990016
commit
3b4276c8f7
13
opencl/source/execution_environment/CMakeLists.txt
Normal file
13
opencl/source/execution_environment/CMakeLists.txt
Normal file
@ -0,0 +1,13 @@
|
||||
#
|
||||
# Copyright (C) 2020 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
|
||||
set(RUNTIME_SRCS_EXECUTION_ENVIRONMENT
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/CMakeLists.txt
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cl_execution_environment.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/cl_execution_environment.cpp
|
||||
)
|
||||
|
||||
target_sources(${NEO_STATIC_LIB_NAME} PRIVATE ${RUNTIME_SRCS_EXECUTION_ENVIRONMENT})
|
@ -0,0 +1,25 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "opencl/source/execution_environment/cl_execution_environment.h"
|
||||
|
||||
#include "opencl/source/event/async_events_handler.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
ClExecutionEnvironment::ClExecutionEnvironment() : ExecutionEnvironment() {
|
||||
asyncEventsHandler.reset(new AsyncEventsHandler());
|
||||
}
|
||||
|
||||
AsyncEventsHandler *ClExecutionEnvironment::getAsyncEventsHandler() const {
|
||||
return asyncEventsHandler.get();
|
||||
}
|
||||
|
||||
ClExecutionEnvironment::~ClExecutionEnvironment() {
|
||||
asyncEventsHandler->closeThread();
|
||||
};
|
||||
} // namespace NEO
|
@ -0,0 +1,23 @@
|
||||
/*
|
||||
* Copyright (C) 2020 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/execution_environment/execution_environment.h"
|
||||
|
||||
namespace NEO {
|
||||
|
||||
class AsyncEventsHandler;
|
||||
|
||||
class ClExecutionEnvironment : public ExecutionEnvironment {
|
||||
public:
|
||||
ClExecutionEnvironment();
|
||||
AsyncEventsHandler *getAsyncEventsHandler() const;
|
||||
~ClExecutionEnvironment() override;
|
||||
|
||||
protected:
|
||||
std::unique_ptr<AsyncEventsHandler> asyncEventsHandler;
|
||||
};
|
||||
} // namespace NEO
|
Reference in New Issue
Block a user