pyccel.stdlib.internal.openmp module#
File providing functions to mimic OpenMP Runtime library routines to allow files to run in pure python mode
- pyccel.stdlib.internal.openmp.omp_get_active_level()[source]#
The omp_get_active_level routine returns the value of the active-level-vars ICV.
- pyccel.stdlib.internal.openmp.omp_get_ancestor_thread_num(level: int32)[source]#
The omp_get_ancestor_thread_num routine returns, for a given nested level of the current thread, the thread number of the ancestor of the current thread.
- Parameters:
level (int32)
- pyccel.stdlib.internal.openmp.omp_get_cancellation()[source]#
The omp_get_cancellation routine returns the value of the cancel-var ICV, which determines if cancellation is enabled or disabled.
- pyccel.stdlib.internal.openmp.omp_get_default_device()[source]#
The omp_get_default_device routine returns the default target device.
- pyccel.stdlib.internal.openmp.omp_get_dynamic()[source]#
The omp_get_dynamic routine returns the value of the dyn-var ICV, which determines whether dynamic adjustment of the number of threads is enabled or disabled.
- pyccel.stdlib.internal.openmp.omp_get_initial_device()[source]#
The omp_get_initial_device routine returns a device number that represents the host device.
- pyccel.stdlib.internal.openmp.omp_get_level()[source]#
The omp_get_level routine returns the value of the levels-var ICV.
- pyccel.stdlib.internal.openmp.omp_get_max_active_levels()[source]#
The omp_get_max_active_levels routine returns the value of the max-active-levels-var ICV, which determines the maximum number of nested active parallel regions on the device.
- pyccel.stdlib.internal.openmp.omp_get_max_task_priority()[source]#
The omp_get_max_task_priority routine returns the maximum value that can be specified in the priority clause.
- pyccel.stdlib.internal.openmp.omp_get_max_threads()[source]#
The omp_get_max_threads routine returns an upper bound on the number of threads that could be used to form a new team if a parallel construct without a num_threads clause were encountered after execution returns from this routine.
- pyccel.stdlib.internal.openmp.omp_get_nested()[source]#
The deprecated omp_get_nested routine returns whether nested parallelism is enabled or disabled, according to the value of the max-active-levels-var ICV.
- pyccel.stdlib.internal.openmp.omp_get_num_devices()[source]#
The omp_get_num_devices routine returns the number of target devices.
- pyccel.stdlib.internal.openmp.omp_get_num_places()[source]#
The omp_get_num_places routine returns the number of places available to the execution environment in the place list.
- pyccel.stdlib.internal.openmp.omp_get_num_procs()[source]#
The omp_get_num_procs routine returns the number of processors available to the device.
- pyccel.stdlib.internal.openmp.omp_get_num_teams()[source]#
The omp_get_num_teams routine returns the number of initial teams in the current teams region.
- pyccel.stdlib.internal.openmp.omp_get_num_threads()[source]#
The omp_get_num_threads routine returns the number of threads in the current team.
- pyccel.stdlib.internal.openmp.omp_get_partition_num_places()[source]#
The omp_get_partition_num_places routine returns the number of places in the place partition of the innermost implicit task.
- pyccel.stdlib.internal.openmp.omp_get_partition_place_nums(place_nums: int32[:])[source]#
The omp_get_partition_place_nums routine returns the list of place numbers corresponding to the places in the place-partition-var ICV of the innermost implicit task.
- Parameters:
place_nums (array of int32s) – To be filled by the function
- pyccel.stdlib.internal.openmp.omp_get_place_num()[source]#
The omp_get_place_num routine returns the place number of the place to which the encountering thread is bound.
- pyccel.stdlib.internal.openmp.omp_get_place_num_procs(place_num: int32)[source]#
The omp_get_place_num_procs routine returns the number of processors available to the execution environment in the specified place.
- Parameters:
place_num (int32)
- pyccel.stdlib.internal.openmp.omp_get_place_proc_ids(place_num: int32, ids: int32[:])[source]#
The omp_get_place_proc_ids routine returns the numerical identifiers of the processors available to the execution environment in the specified place.
- Parameters:
place_num (int32)
ids (array of int32s) – To be filled by the function
- pyccel.stdlib.internal.openmp.omp_get_proc_bind()[source]#
The omp_get_proc_bind routine returns the thread affinity policy to be used for the subsequent nested parallel regions that do not specify a proc_bind clause.
- pyccel.stdlib.internal.openmp.omp_get_schedule()[source]#
The omp_get_schedule routine returns the schedule that is applied when the runtime schedule is used.
Results#
kind : int32 chunk_size : int32
- pyccel.stdlib.internal.openmp.omp_get_team_num()[source]#
The omp_get_team_num routine returns the initial team number of the calling thread.
- pyccel.stdlib.internal.openmp.omp_get_team_size(level: int32)[source]#
The omp_get_team_size routine returns, for a given nested level of the current thread, the size of the thread team to which the ancestor or the current thread belongs.
- Parameters:
level (int32)
- pyccel.stdlib.internal.openmp.omp_get_thread_limit()[source]#
The omp_get_thread_limit routine returns the maximum number of OpenMP threads available to participate in the current contention group.
- pyccel.stdlib.internal.openmp.omp_get_thread_num()[source]#
The omp_get_thread_num routine returns the thread number, within the current team, of the calling thread
- pyccel.stdlib.internal.openmp.omp_in_final()[source]#
The omp_in_final routine returns true if the routine is executed in a final task region; otherwise, it returns false.
- pyccel.stdlib.internal.openmp.omp_in_parallel()[source]#
The omp_in_parallel routine returns true if the active-levels-var ICV is greater than zero; otherwise, it returns false
- pyccel.stdlib.internal.openmp.omp_is_initial_device()[source]#
The omp_is_initial_device routine returns true if the current task is executing on the host device; otherwise, it returns false.
- pyccel.stdlib.internal.openmp.omp_set_default_device(device_num: int32)[source]#
The omp_set_default_device routine controls the default target device by assigning the value of the default-device-var ICV.
- pyccel.stdlib.internal.openmp.omp_set_dynamic(dynamic_threads: bool)[source]#
The omp_set_dynamic routine enables or disables dynamic adjustment of the number of threads available for the execution of subsequent parallel regions by setting the value of the dyn-var ICV
:param : :type : bool
- pyccel.stdlib.internal.openmp.omp_set_max_active_levels(max_levels: int32)[source]#
The omp_set_max_active_levels routine limits the number of nested active parallel regions on the device, by setting the max-active-levels-var ICV
- Parameters:
max_levels (int32)
- pyccel.stdlib.internal.openmp.omp_set_nested(nested: bool)[source]#
The deprecated omp_set_nested routine enables or disables nested parallelism by setting the max-active-levels-var ICV.
- Parameters:
nested (bool)
- pyccel.stdlib.internal.openmp.omp_set_num_threads(num_threads: int32)[source]#
The omp_set_num_threads routine affects the number of threads to be used for subsequent parallel regions that do not specify a num_threads clause, by setting the value of the first element of the nthreads-var ICV of the current task.
- Parameters:
num_threads (int32)