I'm wondering about the best ways to organize the .c files for libgomp.
It seems to me that we should have a separate .c file for each function.
Naming these individual files, however, could be problematic, given the long
names of the OpenMP functions. For example, for the omp_set_num_threads
function, we could have the following names:
libgomp_set_num_threads.c
omp_set_num_threads.c <<-- my preference
set_num_threads.c
Some sort of prefix (libgomp_ or omp_) makes sense, even though we keep the
code in its own directory.
And, of course, we can use dashes instead of underscores (although the
udnerscores reflect the actual function names).
I couldn't find a filename length restriction in the GNU standards.
Attached is a libgomp.h that reflects the comments from this group. Are the
issues with the cvs worked out yet?
..Scott
------------------------------------------------------------------------
/* 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
extern void omp_set_num_threads(int num_threads)
extern int omp_get_num_threads(void)
extern int omp_get_max_threads(void)
extern int omp_get_thread_num(void)
extern int omp_get_num_procs(void)
extern void omp_set_dynamic(int dynamic_threads)
extern int omp_get_dynamic(void)
extern int omp_in_parallel(void)
extern void omp_set_nested(int nested)
extern int omp_get_nested(void)
extern void omp_init_lock(omp_lock_t *lock)
extern void omp_destroy_lock(omp_lock_t *lock)
extern void omp_set_lock(omp_lock_t *lock)
extern void omp_unset_lock(omp_lock_t *lock)
extern int omp_test_lock(omp_lock_t *lock)
extern void omp_init_nest_lock(omp_nest_lock_t *lock)
extern void omp_destroy_nest_lock(omp_nest_lock_t *lock)
extern void omp_set_nest_lock(omp_nest_lock_t *lock)
extern void omp_unset_nest_lock(omp_nest_lock_t *lock)
extern int omp_test_nest_lock(omp_nest_lock_t *lock)
extern double omp_get_wtime(void)
extern double omp_get_wtick(void)
#ifdef __cplusplus
}
#endif
------------------------------------------------------------------------
_______________________________________________
Gomp-discuss mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/gomp-discuss