acc_copyin – Allocate device memory and copy host memory to it.#
- Description
In C/C++, this function allocates
lenbytes of device memory and maps it to the specified host address ina. The device address of the newly allocated device memory is returned.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_copyin(h_void *a, size_t len);Prototype:
void *acc_copyin_async(h_void *a, size_t len, int async);- Fortran:
Interface:
subroutine acc_copyin(a)type, dimension(:[,:]...) :: aInterface:
subroutine acc_copyin(a, len)type, dimension(:[,:]...) :: ainteger lenInterface:
subroutine acc_copyin_async(a, async)type, dimension(:[,:]...) :: ainteger(acc_handle_kind) :: asyncInterface:
subroutine acc_copyin_async(a, len, async)type, dimension(:[,:]...) :: ainteger leninteger(acc_handle_kind) :: async- Reference:
OpenACC specification v2.6, section 3.2.20.