mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-03 23:03:02 +08:00
fix: Add asserts to ensure NonCopyable and NonMovable n/n
Related-To: NEO-14068 Signed-off-by: Filip Hazubski <filip.hazubski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
aeff5513c3
commit
b60c02d597
@@ -68,6 +68,7 @@ class Context : public BaseObject<_cl_context> {
|
||||
|
||||
const StackVec<NEO::GraphicsAllocation *, 1> &getAllocationsVector();
|
||||
};
|
||||
static_assert(NEO::NonCopyable<AbstractBuffersPool<BufferPool, Buffer, MemObj>>);
|
||||
|
||||
class BufferPoolAllocator : public AbstractBuffersAllocator<BufferPool, Buffer, MemObj> {
|
||||
using BaseType = AbstractBuffersAllocator<BufferPool, Buffer, MemObj>;
|
||||
|
||||
@@ -78,6 +78,7 @@ class Event : public BaseObject<_cl_event>, public IDNode<Event> {
|
||||
int32_t callbackExecutionStatusTarget; // minimum event execution status that will triger this callback
|
||||
void *userData;
|
||||
};
|
||||
static_assert(NEO::NonCopyableAndNonMovable<IFList<Callback, true, true>>);
|
||||
|
||||
struct ProfilingInfo {
|
||||
uint64_t cpuTimeInNs;
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2020 Intel Corporation
|
||||
* Copyright (C) 2018-2025 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@@ -24,6 +24,7 @@ struct TrackedEvent : IFNode<TrackedEvent> {
|
||||
Event *ev = nullptr;
|
||||
int64_t eventId = 1;
|
||||
};
|
||||
static_assert(NEO::NonCopyableAndNonMovable<IFList<TrackedEvent, true, true>>);
|
||||
|
||||
class EventsTracker {
|
||||
|
||||
|
||||
@@ -31,6 +31,8 @@ namespace NEO {
|
||||
template void KernelOperation::ResourceCleaner::operator()<LinearStream>(LinearStream *);
|
||||
template void KernelOperation::ResourceCleaner::operator()<IndirectHeap>(IndirectHeap *);
|
||||
|
||||
static_assert(NEO::NonCopyableAndNonMovable<DecRefInternalAtScopeEnd<MemObj>>);
|
||||
|
||||
CommandMapUnmap::CommandMapUnmap(MapOperationType operationType, MemObj &memObj, MemObjSizeArray ©Size, MemObjOffsetArray ©Offset, bool readOnly,
|
||||
CommandQueue &commandQueue)
|
||||
: Command(commandQueue), memObj(memObj), copySize(copySize), copyOffset(copyOffset), readOnly(readOnly), operationType(operationType) {
|
||||
|
||||
Reference in New Issue
Block a user