/* Function declarations for libgomp (GNU OpenMP). Copyright 2003 Free Software Foundation, Inc. Note - certain prototypes declared in this header file are for functions whoes implementation copyright does not belong to the FSF. Those prototypes are present in this file for reference purposes only and their presence in this file should not construed as an indication of ownership by the FSF of the implementation of those functions in any way or form whatsoever. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef LIBGOMP_H #define LIBGOMP_H #ifdef __cplusplus extern "C" { #endif #ifndef OMP_NEST_LOCK_T typedef struct { int owner; int count; } omp_nest_lock_t; #endif /* Sets the default number of threads to use for subsequent parallel regions that do not specify a num_threads clause. */ extern void omp_set_num_threads(int num_threads) /* Returns the number of threads currently in the team executing the parallel region from which it is called. */ extern int omp_get_num_threads(void) /* Returns an integer that is guaranteed to be at least as large as the number of threads that could be used to form a team. */ extern int omp_get_max_threads(void) /* Returns the thread number, with its team, of the thread executing this function. */ extern int omp_get_thread_num(void) /* Returns the number of available processors. */ extern int omp_get_num_procs(void) /* Enables or disables dynamic adjustment of the number of threads available for a parallel region. */ extern void omp_set_dynamic(int dynamic_threads) /* Returns nonzero if dynamic adjustment is enabled. */ extern int omp_get_dynamic(void) /* Returns a nonzero value if it is called within a parallel region executing in parallel. */ extern int omp_in_parallel(void) /* Enables or disables nested parallelism. */ extern void omp_set_nested(int nested) /* Returns nonzero if nested parallelism is enabled. */ extern int omp_get_nested(void) /* Initializes a simple lock. */ extern void omp_init_lock(omp_lock_t *lock) /* Destroys and removes a simple lock. */ extern void omp_destroy_lock(omp_lock_t *lock) /* Waits until a simple lock is available. */ extern void omp_set_lock(omp_lock_t *lock) /* Releases a simple lock. */ extern void omp_unset_lock(omp_lock_t *lock) /* Tests a simple lock. */ extern int omp_test_lock(omp_lock_t *lock) /* Initializes a nestable lock. */ extern void omp_init_nest_lock(omp_nest_lock_t *lock) /* Destroys and removes a nestable lock. */ extern void omp_destroy_nest_lock(omp_nest_lock_t *lock) /* Waits until a nestable lock is available. */ extern void omp_set_nest_lock(omp_nest_lock_t *lock) /* Releases a simple lock. */ extern void omp_unset_nest_lock(omp_nest_lock_t *lock) /* Tests a nestable lock. */ extern int omp_test_nest_lock(omp_nest_lock_t *lock) /* Returns a floating-point value equal to the elapsed wall clock time in seconds since some past time. The actual "time in the past" is implementation dependent. */ extern double omp_get_wtime(void) /* Returns the number of seconds between seccessive clock ticks. */ extern double omp_get_wtick(void) #ifdef __cplusplus } #endif