Added hipHostRegister for hip with tests and added copyright

[ROCm/clr commit: 3127969d97]
Cette révision appartient à :
Aditya Atluri
2016-03-08 12:57:22 -06:00
Parent 0667928d29
révision 6162990f44
11 fichiers modifiés avec 246 ajouts et 1 suppressions
+24
Voir le fichier
@@ -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.