Added hipHostRegister for hip with tests and added copyright

Этот коммит содержится в:
Aditya Atluri committed 2016-03-08 12:57:22 -06:00
1 родитель cbb42c6b6a
Коммит 102f173396
11 files changed
+246 -1

No files matched your search

+24
Просмотреть файл
@@ -61,6 +61,11 @@ extern "C" {
#define hipHostAllocMapped 0x2
#define hipHostAllocWriteCombined 0x4
#define hipHostRegisterDefault 0x0
#define hipHostRegisterPortable 0x1
#define hipHostRegisterMapped 0x2
#define hipHostRegisterIoMemory 0x4
/**
* @warning On AMD devices and recent Nvidia devices, these hints and controls are ignored.
*/
@@ -696,6 +701,25 @@ hipError_t hipHostGetDevicePointer(void** devPtr, void* hstPtr, size_t size) ;
*/
hipError_t hipHostGetFlags(unsigned int* flagsPtr, void* hostPtr) ;
/**
* @brief Pin host memory
*
* @param[out] hostPtr Pointer to host memory to be pinned
* @param[in] sizeBytes size of the host memory
* @param[in] flags Type of pinning the the host memory
* @return Error code
*/
hipError_t hipHostRegister(void* hostPtr, size_t sizeBytes, unsigned int flags) ;
/**
* @brief Un-pin host pointer
*
* @param[in] hostPtr Pinned Host Pointer
* @return Error code
*/
hipError_t hipHostUnregister(void* hostPtr) ;
/**
* @brief Free memory allocated by the hcc hip memory allocation API.
* This API performs an implicit hipDeviceSynchronize() call.