diff --git a/shared/source/helpers/debug_helpers.cpp b/shared/source/helpers/debug_helpers.cpp index 69fa2f35b5..938193ba15 100644 --- a/shared/source/helpers/debug_helpers.cpp +++ b/shared/source/helpers/debug_helpers.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -8,8 +8,9 @@ #include "shared/source/helpers/debug_helpers.h" #include "shared/source/debug_settings/debug_settings_manager.h" +#include "shared/source/helpers/abort.h" -#include +#include #include namespace NEO { diff --git a/shared/source/helpers/debug_helpers.h b/shared/source/helpers/debug_helpers.h index 037deaf7c4..ccc65fa709 100644 --- a/shared/source/helpers/debug_helpers.h +++ b/shared/source/helpers/debug_helpers.h @@ -1,12 +1,11 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * */ #pragma once -#include "shared/source/helpers/abort.h" #include "shared/source/helpers/preprocessor.h" #define UNRECOVERABLE_IF(expression) \ diff --git a/shared/source/memory_manager/host_ptr_manager.cpp b/shared/source/memory_manager/host_ptr_manager.cpp index 8815f401a0..659d707617 100644 --- a/shared/source/memory_manager/host_ptr_manager.cpp +++ b/shared/source/memory_manager/host_ptr_manager.cpp @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018-2021 Intel Corporation + * Copyright (C) 2018-2022 Intel Corporation * * SPDX-License-Identifier: MIT * @@ -7,6 +7,7 @@ #include "shared/source/memory_manager/host_ptr_manager.h" +#include "shared/source/helpers/abort.h" #include "shared/source/memory_manager/memory_manager.h" using namespace NEO; @@ -110,7 +111,7 @@ OsHandleStorage HostPtrManager::populateAlreadyAllocatedFragments(AllocationRequ handleStorage.fragmentStorageData[i].cpuPtr = requirements.allocationFragments[i].allocationPtr; handleStorage.fragmentStorageData[i].fragmentSize = requirements.allocationFragments[i].allocationSize; } else { - //abort whole application instead of silently passing. + // abort whole application instead of silently passing. abortExecution(); return handleStorage; } @@ -178,7 +179,7 @@ FragmentStorage *HostPtrManager::getFragment(HostPtrEntryKey key) { return nullptr; } -//for given inputs see if any allocation overlaps +// for given inputs see if any allocation overlaps FragmentStorage *HostPtrManager::getFragmentAndCheckForOverlaps(uint32_t rootDeviceIndex, const void *inPtr, size_t size, OverlapStatus &overlappingStatus) { std::lock_guard lock(allocationsMutex); void *inputPtr = const_cast(inPtr); @@ -212,7 +213,7 @@ FragmentStorage *HostPtrManager::getFragmentAndCheckForOverlaps(uint32_t rootDev return nullptr; } } - //next fragment doesn't have to be after the inputPtr + // next fragment doesn't have to be after the inputPtr if (nextElement != partialAllocations.end()) { if (nextElement->first.rootDeviceIndex != rootDeviceIndex) { return nullptr; @@ -220,7 +221,7 @@ FragmentStorage *HostPtrManager::getFragmentAndCheckForOverlaps(uint32_t rootDev auto &storedNextElement = nextElement->second; auto storedNextEndAddress = (uintptr_t)storedNextElement.fragmentCpuPointer + storedNextElement.fragmentSize; auto storedNextStartAddress = (uintptr_t)storedNextElement.fragmentCpuPointer; - //check if this allocation is after the inputPtr + // check if this allocation is after the inputPtr if ((uintptr_t)inputPtr < storedNextStartAddress) { if (inputEndAddress > storedNextStartAddress) { overlappingStatus = OverlapStatus::FRAGMENT_OVERLAPING_AND_BIGGER_THEN_STORED_FRAGMENT;