-/* Copyright (C) 2005-2018 Free Software Foundation, Inc.
+/* Copyright (C) 2005-2024 Free Software Foundation, Inc.
Contributed by Jakub Jelinek <jakub@redhat.com>.
This file is part of the GNU Offloading and Multi Processing Library
ialias_redirect (omp_test_nest_lock)
# endif
ialias_redirect (omp_set_dynamic)
-ialias_redirect (omp_set_nested)
-ialias_redirect (omp_set_num_threads)
ialias_redirect (omp_get_dynamic)
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
+ialias_redirect (omp_set_nested)
ialias_redirect (omp_get_nested)
+#pragma GCC diagnostic pop
+ialias_redirect (omp_set_num_threads)
ialias_redirect (omp_in_parallel)
ialias_redirect (omp_get_max_threads)
ialias_redirect (omp_get_num_procs)
ialias_redirect (omp_get_thread_limit)
ialias_redirect (omp_set_max_active_levels)
ialias_redirect (omp_get_max_active_levels)
+ialias_redirect (omp_get_supported_active_levels)
+ialias_redirect (omp_set_num_teams)
+ialias_redirect (omp_get_max_teams)
+ialias_redirect (omp_set_teams_thread_limit)
+ialias_redirect (omp_get_teams_thread_limit)
ialias_redirect (omp_get_level)
ialias_redirect (omp_get_ancestor_thread_num)
ialias_redirect (omp_get_team_size)
ialias_redirect (omp_get_active_level)
ialias_redirect (omp_in_final)
+ialias_redirect (omp_in_explicit_task)
ialias_redirect (omp_get_cancellation)
ialias_redirect (omp_get_proc_bind)
ialias_redirect (omp_get_num_places)
ialias_redirect (omp_set_default_device)
ialias_redirect (omp_get_default_device)
ialias_redirect (omp_get_num_devices)
+ialias_redirect (omp_get_device_num)
ialias_redirect (omp_get_num_teams)
ialias_redirect (omp_get_team_num)
ialias_redirect (omp_is_initial_device)
ialias_redirect (omp_get_max_task_priority)
ialias_redirect (omp_pause_resource)
ialias_redirect (omp_pause_resource_all)
+ialias_redirect (omp_init_allocator)
+ialias_redirect (omp_destroy_allocator)
+ialias_redirect (omp_set_default_allocator)
+ialias_redirect (omp_get_default_allocator)
+ialias_redirect (omp_display_env)
+ialias_redirect (omp_fulfill_event)
#endif
#ifndef LIBGOMP_GNU_SYMBOL_VERSIONING
omp_set_dynamic (!!*set);
}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
void
omp_set_nested_ (const int32_t *set)
{
{
omp_set_nested (!!*set);
}
+#pragma GCC diagnostic pop
void
omp_set_num_threads_ (const int32_t *set)
return omp_get_dynamic ();
}
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
int32_t
omp_get_nested_ (void)
{
return omp_get_nested ();
}
+#pragma GCC diagnostic pop
int32_t
omp_in_parallel_ (void)
return omp_get_max_active_levels ();
}
+int32_t
+omp_get_supported_active_levels_ (void)
+{
+ return omp_get_supported_active_levels ();
+}
+
int32_t
omp_get_level_ (void)
{
return omp_in_final ();
}
+int32_t
+omp_in_explicit_task_ (void)
+{
+ return omp_in_explicit_task ();
+}
+
+void
+omp_set_num_teams_ (const int32_t *num_teams)
+{
+ omp_set_num_teams (*num_teams);
+}
+
+void
+omp_set_num_teams_8_ (const int64_t *num_teams)
+{
+ omp_set_num_teams (TO_INT (*num_teams));
+}
+
+int32_t
+omp_get_max_teams_ (void)
+{
+ return omp_get_max_teams ();
+}
+
+void
+omp_set_teams_thread_limit_ (const int32_t *thread_limit)
+{
+ omp_set_teams_thread_limit (*thread_limit);
+}
+
+void
+omp_set_teams_thread_limit_8_ (const int64_t *thread_limit)
+{
+ omp_set_teams_thread_limit (TO_INT (*thread_limit));
+}
+
+int32_t
+omp_get_teams_thread_limit_ (void)
+{
+ return omp_get_teams_thread_limit ();
+}
+
int32_t
omp_get_cancellation_ (void)
{
return omp_get_initial_device ();
}
+int32_t
+omp_get_device_num_ (void)
+{
+ return omp_get_device_num ();
+}
+
int32_t
omp_get_max_task_priority_ (void)
{
return omp_get_max_task_priority ();
}
+void
+omp_fulfill_event_ (intptr_t event)
+{
+ omp_fulfill_event ((omp_event_handle_t) event);
+}
+
void
omp_set_affinity_format_ (const char *format, size_t format_len)
{
if (ret < sizeof buf)
{
buf[ret] = '\n';
- fwrite (buf, 1, ret + 1, stderr);
+ gomp_print_string (buf, ret + 1);
}
else
{
format_len ? fmt : gomp_affinity_format_var,
gomp_thread_self (), &thr->ts, thr->place);
b[ret] = '\n';
- fwrite (b, 1, ret + 1, stderr);
+ gomp_print_string (b, ret + 1);
free (b);
}
if (fmt && fmt != fmt_buf)
{
return omp_pause_resource_all (*kind);
}
+
+intptr_t
+omp_init_allocator_ (const intptr_t *memspace, const int32_t *ntraits,
+ const omp_alloctrait_t *traits)
+{
+ return (intptr_t) omp_init_allocator ((omp_memspace_handle_t) *memspace,
+ (int) *ntraits, traits);
+}
+
+intptr_t
+omp_init_allocator_8_ (const intptr_t *memspace, const int64_t *ntraits,
+ const omp_alloctrait_t *traits)
+{
+ return (intptr_t) omp_init_allocator ((omp_memspace_handle_t) *memspace,
+ (int) *ntraits, traits);
+}
+
+void
+omp_destroy_allocator_ (const intptr_t *allocator)
+{
+ omp_destroy_allocator ((omp_allocator_handle_t) *allocator);
+}
+
+void
+omp_set_default_allocator_ (const intptr_t *allocator)
+{
+ omp_set_default_allocator ((omp_allocator_handle_t) *allocator);
+}
+
+intptr_t
+omp_get_default_allocator_ ()
+{
+ return (intptr_t) omp_get_default_allocator ();
+}
+
+#ifndef LIBGOMP_OFFLOADED_ONLY
+
+void
+omp_display_env_ (const int32_t *verbose)
+{
+ omp_display_env (*verbose);
+}
+
+void
+omp_display_env_8_ (const int64_t *verbose)
+{
+ omp_display_env (!!*verbose);
+}
+
+#endif /* LIBGOMP_OFFLOADED_ONLY */