Module 11: The “lastprivate” Clause
  Lecture 21: Clause and Routines
 


Run-Time Library Routines

OMP SET NESTED: Used to enable or disable nested parallelism.

Format
int omp set nested(int nested)
  • The default is for nested parallelism to be disabled
  • For C/C++, if nested evaluates to non-zero, nested parallelism is enabled;otherwise is disabled

OMP GET NESTED: Used to determine if nested parallelism is enabled or not.

Format
int omp get nested(void)
  • The default is for nested parallelism to be disabled
  • For C/C++, if non-zero value returned then nested parallelism is enabled;otherwise is disabled

OMP INIT LOCK: This subroutine initializes a lock associated with the lock variable.

Format
void omp init lock(omp lock t *lock)
void omp init nest lock(omp nest nest lock t *lock)
  • The initial state is unlocked

OMP DESTROY LOCK: This subroutine disassociates the given lock variable from any locks.

Format
void omp destroy lock(omp lock t *lock)
void omp destroy nest lock(omp nest nest lock t *lock)
  • It is illegal to call this routine with a lock variable that is not initialized