diff --git a/level_zero/tools/test/unit_tests/sources/debug/linux/prelim/debug_session_fixtures_linux.h b/level_zero/tools/test/unit_tests/sources/debug/linux/prelim/debug_session_fixtures_linux.h index 34cc86ab1c..ab4f9fc4a3 100644 --- a/level_zero/tools/test/unit_tests/sources/debug/linux/prelim/debug_session_fixtures_linux.h +++ b/level_zero/tools/test/unit_tests/sources/debug/linux/prelim/debug_session_fixtures_linux.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2022-2024 Intel Corporation + * Copyright (C) 2022-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -107,7 +107,7 @@ struct MockIoctlHandlerI915 : public L0::ult::MockIoctlHandler { EuControlArg() : euControlBitmask(nullptr) { memset(&euControl, 0, sizeof(euControl)); } - EuControlArg(EuControlArg &&in) : euControl(in.euControl), euControlBitmask(std::move(in.euControlBitmask)), euControlBitmaskSize(in.euControlBitmaskSize){}; + EuControlArg(EuControlArg &&in) noexcept : euControl(in.euControl), euControlBitmask(std::move(in.euControlBitmask)), euControlBitmaskSize(in.euControlBitmaskSize){}; prelim_drm_i915_debug_eu_control euControl = {}; std::unique_ptr euControlBitmask; size_t euControlBitmaskSize = 0; diff --git a/level_zero/tools/test/unit_tests/sources/debug/linux/xe/debug_session_fixtures_linux_xe.h b/level_zero/tools/test/unit_tests/sources/debug/linux/xe/debug_session_fixtures_linux_xe.h index 5dec9f7310..f3c5e4bd18 100644 --- a/level_zero/tools/test/unit_tests/sources/debug/linux/xe/debug_session_fixtures_linux_xe.h +++ b/level_zero/tools/test/unit_tests/sources/debug/linux/xe/debug_session_fixtures_linux_xe.h @@ -133,7 +133,7 @@ struct MockIoctlHandlerXe : public L0::ult::MockIoctlHandler { EuControlArg() : euControlBitmask(nullptr) { memset(&euControl, 0, sizeof(euControl)); } - EuControlArg(EuControlArg &&in) : euControl(in.euControl), euControlBitmask(std::move(in.euControlBitmask)), euControlBitmaskSize(in.euControlBitmaskSize){}; + EuControlArg(EuControlArg &&in) noexcept : euControl(in.euControl), euControlBitmask(std::move(in.euControlBitmask)), euControlBitmaskSize(in.euControlBitmaskSize){}; NEO::EuDebugEuControl euControl = {}; std::unique_ptr euControlBitmask; size_t euControlBitmaskSize = 0; diff --git a/shared/source/device/device.h b/shared/source/device/device.h index 26ab5001c7..55913cb512 100644 --- a/shared/source/device/device.h +++ b/shared/source/device/device.h @@ -61,7 +61,7 @@ using CsrContainer = std::vector>; struct SecondaryContexts : NEO::NonCopyableAndNonMovableClass { SecondaryContexts() = default; - SecondaryContexts(SecondaryContexts &&in) { + SecondaryContexts(SecondaryContexts &&in) noexcept { this->engines = std::move(in.engines); this->regularCounter = in.regularCounter.load(); this->highPriorityCounter = in.highPriorityCounter.load(); diff --git a/shared/source/direct_submission/direct_submission_controller.h b/shared/source/direct_submission/direct_submission_controller.h index c10cbdd173..0015307c74 100644 --- a/shared/source/direct_submission/direct_submission_controller.h +++ b/shared/source/direct_submission/direct_submission_controller.h @@ -61,7 +61,7 @@ class DirectSubmissionController { protected: struct DirectSubmissionState { - DirectSubmissionState(DirectSubmissionState &&other) { + DirectSubmissionState(DirectSubmissionState &&other) noexcept { isStopped = other.isStopped.load(); taskCount = other.taskCount.load(); } diff --git a/shared/source/memory_manager/multi_graphics_allocation.cpp b/shared/source/memory_manager/multi_graphics_allocation.cpp index 47bd916e1a..b197efe4d3 100644 --- a/shared/source/memory_manager/multi_graphics_allocation.cpp +++ b/shared/source/memory_manager/multi_graphics_allocation.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2023 Intel Corporation + * Copyright (C) 2020-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -27,7 +27,7 @@ MultiGraphicsAllocation::MultiGraphicsAllocation(const MultiGraphicsAllocation & migrationSyncData->incRefInternal(); } } -MultiGraphicsAllocation::MultiGraphicsAllocation(MultiGraphicsAllocation &&multiGraphicsAllocation) { +MultiGraphicsAllocation::MultiGraphicsAllocation(MultiGraphicsAllocation &&multiGraphicsAllocation) noexcept { this->graphicsAllocations = std::move(multiGraphicsAllocation.graphicsAllocations); std::swap(this->migrationSyncData, multiGraphicsAllocation.migrationSyncData); this->isMultiStorage = multiGraphicsAllocation.isMultiStorage; diff --git a/shared/source/memory_manager/multi_graphics_allocation.h b/shared/source/memory_manager/multi_graphics_allocation.h index 21c9a3f9e8..4529621f3d 100644 --- a/shared/source/memory_manager/multi_graphics_allocation.h +++ b/shared/source/memory_manager/multi_graphics_allocation.h @@ -1,5 +1,5 @@ /* - * Copyright (C) 2020-2023 Intel Corporation + * Copyright (C) 2020-2025 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -21,7 +21,7 @@ class MultiGraphicsAllocation { public: MultiGraphicsAllocation(uint32_t maxRootDeviceIndex); MultiGraphicsAllocation(const MultiGraphicsAllocation &multiGraphicsAllocation); - MultiGraphicsAllocation(MultiGraphicsAllocation &&); + MultiGraphicsAllocation(MultiGraphicsAllocation &&) noexcept; MultiGraphicsAllocation &operator=(const MultiGraphicsAllocation &) = delete; MultiGraphicsAllocation &operator=(MultiGraphicsAllocation &&) = delete; ~MultiGraphicsAllocation(); diff --git a/shared/source/utilities/buffer_pool_allocator.h b/shared/source/utilities/buffer_pool_allocator.h index 5d857f1380..8168c1dd1b 100644 --- a/shared/source/utilities/buffer_pool_allocator.h +++ b/shared/source/utilities/buffer_pool_allocator.h @@ -60,7 +60,7 @@ struct AbstractBuffersPool : public NonCopyableClass { AbstractBuffersPool(MemoryManager *memoryManager, OnChunkFreeCallback onChunkFreeCallback); AbstractBuffersPool(MemoryManager *memoryManager, OnChunkFreeCallback onChunkFreeCallback, const SmallBuffersParams ¶ms); - AbstractBuffersPool(AbstractBuffersPool &&bufferPool); + AbstractBuffersPool(AbstractBuffersPool &&bufferPool) noexcept; AbstractBuffersPool &operator=(AbstractBuffersPool &&other) noexcept = delete; virtual ~AbstractBuffersPool() = default; diff --git a/shared/source/utilities/buffer_pool_allocator.inl b/shared/source/utilities/buffer_pool_allocator.inl index 2d922edaa1..9a06f1c37e 100644 --- a/shared/source/utilities/buffer_pool_allocator.inl +++ b/shared/source/utilities/buffer_pool_allocator.inl @@ -29,7 +29,7 @@ AbstractBuffersPool::AbstractBuffersPool(Me } template -AbstractBuffersPool::AbstractBuffersPool(AbstractBuffersPool &&bufferPool) +AbstractBuffersPool::AbstractBuffersPool(AbstractBuffersPool &&bufferPool) noexcept : memoryManager{bufferPool.memoryManager}, mainStorage{std::move(bufferPool.mainStorage)}, chunkAllocator{std::move(bufferPool.chunkAllocator)}, diff --git a/shared/source/utilities/isa_pool_allocator.cpp b/shared/source/utilities/isa_pool_allocator.cpp index af42e02890..bd9f16b4a1 100644 --- a/shared/source/utilities/isa_pool_allocator.cpp +++ b/shared/source/utilities/isa_pool_allocator.cpp @@ -32,7 +32,7 @@ ISAPool::ISAPool(Device *device, bool isBuiltin, size_t storageSize) this->stackVec.push_back(graphicsAllocation); } -ISAPool::ISAPool(ISAPool &&pool) : BaseType(std::move(pool)) { +ISAPool::ISAPool(ISAPool &&pool) noexcept : BaseType(std::move(pool)) { this->isBuiltin = pool.isBuiltin; mtx.reset(pool.mtx.release()); this->stackVec = std::move(pool.stackVec); diff --git a/shared/source/utilities/isa_pool_allocator.h b/shared/source/utilities/isa_pool_allocator.h index 10fb90e6db..6c2eefecc0 100644 --- a/shared/source/utilities/isa_pool_allocator.h +++ b/shared/source/utilities/isa_pool_allocator.h @@ -25,7 +25,7 @@ class ISAPool : public AbstractBuffersPool { using BaseType = AbstractBuffersPool; public: - ISAPool(ISAPool &&pool); + ISAPool(ISAPool &&pool) noexcept; ISAPool &operator=(ISAPool &&other) = delete; ISAPool(Device *device, bool isBuiltin, size_t storageSize); ~ISAPool() override; diff --git a/shared/source/utilities/stackvec.h b/shared/source/utilities/stackvec.h index 55e394e696..ed1803330b 100644 --- a/shared/source/utilities/stackvec.h +++ b/shared/source/utilities/stackvec.h @@ -108,7 +108,7 @@ class StackVec { // NOLINT(clang-analyzer-optin.performance.Padding) return *this; } - StackVec(StackVec &&rhs) { + StackVec(StackVec &&rhs) noexcept { onStackMem = reinterpret_cast(onStackMemRawBytes); if (rhs.usesDynamicMem()) { this->dynamicMem = rhs.dynamicMem; @@ -122,7 +122,7 @@ class StackVec { // NOLINT(clang-analyzer-optin.performance.Padding) rhs.clear(); } - StackVec &operator=(StackVec &&rhs) { + StackVec &operator=(StackVec &&rhs) noexcept { if (this == &rhs) { return *this; } diff --git a/shared/source/utilities/staging_buffer_manager.cpp b/shared/source/utilities/staging_buffer_manager.cpp index 193a3408e9..746c83ffc6 100644 --- a/shared/source/utilities/staging_buffer_manager.cpp +++ b/shared/source/utilities/staging_buffer_manager.cpp @@ -24,7 +24,7 @@ StagingBuffer::StagingBuffer(void *baseAddress, size_t size) : baseAddress(baseA this->allocator = std::make_unique(castToUint64(baseAddress), size, MemoryConstants::pageSize, 0u); } -StagingBuffer::StagingBuffer(StagingBuffer &&other) : baseAddress(other.baseAddress) { +StagingBuffer::StagingBuffer(StagingBuffer &&other) noexcept : baseAddress(other.baseAddress) { this->allocator.reset(other.allocator.release()); } diff --git a/shared/source/utilities/staging_buffer_manager.h b/shared/source/utilities/staging_buffer_manager.h index 8cde1a9c9f..3079c1d43a 100644 --- a/shared/source/utilities/staging_buffer_manager.h +++ b/shared/source/utilities/staging_buffer_manager.h @@ -31,7 +31,7 @@ using ChunkTransferBufferFunc = std::function; class StagingBuffer : NEO::NonCopyableClass { public: StagingBuffer(void *baseAddress, size_t size); - StagingBuffer(StagingBuffer &&other); + StagingBuffer(StagingBuffer &&other) noexcept; StagingBuffer &operator=(StagingBuffer &&other) noexcept = delete; void *getBaseAddress() const { diff --git a/shared/source/utilities/timestamp_pool_allocator.cpp b/shared/source/utilities/timestamp_pool_allocator.cpp index 6036373926..656731493f 100644 --- a/shared/source/utilities/timestamp_pool_allocator.cpp +++ b/shared/source/utilities/timestamp_pool_allocator.cpp @@ -31,7 +31,7 @@ TimestampPool::TimestampPool(Device *device, size_t poolSize) this->mtx = std::make_unique(); } -TimestampPool::TimestampPool(TimestampPool &&pool) : BaseType(std::move(pool)) { +TimestampPool::TimestampPool(TimestampPool &&pool) noexcept : BaseType(std::move(pool)) { mtx.reset(pool.mtx.release()); this->stackVec = std::move(pool.stackVec); this->device = pool.device; diff --git a/shared/source/utilities/timestamp_pool_allocator.h b/shared/source/utilities/timestamp_pool_allocator.h index 4e56234cca..aaedaf9ad5 100644 --- a/shared/source/utilities/timestamp_pool_allocator.h +++ b/shared/source/utilities/timestamp_pool_allocator.h @@ -30,7 +30,7 @@ class TimestampPool : public AbstractBuffersPooldata = new int[100]; } - Element(Element &&rhs) { + Element(Element &&rhs) noexcept { this->v = rhs.v; this->data = rhs.data; rhs.data = nullptr; @@ -1423,7 +1423,7 @@ TEST(StackVec, WhenResizingThenElementsAreCorrectlyManaged) { return *this; } - Element &operator=(Element &&rhs) { + Element &operator=(Element &&rhs) noexcept { this->v = rhs.v; delete[] this->data; this->data = rhs.data;