mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-06 02:18:05 +08:00
fix: use const auto& to avoid unnecessary copies
Signed-off-by: Fabian Zwoliński <fabian.zwolinski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
dfd926a9c6
commit
8cf8fe4f5a
@@ -464,7 +464,7 @@ int OfflineCompiler::queryAcronymIds(size_t numArgs, const std::vector<std::stri
|
||||
}
|
||||
|
||||
int OfflineCompiler::querySupportedDevices(Ocloc::SupportedDevicesMode mode, OclocArgHelper *helper) {
|
||||
auto enabledDevices = helper->productConfigHelper->getDeviceAotInfo();
|
||||
const auto &enabledDevices = helper->productConfigHelper->getDeviceAotInfo();
|
||||
|
||||
Ocloc::SupportedDevicesHelper supportedDevicesHelper(mode, helper->productConfigHelper.get());
|
||||
auto supportedDevicesData = supportedDevicesHelper.collectSupportedDevicesData(enabledDevices);
|
||||
|
||||
@@ -1117,7 +1117,7 @@ void IoctlHelperPrelim20::setupIpVersion() {
|
||||
bool IoctlHelperPrelim20::registerResourceClasses() {
|
||||
for (auto &classNameUUID : classNamesToUuid) {
|
||||
auto className = classNameUUID.first;
|
||||
auto uuid = classNameUUID.second;
|
||||
const auto &uuid = classNameUUID.second;
|
||||
|
||||
const auto result = registerStringClassUuid(uuid, (uintptr_t)className, strnlen_s(className, 100));
|
||||
if (result.retVal != 0) {
|
||||
|
||||
@@ -68,7 +68,7 @@ bool KernelInfo::createKernelAllocation(const Device &device, bool internalIsa)
|
||||
|
||||
if (device.getMemoryManager()->isKernelBinaryReuseEnabled()) {
|
||||
auto lock = device.getMemoryManager()->lockKernelAllocationMap();
|
||||
auto kernelName = this->kernelDescriptor.kernelMetadata.kernelName;
|
||||
const auto &kernelName = this->kernelDescriptor.kernelMetadata.kernelName;
|
||||
auto &storedAllocations = device.getMemoryManager()->getKernelAllocationMap();
|
||||
auto kernelAllocations = storedAllocations.find(kernelName);
|
||||
if (kernelAllocations != storedAllocations.end()) {
|
||||
|
||||
Reference in New Issue
Block a user