GHOST  1.1.2
General, Hybrid, and Optimized Sparse Toolkit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
omp.h File Reference

Function wrappers for OpenMP functions. If OpenMP ist disabled, the function are still defined but stubs. More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void ghost_omp_nthread_set (int nthreads)
 Set the number of threads. More...
 
int ghost_omp_threadnum ()
 Get the active thread number. More...
 
int ghost_omp_nthread ()
 Get the number of OpenMP threads. More...
 
int ghost_omp_get_nested ()
 Check whether nested parallelism is enabled. More...
 
void ghost_omp_set_nested (int nested)
 En- or disable nested parallelism. More...
 
int ghost_omp_in_parallel ()
 Check whether one is in an active parallel region. More...
 
void ghost_omp_set_dynamic (int dynamic_threads)
 Indicates that the number of threads available in subsequent parallel region can be adjusted by the run time. More...
 

Detailed Description

Function wrappers for OpenMP functions. If OpenMP ist disabled, the function are still defined but stubs.

Author
Moritz Kreutzer morit.nosp@m.z.kr.nosp@m.eutze.nosp@m.r@fa.nosp@m.u.de

Function Documentation

int ghost_omp_get_nested ( )

Check whether nested parallelism is enabled.

Returns
1 if nested parallelism is enabled, 0 if not.
int ghost_omp_in_parallel ( )

Check whether one is in an active parallel region.

Returns
1 if in parallel region, 0 otherwise.
int ghost_omp_nthread ( )

Get the number of OpenMP threads.

Returns
The number of threads.
void ghost_omp_nthread_set ( int  nthreads)

Set the number of threads.

Parameters
nthreadsThe number of threads.
void ghost_omp_set_dynamic ( int  dynamic_threads)

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

Parameters
dynamic_threads0 implies no runtime adjustments, else runtime adjustments are enabled
void ghost_omp_set_nested ( int  nested)

En- or disable nested parallelism.

Parameters
nested1 if nested parallelism should be en-, 0 if it should be disabled.
int ghost_omp_threadnum ( )

Get the active thread number.

Returns
The thread number.