summaryrefslogtreecommitdiffstats
path: root/openmp/runtime/src/include
diff options
context:
space:
mode:
Diffstat (limited to 'openmp/runtime/src/include')
-rw-r--r--openmp/runtime/src/include/40/iomp.h.var10
-rw-r--r--openmp/runtime/src/include/40/omp.h.var25
-rw-r--r--openmp/runtime/src/include/40/omp_lib.f.var27
-rw-r--r--openmp/runtime/src/include/40/omp_lib.f90.var18
4 files changed, 56 insertions, 24 deletions
diff --git a/openmp/runtime/src/include/40/iomp.h.var b/openmp/runtime/src/include/40/iomp.h.var
index 88b74f35b79..8aeb38c3bc2 100644
--- a/openmp/runtime/src/include/40/iomp.h.var
+++ b/openmp/runtime/src/include/40/iomp.h.var
@@ -82,6 +82,16 @@
extern void __KAI_KMPC_CONVENTION kmp_set_warnings_on(void);
extern void __KAI_KMPC_CONVENTION kmp_set_warnings_off(void);
+ /* schedule kind constants */
+ typedef enum kmp_cancel_kind_t {
+ kmp_cancel_parallel = 1,
+ kmp_cancel_loop = 2,
+ kmp_cancel_sections = 3,
+ kmp_cancel_taskgroup = 4
+ } kmp_cancel_kind_t;
+
+ extern int __KAI_KMPC_CONVENTION kmp_get_cancellation_status(kmp_cancel_kind_t);
+
# undef __KAI_KMPC_CONVENTION
/* Warning:
diff --git a/openmp/runtime/src/include/40/omp.h.var b/openmp/runtime/src/include/40/omp.h.var
index 38400d418b1..c6dd4cd4ee1 100644
--- a/openmp/runtime/src/include/40/omp.h.var
+++ b/openmp/runtime/src/include/40/omp.h.var
@@ -27,30 +27,6 @@
extern "C" {
# endif
-# define omp_set_num_threads ompc_set_num_threads
-# define omp_set_dynamic ompc_set_dynamic
-# define omp_set_nested ompc_set_nested
-# define omp_set_max_active_levels ompc_set_max_active_levels
-# define omp_set_schedule ompc_set_schedule
-# define omp_get_ancestor_thread_num ompc_get_ancestor_thread_num
-# define omp_get_team_size ompc_get_team_size
-
-
-# define kmp_set_stacksize kmpc_set_stacksize
-# define kmp_set_stacksize_s kmpc_set_stacksize_s
-# define kmp_set_blocktime kmpc_set_blocktime
-# define kmp_set_library kmpc_set_library
-# define kmp_set_defaults kmpc_set_defaults
-# define kmp_set_affinity_mask_proc kmpc_set_affinity_mask_proc
-# define kmp_unset_affinity_mask_proc kmpc_unset_affinity_mask_proc
-# define kmp_get_affinity_mask_proc kmpc_get_affinity_mask_proc
-
-# define kmp_malloc kmpc_malloc
-# define kmp_calloc kmpc_calloc
-# define kmp_realloc kmpc_realloc
-# define kmp_free kmpc_free
-
-
# if defined(_WIN32)
# define __KAI_KMPC_CONVENTION __cdecl
# else
@@ -120,6 +96,7 @@
extern int __KAI_KMPC_CONVENTION omp_get_num_devices (void);
extern int __KAI_KMPC_CONVENTION omp_get_num_teams (void);
extern int __KAI_KMPC_CONVENTION omp_get_team_num (void);
+ extern int __KAI_KMPC_CONVENTION omp_get_cancellation (void);
# include <stdlib.h>
/* kmp API functions */
diff --git a/openmp/runtime/src/include/40/omp_lib.f.var b/openmp/runtime/src/include/40/omp_lib.f.var
index 0adadb10260..fb9b2f28da4 100644
--- a/openmp/runtime/src/include/40/omp_lib.f.var
+++ b/openmp/runtime/src/include/40/omp_lib.f.var
@@ -32,6 +32,7 @@
integer, parameter :: kmp_pointer_kind = int_ptr_kind()
integer, parameter :: kmp_size_t_kind = int_ptr_kind()
integer, parameter :: kmp_affinity_mask_kind = int_ptr_kind()
+ integer, parameter :: kmp_cancel_kind = omp_integer_kind
end module omp_lib_kinds
@@ -56,6 +57,11 @@
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_close = 3
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_spread = 4
+ integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_parallel = 1
+ integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_loop = 2
+ integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_sections = 3
+ integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_taskgroup = 4
+
interface
! ***
@@ -199,6 +205,11 @@
integer (kind=omp_integer_kind) omp_get_team_num
end function omp_get_team_num
+ function omp_get_cancellation()
+ use omp_lib_kinds
+ integer (kind=omp_integer_kind) omp_get_cancellation
+ end function omp_get_cancellation
+
subroutine omp_init_lock(lockvar)
!DIR$ IF(__INTEL_COMPILER.GE.1400)
!DIR$ attributes known_intrinsic :: omp_init_lock
@@ -417,6 +428,11 @@
subroutine kmp_set_warnings_off()
end subroutine kmp_set_warnings_off
+ function kmp_get_cancellation_status(cancelkind)
+ use omp_lib_kinds
+ integer (kind=kmp_cancel_kind) cancelkind
+ logical (kind=omp_logical_kind) kmp_get_cancellation_status
+ end function kmp_get_cancellation_status
end interface
!dec$ if defined(_WIN32)
@@ -459,6 +475,7 @@
!dec$ attributes alias:'OMP_GET_NUM_DEVICES' :: omp_get_num_devices
!dec$ attributes alias:'OMP_GET_NUM_TEAMS' :: omp_get_num_teams
!dec$ attributes alias:'OMP_GET_TEAM_NUM' :: omp_get_team_num
+!dec$ attributes alias:'OMP_GET_CANCELLATION' :: omp_get_cancellation
!dec$ attributes alias:'omp_init_lock' :: omp_init_lock
!dec$ attributes alias:'omp_destroy_lock' :: omp_destroy_lock
@@ -498,6 +515,8 @@
!dec$ attributes alias:'KMP_SET_WARNINGS_ON'::kmp_set_warnings_on
!dec$ attributes alias:'KMP_SET_WARNINGS_OFF'::kmp_set_warnings_off
+!dec$ attributes alias:'KMP_GET_CANCELLATION_STATUS' :: kmp_get_cancellation_status
+
!dec$ else
!***
@@ -531,6 +550,7 @@
!dec$ attributes alias:'_OMP_GET_NUM_DEVICES' :: omp_get_num_devices
!dec$ attributes alias:'_OMP_GET_NUM_TEAMS' :: omp_get_num_teams
!dec$ attributes alias:'_OMP_GET_TEAM_NUM' :: omp_get_team_num
+!dec$ attributes alias:'_OMP_GET_CANCELLATION' :: omp_get_cancellation
!dec$ attributes alias:'_omp_init_lock' :: omp_init_lock
!dec$ attributes alias:'_omp_destroy_lock' :: omp_destroy_lock
@@ -570,6 +590,8 @@
!dec$ attributes alias:'_KMP_SET_WARNINGS_ON'::kmp_set_warnings_on
!dec$ attributes alias:'_KMP_SET_WARNINGS_OFF'::kmp_set_warnings_off
+!dec$ attributes alias:'_KMP_GET_CANCELLATION_STATUS' :: kmp_get_cancellation_status
+
!dec$ endif
!dec$ endif
@@ -606,6 +628,7 @@
!dec$ attributes alias:'omp_get_num_devices_'::omp_get_num_devices
!dec$ attributes alias:'omp_get_num_teams_'::omp_get_num_teams
!dec$ attributes alias:'omp_get_team_num_'::omp_get_team_num
+!dec$ attributes alias:'omp_get_cancellation_'::omp_get_cancellation
!dec$ attributes alias:'omp_init_lock_'::omp_init_lock
!dec$ attributes alias:'omp_destroy_lock_'::omp_destroy_lock
@@ -644,6 +667,7 @@
!dec$ attributes alias:'kmp_set_warnings_on_'::kmp_set_warnings_on
!dec$ attributes alias:'kmp_set_warnings_off_'::kmp_set_warnings_off
+!dec$ attributes alias:'kmp_get_cancellation_status_'::kmp_get_cancellation_status
!dec$ endif
@@ -678,6 +702,7 @@
!dec$ attributes alias:'_omp_get_wtick_'::omp_get_wtick
!dec$ attributes alias:'_omp_get_num_teams_'::omp_get_num_teams
!dec$ attributes alias:'_omp_get_team_num_'::omp_get_team_num
+!dec$ attributes alias:'_omp_get_cancellation_'::omp_get_cancellation
!dec$ attributes alias:'_omp_init_lock_'::omp_init_lock
!dec$ attributes alias:'_omp_destroy_lock_'::omp_destroy_lock
@@ -717,6 +742,8 @@
!dec$ attributes alias:'_kmp_set_warnings_on_'::kmp_set_warnings_on
!dec$ attributes alias:'_kmp_set_warnings_off_'::kmp_set_warnings_off
+!dec$ attributes alias:'_kmp_get_cancellation_status_'::kmp_get_cancellation_status
+
!dec$ endif
end module omp_lib
diff --git a/openmp/runtime/src/include/40/omp_lib.f90.var b/openmp/runtime/src/include/40/omp_lib.f90.var
index 5cac259b49e..f78535212ca 100644
--- a/openmp/runtime/src/include/40/omp_lib.f90.var
+++ b/openmp/runtime/src/include/40/omp_lib.f90.var
@@ -28,6 +28,7 @@
integer, parameter :: kmp_pointer_kind = c_intptr_t
integer, parameter :: kmp_size_t_kind = c_size_t
integer, parameter :: kmp_affinity_mask_kind = c_intptr_t
+ integer, parameter :: kmp_cancel_kind = omp_integer_kind
end module omp_lib_kinds
@@ -47,12 +48,18 @@
integer(kind=omp_sched_kind), parameter :: omp_sched_guided = 3
integer(kind=omp_sched_kind), parameter :: omp_sched_auto = 4
+
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_false = 0
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_true = 1
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_master = 2
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_close = 3
integer (kind=omp_proc_bind_kind), parameter :: omp_proc_bind_spread = 4
+ integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_parallel = 1
+ integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_loop = 2
+ integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_sections = 3
+ integer (kind=kmp_cancel_kind), parameter :: kmp_cancel_taskgroup = 4
+
interface
! ***
@@ -198,6 +205,11 @@
integer (kind=omp_integer_kind) omp_get_team_num
end function omp_get_team_num
+ function omp_get_cancellation() bind(c)
+ use omp_lib_kinds
+ integer (kind=omp_integer_kind) omp_get_cancellation
+ end function omp_get_cancellation
+
subroutine omp_init_lock(lockvar) bind(c)
!DIR$ IF(__INTEL_COMPILER.GE.1400)
!DIR$ attributes known_intrinsic :: omp_init_lock
@@ -417,6 +429,12 @@
subroutine kmp_set_warnings_off() bind(c)
end subroutine kmp_set_warnings_off
+ function kmp_get_cancellation_status(cancelkind) bind(c)
+ use omp_lib_kinds
+ integer (kind=kmp_cancel_kind), value :: cancelkind
+ logical (kind=omp_logical_kind) kmp_get_cancellation_status
+ end function kmp_get_cancellation_status
+
end interface
end module omp_lib
OpenPOWER on IntegriCloud