comparison libgomp/openacc.h @ 145:1830386684a0

gcc-9.2.0
author anatofuz
date Thu, 13 Feb 2020 11:34:05 +0900
parents 84e7813d76e9
children
comparison
equal deleted inserted replaced
131:84e7813d76e9 145:1830386684a0
1 /* OpenACC Runtime Library User-facing Declarations 1 /* OpenACC Runtime Library User-facing Declarations
2 2
3 Copyright (C) 2013-2018 Free Software Foundation, Inc. 3 Copyright (C) 2013-2020 Free Software Foundation, Inc.
4 4
5 Contributed by Mentor Embedded. 5 Contributed by Mentor Embedded.
6 6
7 This file is part of the GNU Offloading and Multi Processing Library 7 This file is part of the GNU Offloading and Multi Processing Library
8 (libgomp). 8 (libgomp).
47 #endif 47 #endif
48 48
49 /* Types */ 49 /* Types */
50 typedef enum acc_device_t { 50 typedef enum acc_device_t {
51 /* Keep in sync with include/gomp-constants.h. */ 51 /* Keep in sync with include/gomp-constants.h. */
52 acc_device_current = -3,
52 acc_device_none = 0, 53 acc_device_none = 0,
53 acc_device_default = 1, 54 acc_device_default = 1,
54 acc_device_host = 2, 55 acc_device_host = 2,
55 /* acc_device_host_nonshm = 3 removed. */ 56 /* acc_device_host_nonshm = 3 removed. */
56 acc_device_not_host = 4, 57 acc_device_not_host = 4,
57 acc_device_nvidia = 5, 58 acc_device_nvidia = 5,
59 acc_device_radeon = 8,
58 _ACC_device_hwm, 60 _ACC_device_hwm,
59 /* Ensure enumeration is layout compatible with int. */ 61 /* Ensure enumeration is layout compatible with int. */
60 _ACC_highest = __INT_MAX__, 62 _ACC_highest = __INT_MAX__,
61 _ACC_neg = -1 63 _ACC_neg = -1
62 } acc_device_t; 64 } acc_device_t;
65
66 typedef enum acc_device_property_t {
67 /* Keep in sync with 'libgomp/libgomp-plugin.h:goacc_property'. */
68 acc_property_memory = 1,
69 acc_property_free_memory = 2,
70 acc_property_name = 0x10001,
71 acc_property_vendor = 0x10002,
72 acc_property_driver = 0x10003
73 } acc_device_property_t;
63 74
64 typedef enum acc_async_t { 75 typedef enum acc_async_t {
65 /* Keep in sync with include/gomp-constants.h. */ 76 /* Keep in sync with include/gomp-constants.h. */
66 acc_async_noval = -1, 77 acc_async_noval = -1,
67 acc_async_sync = -2 78 acc_async_sync = -2
70 int acc_get_num_devices (acc_device_t) __GOACC_NOTHROW; 81 int acc_get_num_devices (acc_device_t) __GOACC_NOTHROW;
71 void acc_set_device_type (acc_device_t) __GOACC_NOTHROW; 82 void acc_set_device_type (acc_device_t) __GOACC_NOTHROW;
72 acc_device_t acc_get_device_type (void) __GOACC_NOTHROW; 83 acc_device_t acc_get_device_type (void) __GOACC_NOTHROW;
73 void acc_set_device_num (int, acc_device_t) __GOACC_NOTHROW; 84 void acc_set_device_num (int, acc_device_t) __GOACC_NOTHROW;
74 int acc_get_device_num (acc_device_t) __GOACC_NOTHROW; 85 int acc_get_device_num (acc_device_t) __GOACC_NOTHROW;
86 size_t acc_get_property
87 (int, acc_device_t, acc_device_property_t) __GOACC_NOTHROW;
88 const char *acc_get_property_string
89 (int, acc_device_t, acc_device_property_t) __GOACC_NOTHROW;
75 int acc_async_test (int) __GOACC_NOTHROW; 90 int acc_async_test (int) __GOACC_NOTHROW;
76 int acc_async_test_all (void) __GOACC_NOTHROW; 91 int acc_async_test_all (void) __GOACC_NOTHROW;
77 void acc_wait (int) __GOACC_NOTHROW; 92 void acc_wait (int) __GOACC_NOTHROW;
78 void acc_async_wait (int) __GOACC_NOTHROW; 93 void acc_async_wait (int) __GOACC_NOTHROW;
79 void acc_wait_async (int, int) __GOACC_NOTHROW; 94 void acc_wait_async (int, int) __GOACC_NOTHROW;
106 void *acc_deviceptr (void *) __GOACC_NOTHROW; 121 void *acc_deviceptr (void *) __GOACC_NOTHROW;
107 void *acc_hostptr (void *) __GOACC_NOTHROW; 122 void *acc_hostptr (void *) __GOACC_NOTHROW;
108 int acc_is_present (void *, size_t) __GOACC_NOTHROW; 123 int acc_is_present (void *, size_t) __GOACC_NOTHROW;
109 void acc_memcpy_to_device (void *, void *, size_t) __GOACC_NOTHROW; 124 void acc_memcpy_to_device (void *, void *, size_t) __GOACC_NOTHROW;
110 void acc_memcpy_from_device (void *, void *, size_t) __GOACC_NOTHROW; 125 void acc_memcpy_from_device (void *, void *, size_t) __GOACC_NOTHROW;
126 void acc_attach (void **) __GOACC_NOTHROW;
127 void acc_attach_async (void **, int) __GOACC_NOTHROW;
128 void acc_detach (void **) __GOACC_NOTHROW;
129 void acc_detach_async (void **, int) __GOACC_NOTHROW;
111 130
112 /* Finalize versions of copyout/delete functions, specified in OpenACC 2.5. */ 131 /* Finalize versions of copyout/delete functions, specified in OpenACC 2.5. */
113 void acc_copyout_finalize (void *, size_t) __GOACC_NOTHROW; 132 void acc_copyout_finalize (void *, size_t) __GOACC_NOTHROW;
114 void acc_copyout_finalize_async (void *, size_t, int) __GOACC_NOTHROW; 133 void acc_copyout_finalize_async (void *, size_t, int) __GOACC_NOTHROW;
115 void acc_delete_finalize (void *, size_t) __GOACC_NOTHROW; 134 void acc_delete_finalize (void *, size_t) __GOACC_NOTHROW;
116 void acc_delete_finalize_async (void *, size_t, int) __GOACC_NOTHROW; 135 void acc_delete_finalize_async (void *, size_t, int) __GOACC_NOTHROW;
136 void acc_detach_finalize (void **) __GOACC_NOTHROW;
137 void acc_detach_finalize_async (void **, int) __GOACC_NOTHROW;
138
139 /* Async functions, specified in OpenACC 2.5. */
140 void acc_copyin_async (void *, size_t, int) __GOACC_NOTHROW;
141 void acc_create_async (void *, size_t, int) __GOACC_NOTHROW;
142 void acc_copyout_async (void *, size_t, int) __GOACC_NOTHROW;
143 void acc_delete_async (void *, size_t, int) __GOACC_NOTHROW;
144 void acc_update_device_async (void *, size_t, int) __GOACC_NOTHROW;
145 void acc_update_self_async (void *, size_t, int) __GOACC_NOTHROW;
146 void acc_memcpy_to_device_async (void *, void *, size_t, int) __GOACC_NOTHROW;
147 void acc_memcpy_from_device_async (void *, void *, size_t, int) __GOACC_NOTHROW;
117 148
118 /* CUDA-specific routines. */ 149 /* CUDA-specific routines. */
119 void *acc_get_current_cuda_device (void) __GOACC_NOTHROW; 150 void *acc_get_current_cuda_device (void) __GOACC_NOTHROW;
120 void *acc_get_current_cuda_context (void) __GOACC_NOTHROW; 151 void *acc_get_current_cuda_context (void) __GOACC_NOTHROW;
121 void *acc_get_cuda_stream (int) __GOACC_NOTHROW; 152 void *acc_get_cuda_stream (int) __GOACC_NOTHROW;