Compartir a través de


OpenMP Functions

Provides links to functions used in the OpenMP API.

The Visual C++ implementation of the OpenMP standard includes the following functions.

Function

Description

omp_destroy_lock

Uninitializes a lock.

omp_destroy_nest_lock

Uninitializes a nestable lock.

omp_get_dynamic

Returns a value that indicates if the number of threads available in subsequent parallel region can be adjusted by the run time.

omp_get_max_threads

Returns an integer that is equal to or greater than the number of threads that would be available if a parallel region without num_threads were defined at that point in the code.

omp_get_nested

Returns a value that indicates if nested parallelism is enabled.

omp_get_num_procs

Returns the number of processors that are available when the function is called.

omp_get_num_threads

Returns the number of threads in the parallel region.

omp_get_thread_num

Returns the thread number of the thread executing within its thread team.

omp_get_wtick

Returns the number of seconds between processor clock ticks.

omp_get_wtime

Returns a value in seconds of the time elapsed from some point.

omp_in_parallel

Returns nonzero if called from within a parallel region.

omp_init_lock

Initializes a simple lock.

omp_init_nest_lock

Initializes a lock.

omp_set_dynamic

Indicates that the number of threads available in subsequent parallel region can be adjusted by the run time.

omp_set_lock

Blocks thread execution until a lock is available.

omp_set_nest_lock

Blocks thread execution until a lock is available.

omp_set_nested

Enables nested parallelism.

omp_set_num_threads

Sets the number of threads in subsequent parallel regions, unless overridden by a num_threads clause.

omp_test_lock

Attempts to set a lock but does not block thread execution.

omp_test_nest_lock

Attempts to set a nestable lock but does not block thread execution.

omp_unset_lock

Releases a lock.

omp_unset_nest_lock

Releases a nestable lock.

See Also

Reference

OpenMP Library Reference