mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-27 07:44:16 +08:00
fix: Add asserts to ensure NonCopyable and NonMovable 1/n
Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
72a5e52385
commit
6b2b42972a
@@ -74,9 +74,6 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
|
||||
|
||||
CommandQueue(Context *context, ClDevice *device, const cl_queue_properties *properties, bool internalUsage);
|
||||
|
||||
CommandQueue &operator=(const CommandQueue &) = delete;
|
||||
CommandQueue(const CommandQueue &) = delete;
|
||||
|
||||
~CommandQueue() override;
|
||||
|
||||
// API entry points
|
||||
@@ -513,6 +510,8 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
|
||||
bool isForceStateless = false;
|
||||
};
|
||||
|
||||
static_assert(NEO::NonCopyableAndNonMovable<CommandQueue>);
|
||||
|
||||
template <typename PtrType>
|
||||
PtrType CommandQueue::convertAddressWithOffsetToGpuVa(PtrType ptr, InternalMemoryType memoryType, GraphicsAllocation &allocation) {
|
||||
// If this is device or shared USM pointer, it is already a gpuVA and we don't have to do anything.
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
/*
|
||||
* Copyright (C) 2019-2024 Intel Corporation
|
||||
* Copyright (C) 2019-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/helpers/non_copyable_or_moveable.h"
|
||||
#include "shared/source/utilities/stackvec.h"
|
||||
|
||||
#include "opencl/extensions/public/cl_ext_private.h"
|
||||
@@ -13,16 +14,15 @@
|
||||
|
||||
namespace NEO {
|
||||
class CommandQueue;
|
||||
class BarrierCommand {
|
||||
class BarrierCommand : NEO::NonCopyableAndNonMovableClass {
|
||||
public:
|
||||
BarrierCommand(CommandQueue *commandQueue, const cl_resource_barrier_descriptor_intel *descriptors, uint32_t numDescriptors);
|
||||
~BarrierCommand() {}
|
||||
BarrierCommand(BarrierCommand &&other) noexcept = delete;
|
||||
BarrierCommand(const BarrierCommand &other) = delete;
|
||||
BarrierCommand &operator=(BarrierCommand &&other) noexcept = delete;
|
||||
BarrierCommand &operator=(const BarrierCommand &other) = delete;
|
||||
uint32_t numSurfaces = 0;
|
||||
StackVec<ResourceSurface, 32> surfaces;
|
||||
StackVec<Surface *, 32> surfacePtrs;
|
||||
};
|
||||
|
||||
static_assert(NEO::NonCopyableAndNonMovable<BarrierCommand>);
|
||||
|
||||
} // namespace NEO
|
||||
|
||||
Reference in New Issue
Block a user