|
| hipError_t | hipMalloc (void **ptr, size_t size) |
| |
| hipError_t | hipMallocHost (void **ptr, size_t size) |
| |
| hipError_t | hipFree (void *ptr) |
| |
| hipError_t | hipFreeHost (void *ptr) |
| |
| hipError_t | hipMemcpy (void *dst, const void *src, size_t sizeBytes, hipMemcpyKind kind) |
| |
|
hipError_t | hipMemcpyToSymbol (const char *symbolName, const void *src, size_t sizeBytes, size_t offset, hipMemcpyKind kind) |
| |
| hipError_t | hipMemcpyAsync (void *dst, const void *src, size_t sizeBytes, hipMemcpyKind kind, hipStream_t stream=0) |
| |
|
hipError_t | hipMemset (void *dst, int value, size_t sizeBytes) |
| |
|
hipError_t | hipMemsetAsync (void *dst, int value, size_t sizeBytes, hipStream_t=0) |
| |
|
hipError_t | hipMemGetInfo (size_t *free, size_t *total) |
| |
----------------------------------------------------------------------------------------------—
The following CUDA APIs are not currently supported:
- cudaMalloc3D
- cudaMalloc3DArray
- TODO - more 2D, 3D, array APIs here.
Free memory allocated by the hcc hip memory allocation API. This API performs an implicit hipDeviceSynchronize() call.
- Parameters
-
| [in] | ptr | Pointer to memory to be freed |
- Returns
- Error code
Free memory allocated by the hcc hip host memory allocation API
- Parameters
-
| [in] | ptr | Pointer to memory to be freed |
- Returns
- Error code
Allocate memory on the default accelerator
- Parameters
-
| [out] | ptr | Pointer to the allocated memory |
| [in] | size | Requested memory size |
- Returns
- hipSuccess
| hipError_t hipMallocHost |
( |
void ** |
ptr, |
|
|
size_t |
size |
|
) |
| |
Allocate pinned host memory
- Parameters
-
| [in] | ptr | Pointer to the allocated host pinned memory |
| [out] | size | Requested memory size |
- Returns
- Error code
Copy data from src to dst. It supports memory from host to device, device to host, device to device and host to host The src and dst must not overlap. If the
This function is host-synchronous for most inputs. It uses the default NULL stream and will synchronize with other blocking streams on the same device.
- Parameters
-
| | being copy to |
| [in] | src | Data being copy from |
| [in] | sizeBytes | Data size in bytes |
| [in] | copyType | Memory copy type |
- Returns
- Error code
Copy data from src to dst asynchronously. It supports memory from host to device, device to host, device to device and host to host.
- Parameters
-
| [out] | dst | Data being copy to |
| [in] | src | Data being copy from |
| [in] | sizeBytes | Data size in bytes |
| [in] | accelerator_view | Accelerator view which the copy is being enqueued |
- Returns
- Error code