mirror of
https://github.com/intel/compute-runtime.git
synced 2025-12-19 06:24:51 +08:00
performance: move instead of copy
Related-To: NEO-15630 Signed-off-by: Jakub Nowacki <jakub.nowacki@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
f0fed704a3
commit
be34c1ac86
@@ -1281,7 +1281,7 @@ int OfflineCompiler::parseCommandLine(size_t numArgs, const std::vector<std::str
|
||||
if (revisionId == -1 || deviceConfig.aotConfig.revision == static_cast<uint32_t>(revisionId)) {
|
||||
std::string ipVersion = ProductConfigHelper::parseMajorMinorRevisionValue(deviceConfig.aotConfig);
|
||||
if (!ipVersion.empty()) {
|
||||
deviceNamesToCheck.push_back(ipVersion);
|
||||
deviceNamesToCheck.push_back(std::move(ipVersion));
|
||||
}
|
||||
if (revisionId != -1) {
|
||||
break;
|
||||
|
||||
@@ -24,7 +24,7 @@ void HostFunctionWorkerAtomic::start() {
|
||||
std::lock_guard<std::mutex> lg{workerMutex};
|
||||
if (!worker) {
|
||||
worker = std::make_unique<std::jthread>([this](std::stop_token st) {
|
||||
this->workerLoop(st);
|
||||
this->workerLoop(std::move(st));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@ void HostFunctionWorkerCountingSemaphore::start() {
|
||||
|
||||
if (!worker) {
|
||||
worker = std::make_unique<std::jthread>([this](std::stop_token st) {
|
||||
this->workerLoop(st);
|
||||
this->workerLoop(std::move(st));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -25,7 +25,7 @@ void HostFunctionWorkerCV::start() {
|
||||
std::lock_guard<std::mutex> lg{workerMutex};
|
||||
if (!worker) {
|
||||
worker = std::make_unique<std::jthread>([this](std::stop_token st) {
|
||||
this->workerLoop(st);
|
||||
this->workerLoop(std::move(st));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -196,7 +196,7 @@ bool Elf<numBits>::decodeRelocations(SectionHeaderAndData<numBits> §ionHeade
|
||||
|
||||
RelocationInfo relocInfo = {symbolSectionIndex, symbolIndex, targetSectionIndex, 0, reloc->offset, relocType, std::move(name)};
|
||||
|
||||
relocs.push_back(relocInfo);
|
||||
relocs.push_back(std::move(relocInfo));
|
||||
reloc++;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -493,7 +493,7 @@ bool IoctlHelperI915::getTopologyDataAndMap(HardwareInfo &hwInfo, DrmQueryTopolo
|
||||
|
||||
topologyMap.clear();
|
||||
if (!mapping.sliceIndices.empty()) {
|
||||
topologyMap[0] = mapping;
|
||||
topologyMap[0] = std::move(mapping);
|
||||
}
|
||||
|
||||
return retVal;
|
||||
|
||||
@@ -126,7 +126,7 @@ bool IoctlHelperPrelim20::getTopologyDataAndMap(HardwareInfo &hwInfo, DrmQueryTo
|
||||
topologyData.maxSubSlicesPerSlice = std::max(topologyData.maxSubSlicesPerSlice, tileTopologyData.maxSubSlicesPerSlice);
|
||||
topologyData.maxEusPerSubSlice = std::max(topologyData.maxEusPerSubSlice, static_cast<int>(data->maxEusPerSubslice));
|
||||
|
||||
topologyMap[i] = mapping;
|
||||
topologyMap[i] = std::move(mapping);
|
||||
}
|
||||
|
||||
if (success) {
|
||||
|
||||
Reference in New Issue
Block a user