Skip to content

Commit be34c1a

Browse files
performance: move instead of copy
Related-To: NEO-15630 Signed-off-by: Jakub Nowacki <jakub.nowacki@intel.com>
1 parent f0fed70 commit be34c1a

File tree

7 files changed

+7
-7
lines changed

7 files changed

+7
-7
lines changed

shared/offline_compiler/source/offline_compiler.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1281,7 +1281,7 @@ int OfflineCompiler::parseCommandLine(size_t numArgs, const std::vector<std::str
12811281
if (revisionId == -1 || deviceConfig.aotConfig.revision == static_cast<uint32_t>(revisionId)) {
12821282
std::string ipVersion = ProductConfigHelper::parseMajorMinorRevisionValue(deviceConfig.aotConfig);
12831283
if (!ipVersion.empty()) {
1284-
deviceNamesToCheck.push_back(ipVersion);
1284+
deviceNamesToCheck.push_back(std::move(ipVersion));
12851285
}
12861286
if (revisionId != -1) {
12871287
break;

shared/source/command_stream/host_function_worker_atomic.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ void HostFunctionWorkerAtomic::start() {
2424
std::lock_guard<std::mutex> lg{workerMutex};
2525
if (!worker) {
2626
worker = std::make_unique<std::jthread>([this](std::stop_token st) {
27-
this->workerLoop(st);
27+
this->workerLoop(std::move(st));
2828
});
2929
}
3030
}

shared/source/command_stream/host_function_worker_counting_semaphore.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ void HostFunctionWorkerCountingSemaphore::start() {
2020

2121
if (!worker) {
2222
worker = std::make_unique<std::jthread>([this](std::stop_token st) {
23-
this->workerLoop(st);
23+
this->workerLoop(std::move(st));
2424
});
2525
}
2626
}

shared/source/command_stream/host_function_worker_cv.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ void HostFunctionWorkerCV::start() {
2525
std::lock_guard<std::mutex> lg{workerMutex};
2626
if (!worker) {
2727
worker = std::make_unique<std::jthread>([this](std::stop_token st) {
28-
this->workerLoop(st);
28+
this->workerLoop(std::move(st));
2929
});
3030
}
3131
}

shared/source/device_binary_format/elf/elf_decoder.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ bool Elf<numBits>::decodeRelocations(SectionHeaderAndData<numBits> &sectionHeade
196196

197197
RelocationInfo relocInfo = {symbolSectionIndex, symbolIndex, targetSectionIndex, 0, reloc->offset, relocType, std::move(name)};
198198

199-
relocs.push_back(relocInfo);
199+
relocs.push_back(std::move(relocInfo));
200200
reloc++;
201201
}
202202
}

shared/source/os_interface/linux/ioctl_helper_i915.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -493,7 +493,7 @@ bool IoctlHelperI915::getTopologyDataAndMap(HardwareInfo &hwInfo, DrmQueryTopolo
493493

494494
topologyMap.clear();
495495
if (!mapping.sliceIndices.empty()) {
496-
topologyMap[0] = mapping;
496+
topologyMap[0] = std::move(mapping);
497497
}
498498

499499
return retVal;

shared/source/os_interface/linux/ioctl_helper_prelim.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ bool IoctlHelperPrelim20::getTopologyDataAndMap(HardwareInfo &hwInfo, DrmQueryTo
126126
topologyData.maxSubSlicesPerSlice = std::max(topologyData.maxSubSlicesPerSlice, tileTopologyData.maxSubSlicesPerSlice);
127127
topologyData.maxEusPerSubSlice = std::max(topologyData.maxEusPerSubSlice, static_cast<int>(data->maxEusPerSubslice));
128128

129-
topologyMap[i] = mapping;
129+
topologyMap[i] = std::move(mapping);
130130
}
131131

132132
if (success) {

0 commit comments

Comments
 (0)