1 /* This file is automatically generated. DO NOT EDIT! */ 2 /* Generated from: NetBSD: mknative-gcc,v 1.120 2025/09/16 04:18:30 mrg Exp */ 3 /* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ 4 5 /* Copyright (C) 2005-2024 Free Software Foundation, Inc. 6 Contributed by Richard Henderson <rth (at) redhat.com>. 7 8 This file is part of the GNU Offloading and Multi Processing Library 9 (libgomp). 10 11 Libgomp is free software; you can redistribute it and/or modify it 12 under the terms of the GNU General Public License as published by 13 the Free Software Foundation; either version 3, or (at your option) 14 any later version. 15 16 Libgomp is distributed in the hope that it will be useful, but WITHOUT ANY 17 WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 18 FOR A PARTICULAR PURPOSE. See the GNU General Public License for 19 more details. 20 21 Under Section 7 of GPL version 3, you are granted additional 22 permissions described in the GCC Runtime Library Exception, version 23 3.1, as published by the Free Software Foundation. 24 25 You should have received a copy of the GNU General Public License and 26 a copy of the GCC Runtime Library Exception along with this program; 27 see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 28 <http://www.gnu.org/licenses/>. */ 29 30 #ifndef _OMP_H 31 #define _OMP_H 1 32 33 #if defined(__GNUC__) && _OPENMP >= 201811 34 # define __GOMP_DEPRECATED_5_0 __attribute__((__deprecated__)) 35 #else 36 # define __GOMP_DEPRECATED_5_0 37 #endif 38 39 #if defined(__GNUC__) && _OPENMP >= 202011 40 # define __GOMP_DEPRECATED_5_1 __attribute__((__deprecated__)) 41 #else 42 # define __GOMP_DEPRECATED_5_1 43 #endif 44 45 #ifndef _LIBGOMP_OMP_LOCK_DEFINED 46 #define _LIBGOMP_OMP_LOCK_DEFINED 1 47 /* These two structures get edited by the libgomp build process to 48 reflect the shape of the two types. Their internals are private 49 to the library. */ 50 51 typedef struct 52 { 53 unsigned char _x[4] 54 __attribute__((__aligned__(4))); 55 } omp_lock_t; 56 57 typedef struct 58 { 59 unsigned char _x[12] 60 __attribute__((__aligned__(4))); 61 } omp_nest_lock_t; 62 #endif 63 64 typedef enum omp_sched_t 65 { 66 omp_sched_static = 1, 67 omp_sched_dynamic = 2, 68 omp_sched_guided = 3, 69 omp_sched_auto = 4, 70 omp_sched_monotonic = 0x80000000U 71 } omp_sched_t; 72 73 typedef enum omp_proc_bind_t 74 { 75 omp_proc_bind_false = 0, 76 omp_proc_bind_true = 1, 77 omp_proc_bind_primary = 2, 78 omp_proc_bind_master __GOMP_DEPRECATED_5_1 79 = omp_proc_bind_primary, 80 omp_proc_bind_close = 3, 81 omp_proc_bind_spread = 4 82 } omp_proc_bind_t; 83 84 typedef enum omp_sync_hint_t 85 { 86 omp_sync_hint_none = 0, 87 omp_lock_hint_none __GOMP_DEPRECATED_5_0 = omp_sync_hint_none, 88 omp_sync_hint_uncontended = 1, 89 omp_lock_hint_uncontended __GOMP_DEPRECATED_5_0 = omp_sync_hint_uncontended, 90 omp_sync_hint_contended = 2, 91 omp_lock_hint_contended __GOMP_DEPRECATED_5_0 = omp_sync_hint_contended, 92 omp_sync_hint_nonspeculative = 4, 93 omp_lock_hint_nonspeculative __GOMP_DEPRECATED_5_0 94 = omp_sync_hint_nonspeculative, 95 omp_sync_hint_speculative = 8, 96 omp_lock_hint_speculative __GOMP_DEPRECATED_5_0 = omp_sync_hint_speculative 97 } omp_sync_hint_t; 98 99 typedef __GOMP_DEPRECATED_5_0 omp_sync_hint_t omp_lock_hint_t; 100 101 typedef struct __attribute__((__aligned__ (sizeof (void *)))) omp_depend_t 102 { 103 char __omp_depend_t__[2 * sizeof (void *)]; 104 } omp_depend_t; 105 106 typedef enum omp_pause_resource_t 107 { 108 omp_pause_soft = 1, 109 omp_pause_hard = 2 110 } omp_pause_resource_t; 111 112 typedef __UINTPTR_TYPE__ omp_uintptr_t; 113 114 #if __cplusplus >= 201103L 115 # define __GOMP_UINTPTR_T_ENUM : omp_uintptr_t 116 #else 117 # define __GOMP_UINTPTR_T_ENUM 118 #endif 119 120 typedef enum omp_memspace_handle_t __GOMP_UINTPTR_T_ENUM 121 { 122 omp_default_mem_space = 0, 123 omp_large_cap_mem_space = 1, 124 omp_const_mem_space = 2, 125 omp_high_bw_mem_space = 3, 126 omp_low_lat_mem_space = 4, 127 __omp_memspace_handle_t_max__ = __UINTPTR_MAX__ 128 } omp_memspace_handle_t; 129 130 typedef enum omp_allocator_handle_t __GOMP_UINTPTR_T_ENUM 131 { 132 omp_null_allocator = 0, 133 omp_default_mem_alloc = 1, 134 omp_large_cap_mem_alloc = 2, 135 omp_const_mem_alloc = 3, 136 omp_high_bw_mem_alloc = 4, 137 omp_low_lat_mem_alloc = 5, 138 omp_cgroup_mem_alloc = 6, 139 omp_pteam_mem_alloc = 7, 140 omp_thread_mem_alloc = 8, 141 __omp_allocator_handle_t_max__ = __UINTPTR_MAX__ 142 } omp_allocator_handle_t; 143 144 typedef enum omp_alloctrait_key_t 145 { 146 omp_atk_sync_hint = 1, 147 omp_atk_alignment = 2, 148 omp_atk_access = 3, 149 omp_atk_pool_size = 4, 150 omp_atk_fallback = 5, 151 omp_atk_fb_data = 6, 152 omp_atk_pinned = 7, 153 omp_atk_partition = 8 154 } omp_alloctrait_key_t; 155 156 typedef enum omp_alloctrait_value_t 157 { 158 omp_atv_default = (__UINTPTR_TYPE__) -1, 159 omp_atv_false = 0, 160 omp_atv_true = 1, 161 omp_atv_contended = 3, 162 omp_atv_uncontended = 4, 163 omp_atv_serialized = 5, 164 omp_atv_sequential __GOMP_DEPRECATED_5_1 = omp_atv_serialized, 165 omp_atv_private = 6, 166 omp_atv_all = 7, 167 omp_atv_thread = 8, 168 omp_atv_pteam = 9, 169 omp_atv_cgroup = 10, 170 omp_atv_default_mem_fb = 11, 171 omp_atv_null_fb = 12, 172 omp_atv_abort_fb = 13, 173 omp_atv_allocator_fb = 14, 174 omp_atv_environment = 15, 175 omp_atv_nearest = 16, 176 omp_atv_blocked = 17, 177 omp_atv_interleaved = 18 178 } omp_alloctrait_value_t; 179 180 typedef struct omp_alloctrait_t 181 { 182 omp_alloctrait_key_t key; 183 omp_uintptr_t value; 184 } omp_alloctrait_t; 185 186 typedef enum omp_event_handle_t __GOMP_UINTPTR_T_ENUM 187 { 188 __omp_event_handle_t_max__ = __UINTPTR_MAX__ 189 } omp_event_handle_t; 190 191 enum 192 { 193 omp_initial_device = -1, 194 omp_invalid_device = -4 195 }; 196 197 #ifdef __cplusplus 198 extern "C" { 199 # define __GOMP_NOTHROW throw () 200 # define __GOMP_DEFAULT_NULL_ALLOCATOR = omp_null_allocator 201 #else 202 # define __GOMP_NOTHROW __attribute__((__nothrow__)) 203 # define __GOMP_DEFAULT_NULL_ALLOCATOR 204 #endif 205 206 extern void omp_set_num_threads (int) __GOMP_NOTHROW; 207 extern int omp_get_num_threads (void) __GOMP_NOTHROW; 208 extern int omp_get_max_threads (void) __GOMP_NOTHROW; 209 extern int omp_get_thread_num (void) __GOMP_NOTHROW; 210 extern int omp_get_num_procs (void) __GOMP_NOTHROW; 211 212 extern int omp_in_parallel (void) __GOMP_NOTHROW; 213 214 extern void omp_set_dynamic (int) __GOMP_NOTHROW; 215 extern int omp_get_dynamic (void) __GOMP_NOTHROW; 216 217 extern void omp_set_nested (int) __GOMP_NOTHROW __GOMP_DEPRECATED_5_0; 218 extern int omp_get_nested (void) __GOMP_NOTHROW __GOMP_DEPRECATED_5_0; 219 220 extern void omp_init_lock (omp_lock_t *) __GOMP_NOTHROW; 221 extern void omp_init_lock_with_hint (omp_lock_t *, omp_sync_hint_t) 222 __GOMP_NOTHROW; 223 extern void omp_destroy_lock (omp_lock_t *) __GOMP_NOTHROW; 224 extern void omp_set_lock (omp_lock_t *) __GOMP_NOTHROW; 225 extern void omp_unset_lock (omp_lock_t *) __GOMP_NOTHROW; 226 extern int omp_test_lock (omp_lock_t *) __GOMP_NOTHROW; 227 228 extern void omp_init_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW; 229 extern void omp_init_nest_lock_with_hint (omp_nest_lock_t *, omp_sync_hint_t) 230 __GOMP_NOTHROW; 231 extern void omp_destroy_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW; 232 extern void omp_set_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW; 233 extern void omp_unset_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW; 234 extern int omp_test_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW; 235 236 extern double omp_get_wtime (void) __GOMP_NOTHROW; 237 extern double omp_get_wtick (void) __GOMP_NOTHROW; 238 239 extern void omp_set_schedule (omp_sched_t, int) __GOMP_NOTHROW; 240 extern void omp_get_schedule (omp_sched_t *, int *) __GOMP_NOTHROW; 241 extern int omp_get_thread_limit (void) __GOMP_NOTHROW; 242 extern void omp_set_max_active_levels (int) __GOMP_NOTHROW; 243 extern int omp_get_max_active_levels (void) __GOMP_NOTHROW; 244 extern int omp_get_supported_active_levels (void) __GOMP_NOTHROW; 245 extern int omp_get_level (void) __GOMP_NOTHROW; 246 extern int omp_get_ancestor_thread_num (int) __GOMP_NOTHROW; 247 extern int omp_get_team_size (int) __GOMP_NOTHROW; 248 extern int omp_get_active_level (void) __GOMP_NOTHROW; 249 250 extern int omp_in_final (void) __GOMP_NOTHROW; 251 extern int omp_in_explicit_task (void) __GOMP_NOTHROW; 252 253 extern int omp_get_cancellation (void) __GOMP_NOTHROW; 254 extern omp_proc_bind_t omp_get_proc_bind (void) __GOMP_NOTHROW; 255 extern int omp_get_num_places (void) __GOMP_NOTHROW; 256 extern int omp_get_place_num_procs (int) __GOMP_NOTHROW; 257 extern void omp_get_place_proc_ids (int, int *) __GOMP_NOTHROW; 258 extern int omp_get_place_num (void) __GOMP_NOTHROW; 259 extern int omp_get_partition_num_places (void) __GOMP_NOTHROW; 260 extern void omp_get_partition_place_nums (int *) __GOMP_NOTHROW; 261 262 extern void omp_set_default_device (int) __GOMP_NOTHROW; 263 extern int omp_get_default_device (void) __GOMP_NOTHROW; 264 extern int omp_get_num_devices (void) __GOMP_NOTHROW; 265 extern int omp_get_device_num (void) __GOMP_NOTHROW; 266 extern int omp_get_num_teams (void) __GOMP_NOTHROW; 267 extern int omp_get_team_num (void) __GOMP_NOTHROW; 268 269 extern int omp_is_initial_device (void) __GOMP_NOTHROW; 270 extern int omp_get_initial_device (void) __GOMP_NOTHROW; 271 extern int omp_get_max_task_priority (void) __GOMP_NOTHROW; 272 273 extern void omp_fulfill_event (omp_event_handle_t) __GOMP_NOTHROW; 274 275 extern void omp_set_num_teams (int) __GOMP_NOTHROW; 276 extern int omp_get_max_teams (void) __GOMP_NOTHROW; 277 extern void omp_set_teams_thread_limit (int) __GOMP_NOTHROW; 278 extern int omp_get_teams_thread_limit (void) __GOMP_NOTHROW; 279 280 extern void *omp_target_alloc (__SIZE_TYPE__, int) __GOMP_NOTHROW; 281 extern void omp_target_free (void *, int) __GOMP_NOTHROW; 282 extern int omp_target_is_present (const void *, int) __GOMP_NOTHROW; 283 extern int omp_target_memcpy (void *, const void *, __SIZE_TYPE__, 284 __SIZE_TYPE__, __SIZE_TYPE__, int, int) 285 __GOMP_NOTHROW; 286 extern int omp_target_memcpy_async (void *, const void *, __SIZE_TYPE__, 287 __SIZE_TYPE__, __SIZE_TYPE__, int, int, 288 int, omp_depend_t *) 289 __GOMP_NOTHROW; 290 extern int omp_target_memcpy_rect (void *, const void *, __SIZE_TYPE__, int, 291 const __SIZE_TYPE__ *, 292 const __SIZE_TYPE__ *, 293 const __SIZE_TYPE__ *, 294 const __SIZE_TYPE__ *, 295 const __SIZE_TYPE__ *, int, int) 296 __GOMP_NOTHROW; 297 extern int omp_target_memcpy_rect_async (void *, const void *, __SIZE_TYPE__, 298 int, const __SIZE_TYPE__ *, 299 const __SIZE_TYPE__ *, 300 const __SIZE_TYPE__ *, 301 const __SIZE_TYPE__ *, 302 const __SIZE_TYPE__ *, int, int, int, 303 omp_depend_t *) 304 __GOMP_NOTHROW; 305 extern int omp_target_associate_ptr (const void *, const void *, __SIZE_TYPE__, 306 __SIZE_TYPE__, int) __GOMP_NOTHROW; 307 extern int omp_target_disassociate_ptr (const void *, int) __GOMP_NOTHROW; 308 extern void *omp_get_mapped_ptr (const void *, int) __GOMP_NOTHROW; 309 extern int omp_target_is_accessible (const void *, __SIZE_TYPE__, int) 310 __GOMP_NOTHROW; 311 312 extern void omp_set_affinity_format (const char *) __GOMP_NOTHROW; 313 extern __SIZE_TYPE__ omp_get_affinity_format (char *, __SIZE_TYPE__) 314 __GOMP_NOTHROW; 315 extern void omp_display_affinity (const char *) __GOMP_NOTHROW; 316 extern __SIZE_TYPE__ omp_capture_affinity (char *, __SIZE_TYPE__, const char *) 317 __GOMP_NOTHROW; 318 319 extern int omp_pause_resource (omp_pause_resource_t, int) __GOMP_NOTHROW; 320 extern int omp_pause_resource_all (omp_pause_resource_t) __GOMP_NOTHROW; 321 322 extern omp_allocator_handle_t omp_init_allocator (omp_memspace_handle_t, 323 int, 324 const omp_alloctrait_t []) 325 __GOMP_NOTHROW; 326 extern void omp_destroy_allocator (omp_allocator_handle_t) __GOMP_NOTHROW; 327 extern void omp_set_default_allocator (omp_allocator_handle_t) __GOMP_NOTHROW; 328 extern omp_allocator_handle_t omp_get_default_allocator (void) __GOMP_NOTHROW; 329 extern void omp_free (void *, 330 omp_allocator_handle_t __GOMP_DEFAULT_NULL_ALLOCATOR) 331 __GOMP_NOTHROW; 332 extern void *omp_alloc (__SIZE_TYPE__, 333 omp_allocator_handle_t __GOMP_DEFAULT_NULL_ALLOCATOR) 334 __GOMP_NOTHROW __attribute__((__malloc__, __malloc__ (omp_free), 335 __alloc_size__ (1))); 336 extern void *omp_aligned_alloc (__SIZE_TYPE__, __SIZE_TYPE__, 337 omp_allocator_handle_t 338 __GOMP_DEFAULT_NULL_ALLOCATOR) 339 __GOMP_NOTHROW __attribute__((__malloc__, __malloc__ (omp_free), 340 __alloc_size__ (2), __alloc_align__ (1))); 341 extern void *omp_calloc (__SIZE_TYPE__, __SIZE_TYPE__, 342 omp_allocator_handle_t __GOMP_DEFAULT_NULL_ALLOCATOR) 343 __GOMP_NOTHROW __attribute__((__malloc__, __malloc__ (omp_free), 344 __alloc_size__ (1, 2))); 345 extern void *omp_aligned_calloc (__SIZE_TYPE__, __SIZE_TYPE__, __SIZE_TYPE__, 346 omp_allocator_handle_t 347 __GOMP_DEFAULT_NULL_ALLOCATOR) 348 __GOMP_NOTHROW __attribute__((__malloc__, __malloc__ (omp_free), 349 __alloc_size__ (2, 3), __alloc_align__ (1))); 350 extern void *omp_realloc (void *, __SIZE_TYPE__, 351 omp_allocator_handle_t __GOMP_DEFAULT_NULL_ALLOCATOR, 352 omp_allocator_handle_t __GOMP_DEFAULT_NULL_ALLOCATOR) 353 __GOMP_NOTHROW __attribute__((__malloc__ (omp_free), __alloc_size__ (2))); 354 355 extern void omp_display_env (int) __GOMP_NOTHROW; 356 357 #ifdef __cplusplus 358 } 359 #endif 360 361 #endif /* _OMP_H */ 362