2 * kmp_ftn_os.h -- KPTS Fortran defines header file.
5 //===----------------------------------------------------------------------===//
7 // The LLVM Compiler Infrastructure
9 // This file is dual licensed under the MIT and the University of Illinois Open
10 // Source Licenses. See LICENSE.txt for details.
12 //===----------------------------------------------------------------------===//
17 // KMP_FNT_ENTRIES may be one of: KMP_FTN_PLAIN, KMP_FTN_UPPER, KMP_FTN_APPEND,
20 /* -------------------------- External definitions ------------------------ */
22 #if KMP_FTN_ENTRIES == KMP_FTN_PLAIN
24 #define FTN_SET_STACKSIZE kmp_set_stacksize
25 #define FTN_SET_STACKSIZE_S kmp_set_stacksize_s
26 #define FTN_GET_STACKSIZE kmp_get_stacksize
27 #define FTN_GET_STACKSIZE_S kmp_get_stacksize_s
28 #define FTN_SET_BLOCKTIME kmp_set_blocktime
29 #define FTN_GET_BLOCKTIME kmp_get_blocktime
30 #define FTN_SET_LIBRARY_SERIAL kmp_set_library_serial
31 #define FTN_SET_LIBRARY_TURNAROUND kmp_set_library_turnaround
32 #define FTN_SET_LIBRARY_THROUGHPUT kmp_set_library_throughput
33 #define FTN_SET_LIBRARY kmp_set_library
34 #define FTN_GET_LIBRARY kmp_get_library
35 #define FTN_SET_DEFAULTS kmp_set_defaults
36 #define FTN_SET_DISP_NUM_BUFFERS kmp_set_disp_num_buffers
37 #define FTN_SET_AFFINITY kmp_set_affinity
38 #define FTN_GET_AFFINITY kmp_get_affinity
39 #define FTN_GET_AFFINITY_MAX_PROC kmp_get_affinity_max_proc
40 #define FTN_CREATE_AFFINITY_MASK kmp_create_affinity_mask
41 #define FTN_DESTROY_AFFINITY_MASK kmp_destroy_affinity_mask
42 #define FTN_SET_AFFINITY_MASK_PROC kmp_set_affinity_mask_proc
43 #define FTN_UNSET_AFFINITY_MASK_PROC kmp_unset_affinity_mask_proc
44 #define FTN_GET_AFFINITY_MASK_PROC kmp_get_affinity_mask_proc
46 #define FTN_MALLOC kmp_malloc
47 #define FTN_ALIGNED_MALLOC kmp_aligned_malloc
48 #define FTN_CALLOC kmp_calloc
49 #define FTN_REALLOC kmp_realloc
50 #define FTN_KFREE kmp_free
52 #define FTN_GET_NUM_KNOWN_THREADS kmp_get_num_known_threads
54 #define FTN_SET_NUM_THREADS omp_set_num_threads
55 #define FTN_GET_NUM_THREADS omp_get_num_threads
56 #define FTN_GET_MAX_THREADS omp_get_max_threads
57 #define FTN_GET_THREAD_NUM omp_get_thread_num
58 #define FTN_GET_NUM_PROCS omp_get_num_procs
59 #define FTN_SET_DYNAMIC omp_set_dynamic
60 #define FTN_GET_DYNAMIC omp_get_dynamic
61 #define FTN_SET_NESTED omp_set_nested
62 #define FTN_GET_NESTED omp_get_nested
63 #define FTN_IN_PARALLEL omp_in_parallel
64 #define FTN_GET_THREAD_LIMIT omp_get_thread_limit
65 #define FTN_SET_SCHEDULE omp_set_schedule
66 #define FTN_GET_SCHEDULE omp_get_schedule
67 #define FTN_SET_MAX_ACTIVE_LEVELS omp_set_max_active_levels
68 #define FTN_GET_MAX_ACTIVE_LEVELS omp_get_max_active_levels
69 #define FTN_GET_ACTIVE_LEVEL omp_get_active_level
70 #define FTN_GET_LEVEL omp_get_level
71 #define FTN_GET_ANCESTOR_THREAD_NUM omp_get_ancestor_thread_num
72 #define FTN_GET_TEAM_SIZE omp_get_team_size
73 #define FTN_IN_FINAL omp_in_final
74 // #define FTN_SET_PROC_BIND omp_set_proc_bind
75 #define FTN_GET_PROC_BIND omp_get_proc_bind
76 // #define FTN_CURR_PROC_BIND omp_curr_proc_bind
78 #define FTN_GET_NUM_TEAMS omp_get_num_teams
79 #define FTN_GET_TEAM_NUM omp_get_team_num
81 #define FTN_INIT_LOCK omp_init_lock
82 #if KMP_USE_DYNAMIC_LOCK
83 #define FTN_INIT_LOCK_WITH_HINT omp_init_lock_with_hint
84 #define FTN_INIT_NEST_LOCK_WITH_HINT omp_init_nest_lock_with_hint
86 #define FTN_DESTROY_LOCK omp_destroy_lock
87 #define FTN_SET_LOCK omp_set_lock
88 #define FTN_UNSET_LOCK omp_unset_lock
89 #define FTN_TEST_LOCK omp_test_lock
90 #define FTN_INIT_NEST_LOCK omp_init_nest_lock
91 #define FTN_DESTROY_NEST_LOCK omp_destroy_nest_lock
92 #define FTN_SET_NEST_LOCK omp_set_nest_lock
93 #define FTN_UNSET_NEST_LOCK omp_unset_nest_lock
94 #define FTN_TEST_NEST_LOCK omp_test_nest_lock
96 #define FTN_SET_WARNINGS_ON kmp_set_warnings_on
97 #define FTN_SET_WARNINGS_OFF kmp_set_warnings_off
99 #define FTN_GET_WTIME omp_get_wtime
100 #define FTN_GET_WTICK omp_get_wtick
103 #define FTN_GET_NUM_DEVICES omp_get_num_devices
104 #define FTN_GET_DEFAULT_DEVICE omp_get_default_device
105 #define FTN_SET_DEFAULT_DEVICE omp_set_default_device
106 #define FTN_IS_INITIAL_DEVICE omp_is_initial_device
110 #define FTN_GET_CANCELLATION omp_get_cancellation
111 #define FTN_GET_CANCELLATION_STATUS kmp_get_cancellation_status
115 #define FTN_GET_MAX_TASK_PRIORITY omp_get_max_task_priority
116 #define FTN_GET_NUM_PLACES omp_get_num_places
117 #define FTN_GET_PLACE_NUM_PROCS omp_get_place_num_procs
118 #define FTN_GET_PLACE_PROC_IDS omp_get_place_proc_ids
119 #define FTN_GET_PLACE_NUM omp_get_place_num
120 #define FTN_GET_PARTITION_NUM_PLACES omp_get_partition_num_places
121 #define FTN_GET_PARTITION_PLACE_NUMS omp_get_partition_place_nums
122 #define FTN_GET_INITIAL_DEVICE omp_get_initial_device
124 #define FTN_TARGET_ALLOC omp_target_alloc
125 #define FTN_TARGET_FREE omp_target_free
126 #define FTN_TARGET_IS_PRESENT omp_target_is_present
127 #define FTN_TARGET_MEMCPY omp_target_memcpy
128 #define FTN_TARGET_MEMCPY_RECT omp_target_memcpy_rect
129 #define FTN_TARGET_ASSOCIATE_PTR omp_target_associate_ptr
130 #define FTN_TARGET_DISASSOCIATE_PTR omp_target_disassociate_ptr
135 #define FTN_CONTROL_TOOL omp_control_tool
136 #define FTN_SET_DEFAULT_ALLOCATOR omp_set_default_allocator
137 #define FTN_GET_DEFAULT_ALLOCATOR omp_get_default_allocator
138 #define FTN_ALLOC omp_alloc
139 #define FTN_FREE omp_free
140 #define FTN_GET_DEVICE_NUM omp_get_device_num
141 #define FTN_SET_AFFINITY_FORMAT omp_set_affinity_format
142 #define FTN_GET_AFFINITY_FORMAT omp_get_affinity_format
143 #define FTN_DISPLAY_AFFINITY omp_display_affinity
144 #define FTN_CAPTURE_AFFINITY omp_capture_affinity
147 #endif /* KMP_FTN_PLAIN */
149 /* ------------------------------------------------------------------------ */
151 #if KMP_FTN_ENTRIES == KMP_FTN_APPEND
153 #define FTN_SET_STACKSIZE kmp_set_stacksize_
154 #define FTN_SET_STACKSIZE_S kmp_set_stacksize_s_
155 #define FTN_GET_STACKSIZE kmp_get_stacksize_
156 #define FTN_GET_STACKSIZE_S kmp_get_stacksize_s_
157 #define FTN_SET_BLOCKTIME kmp_set_blocktime_
158 #define FTN_GET_BLOCKTIME kmp_get_blocktime_
159 #define FTN_SET_LIBRARY_SERIAL kmp_set_library_serial_
160 #define FTN_SET_LIBRARY_TURNAROUND kmp_set_library_turnaround_
161 #define FTN_SET_LIBRARY_THROUGHPUT kmp_set_library_throughput_
162 #define FTN_SET_LIBRARY kmp_set_library_
163 #define FTN_GET_LIBRARY kmp_get_library_
164 #define FTN_SET_DEFAULTS kmp_set_defaults_
165 #define FTN_SET_DISP_NUM_BUFFERS kmp_set_disp_num_buffers_
166 #define FTN_SET_AFFINITY kmp_set_affinity_
167 #define FTN_GET_AFFINITY kmp_get_affinity_
168 #define FTN_GET_AFFINITY_MAX_PROC kmp_get_affinity_max_proc_
169 #define FTN_CREATE_AFFINITY_MASK kmp_create_affinity_mask_
170 #define FTN_DESTROY_AFFINITY_MASK kmp_destroy_affinity_mask_
171 #define FTN_SET_AFFINITY_MASK_PROC kmp_set_affinity_mask_proc_
172 #define FTN_UNSET_AFFINITY_MASK_PROC kmp_unset_affinity_mask_proc_
173 #define FTN_GET_AFFINITY_MASK_PROC kmp_get_affinity_mask_proc_
175 #define FTN_MALLOC kmp_malloc_
176 #define FTN_ALIGNED_MALLOC kmp_aligned_malloc_
177 #define FTN_CALLOC kmp_calloc_
178 #define FTN_REALLOC kmp_realloc_
179 #define FTN_KFREE kmp_free_
181 #define FTN_GET_NUM_KNOWN_THREADS kmp_get_num_known_threads_
183 #define FTN_SET_NUM_THREADS omp_set_num_threads_
184 #define FTN_GET_NUM_THREADS omp_get_num_threads_
185 #define FTN_GET_MAX_THREADS omp_get_max_threads_
186 #define FTN_GET_THREAD_NUM omp_get_thread_num_
187 #define FTN_GET_NUM_PROCS omp_get_num_procs_
188 #define FTN_SET_DYNAMIC omp_set_dynamic_
189 #define FTN_GET_DYNAMIC omp_get_dynamic_
190 #define FTN_SET_NESTED omp_set_nested_
191 #define FTN_GET_NESTED omp_get_nested_
192 #define FTN_IN_PARALLEL omp_in_parallel_
193 #define FTN_GET_THREAD_LIMIT omp_get_thread_limit_
194 #define FTN_SET_SCHEDULE omp_set_schedule_
195 #define FTN_GET_SCHEDULE omp_get_schedule_
196 #define FTN_SET_MAX_ACTIVE_LEVELS omp_set_max_active_levels_
197 #define FTN_GET_MAX_ACTIVE_LEVELS omp_get_max_active_levels_
198 #define FTN_GET_ACTIVE_LEVEL omp_get_active_level_
199 #define FTN_GET_LEVEL omp_get_level_
200 #define FTN_GET_ANCESTOR_THREAD_NUM omp_get_ancestor_thread_num_
201 #define FTN_GET_TEAM_SIZE omp_get_team_size_
202 #define FTN_IN_FINAL omp_in_final_
203 // #define FTN_SET_PROC_BIND omp_set_proc_bind_
204 #define FTN_GET_PROC_BIND omp_get_proc_bind_
205 // #define FTN_CURR_PROC_BIND omp_curr_proc_bind_
207 #define FTN_GET_NUM_TEAMS omp_get_num_teams_
208 #define FTN_GET_TEAM_NUM omp_get_team_num_
210 #define FTN_INIT_LOCK omp_init_lock_
211 #if KMP_USE_DYNAMIC_LOCK
212 #define FTN_INIT_LOCK_WITH_HINT omp_init_lock_with_hint_
213 #define FTN_INIT_NEST_LOCK_WITH_HINT omp_init_nest_lock_with_hint_
215 #define FTN_DESTROY_LOCK omp_destroy_lock_
216 #define FTN_SET_LOCK omp_set_lock_
217 #define FTN_UNSET_LOCK omp_unset_lock_
218 #define FTN_TEST_LOCK omp_test_lock_
219 #define FTN_INIT_NEST_LOCK omp_init_nest_lock_
220 #define FTN_DESTROY_NEST_LOCK omp_destroy_nest_lock_
221 #define FTN_SET_NEST_LOCK omp_set_nest_lock_
222 #define FTN_UNSET_NEST_LOCK omp_unset_nest_lock_
223 #define FTN_TEST_NEST_LOCK omp_test_nest_lock_
225 #define FTN_SET_WARNINGS_ON kmp_set_warnings_on_
226 #define FTN_SET_WARNINGS_OFF kmp_set_warnings_off_
228 #define FTN_GET_WTIME omp_get_wtime_
229 #define FTN_GET_WTICK omp_get_wtick_
232 #define FTN_GET_NUM_DEVICES omp_get_num_devices_
233 #define FTN_GET_DEFAULT_DEVICE omp_get_default_device_
234 #define FTN_SET_DEFAULT_DEVICE omp_set_default_device_
235 #define FTN_IS_INITIAL_DEVICE omp_is_initial_device_
239 #define FTN_GET_CANCELLATION omp_get_cancellation_
240 #define FTN_GET_CANCELLATION_STATUS kmp_get_cancellation_status_
244 #define FTN_GET_MAX_TASK_PRIORITY omp_get_max_task_priority_
245 #define FTN_GET_NUM_PLACES omp_get_num_places_
246 #define FTN_GET_PLACE_NUM_PROCS omp_get_place_num_procs_
247 #define FTN_GET_PLACE_PROC_IDS omp_get_place_proc_ids_
248 #define FTN_GET_PLACE_NUM omp_get_place_num_
249 #define FTN_GET_PARTITION_NUM_PLACES omp_get_partition_num_places_
250 #define FTN_GET_PARTITION_PLACE_NUMS omp_get_partition_place_nums_
251 #define FTN_GET_INITIAL_DEVICE omp_get_initial_device_
253 #define FTN_TARGET_ALLOC omp_target_alloc_
254 #define FTN_TARGET_FREE omp_target_free_
255 #define FTN_TARGET_IS_PRESENT omp_target_is_present_
256 #define FTN_TARGET_MEMCPY omp_target_memcpy_
257 #define FTN_TARGET_MEMCPY_RECT omp_target_memcpy_rect_
258 #define FTN_TARGET_ASSOCIATE_PTR omp_target_associate_ptr_
259 #define FTN_TARGET_DISASSOCIATE_PTR omp_target_disassociate_ptr_
264 #define FTN_CONTROL_TOOL omp_control_tool_
265 #define FTN_SET_DEFAULT_ALLOCATOR omp_set_default_allocator_
266 #define FTN_GET_DEFAULT_ALLOCATOR omp_get_default_allocator_
267 #define FTN_ALLOC omp_alloc_
268 #define FTN_FREE omp_free_
269 #define FTN_GET_DEVICE_NUM omp_get_device_num_
270 #define FTN_SET_AFFINITY_FORMAT omp_set_affinity_format_
271 #define FTN_GET_AFFINITY_FORMAT omp_get_affinity_format_
272 #define FTN_DISPLAY_AFFINITY omp_display_affinity_
273 #define FTN_CAPTURE_AFFINITY omp_capture_affinity_
276 #endif /* KMP_FTN_APPEND */
278 /* ------------------------------------------------------------------------ */
280 #if KMP_FTN_ENTRIES == KMP_FTN_UPPER
282 #define FTN_SET_STACKSIZE KMP_SET_STACKSIZE
283 #define FTN_SET_STACKSIZE_S KMP_SET_STACKSIZE_S
284 #define FTN_GET_STACKSIZE KMP_GET_STACKSIZE
285 #define FTN_GET_STACKSIZE_S KMP_GET_STACKSIZE_S
286 #define FTN_SET_BLOCKTIME KMP_SET_BLOCKTIME
287 #define FTN_GET_BLOCKTIME KMP_GET_BLOCKTIME
288 #define FTN_SET_LIBRARY_SERIAL KMP_SET_LIBRARY_SERIAL
289 #define FTN_SET_LIBRARY_TURNAROUND KMP_SET_LIBRARY_TURNAROUND
290 #define FTN_SET_LIBRARY_THROUGHPUT KMP_SET_LIBRARY_THROUGHPUT
291 #define FTN_SET_LIBRARY KMP_SET_LIBRARY
292 #define FTN_GET_LIBRARY KMP_GET_LIBRARY
293 #define FTN_SET_DEFAULTS KMP_SET_DEFAULTS
294 #define FTN_SET_DISP_NUM_BUFFERS KMP_SET_DISP_NUM_BUFFERS
295 #define FTN_SET_AFFINITY KMP_SET_AFFINITY
296 #define FTN_GET_AFFINITY KMP_GET_AFFINITY
297 #define FTN_GET_AFFINITY_MAX_PROC KMP_GET_AFFINITY_MAX_PROC
298 #define FTN_CREATE_AFFINITY_MASK KMP_CREATE_AFFINITY_MASK
299 #define FTN_DESTROY_AFFINITY_MASK KMP_DESTROY_AFFINITY_MASK
300 #define FTN_SET_AFFINITY_MASK_PROC KMP_SET_AFFINITY_MASK_PROC
301 #define FTN_UNSET_AFFINITY_MASK_PROC KMP_UNSET_AFFINITY_MASK_PROC
302 #define FTN_GET_AFFINITY_MASK_PROC KMP_GET_AFFINITY_MASK_PROC
304 #define FTN_MALLOC KMP_MALLOC
305 #define FTN_ALIGNED_MALLOC KMP_ALIGNED_MALLOC
306 #define FTN_CALLOC KMP_CALLOC
307 #define FTN_REALLOC KMP_REALLOC
308 #define FTN_KFREE KMP_FREE
310 #define FTN_GET_NUM_KNOWN_THREADS KMP_GET_NUM_KNOWN_THREADS
312 #define FTN_SET_NUM_THREADS OMP_SET_NUM_THREADS
313 #define FTN_GET_NUM_THREADS OMP_GET_NUM_THREADS
314 #define FTN_GET_MAX_THREADS OMP_GET_MAX_THREADS
315 #define FTN_GET_THREAD_NUM OMP_GET_THREAD_NUM
316 #define FTN_GET_NUM_PROCS OMP_GET_NUM_PROCS
317 #define FTN_SET_DYNAMIC OMP_SET_DYNAMIC
318 #define FTN_GET_DYNAMIC OMP_GET_DYNAMIC
319 #define FTN_SET_NESTED OMP_SET_NESTED
320 #define FTN_GET_NESTED OMP_GET_NESTED
321 #define FTN_IN_PARALLEL OMP_IN_PARALLEL
322 #define FTN_GET_THREAD_LIMIT OMP_GET_THREAD_LIMIT
323 #define FTN_SET_SCHEDULE OMP_SET_SCHEDULE
324 #define FTN_GET_SCHEDULE OMP_GET_SCHEDULE
325 #define FTN_SET_MAX_ACTIVE_LEVELS OMP_SET_MAX_ACTIVE_LEVELS
326 #define FTN_GET_MAX_ACTIVE_LEVELS OMP_GET_MAX_ACTIVE_LEVELS
327 #define FTN_GET_ACTIVE_LEVEL OMP_GET_ACTIVE_LEVEL
328 #define FTN_GET_LEVEL OMP_GET_LEVEL
329 #define FTN_GET_ANCESTOR_THREAD_NUM OMP_GET_ANCESTOR_THREAD_NUM
330 #define FTN_GET_TEAM_SIZE OMP_GET_TEAM_SIZE
331 #define FTN_IN_FINAL OMP_IN_FINAL
332 // #define FTN_SET_PROC_BIND OMP_SET_PROC_BIND
333 #define FTN_GET_PROC_BIND OMP_GET_PROC_BIND
334 // #define FTN_CURR_PROC_BIND OMP_CURR_PROC_BIND
336 #define FTN_GET_NUM_TEAMS OMP_GET_NUM_TEAMS
337 #define FTN_GET_TEAM_NUM OMP_GET_TEAM_NUM
339 #define FTN_INIT_LOCK OMP_INIT_LOCK
340 #if KMP_USE_DYNAMIC_LOCK
341 #define FTN_INIT_LOCK_WITH_HINT OMP_INIT_LOCK_WITH_HINT
342 #define FTN_INIT_NEST_LOCK_WITH_HINT OMP_INIT_NEST_LOCK_WITH_HINT
344 #define FTN_DESTROY_LOCK OMP_DESTROY_LOCK
345 #define FTN_SET_LOCK OMP_SET_LOCK
346 #define FTN_UNSET_LOCK OMP_UNSET_LOCK
347 #define FTN_TEST_LOCK OMP_TEST_LOCK
348 #define FTN_INIT_NEST_LOCK OMP_INIT_NEST_LOCK
349 #define FTN_DESTROY_NEST_LOCK OMP_DESTROY_NEST_LOCK
350 #define FTN_SET_NEST_LOCK OMP_SET_NEST_LOCK
351 #define FTN_UNSET_NEST_LOCK OMP_UNSET_NEST_LOCK
352 #define FTN_TEST_NEST_LOCK OMP_TEST_NEST_LOCK
354 #define FTN_SET_WARNINGS_ON KMP_SET_WARNINGS_ON
355 #define FTN_SET_WARNINGS_OFF KMP_SET_WARNINGS_OFF
357 #define FTN_GET_WTIME OMP_GET_WTIME
358 #define FTN_GET_WTICK OMP_GET_WTICK
361 #define FTN_GET_NUM_DEVICES OMP_GET_NUM_DEVICES
362 #define FTN_GET_DEFAULT_DEVICE OMP_GET_DEFAULT_DEVICE
363 #define FTN_SET_DEFAULT_DEVICE OMP_SET_DEFAULT_DEVICE
364 #define FTN_IS_INITIAL_DEVICE OMP_IS_INITIAL_DEVICE
368 #define FTN_GET_CANCELLATION OMP_GET_CANCELLATION
369 #define FTN_GET_CANCELLATION_STATUS KMP_GET_CANCELLATION_STATUS
373 #define FTN_GET_MAX_TASK_PRIORITY OMP_GET_MAX_TASK_PRIORITY
374 #define FTN_GET_NUM_PLACES OMP_GET_NUM_PLACES
375 #define FTN_GET_PLACE_NUM_PROCS OMP_GET_PLACE_NUM_PROCS
376 #define FTN_GET_PLACE_PROC_IDS OMP_GET_PLACE_PROC_IDS
377 #define FTN_GET_PLACE_NUM OMP_GET_PLACE_NUM
378 #define FTN_GET_PARTITION_NUM_PLACES OMP_GET_PARTITION_NUM_PLACES
379 #define FTN_GET_PARTITION_PLACE_NUMS OMP_GET_PARTITION_PLACE_NUMS
380 #define FTN_GET_INITIAL_DEVICE OMP_GET_INITIAL_DEVICE
382 #define FTN_TARGET_ALLOC OMP_TARGET_ALLOC
383 #define FTN_TARGET_FREE OMP_TARGET_FREE
384 #define FTN_TARGET_IS_PRESENT OMP_TARGET_IS_PRESENT
385 #define FTN_TARGET_MEMCPY OMP_TARGET_MEMCPY
386 #define FTN_TARGET_MEMCPY_RECT OMP_TARGET_MEMCPY_RECT
387 #define FTN_TARGET_ASSOCIATE_PTR OMP_TARGET_ASSOCIATE_PTR
388 #define FTN_TARGET_DISASSOCIATE_PTR OMP_TARGET_DISASSOCIATE_PTR
393 #define FTN_CONTROL_TOOL OMP_CONTROL_TOOL
394 #define FTN_SET_DEFAULT_ALLOCATOR OMP_SET_DEFAULT_ALLOCATOR
395 #define FTN_GET_DEFAULT_ALLOCATOR OMP_GET_DEFAULT_ALLOCATOR
396 #define FTN_ALLOC OMP_ALLOC
397 #define FTN_FREE OMP_FREE
398 #define FTN_GET_DEVICE_NUM OMP_GET_DEVICE_NUM
399 #define FTN_SET_AFFINITY_FORMAT OMP_SET_AFFINITY_FORMAT
400 #define FTN_GET_AFFINITY_FORMAT OMP_GET_AFFINITY_FORMAT
401 #define FTN_DISPLAY_AFFINITY OMP_DISPLAY_AFFINITY
402 #define FTN_CAPTURE_AFFINITY OMP_CAPTURE_AFFINITY
405 #endif /* KMP_FTN_UPPER */
407 /* ------------------------------------------------------------------------ */
409 #if KMP_FTN_ENTRIES == KMP_FTN_UAPPEND
411 #define FTN_SET_STACKSIZE KMP_SET_STACKSIZE_
412 #define FTN_SET_STACKSIZE_S KMP_SET_STACKSIZE_S_
413 #define FTN_GET_STACKSIZE KMP_GET_STACKSIZE_
414 #define FTN_GET_STACKSIZE_S KMP_GET_STACKSIZE_S_
415 #define FTN_SET_BLOCKTIME KMP_SET_BLOCKTIME_
416 #define FTN_GET_BLOCKTIME KMP_GET_BLOCKTIME_
417 #define FTN_SET_LIBRARY_SERIAL KMP_SET_LIBRARY_SERIAL_
418 #define FTN_SET_LIBRARY_TURNAROUND KMP_SET_LIBRARY_TURNAROUND_
419 #define FTN_SET_LIBRARY_THROUGHPUT KMP_SET_LIBRARY_THROUGHPUT_
420 #define FTN_SET_LIBRARY KMP_SET_LIBRARY_
421 #define FTN_GET_LIBRARY KMP_GET_LIBRARY_
422 #define FTN_SET_DEFAULTS KMP_SET_DEFAULTS_
423 #define FTN_SET_DISP_NUM_BUFFERS KMP_SET_DISP_NUM_BUFFERS_
424 #define FTN_SET_AFFINITY KMP_SET_AFFINITY_
425 #define FTN_GET_AFFINITY KMP_GET_AFFINITY_
426 #define FTN_GET_AFFINITY_MAX_PROC KMP_GET_AFFINITY_MAX_PROC_
427 #define FTN_CREATE_AFFINITY_MASK KMP_CREATE_AFFINITY_MASK_
428 #define FTN_DESTROY_AFFINITY_MASK KMP_DESTROY_AFFINITY_MASK_
429 #define FTN_SET_AFFINITY_MASK_PROC KMP_SET_AFFINITY_MASK_PROC_
430 #define FTN_UNSET_AFFINITY_MASK_PROC KMP_UNSET_AFFINITY_MASK_PROC_
431 #define FTN_GET_AFFINITY_MASK_PROC KMP_GET_AFFINITY_MASK_PROC_
433 #define FTN_MALLOC KMP_MALLOC_
434 #define FTN_ALIGNED_MALLOC KMP_ALIGNED_MALLOC_
435 #define FTN_CALLOC KMP_CALLOC_
436 #define FTN_REALLOC KMP_REALLOC_
437 #define FTN_KFREE KMP_FREE_
439 #define FTN_GET_NUM_KNOWN_THREADS KMP_GET_NUM_KNOWN_THREADS_
441 #define FTN_SET_NUM_THREADS OMP_SET_NUM_THREADS_
442 #define FTN_GET_NUM_THREADS OMP_GET_NUM_THREADS_
443 #define FTN_GET_MAX_THREADS OMP_GET_MAX_THREADS_
444 #define FTN_GET_THREAD_NUM OMP_GET_THREAD_NUM_
445 #define FTN_GET_NUM_PROCS OMP_GET_NUM_PROCS_
446 #define FTN_SET_DYNAMIC OMP_SET_DYNAMIC_
447 #define FTN_GET_DYNAMIC OMP_GET_DYNAMIC_
448 #define FTN_SET_NESTED OMP_SET_NESTED_
449 #define FTN_GET_NESTED OMP_GET_NESTED_
450 #define FTN_IN_PARALLEL OMP_IN_PARALLEL_
451 #define FTN_GET_THREAD_LIMIT OMP_GET_THREAD_LIMIT_
452 #define FTN_SET_SCHEDULE OMP_SET_SCHEDULE_
453 #define FTN_GET_SCHEDULE OMP_GET_SCHEDULE_
454 #define FTN_SET_MAX_ACTIVE_LEVELS OMP_SET_MAX_ACTIVE_LEVELS_
455 #define FTN_GET_MAX_ACTIVE_LEVELS OMP_GET_MAX_ACTIVE_LEVELS_
456 #define FTN_GET_ACTIVE_LEVEL OMP_GET_ACTIVE_LEVEL_
457 #define FTN_GET_LEVEL OMP_GET_LEVEL_
458 #define FTN_GET_ANCESTOR_THREAD_NUM OMP_GET_ANCESTOR_THREAD_NUM_
459 #define FTN_GET_TEAM_SIZE OMP_GET_TEAM_SIZE_
460 #define FTN_IN_FINAL OMP_IN_FINAL_
461 // #define FTN_SET_PROC_BIND OMP_SET_PROC_BIND_
462 #define FTN_GET_PROC_BIND OMP_GET_PROC_BIND_
463 // #define FTN_CURR_PROC_BIND OMP_CURR_PROC_BIND_
465 #define FTN_GET_NUM_TEAMS OMP_GET_NUM_TEAMS_
466 #define FTN_GET_TEAM_NUM OMP_GET_TEAM_NUM_
468 #define FTN_INIT_LOCK OMP_INIT_LOCK_
469 #if KMP_USE_DYNAMIC_LOCK
470 #define FTN_INIT_LOCK_WITH_HINT OMP_INIT_LOCK_WITH_HINT_
471 #define FTN_INIT_NEST_LOCK_WITH_HINT OMP_INIT_NEST_LOCK_WITH_HINT_
473 #define FTN_DESTROY_LOCK OMP_DESTROY_LOCK_
474 #define FTN_SET_LOCK OMP_SET_LOCK_
475 #define FTN_UNSET_LOCK OMP_UNSET_LOCK_
476 #define FTN_TEST_LOCK OMP_TEST_LOCK_
477 #define FTN_INIT_NEST_LOCK OMP_INIT_NEST_LOCK_
478 #define FTN_DESTROY_NEST_LOCK OMP_DESTROY_NEST_LOCK_
479 #define FTN_SET_NEST_LOCK OMP_SET_NEST_LOCK_
480 #define FTN_UNSET_NEST_LOCK OMP_UNSET_NEST_LOCK_
481 #define FTN_TEST_NEST_LOCK OMP_TEST_NEST_LOCK_
483 #define FTN_SET_WARNINGS_ON KMP_SET_WARNINGS_ON_
484 #define FTN_SET_WARNINGS_OFF KMP_SET_WARNINGS_OFF_
486 #define FTN_GET_WTIME OMP_GET_WTIME_
487 #define FTN_GET_WTICK OMP_GET_WTICK_
490 #define FTN_GET_NUM_DEVICES OMP_GET_NUM_DEVICES_
491 #define FTN_GET_DEFAULT_DEVICE OMP_GET_DEFAULT_DEVICE_
492 #define FTN_SET_DEFAULT_DEVICE OMP_SET_DEFAULT_DEVICE_
493 #define FTN_IS_INITIAL_DEVICE OMP_IS_INITIAL_DEVICE_
497 #define FTN_GET_CANCELLATION OMP_GET_CANCELLATION_
498 #define FTN_GET_CANCELLATION_STATUS KMP_GET_CANCELLATION_STATUS_
502 #define FTN_GET_MAX_TASK_PRIORITY OMP_GET_MAX_TASK_PRIORITY_
503 #define FTN_GET_NUM_PLACES OMP_GET_NUM_PLACES_
504 #define FTN_GET_PLACE_NUM_PROCS OMP_GET_PLACE_NUM_PROCS_
505 #define FTN_GET_PLACE_PROC_IDS OMP_GET_PLACE_PROC_IDS_
506 #define FTN_GET_PLACE_NUM OMP_GET_PLACE_NUM_
507 #define FTN_GET_PARTITION_NUM_PLACES OMP_GET_PARTITION_NUM_PLACES_
508 #define FTN_GET_PARTITION_PLACE_NUMS OMP_GET_PARTITION_PLACE_NUMS_
509 #define FTN_GET_INITIAL_DEVICE OMP_GET_INITIAL_DEVICE_
511 #define FTN_TARGET_ALLOC OMP_TARGET_ALLOC_
512 #define FTN_TARGET_FREE OMP_TARGET_FREE_
513 #define FTN_TARGET_IS_PRESENT OMP_TARGET_IS_PRESENT_
514 #define FTN_TARGET_MEMCPY OMP_TARGET_MEMCPY_
515 #define FTN_TARGET_MEMCPY_RECT OMP_TARGET_MEMCPY_RECT_
516 #define FTN_TARGET_ASSOCIATE_PTR OMP_TARGET_ASSOCIATE_PTR_
517 #define FTN_TARGET_DISASSOCIATE_PTR OMP_TARGET_DISASSOCIATE_PTR_
522 #define FTN_CONTROL_TOOL OMP_CONTROL_TOOL_
523 #define FTN_SET_DEFAULT_ALLOCATOR OMP_SET_DEFAULT_ALLOCATOR_
524 #define FTN_GET_DEFAULT_ALLOCATOR OMP_GET_DEFAULT_ALLOCATOR_
525 #define FTN_ALLOC OMP_ALLOC_
526 #define FTN_FREE OMP_FREE_
527 #define FTN_GET_DEVICE_NUM OMP_GET_DEVICE_NUM_
528 #define FTN_SET_AFFINITY_FORMAT OMP_SET_AFFINITY_FORMAT_
529 #define FTN_GET_AFFINITY_FORMAT OMP_GET_AFFINITY_FORMAT_
530 #define FTN_DISPLAY_AFFINITY OMP_DISPLAY_AFFINITY_
531 #define FTN_CAPTURE_AFFINITY OMP_CAPTURE_AFFINITY_
534 #endif /* KMP_FTN_UAPPEND */
536 /* -------------------------- GOMP API NAMES ------------------------ */
537 // All GOMP_1.0 symbols
538 #define KMP_API_NAME_GOMP_ATOMIC_END GOMP_atomic_end
539 #define KMP_API_NAME_GOMP_ATOMIC_START GOMP_atomic_start
540 #define KMP_API_NAME_GOMP_BARRIER GOMP_barrier
541 #define KMP_API_NAME_GOMP_CRITICAL_END GOMP_critical_end
542 #define KMP_API_NAME_GOMP_CRITICAL_NAME_END GOMP_critical_name_end
543 #define KMP_API_NAME_GOMP_CRITICAL_NAME_START GOMP_critical_name_start
544 #define KMP_API_NAME_GOMP_CRITICAL_START GOMP_critical_start
545 #define KMP_API_NAME_GOMP_LOOP_DYNAMIC_NEXT GOMP_loop_dynamic_next
546 #define KMP_API_NAME_GOMP_LOOP_DYNAMIC_START GOMP_loop_dynamic_start
547 #define KMP_API_NAME_GOMP_LOOP_END GOMP_loop_end
548 #define KMP_API_NAME_GOMP_LOOP_END_NOWAIT GOMP_loop_end_nowait
549 #define KMP_API_NAME_GOMP_LOOP_GUIDED_NEXT GOMP_loop_guided_next
550 #define KMP_API_NAME_GOMP_LOOP_GUIDED_START GOMP_loop_guided_start
551 #define KMP_API_NAME_GOMP_LOOP_ORDERED_DYNAMIC_NEXT \
552 GOMP_loop_ordered_dynamic_next
553 #define KMP_API_NAME_GOMP_LOOP_ORDERED_DYNAMIC_START \
554 GOMP_loop_ordered_dynamic_start
555 #define KMP_API_NAME_GOMP_LOOP_ORDERED_GUIDED_NEXT GOMP_loop_ordered_guided_next
556 #define KMP_API_NAME_GOMP_LOOP_ORDERED_GUIDED_START \
557 GOMP_loop_ordered_guided_start
558 #define KMP_API_NAME_GOMP_LOOP_ORDERED_RUNTIME_NEXT \
559 GOMP_loop_ordered_runtime_next
560 #define KMP_API_NAME_GOMP_LOOP_ORDERED_RUNTIME_START \
561 GOMP_loop_ordered_runtime_start
562 #define KMP_API_NAME_GOMP_LOOP_ORDERED_STATIC_NEXT GOMP_loop_ordered_static_next
563 #define KMP_API_NAME_GOMP_LOOP_ORDERED_STATIC_START \
564 GOMP_loop_ordered_static_start
565 #define KMP_API_NAME_GOMP_LOOP_RUNTIME_NEXT GOMP_loop_runtime_next
566 #define KMP_API_NAME_GOMP_LOOP_RUNTIME_START GOMP_loop_runtime_start
567 #define KMP_API_NAME_GOMP_LOOP_STATIC_NEXT GOMP_loop_static_next
568 #define KMP_API_NAME_GOMP_LOOP_STATIC_START GOMP_loop_static_start
569 #define KMP_API_NAME_GOMP_ORDERED_END GOMP_ordered_end
570 #define KMP_API_NAME_GOMP_ORDERED_START GOMP_ordered_start
571 #define KMP_API_NAME_GOMP_PARALLEL_END GOMP_parallel_end
572 #define KMP_API_NAME_GOMP_PARALLEL_LOOP_DYNAMIC_START \
573 GOMP_parallel_loop_dynamic_start
574 #define KMP_API_NAME_GOMP_PARALLEL_LOOP_GUIDED_START \
575 GOMP_parallel_loop_guided_start
576 #define KMP_API_NAME_GOMP_PARALLEL_LOOP_RUNTIME_START \
577 GOMP_parallel_loop_runtime_start
578 #define KMP_API_NAME_GOMP_PARALLEL_LOOP_STATIC_START \
579 GOMP_parallel_loop_static_start
580 #define KMP_API_NAME_GOMP_PARALLEL_SECTIONS_START GOMP_parallel_sections_start
581 #define KMP_API_NAME_GOMP_PARALLEL_START GOMP_parallel_start
582 #define KMP_API_NAME_GOMP_SECTIONS_END GOMP_sections_end
583 #define KMP_API_NAME_GOMP_SECTIONS_END_NOWAIT GOMP_sections_end_nowait
584 #define KMP_API_NAME_GOMP_SECTIONS_NEXT GOMP_sections_next
585 #define KMP_API_NAME_GOMP_SECTIONS_START GOMP_sections_start
586 #define KMP_API_NAME_GOMP_SINGLE_COPY_END GOMP_single_copy_end
587 #define KMP_API_NAME_GOMP_SINGLE_COPY_START GOMP_single_copy_start
588 #define KMP_API_NAME_GOMP_SINGLE_START GOMP_single_start
590 // All GOMP_2.0 symbols
591 #define KMP_API_NAME_GOMP_TASK GOMP_task
592 #define KMP_API_NAME_GOMP_TASKWAIT GOMP_taskwait
593 #define KMP_API_NAME_GOMP_LOOP_ULL_DYNAMIC_NEXT GOMP_loop_ull_dynamic_next
594 #define KMP_API_NAME_GOMP_LOOP_ULL_DYNAMIC_START GOMP_loop_ull_dynamic_start
595 #define KMP_API_NAME_GOMP_LOOP_ULL_GUIDED_NEXT GOMP_loop_ull_guided_next
596 #define KMP_API_NAME_GOMP_LOOP_ULL_GUIDED_START GOMP_loop_ull_guided_start
597 #define KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_DYNAMIC_NEXT \
598 GOMP_loop_ull_ordered_dynamic_next
599 #define KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_DYNAMIC_START \
600 GOMP_loop_ull_ordered_dynamic_start
601 #define KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_GUIDED_NEXT \
602 GOMP_loop_ull_ordered_guided_next
603 #define KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_GUIDED_START \
604 GOMP_loop_ull_ordered_guided_start
605 #define KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_RUNTIME_NEXT \
606 GOMP_loop_ull_ordered_runtime_next
607 #define KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_RUNTIME_START \
608 GOMP_loop_ull_ordered_runtime_start
609 #define KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_STATIC_NEXT \
610 GOMP_loop_ull_ordered_static_next
611 #define KMP_API_NAME_GOMP_LOOP_ULL_ORDERED_STATIC_START \
612 GOMP_loop_ull_ordered_static_start
613 #define KMP_API_NAME_GOMP_LOOP_ULL_RUNTIME_NEXT GOMP_loop_ull_runtime_next
614 #define KMP_API_NAME_GOMP_LOOP_ULL_RUNTIME_START GOMP_loop_ull_runtime_start
615 #define KMP_API_NAME_GOMP_LOOP_ULL_STATIC_NEXT GOMP_loop_ull_static_next
616 #define KMP_API_NAME_GOMP_LOOP_ULL_STATIC_START GOMP_loop_ull_static_start
618 // All GOMP_3.0 symbols
619 #define KMP_API_NAME_GOMP_TASKYIELD GOMP_taskyield
621 // All GOMP_4.0 symbols
622 // TODO: As of 2013-10-14, none of the GOMP_4.0 functions are implemented in
624 #define KMP_API_NAME_GOMP_BARRIER_CANCEL GOMP_barrier_cancel
625 #define KMP_API_NAME_GOMP_CANCEL GOMP_cancel
626 #define KMP_API_NAME_GOMP_CANCELLATION_POINT GOMP_cancellation_point
627 #define KMP_API_NAME_GOMP_LOOP_END_CANCEL GOMP_loop_end_cancel
628 #define KMP_API_NAME_GOMP_PARALLEL_LOOP_DYNAMIC GOMP_parallel_loop_dynamic
629 #define KMP_API_NAME_GOMP_PARALLEL_LOOP_GUIDED GOMP_parallel_loop_guided
630 #define KMP_API_NAME_GOMP_PARALLEL_LOOP_RUNTIME GOMP_parallel_loop_runtime
631 #define KMP_API_NAME_GOMP_PARALLEL_LOOP_STATIC GOMP_parallel_loop_static
632 #define KMP_API_NAME_GOMP_PARALLEL_SECTIONS GOMP_parallel_sections
633 #define KMP_API_NAME_GOMP_PARALLEL GOMP_parallel
634 #define KMP_API_NAME_GOMP_SECTIONS_END_CANCEL GOMP_sections_end_cancel
635 #define KMP_API_NAME_GOMP_TASKGROUP_START GOMP_taskgroup_start
636 #define KMP_API_NAME_GOMP_TASKGROUP_END GOMP_taskgroup_end
637 /* Target functions should be taken care of by liboffload */
638 #define KMP_API_NAME_GOMP_TARGET GOMP_target
639 #define KMP_API_NAME_GOMP_TARGET_DATA GOMP_target_data
640 #define KMP_API_NAME_GOMP_TARGET_END_DATA GOMP_target_end_data
641 #define KMP_API_NAME_GOMP_TARGET_UPDATE GOMP_target_update
642 #define KMP_API_NAME_GOMP_TEAMS GOMP_teams
644 // All GOMP_4.5 symbols
645 #define KMP_API_NAME_GOMP_TASKLOOP GOMP_taskloop
646 #define KMP_API_NAME_GOMP_TASKLOOP_ULL GOMP_taskloop_ull
647 #define KMP_API_NAME_GOMP_DOACROSS_POST GOMP_doacross_post
648 #define KMP_API_NAME_GOMP_DOACROSS_WAIT GOMP_doacross_wait
649 #define KMP_API_NAME_GOMP_LOOP_DOACROSS_STATIC_START \
650 GOMP_loop_doacross_static_start
651 #define KMP_API_NAME_GOMP_LOOP_DOACROSS_DYNAMIC_START \
652 GOMP_loop_doacross_dynamic_start
653 #define KMP_API_NAME_GOMP_LOOP_DOACROSS_GUIDED_START \
654 GOMP_loop_doacross_guided_start
655 #define KMP_API_NAME_GOMP_LOOP_DOACROSS_RUNTIME_START \
656 GOMP_loop_doacross_runtime_start
657 #define KMP_API_NAME_GOMP_DOACROSS_ULL_POST GOMP_doacross_ull_post
658 #define KMP_API_NAME_GOMP_DOACROSS_ULL_WAIT GOMP_doacross_ull_wait
659 #define KMP_API_NAME_GOMP_LOOP_ULL_DOACROSS_STATIC_START \
660 GOMP_loop_ull_doacross_static_start
661 #define KMP_API_NAME_GOMP_LOOP_ULL_DOACROSS_DYNAMIC_START \
662 GOMP_loop_ull_doacross_dynamic_start
663 #define KMP_API_NAME_GOMP_LOOP_ULL_DOACROSS_GUIDED_START \
664 GOMP_loop_ull_doacross_guided_start
665 #define KMP_API_NAME_GOMP_LOOP_ULL_DOACROSS_RUNTIME_START \
666 GOMP_loop_ull_doacross_runtime_start
668 #endif /* KMP_FTN_OS_H */