1 1 5 OpenACC Runtime Library Routines 1 ********************************** 1 1 The runtime routines described here are defined by section 3 of the 1 OpenACC specifications in version 2.0. They have C linkage, and do not 1 throw exceptions. Generally, they are available only for the host, with 1 the exception of 'acc_on_device', which is available for both the host 1 and the acceleration device. 1
1 · acc_get_num_devices Get number of devices for the given device 1 type. · acc_set_device_type Set type of device accelerator to use. · acc_get_device_type Get type of device accelerator to be used. · acc_set_device_num Set device number to use. · acc_get_device_num Get device number to be used. · acc_async_test Tests for completion of a specific asynchronous 1 operation. · acc_async_test_all Tests for completion of all asychronous 1 operations. · acc_wait Wait for completion of a specific asynchronous 1 operation. · acc_wait_all Waits for completion of all asyncrhonous 1 operations. · acc_wait_all_async Wait for completion of all asynchronous 1 operations. · acc_wait_async 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 1 type. · acc_on_device 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 1 it. · acc_present_or_copyin If the data is not present on the device, 1 allocate device memory and copy from host 1 memory. · acc_create Allocate device memory and map it to host 1 memory. · acc_present_or_create If the data is not present on the device, 1 allocate device memory and map it to host 1 memory. · acc_copyout Copy device memory to host memory. · acc_delete Free device memory. · acc_update_device Update device memory from mapped host memory. · acc_update_self Update host memory from mapped device memory. · acc_map_data Map previously allocated device memory to host 1 memory. · acc_unmap_data Unmap device memory from host memory. · acc_deviceptr Get device pointer associated with specific 1 host address. · acc_hostptr Get host pointer associated with specific 1 device address. · acc_is_present Indiciate whether host variable / array is 1 present on device. · acc_memcpy_to_device Copy host memory to device memory. · acc_memcpy_from_device Copy device memory to host memory. 1 1 API routines for target platforms. 1 · acc_get_current_cuda_device Get CUDA device handle. · acc_get_current_cuda_contextGet CUDA context handle. · acc_get_cuda_stream Get CUDA stream handle. · acc_set_cuda_stream Set CUDA stream handle. 1