refactor: add wrapper for max product enum value

Signed-off-by: Mateusz Jablonski <mateusz.jablonski@intel.com>
This commit is contained in:
Mateusz Jablonski
2025-11-19 14:05:39 +00:00
committed by Compute-Runtime-Automation
parent 794798d858
commit 8db92240fc
35 changed files with 69 additions and 68 deletions

View File

@@ -307,7 +307,7 @@ TEST_F(IgaWrapperTest, GivenIgcWrapperWhenCallingSetGfxCoreMultipleTimesThenFirs
TEST_F(IgaWrapperTest, GivenIgcWrapperWhenCallingSetProductFamilyMultipleTimesThenFirstValidProductFamilyIsPreserved) {
ASSERT_FALSE(testedIgaWrapper.isKnownPlatform());
constexpr auto invalidProductFamily = IGFX_MAX_PRODUCT;
constexpr auto invalidProductFamily = NEO::maxProductEnumValue;
testedIgaWrapper.setProductFamily(invalidProductFamily);
EXPECT_FALSE(testedIgaWrapper.isKnownPlatform());

View File

@@ -136,7 +136,7 @@ int main(int argc, char **argv) {
}
uint16_t revision = 0;
for (unsigned int productId = 0; productId < IGFX_MAX_PRODUCT; ++productId) {
for (unsigned int productId = 0; productId < NEO::maxProductEnumValue; ++productId) {
if (NEO::hardwarePrefix[productId] && (0 == strcmp(devicePrefix.c_str(), NEO::hardwarePrefix[productId]))) {
if (NEO::hardwareInfoTable[productId]) {
renderCoreFamily = NEO::hardwareInfoTable[productId]->platform.eRenderCoreFamily;