default_rng.h

Go to the documentation of this file.
00001 /*  _________________________________________________________________________
00002  *
00003  *  UTILIB: A utility library for developing portable C++ codes.
00004  *  Copyright (c) 2001, Sandia National Laboratories.
00005  *  This software is distributed under the GNU Lesser General Public License.
00006  *  For more information, see the README file in the top UTILIB directory.
00007  *  _________________________________________________________________________
00008  */
00009 
00017 #ifndef _default_rng_h
00018 #define _default_rng_h
00019 
00020 #ifdef __cplusplus
00021 #include "PM_LCG.h"
00022 
00027 extern UTILIB_API PM_LCG default_rng;
00028 #endif
00029 
00030 #include "real.h"
00031 #ifdef __cplusplus
00032 extern "C" {
00033 #endif
00034 
00038 extern REAL LEC_runif(void);
00039 #ifdef __cplusplus
00040 };
00041 #endif
00042 
00049 #ifdef OLDSTYLE_RANLIB
00050 #define ranf()  LEC_runif()
00051 #else
00052 #define ranf()  (*global_runif)()
00053 #ifdef __cplusplus
00054 extern "C" {
00055 #endif
00056 
00060 extern REAL (*global_runif)(void);
00061 #ifdef __cplusplus
00062 };
00063 #endif
00064 
00070 #define set_global_runif(func)  global_runif = func
00071 #endif
00072 
00073 #endif