acc_create – Allocate device memory and map it to host memory.#
- Description
This function allocates device memory and maps it to host memory specified by the host address
awith a length oflenbytes. In C/C++, the function returns the device address of the allocated device memory.In Fortran, two (2) forms are supported. In the first form,
aspecifies a contiguous array section. The second formaspecifies a variable or array element andlenspecifies the length in bytes.- C/C++:
Prototype:
void *acc_create(h_void *a, size_t len);Prototype:
void *acc_create_async(h_void *a, size_t len, int async);- Fortran:
Interface:
subroutine acc_create(a)type, dimension(:[,:]...) :: aInterface:
subroutine acc_create(a, len)type, dimension(:[,:]...) :: ainteger lenInterface:
subroutine acc_create_async(a, async)type, dimension(:[,:]...) :: ainteger(acc_handle_kind) :: asyncInterface:
subroutine acc_create_async(a, len, async)type, dimension(:[,:]...) :: ainteger leninteger(acc_handle_kind) :: async- Reference:
OpenACC specification v2.6, section 3.2.21.