Use amHostCoherentFlag. Requires new HCC version.

[ROCm/clr commit: 9bfc7b0e13]
Tá an tiomantas seo le fáil i:
Ben Sander tiomanta 2017-06-07 09:06:40 -05:00
1 tuismitheoir aeb85a76ef
tiomantas 2408d0cf79
1 comhad athraithe
+3 -2
+3 -2
Féach ar an gComhad
@@ -243,6 +243,7 @@ hipError_t hipMalloc(void** ptr, size_t sizeBytes)
}
hipError_t hipHostMalloc(void** ptr, size_t sizeBytes, unsigned int flags)
{
HIP_INIT_SPECIAL_API((TRACE_MEM), ptr, sizeBytes, flags);
@@ -289,10 +290,10 @@ hipError_t hipHostMalloc(void** ptr, size_t sizeBytes, unsigned int flags)
if (flags & hipHostMallocCoherent) {
amFlags = amHostCoherent;
} else if (flags & hipHostMallocNonCoherent) {
amFlags = amHostPinned;
amFlags = amHostNonCoherent;
} else {
// depends on env variables:
amFlags = HIP_COHERENT_HOST_ALLOC ? amHostCoherent : amHostPinned;
amFlags = HIP_COHERENT_HOST_ALLOC ? amHostCoherent : amHostNonCoherent;
}