mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-24 21:18:24 +08:00
refactor: add NonCopyableOrMovableClass to classes that don't need copy ctors
Related-To: NEO-9038 Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
038c287656
commit
72182c28e9
@@ -8,6 +8,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "shared/source/device/device.h"
|
||||
#include "shared/source/helpers/non_copyable_or_moveable.h"
|
||||
#include "shared/source/helpers/topology_map.h"
|
||||
#include "shared/source/memory_manager/memadvise_flags.h"
|
||||
#include "shared/source/memory_manager/unified_memory_manager.h"
|
||||
@@ -29,7 +30,7 @@ struct SysmanDevice;
|
||||
struct FabricVertex;
|
||||
class CacheReservation;
|
||||
|
||||
struct DeviceImp : public Device {
|
||||
struct DeviceImp : public Device, NEO::NonCopyableOrMovableClass {
|
||||
DeviceImp();
|
||||
ze_result_t getStatus() override;
|
||||
ze_result_t submitCopyForP2P(ze_device_handle_t hPeerDevice, ze_bool_t *value);
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "shared/source/helpers/non_copyable_or_moveable.h"
|
||||
#include "shared/source/helpers/surface_format_info.h"
|
||||
|
||||
#include "level_zero/core/source/image/image.h"
|
||||
@@ -16,7 +17,7 @@
|
||||
|
||||
namespace L0 {
|
||||
|
||||
struct ImageImp : public Image {
|
||||
struct ImageImp : public Image, NEO::NonCopyableOrMovableClass {
|
||||
ze_result_t destroy() override;
|
||||
ze_result_t destroyPeerImages(const void *ptr, Device *device) override;
|
||||
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/helpers/non_copyable_or_moveable.h"
|
||||
|
||||
#include "level_zero/sysman/source/linux/udev/udev_lib.h"
|
||||
#include "level_zero/sysman/source/os_sysman_driver.h"
|
||||
|
||||
@@ -15,7 +17,7 @@ namespace Sysman {
|
||||
class LinuxEventsUtil;
|
||||
struct SysmanDeviceImp;
|
||||
|
||||
class LinuxSysmanDriverImp : public OsSysmanDriver {
|
||||
class LinuxSysmanDriverImp : public OsSysmanDriver, NEO::NonCopyableOrMovableClass {
|
||||
public:
|
||||
LinuxSysmanDriverImp();
|
||||
~LinuxSysmanDriverImp() override;
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/helpers/non_copyable_or_moveable.h"
|
||||
|
||||
#include "level_zero/tools/source/sysman/linux/udev/udev_lib.h"
|
||||
#include "level_zero/tools/source/sysman/os_sysman_driver.h"
|
||||
|
||||
@@ -14,7 +16,7 @@ namespace L0 {
|
||||
class LinuxEventsUtil;
|
||||
struct SysmanDeviceImp;
|
||||
|
||||
class LinuxSysmanDriverImp : public OsSysmanDriver {
|
||||
class LinuxSysmanDriverImp : public OsSysmanDriver, NEO::NonCopyableOrMovableClass {
|
||||
public:
|
||||
LinuxSysmanDriverImp();
|
||||
~LinuxSysmanDriverImp() override;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,6 +7,8 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "shared/source/helpers/non_copyable_or_moveable.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
@@ -18,7 +20,7 @@ class GraphicsAllocation;
|
||||
class Device;
|
||||
struct MultiDispatchInfo;
|
||||
|
||||
class PrintfHandler {
|
||||
class PrintfHandler : NonCopyableOrMovableClass {
|
||||
public:
|
||||
static PrintfHandler *create(const MultiDispatchInfo &multiDispatchInfo, Device &deviceArg);
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/helpers/constants.h"
|
||||
#include "shared/source/helpers/non_copyable_or_moveable.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <mutex>
|
||||
@@ -26,7 +27,7 @@ static_assert(sizeof(AssertBufferHeader) == 3u * sizeof(uint32_t));
|
||||
|
||||
#pragma pack()
|
||||
|
||||
class AssertHandler {
|
||||
class AssertHandler : NonCopyableOrMovableClass {
|
||||
public:
|
||||
AssertHandler(Device *device);
|
||||
MOCKABLE_VIRTUAL ~AssertHandler();
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/helpers/non_copyable_or_moveable.h"
|
||||
|
||||
#include <cstdint>
|
||||
#include <memory>
|
||||
|
||||
@@ -16,7 +18,7 @@ class GraphicsAllocation;
|
||||
class LinearStream;
|
||||
class MemoryManager;
|
||||
|
||||
class ExperimentalCommandBuffer {
|
||||
class ExperimentalCommandBuffer : NonCopyableOrMovableClass {
|
||||
public:
|
||||
virtual ~ExperimentalCommandBuffer();
|
||||
ExperimentalCommandBuffer(CommandStreamReceiver *csr, double profilingTimerResolution);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
* Copyright (C) 2018-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/helpers/bindless_heaps_helper.h"
|
||||
#include "shared/source/helpers/non_copyable_or_moveable.h"
|
||||
#include "shared/source/indirect_heap/indirect_heap.h"
|
||||
|
||||
#include <cstddef>
|
||||
@@ -28,7 +29,7 @@ inline constexpr size_t scratchSpaceOffsetFor64Bit = 4096u;
|
||||
|
||||
using ResidencyContainer = std::vector<GraphicsAllocation *>;
|
||||
|
||||
class ScratchSpaceController {
|
||||
class ScratchSpaceController : NonCopyableOrMovableClass {
|
||||
public:
|
||||
ScratchSpaceController(uint32_t rootDeviceIndex, ExecutionEnvironment &environment, InternalAllocationStorage &allocationStorage);
|
||||
virtual ~ScratchSpaceController();
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
* Copyright (C) 2020-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/helpers/non_copyable_or_moveable.h"
|
||||
#include "shared/source/utilities/io_functions.h"
|
||||
|
||||
#include <chrono>
|
||||
@@ -27,7 +28,7 @@ struct DirectSubmissionSingleDelta {
|
||||
|
||||
using DirectSubmissionExecution = std::vector<DirectSubmissionSingleDelta>;
|
||||
|
||||
class DirectSubmissionDiagnosticsCollector {
|
||||
class DirectSubmissionDiagnosticsCollector : NonCopyableOrMovableClass {
|
||||
public:
|
||||
DirectSubmissionDiagnosticsCollector(uint32_t executions,
|
||||
bool storeExecutions,
|
||||
|
||||
@@ -7,13 +7,14 @@
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/gmm_helper/gmm_lib.h"
|
||||
#include "shared/source/helpers/non_copyable_or_moveable.h"
|
||||
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
namespace NEO {
|
||||
class GmmClientContext;
|
||||
class GmmResourceInfo {
|
||||
class GmmResourceInfo : NonCopyableOrMovableClass {
|
||||
public:
|
||||
static GmmResourceInfo *create(GmmClientContext *clientContext, GMM_RESCREATE_PARAMS *resourceCreateParams);
|
||||
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/helpers/non_copyable_or_moveable.h"
|
||||
#include "shared/source/os_interface/os_library.h"
|
||||
|
||||
#define UMDF_USING_NTSTATUS
|
||||
@@ -14,7 +15,7 @@
|
||||
namespace NEO {
|
||||
namespace Windows {
|
||||
|
||||
class OsLibrary : public NEO::OsLibrary {
|
||||
class OsLibrary : public NEO::OsLibrary, NEO::NonCopyableOrMovableClass {
|
||||
private:
|
||||
HMODULE handle;
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/helpers/debug_helpers.h"
|
||||
#include "shared/source/helpers/non_copyable_or_moveable.h"
|
||||
#include "shared/source/os_interface/windows/windows_wrapper.h"
|
||||
#include "shared/source/utilities/io_functions.h"
|
||||
|
||||
@@ -22,7 +23,7 @@ constexpr bool wddmResidencyLoggingAvailable = true;
|
||||
constexpr bool wddmResidencyLoggingAvailable = false;
|
||||
#endif
|
||||
|
||||
class WddmResidencyLogger {
|
||||
class WddmResidencyLogger : NonCopyableOrMovableClass {
|
||||
public:
|
||||
WddmResidencyLogger(unsigned int device, void *fenceValueCpuVirtualAddress, std::string outDirectory) {
|
||||
const char *wddmResidencyLoggerDefaultDirectory = "unk";
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2022 Intel Corporation
|
||||
* Copyright (C) 2019-2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -8,6 +8,7 @@
|
||||
#pragma once
|
||||
|
||||
#include "shared/source/helpers/constants.h"
|
||||
#include "shared/source/helpers/non_copyable_or_moveable.h"
|
||||
|
||||
#include <mutex>
|
||||
|
||||
@@ -18,7 +19,7 @@ class Device;
|
||||
class GraphicsAllocation;
|
||||
class MemoryManager;
|
||||
|
||||
class SyncBufferHandler {
|
||||
class SyncBufferHandler : NonCopyableOrMovableClass {
|
||||
public:
|
||||
~SyncBufferHandler();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user