OpenACC Runtime Library Routines (GNU libgomp) (original) (raw)
The runtime routines described here are defined by section 3 of the OpenACC specifications in version 2.6. They have C linkage, and do not throw exceptions. Generally, they are available only for the host, with the exception ofacc_on_device
, which is available for both the host and the acceleration device.
Get number of devices for the given device type.
Set type of device accelerator to use.
Get type of device accelerator to be used.
Set device number to use.
Get device number to be used.
Get device property.
Tests for completion of a specific asynchronous operation.
Tests for completion of all asynchronous operations.
• acc_wait:
Wait for completion of a specific asynchronous operation.
• acc_wait_all:
Waits for completion of all asynchronous operations.
Wait for completion of all asynchronous operations.
Wait for completion of asynchronous operations.
• acc_init:
Initialize runtime for a specific device type.
• acc_shutdown:
Shuts down the runtime for a specific device type.
Whether executing on a particular device
• acc_malloc:
Allocate device memory.
• acc_free:
Free device memory.
• acc_copyin:
Allocate device memory and copy host memory to it.
If the data is not present on the device, allocate device memory and copy from host memory.
• acc_create:
Allocate device memory and map it to host memory.
If the data is not present on the device, allocate device memory and map it to host memory.
• acc_copyout:
Copy device memory to host memory.
• acc_delete:
Free device memory.
Update device memory from mapped host memory.
Update host memory from mapped device memory.
• acc_map_data:
Map previously allocated device memory to host memory.
Unmap device memory from host memory.
Get device pointer associated with specific host address.
• acc_hostptr:
Get host pointer associated with specific device address.
Indicate whether host variable / array is present on device.
Copy host memory to device memory.
Copy device memory to host memory.
• acc_attach:
Let device pointer point to device-pointer target.
• acc_detach:
Let device pointer point to host-pointer target.
API routines for target platforms.
• acc_get_current_cuda_device:
Get CUDA device handle.
• acc_get_current_cuda_context:
Get CUDA context handle.
Get CUDA stream handle.
Set CUDA stream handle.
API routines for the OpenACC Profiling Interface.
Register callbacks.
Unregister callbacks.
Obtain inquiry functions.
Library registration.