mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
refactor: move builtinOpsBuilders from ClExecutionEnvironment to ClDevice
Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
48c11c24ff
commit
5abdcc045e
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
* Copyright (C) 2020-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,7 +7,6 @@
|
||||
|
||||
#include "opencl/source/execution_environment/cl_execution_environment.h"
|
||||
|
||||
#include "opencl/source/built_ins/builtins_dispatch_builder.h"
|
||||
#include "opencl/source/event/async_events_handler.h"
|
||||
|
||||
namespace NEO {
|
||||
@@ -25,9 +24,5 @@ ClExecutionEnvironment::~ClExecutionEnvironment() {
|
||||
};
|
||||
void ClExecutionEnvironment::prepareRootDeviceEnvironments(uint32_t numRootDevices) {
|
||||
ExecutionEnvironment::prepareRootDeviceEnvironments(numRootDevices);
|
||||
builtinOpsBuilders.resize(numRootDevices);
|
||||
for (auto i = 0u; i < numRootDevices; i++) {
|
||||
builtinOpsBuilders[i] = std::make_unique<BuilderT[]>(EBuiltInOps::count);
|
||||
}
|
||||
}
|
||||
} // namespace NEO
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
* Copyright (C) 2020-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -23,11 +23,8 @@ class ClExecutionEnvironment : public ExecutionEnvironment {
|
||||
AsyncEventsHandler *getAsyncEventsHandler() const;
|
||||
~ClExecutionEnvironment() override;
|
||||
void prepareRootDeviceEnvironments(uint32_t numRootDevices) override;
|
||||
using BuilderT = std::pair<std::unique_ptr<BuiltinDispatchInfoBuilder>, std::once_flag>;
|
||||
BuilderT *peekBuilders(uint32_t rootDeviceIndex) { return builtinOpsBuilders[rootDeviceIndex].get(); }
|
||||
|
||||
protected:
|
||||
std::vector<std::unique_ptr<BuilderT[]>> builtinOpsBuilders;
|
||||
std::unique_ptr<AsyncEventsHandler> asyncEventsHandler;
|
||||
};
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user