]> git.ipfire.org Git - thirdparty/gcc.git/blame - libgomp/doc/openacc-runtime-library-routines/acccreate.rst
sphinx: add missing trailing newline
[thirdparty/gcc.git] / libgomp / doc / openacc-runtime-library-routines / acccreate.rst
CommitLineData
c63539ff
ML
1..
2 Copyright 1988-2022 Free Software Foundation, Inc.
3 This is part of the GCC manual.
4 For copying conditions, see the copyright.rst file.
5
6.. _acc_create:
7
8acc_create -- Allocate device memory and map it to host memory.
9***************************************************************
10
11Description
12 This function allocates device memory and maps it to host memory specified
13 by the host address :samp:`{a}` with a length of :samp:`{len}` bytes. In C/C++,
14 the function returns the device address of the allocated device memory.
15
16 In Fortran, two (2) forms are supported. In the first form, :samp:`{a}` specifies
17 a contiguous array section. The second form :samp:`{a}` specifies a variable or
18 array element and :samp:`{len}` specifies the length in bytes.
19
20C/C++:
21 .. list-table::
22
23 * - *Prototype*:
24 - ``void *acc_create(h_void *a, size_t len);``
25 * - *Prototype*:
26 - ``void *acc_create_async(h_void *a, size_t len, int async);``
27
28Fortran:
29 .. list-table::
30
31 * - *Interface*:
32 - ``subroutine acc_create(a)``
33 * -
34 - ``type, dimension(:[,:]...) :: a``
35 * - *Interface*:
36 - ``subroutine acc_create(a, len)``
37 * -
38 - ``type, dimension(:[,:]...) :: a``
39 * -
40 - ``integer len``
41 * - *Interface*:
42 - ``subroutine acc_create_async(a, async)``
43 * -
44 - ``type, dimension(:[,:]...) :: a``
45 * -
46 - ``integer(acc_handle_kind) :: async``
47 * - *Interface*:
48 - ``subroutine acc_create_async(a, len, async)``
49 * -
50 - ``type, dimension(:[,:]...) :: a``
51 * -
52 - ``integer len``
53 * -
54 - ``integer(acc_handle_kind) :: async``
55
56Reference:
57 :openacc:`2.6`, section
3ed1b4ce 58 3.2.21.