Print size_t variables with %zu
Change-Id: I02bb073b07e9efd03dea2b76b6ba1bd2f552bcaa Total Memory is not being printed correctly with %u. %zu represents size_t variables appropriately.
Этот коммит содержится в:
@@ -124,7 +124,7 @@ hipError_t ihipMalloc(void** ptr, size_t sizeBytes, unsigned int flags)
|
||||
if (*ptr == nullptr) {
|
||||
size_t free = 0, total =0;
|
||||
hipMemGetInfo(&free, &total);
|
||||
LogPrintfError("Allocation failed : Device memory : required :%u | free :%u | total :%u \n", sizeBytes, free, total);
|
||||
LogPrintfError("Allocation failed : Device memory : required :%zu | free :%zu | total :%zu \n", sizeBytes, free, total);
|
||||
return hipErrorOutOfMemory;
|
||||
}
|
||||
|
||||
|
||||
Ссылка в новой задаче
Block a user