mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-21 10:33:07 +08:00
fix: fix clang-tidy errors on some numa tests
Modified variables to address clang-tidy issues and MSVC compilation issues. Related-To: NEO-8276 Signed-off-by: Young Jin Yoon <young.jin.yoon@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
316f0161eb
commit
237a7f5494
@@ -517,14 +517,14 @@ TEST(MemoryInfo, givenMemoryInfoWithMemoryPolicyEnabledWhenCallingCreateGemExtFo
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
auto drm = std::make_unique<DrmQueryMock>(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
|
||||
constexpr int num_numa = 4;
|
||||
constexpr static int numNuma = 4;
|
||||
// setup numa library in MemoryInfo
|
||||
WhiteBoxNumaLibrary::GetMemPolicyPtr memPolicyHandler =
|
||||
[](int *mode, unsigned long nodeMask[], unsigned long, void *, unsigned long) -> long {
|
||||
if (mode) {
|
||||
*mode = 0;
|
||||
}
|
||||
for (int i = 0; i < num_numa; i++) {
|
||||
for (int i = 0; i < numNuma; i++) {
|
||||
nodeMask[i] = i;
|
||||
}
|
||||
return 0;
|
||||
@@ -532,7 +532,7 @@ TEST(MemoryInfo, givenMemoryInfoWithMemoryPolicyEnabledWhenCallingCreateGemExtFo
|
||||
WhiteBoxNumaLibrary::NumaAvailablePtr numaAvailableHandler =
|
||||
[](void) -> int { return 0; };
|
||||
WhiteBoxNumaLibrary::NumaMaxNodePtr numaMaxNodeHandler =
|
||||
[](void) -> int { return num_numa - 1; };
|
||||
[](void) -> int { return numNuma - 1; };
|
||||
MockOsLibrary::loadLibraryNewObject = new MockOsLibraryCustom(nullptr, true);
|
||||
MockOsLibraryCustom *osLibrary = static_cast<MockOsLibraryCustom *>(MockOsLibrary::loadLibraryNewObject);
|
||||
// register proc pointers
|
||||
@@ -578,14 +578,14 @@ TEST(MemoryInfo, givenMemoryInfoWithMemoryPolicyEnabledAndOverrideMemoryPolicyMo
|
||||
auto executionEnvironment = std::make_unique<MockExecutionEnvironment>();
|
||||
auto drm = std::make_unique<DrmQueryMock>(*executionEnvironment->rootDeviceEnvironments[0]);
|
||||
|
||||
constexpr int num_numa = 4;
|
||||
constexpr static int numNuma = 4;
|
||||
// setup numa library in MemoryInfo
|
||||
WhiteBoxNumaLibrary::GetMemPolicyPtr memPolicyHandler =
|
||||
[](int *mode, unsigned long nodeMask[], unsigned long, void *, unsigned long) -> long {
|
||||
if (mode) {
|
||||
*mode = 3;
|
||||
}
|
||||
for (int i = 0; i < num_numa; i++) {
|
||||
for (int i = 0; i < numNuma; i++) {
|
||||
nodeMask[i] = i;
|
||||
}
|
||||
return 0;
|
||||
@@ -593,7 +593,7 @@ TEST(MemoryInfo, givenMemoryInfoWithMemoryPolicyEnabledAndOverrideMemoryPolicyMo
|
||||
WhiteBoxNumaLibrary::NumaAvailablePtr numaAvailableHandler =
|
||||
[](void) -> int { return 0; };
|
||||
WhiteBoxNumaLibrary::NumaMaxNodePtr numaMaxNodeHandler =
|
||||
[](void) -> int { return num_numa - 1; };
|
||||
[](void) -> int { return numNuma - 1; };
|
||||
MockOsLibrary::loadLibraryNewObject = new MockOsLibraryCustom(nullptr, true);
|
||||
MockOsLibraryCustom *osLibrary = static_cast<MockOsLibraryCustom *>(MockOsLibrary::loadLibraryNewObject);
|
||||
// register proc pointers
|
||||
|
||||
Reference in New Issue
Block a user