GHOST  1.1.2
General, Hybrid, and Optimized Sparse Toolkit
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Functions
omp.c File Reference
#include "ghost/config.h"
#include "ghost/omp.h"
#include "ghost/util.h"
Include dependency graph for omp.c:

Functions

void ghost_omp_nthread_set (int nthreads)
 Set the number of threads. More...
 
int ghost_omp_nthread ()
 Get the number of OpenMP threads. More...
 
int ghost_omp_threadnum ()
 Get the active thread number. More...
 
int ghost_omp_get_nested ()
 Check whether nested parallelism is enabled. More...
 
int ghost_omp_in_parallel ()
 Check whether one is in an active parallel region. More...
 
void ghost_omp_set_nested (int nested)
 En- or disable nested parallelism. 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...
 

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.