From 69f2911e04ffb1b19eef1fafb8c040af271f656e Mon Sep 17 00:00:00 2001 From: Tor Aamodt Date: Thu, 15 Jul 2010 18:09:46 -0800 Subject: creating branch for adding support for CUDA 3.x and Fermi [git-p4: depot-paths = "//depot/gpgpu_sim_research/fermi/distribution/": change = 6829] --- src/intersim/random_utils.hpp | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/intersim/random_utils.hpp (limited to 'src/intersim/random_utils.hpp') diff --git a/src/intersim/random_utils.hpp b/src/intersim/random_utils.hpp new file mode 100644 index 0000000..290953d --- /dev/null +++ b/src/intersim/random_utils.hpp @@ -0,0 +1,21 @@ +#ifndef _RANDOM_UTILS_HPP_ +#define _RANDOM_UTILS_HPP_ + +#include "rng.hpp" + +#ifdef USE_TWISTER +extern unsigned long int_genrand( ); +extern void int_lsgenrand( unsigned long seed_array[] ); +extern void int_sgenrand( unsigned long seed ); + +extern double float_genrand( ); +extern void float_lsgenrand( unsigned long seed_array[] ); +extern void float_sgenrand( unsigned long seed ); +#endif + +void RandomSeed( long seed ); +int RandomInt( int max ) ; +float RandomFloat( float max = 1.0 ); +unsigned long RandomIntLong( ); + +#endif -- cgit v1.3