GNU libgomp: acc_copyin

Next: acc_present_or_copyin, Previous: acc_free, Up: OpenACC Runtime Library Routines [Contents][Index]

### 5.17 `acc_copyin` – Allocate device memory and copy host memory to it.

Description

  In C/C++, this function allocates len bytes of device memory and maps it to the specified host address in a. The device address of the newly allocated device memory is returned.

  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_copyin(h_void *a, size_t len);`

Fortran:

  Interface: | `subroutine acc_copyin(a)`
  | `type, dimension(:[,:]...) :: a`
  Interface: | `subroutine acc_copyin(a, len)`
  | `type, dimension(:[,:]...) :: a`
  | `integer len`

Reference:

  OpenACC specification v2.0, section 3.2.17.