Update hipHostMallocTests.cc
std::numeric_limits::max() conflicts with max() defined in windows headers. Wrap it in parenthesis to prevent macro expansion.
Dieser Commit ist enthalten in:
1 Ursprung
54b1822167
Commit
f356d2c33d
1 Datei geändert
+2
-2
@@ -46,12 +46,12 @@ TEST_CASE("Unit_hipHostMalloc_ArgValidation") {
|
||||
}
|
||||
|
||||
SECTION("Size as max(size_t)") {
|
||||
HIP_CHECK_ERROR(hipHostMalloc(&ptr, std::numeric_limits<std::size_t>::max()),
|
||||
HIP_CHECK_ERROR(hipHostMalloc(&ptr, (std::numeric_limits<std::size_t>::max)()),
|
||||
hipErrorMemoryAllocation);
|
||||
}
|
||||
|
||||
SECTION("Flags as max(uint)") {
|
||||
HIP_CHECK_ERROR(hipHostMalloc(&ptr, allocSize, std::numeric_limits<unsigned int>::max()),
|
||||
HIP_CHECK_ERROR(hipHostMalloc(&ptr, allocSize, (std::numeric_limits<unsigned int>::max)()),
|
||||
hipErrorInvalidValue);
|
||||
}
|
||||
|
||||
|
||||
In neuem Issue referenzieren
Einen Benutzer sperren