hipHostRegister and hipHostMalloc refactor.

Note hipHostMalloc (not hipHostAlloc or hipMallocHost).
 -  the hipHost* is used for all HIP APIs dealing with Host memory.
    (including hipHostMalloc, hipHostFree, hipHostRegister,
hipHostUnregister, hipHostGetFlags, hipHostGetDevicePointer).
  - hipMallocHost is consistent with "hipMalloc" for allocating device
    memory.  Enumerations hipHostMalloc* also used as optional
    flags parm to hipHostMalloc.
Этот коммит содержится в:
Ben Sander
2016-03-22 02:30:10 -05:00
родитель 8087bc0401
Коммит ab910efb96
17 изменённых файлов: 95 добавлений и 70 удалений
+3 -3
Просмотреть файл
@@ -42,9 +42,9 @@ if(prop.canMapHostMemory != 1){
//std::cout<<"Exiting..."<<std::endl;
}
HIPCHECK(hipHostAlloc((void**)&A, SIZE, hipHostAllocWriteCombined | hipHostAllocMapped));
HIPCHECK(hipHostAlloc((void**)&B, SIZE, hipHostAllocDefault));
HIPCHECK(hipHostAlloc((void**)&C, SIZE, hipHostAllocMapped));
HIPCHECK(hipHostMalloc((void**)&A, SIZE, hipHostMallocWriteCombined | hipHostMallocMapped));
HIPCHECK(hipHostMalloc((void**)&B, SIZE, hipHostMallocDefault));
HIPCHECK(hipHostMalloc((void**)&C, SIZE, hipHostMallocMapped));
HIPCHECK(hipHostGetDevicePointer((void**)&Ad, A, 0));
HIPCHECK(hipHostGetDevicePointer((void**)&Cd, C, 0));