mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-20 13:11:34 +08:00
Code refactor
This commit: - Optimizes usage of std::unordered map - Corrects variables naming and output messages - Minor changes in using std::string methods Signed-off-by: Kacper Nowak <kacper.nowak@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
f6c5995219
commit
1b6a907b13
@ -670,8 +670,7 @@ inline bool YamlParser::readValueChecked<std::string>(const Node &node, std::str
|
||||
if (Token::Type::LiteralString != token.traits.type) {
|
||||
return false;
|
||||
}
|
||||
outValue.resize(token.len);
|
||||
std::copy(token.pos, token.pos + token.len, outValue.begin());
|
||||
outValue.assign(token.pos, token.len);
|
||||
return true;
|
||||
}
|
||||
} // namespace Yaml
|
||||
|
@ -1395,6 +1395,7 @@ DecodeError decodeSingleDeviceBinary<NEO::DeviceBinaryFormat::Zebin>(ProgramInfo
|
||||
if (DecodeError::Success != zeInfoErr) {
|
||||
return zeInfoErr;
|
||||
}
|
||||
dst.globalsDeviceToHostNameMap.reserve(globalHostAccessMapping.size());
|
||||
for (auto it = globalHostAccessMapping.begin(); it != globalHostAccessMapping.end(); it++) {
|
||||
dst.globalsDeviceToHostNameMap[it->deviceName] = it->hostName;
|
||||
}
|
||||
|
Reference in New Issue
Block a user