From a65d4da88b9cf486eec41460d55c5bed20502c7f Mon Sep 17 00:00:00 2001 From: "Chodor, Jaroslaw" Date: Mon, 3 Feb 2025 18:02:37 +0000 Subject: [PATCH] refactor: prevent copy/move on KernelDesc and ZebinExecEnv Signed-off-by: Chodor, Jaroslaw --- shared/source/device_binary_format/zebin/zeinfo.h | 3 ++- shared/source/kernel/kernel_descriptor.h | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/shared/source/device_binary_format/zebin/zeinfo.h b/shared/source/device_binary_format/zebin/zeinfo.h index d81a6a6947..ca964c100f 100644 --- a/shared/source/device_binary_format/zebin/zeinfo.h +++ b/shared/source/device_binary_format/zebin/zeinfo.h @@ -8,6 +8,7 @@ #pragma once #include "shared/source/device_binary_format/yaml/yaml_parser.h" +#include "shared/source/helpers/non_copyable_or_moveable.h" #include "shared/source/utilities/const_stringref.h" #include @@ -398,7 +399,7 @@ struct ExecutionEnvExt; ExecutionEnvExt *allocateExecEnvExt(); void freeExecEnvExt(ExecutionEnvExt *); -struct ExecutionEnvBaseT final { +struct ExecutionEnvBaseT final : NEO::NonCopyableOrMovableClass { ExecutionEnvBaseT() { execEnvExt = allocateExecEnvExt(); } diff --git a/shared/source/kernel/kernel_descriptor.h b/shared/source/kernel/kernel_descriptor.h index 6af6f03c5a..41019e59fb 100644 --- a/shared/source/kernel/kernel_descriptor.h +++ b/shared/source/kernel/kernel_descriptor.h @@ -10,6 +10,7 @@ #include "shared/source/command_stream/thread_arbitration_policy.h" #include "shared/source/device_binary_format/device_binary_formats.h" #include "shared/source/helpers/definitions/command_encoder_args.h" +#include "shared/source/helpers/non_copyable_or_moveable.h" #include "shared/source/kernel/debug_data.h" #include "shared/source/kernel/grf_config.h" #include "shared/source/kernel/kernel_arg_descriptor.h" @@ -32,7 +33,7 @@ struct KernelDescriptorExt; KernelDescriptorExt *allocateKernelDescriptorExt(); void freeKernelDescriptorExt(KernelDescriptorExt *); -struct KernelDescriptor { +struct KernelDescriptor : NEO::NonCopyableOrMovableClass { static bool isBindlessAddressingKernel(const KernelDescriptor &desc); enum AddressingMode : uint8_t {