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:
Andrzej Swierczynski
2020-03-17 12:37:38 +01:00
committed by sys_ocldev
parent ef64990016
commit 3b4276c8f7
22 changed files with 156 additions and 81 deletions

View 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})

View File

@ -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

View File

@ -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