Memory management (deprecated)#
-
hipError_t hipMallocHost(void **ptr, size_t size)#
Allocate pinned host memory [Deprecated].
If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.
Warning
This API is deprecated, use hipHostMalloc() instead
- Parameters:
ptr – [out] Pointer to the allocated host pinned memory
size – [in] Requested memory size
- Returns:
hipSuccess, hipErrorOutOfMemory
-
hipError_t hipMemAllocHost(void **ptr, size_t size)#
Allocate pinned host memory [Deprecated].
If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.
Warning
This API is deprecated, use hipHostMalloc() instead
- Parameters:
ptr – [out] Pointer to the allocated host pinned memory
size – [in] Requested memory size
- Returns:
hipSuccess, hipErrorOutOfMemory
-
hipError_t hipHostAlloc(void **ptr, size_t size, unsigned int flags)#
Allocate device accessible page locked host memory [Deprecated].
If size is 0, no memory is allocated, *ptr returns nullptr, and hipSuccess is returned.
Warning
This API is deprecated, use hipHostMalloc() instead
- Parameters:
ptr – [out] Pointer to the allocated host pinned memory
size – [in] Requested memory size in bytes
flags – [in] Type of host memory allocation
- Returns:
hipSuccess, hipErrorOutOfMemory
-
hipError_t hipFreeHost(void *ptr)#
Free memory allocated by the hcc hip host memory allocation API [Deprecated].
Warning
This API is deprecated, use hipHostFree() instead
- Parameters:
ptr – [in] Pointer to memory to be freed
- Returns:
hipSuccess, hipErrorInvalidValue (if pointer is invalid, including device pointers allocated with hipMalloc)
-
hipError_t hipMemcpyToArray(hipArray_t dst, size_t wOffset, size_t hOffset, const void *src, size_t count, hipMemcpyKind kind)#
Copies data between host and device.
See also
hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync
Warning
This API is deprecated.
- Parameters:
dst – [in] Destination memory address
wOffset – [in] Destination starting X offset
hOffset – [in] Destination starting Y offset
src – [in] Source memory address
count – [in] size in bytes to copy
kind – [in] Type of transfer
- Returns:
hipSuccess, hipErrorInvalidValue, hipErrorInvalidPitchValue, hipErrorInvalidDevicePointer, hipErrorInvalidMemcpyDirection
-
hipError_t hipMemcpyFromArray(void *dst, hipArray_const_t srcArray, size_t wOffset, size_t hOffset, size_t count, hipMemcpyKind kind)#
Copies data between host and device.
See also
hipMemcpy, hipMemcpy2DToArray, hipMemcpy2D, hipMemcpyFromArray, hipMemcpyToSymbol, hipMemcpyAsync
Warning
This API is deprecated.
- Parameters:
dst – [in] Destination memory address
srcArray – [in] Source memory address
wOffset – [in] Source starting X offset
hOffset – [in] Source starting Y offset
count – [in] Size in bytes to copy
kind – [in] Type of transfer
- Returns:
hipSuccess, hipErrorInvalidValue, hipErrorInvalidPitchValue, hipErrorInvalidDevicePointer, hipErrorInvalidMemcpyDirection