1/* This file is automatically generated. DO NOT EDIT! */ 2/* Generated from: NetBSD: mknative-gcc,v 1.117 2023/07/31 01:48:37 mrg Exp */ 3/* Generated from: NetBSD: mknative.common,v 1.16 2018/04/15 15:13:37 christos Exp */ 4 5/* Copyright (C) 2005-2022 Free Software Foundation, Inc. 6 Contributed by Richard Henderson <rth@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 51typedef struct 52{ 53 unsigned char _x[4] 54 __attribute__((__aligned__(4))); 55} omp_lock_t; 56 57typedef struct 58{ 59 unsigned char _x[12] 60 __attribute__((__aligned__(4))); 61} omp_nest_lock_t; 62#endif 63 64typedef 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 73typedef 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 84typedef 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 99typedef __GOMP_DEPRECATED_5_0 omp_sync_hint_t omp_lock_hint_t; 100 101typedef struct __attribute__((__aligned__ (sizeof (void *)))) omp_depend_t 102{ 103 char __omp_depend_t__[2 * sizeof (void *)]; 104} omp_depend_t; 105 106typedef enum omp_pause_resource_t 107{ 108 omp_pause_soft = 1, 109 omp_pause_hard = 2 110} omp_pause_resource_t; 111 112typedef __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 120typedef 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 130typedef 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 144typedef 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 156typedef 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 180typedef struct omp_alloctrait_t 181{ 182 omp_alloctrait_key_t key; 183 omp_uintptr_t value; 184} omp_alloctrait_t; 185 186typedef 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#ifdef __cplusplus 192extern "C" { 193# define __GOMP_NOTHROW throw () 194# define __GOMP_DEFAULT_NULL_ALLOCATOR = omp_null_allocator 195#else 196# define __GOMP_NOTHROW __attribute__((__nothrow__)) 197# define __GOMP_DEFAULT_NULL_ALLOCATOR 198#endif 199 200extern void omp_set_num_threads (int) __GOMP_NOTHROW; 201extern int omp_get_num_threads (void) __GOMP_NOTHROW; 202extern int omp_get_max_threads (void) __GOMP_NOTHROW; 203extern int omp_get_thread_num (void) __GOMP_NOTHROW; 204extern int omp_get_num_procs (void) __GOMP_NOTHROW; 205 206extern int omp_in_parallel (void) __GOMP_NOTHROW; 207 208extern void omp_set_dynamic (int) __GOMP_NOTHROW; 209extern int omp_get_dynamic (void) __GOMP_NOTHROW; 210 211extern void omp_set_nested (int) __GOMP_NOTHROW __GOMP_DEPRECATED_5_0; 212extern int omp_get_nested (void) __GOMP_NOTHROW __GOMP_DEPRECATED_5_0; 213 214extern void omp_init_lock (omp_lock_t *) __GOMP_NOTHROW; 215extern void omp_init_lock_with_hint (omp_lock_t *, omp_sync_hint_t) 216 __GOMP_NOTHROW; 217extern void omp_destroy_lock (omp_lock_t *) __GOMP_NOTHROW; 218extern void omp_set_lock (omp_lock_t *) __GOMP_NOTHROW; 219extern void omp_unset_lock (omp_lock_t *) __GOMP_NOTHROW; 220extern int omp_test_lock (omp_lock_t *) __GOMP_NOTHROW; 221 222extern void omp_init_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW; 223extern void omp_init_nest_lock_with_hint (omp_nest_lock_t *, omp_sync_hint_t) 224 __GOMP_NOTHROW; 225extern void omp_destroy_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW; 226extern void omp_set_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW; 227extern void omp_unset_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW; 228extern int omp_test_nest_lock (omp_nest_lock_t *) __GOMP_NOTHROW; 229 230extern double omp_get_wtime (void) __GOMP_NOTHROW; 231extern double omp_get_wtick (void) __GOMP_NOTHROW; 232 233extern void omp_set_schedule (omp_sched_t, int) __GOMP_NOTHROW; 234extern void omp_get_schedule (omp_sched_t *, int *) __GOMP_NOTHROW; 235extern int omp_get_thread_limit (void) __GOMP_NOTHROW; 236extern void omp_set_max_active_levels (int) __GOMP_NOTHROW; 237extern int omp_get_max_active_levels (void) __GOMP_NOTHROW; 238extern int omp_get_supported_active_levels (void) __GOMP_NOTHROW; 239extern int omp_get_level (void) __GOMP_NOTHROW; 240extern int omp_get_ancestor_thread_num (int) __GOMP_NOTHROW; 241extern int omp_get_team_size (int) __GOMP_NOTHROW; 242extern int omp_get_active_level (void) __GOMP_NOTHROW; 243 244extern int omp_in_final (void) __GOMP_NOTHROW; 245 246extern int omp_get_cancellation (void) __GOMP_NOTHROW; 247extern omp_proc_bind_t omp_get_proc_bind (void) __GOMP_NOTHROW; 248extern int omp_get_num_places (void) __GOMP_NOTHROW; 249extern int omp_get_place_num_procs (int) __GOMP_NOTHROW; 250extern void omp_get_place_proc_ids (int, int *) __GOMP_NOTHROW; 251extern int omp_get_place_num (void) __GOMP_NOTHROW; 252extern int omp_get_partition_num_places (void) __GOMP_NOTHROW; 253extern void omp_get_partition_place_nums (int *) __GOMP_NOTHROW; 254 255extern void omp_set_default_device (int) __GOMP_NOTHROW; 256extern int omp_get_default_device (void) __GOMP_NOTHROW; 257extern int omp_get_num_devices (void) __GOMP_NOTHROW; 258extern int omp_get_device_num (void) __GOMP_NOTHROW; 259extern int omp_get_num_teams (void) __GOMP_NOTHROW; 260extern int omp_get_team_num (void) __GOMP_NOTHROW; 261 262extern int omp_is_initial_device (void) __GOMP_NOTHROW; 263extern int omp_get_initial_device (void) __GOMP_NOTHROW; 264extern int omp_get_max_task_priority (void) __GOMP_NOTHROW; 265 266extern void omp_fulfill_event (omp_event_handle_t) __GOMP_NOTHROW; 267 268extern void omp_set_num_teams (int) __GOMP_NOTHROW; 269extern int omp_get_max_teams (void) __GOMP_NOTHROW; 270extern void omp_set_teams_thread_limit (int) __GOMP_NOTHROW; 271extern int omp_get_teams_thread_limit (void) __GOMP_NOTHROW; 272 273extern void *omp_target_alloc (__SIZE_TYPE__, int) __GOMP_NOTHROW; 274extern void omp_target_free (void *, int) __GOMP_NOTHROW; 275extern int omp_target_is_present (const void *, int) __GOMP_NOTHROW; 276extern int omp_target_memcpy (void *, const void *, __SIZE_TYPE__, 277 __SIZE_TYPE__, __SIZE_TYPE__, int, int) 278 __GOMP_NOTHROW; 279extern int omp_target_memcpy_rect (void *, const void *, __SIZE_TYPE__, int, 280 const __SIZE_TYPE__ *, 281 const __SIZE_TYPE__ *, 282 const __SIZE_TYPE__ *, 283 const __SIZE_TYPE__ *, 284 const __SIZE_TYPE__ *, int, int) 285 __GOMP_NOTHROW; 286extern int omp_target_associate_ptr (const void *, const void *, __SIZE_TYPE__, 287 __SIZE_TYPE__, int) __GOMP_NOTHROW; 288extern int omp_target_disassociate_ptr (const void *, int) __GOMP_NOTHROW; 289 290extern void omp_set_affinity_format (const char *) __GOMP_NOTHROW; 291extern __SIZE_TYPE__ omp_get_affinity_format (char *, __SIZE_TYPE__) 292 __GOMP_NOTHROW; 293extern void omp_display_affinity (const char *) __GOMP_NOTHROW; 294extern __SIZE_TYPE__ omp_capture_affinity (char *, __SIZE_TYPE__, const char *) 295 __GOMP_NOTHROW; 296 297extern int omp_pause_resource (omp_pause_resource_t, int) __GOMP_NOTHROW; 298extern int omp_pause_resource_all (omp_pause_resource_t) __GOMP_NOTHROW; 299 300extern omp_allocator_handle_t omp_init_allocator (omp_memspace_handle_t, 301 int, 302 const omp_alloctrait_t []) 303 __GOMP_NOTHROW; 304extern void omp_destroy_allocator (omp_allocator_handle_t) __GOMP_NOTHROW; 305extern void omp_set_default_allocator (omp_allocator_handle_t) __GOMP_NOTHROW; 306extern omp_allocator_handle_t omp_get_default_allocator (void) __GOMP_NOTHROW; 307extern void omp_free (void *, 308 omp_allocator_handle_t __GOMP_DEFAULT_NULL_ALLOCATOR) 309 __GOMP_NOTHROW; 310extern void *omp_alloc (__SIZE_TYPE__, 311 omp_allocator_handle_t __GOMP_DEFAULT_NULL_ALLOCATOR) 312 __GOMP_NOTHROW __attribute__((__malloc__, __malloc__ (omp_free), 313 __alloc_size__ (1))); 314extern void *omp_aligned_alloc (__SIZE_TYPE__, __SIZE_TYPE__, 315 omp_allocator_handle_t 316 __GOMP_DEFAULT_NULL_ALLOCATOR) 317 __GOMP_NOTHROW __attribute__((__malloc__, __malloc__ (omp_free), 318 __alloc_size__ (2), __alloc_align__ (1))); 319extern void *omp_calloc (__SIZE_TYPE__, __SIZE_TYPE__, 320 omp_allocator_handle_t __GOMP_DEFAULT_NULL_ALLOCATOR) 321 __GOMP_NOTHROW __attribute__((__malloc__, __malloc__ (omp_free), 322 __alloc_size__ (1, 2))); 323extern void *omp_aligned_calloc (__SIZE_TYPE__, __SIZE_TYPE__, __SIZE_TYPE__, 324 omp_allocator_handle_t 325 __GOMP_DEFAULT_NULL_ALLOCATOR) 326 __GOMP_NOTHROW __attribute__((__malloc__, __malloc__ (omp_free), 327 __alloc_size__ (2, 3), __alloc_align__ (1))); 328extern void *omp_realloc (void *, __SIZE_TYPE__, 329 omp_allocator_handle_t __GOMP_DEFAULT_NULL_ALLOCATOR, 330 omp_allocator_handle_t __GOMP_DEFAULT_NULL_ALLOCATOR) 331 __GOMP_NOTHROW __attribute__((__malloc__ (omp_free), __alloc_size__ (2))); 332 333extern void omp_display_env (int) __GOMP_NOTHROW; 334 335#ifdef __cplusplus 336} 337#endif 338 339#endif /* _OMP_H */ 340