Next: , Previous: acc_present_or_copyin, Up: OpenACC Runtime Library Routines


5.19 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 a with a length of len bytes. 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, a specifies a contiguous array section. The second form a specifies a variable or array element and len specifies the length in bytes.

C/C++:

Prototype: void *acc_create(h_void *a, size_t len);

Fortran:

Interface: subroutine acc_create(a)
type, dimension(:[,:]...) :: a
Interface: subroutine acc_create(a, len)
type, dimension(:[,:]...) :: a
integer len

Reference:
OpenACC specification v2.0, section 3.2.19.