mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Improve files of SipKernel class
This change: - removes redundant copying of std::vector - removes unneeded includes from the header file and introduces usage of forward declaration Signed-off-by: Patryk Wrobel <patryk.wrobel@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
4809a2a9b3
commit
de3e5d4d69
@ -14,6 +14,7 @@
|
||||
#include "shared/source/helpers/aligned_memory.h"
|
||||
#include "shared/source/helpers/debug_helpers.h"
|
||||
#include "shared/source/helpers/hw_helper.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/helpers/ptr_math.h"
|
||||
#include "shared/source/helpers/string.h"
|
||||
#include "shared/source/memory_manager/allocation_properties.h"
|
||||
@ -59,7 +60,7 @@ std::vector<char> readFile(const std::string &fileName, size_t &retSize) {
|
||||
|
||||
SipKernel::~SipKernel() = default;
|
||||
|
||||
SipKernel::SipKernel(SipKernelType type, GraphicsAllocation *sipAlloc, std::vector<char> ssah) : stateSaveAreaHeader(ssah), sipAllocation(sipAlloc), type(type) {
|
||||
SipKernel::SipKernel(SipKernelType type, GraphicsAllocation *sipAlloc, std::vector<char> ssah) : stateSaveAreaHeader(std::move(ssah)), sipAllocation(sipAlloc), type(type) {
|
||||
}
|
||||
|
||||
GraphicsAllocation *SipKernel::getSipAllocation() const {
|
||||
@ -74,7 +75,7 @@ size_t SipKernel::getStateSaveAreaSize(Device *device) const {
|
||||
auto &hwInfo = device->getHardwareInfo();
|
||||
auto &hwHelper = HwHelper::get(hwInfo.platform.eRenderCoreFamily);
|
||||
auto maxDbgSurfaceSize = hwHelper.getSipKernelMaxDbgSurfaceSize(hwInfo);
|
||||
auto stateSaveAreaHeader = getStateSaveAreaHeader();
|
||||
const auto &stateSaveAreaHeader = getStateSaveAreaHeader();
|
||||
if (stateSaveAreaHeader.empty()) {
|
||||
return maxDbgSurfaceSize;
|
||||
}
|
||||
|
@ -6,17 +6,21 @@
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/built_ins/sip_kernel_type.h"
|
||||
#include "shared/source/helpers/hw_info.h"
|
||||
#include "shared/source/program/program_info.h"
|
||||
|
||||
#include "shared/source/built_ins/sip_kernel_type.h"
|
||||
|
||||
#include <cstddef>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
namespace NEO {
|
||||
|
||||
class Device;
|
||||
class GraphicsAllocation;
|
||||
class MemoryManager;
|
||||
|
||||
struct HardwareInfo;
|
||||
struct RootDeviceEnvironment;
|
||||
|
||||
class SipKernel {
|
||||
@ -68,4 +72,5 @@ class SipKernel {
|
||||
GraphicsAllocation *sipAllocation = nullptr;
|
||||
SipKernelType type = SipKernelType::COUNT;
|
||||
};
|
||||
|
||||
} // namespace NEO
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2018-2021 Intel Corporation
|
||||
* Copyright (C) 2018-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@ -7,6 +7,7 @@
|
||||
|
||||
#pragma once
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
#include "shared/source/helpers/debug_helpers.h"
|
||||
#include "shared/source/helpers/validators.h"
|
||||
#include "shared/source/os_interface/os_library.h"
|
||||
|
||||
|
Reference in New Issue
Block a user