|
1 | 1 | /*
|
2 |
| - * Copyright (C) 2022-2024 Intel Corporation |
| 2 | + * Copyright (C) 2022-2025 Intel Corporation |
3 | 3 | *
|
4 | 4 | * SPDX-License-Identifier: MIT
|
5 | 5 | *
|
@@ -47,7 +47,7 @@ void ProductConfigHelper::adjustDeviceName(std::string &device) {
|
47 | 47 | device = device.substr(0, findCore);
|
48 | 48 | }
|
49 | 49 |
|
50 |
| - auto findUnderscore = device.find("_"); |
| 50 | + auto findUnderscore = device.find('_'); |
51 | 51 | if (findUnderscore != std::string::npos) {
|
52 | 52 | device.erase(std::remove(device.begin(), device.end(), '_'), device.end());
|
53 | 53 | }
|
@@ -146,7 +146,7 @@ bool ProductConfigHelper::isSupportedProductConfig(uint32_t config) const {
|
146 | 146 |
|
147 | 147 | AOT::PRODUCT_CONFIG ProductConfigHelper::getProductConfigFromDeviceName(const std::string &device) const {
|
148 | 148 | uint32_t config = AOT::UNKNOWN_ISA;
|
149 |
| - if (device.find(".") != std::string::npos) { |
| 149 | + if (device.find('.') != std::string::npos) { |
150 | 150 | config = getProductConfigFromVersionValue(device);
|
151 | 151 | } else if (std::all_of(device.begin(), device.end(), (::isdigit))) {
|
152 | 152 | config = static_cast<uint32_t>(std::stoul(device));
|
@@ -212,7 +212,7 @@ std::vector<NEO::ConstStringRef> ProductConfigHelper::getAllProductAcronyms() {
|
212 | 212 |
|
213 | 213 | PRODUCT_FAMILY ProductConfigHelper::getProductFamilyFromDeviceName(const std::string &device) const {
|
214 | 214 | std::vector<DeviceAotInfo>::const_iterator it;
|
215 |
| - if (device.find(".") != std::string::npos) { |
| 215 | + if (device.find('.') != std::string::npos) { |
216 | 216 | it = std::find_if(deviceAotInfo.begin(), deviceAotInfo.end(), findProductConfig(getProductConfigFromVersionValue(device)));
|
217 | 217 | } else {
|
218 | 218 | it = std::find_if(deviceAotInfo.begin(), deviceAotInfo.end(), findAcronym(device));
|
@@ -271,13 +271,13 @@ int ProductConfigHelper::parseProductConfigFromString(const std::string &device,
|
271 | 271 | }
|
272 | 272 |
|
273 | 273 | uint32_t ProductConfigHelper::getProductConfigFromVersionValue(const std::string &device) {
|
274 |
| - auto majorPos = device.find("."); |
| 274 | + auto majorPos = device.find('.'); |
275 | 275 | auto major = parseProductConfigFromString(device, 0, majorPos);
|
276 | 276 | if (major == ConfigStatus::MismatchedValue || majorPos == std::string::npos) {
|
277 | 277 | return AOT::UNKNOWN_ISA;
|
278 | 278 | }
|
279 | 279 |
|
280 |
| - auto minorPos = device.find(".", ++majorPos); |
| 280 | + auto minorPos = device.find('.', ++majorPos); |
281 | 281 | auto minor = parseProductConfigFromString(device, majorPos, minorPos);
|
282 | 282 |
|
283 | 283 | if (minor == ConfigStatus::MismatchedValue || minorPos == std::string::npos) {
|
|
0 commit comments