Zero  0.1.0
random_input.h
Go to the documentation of this file.
1 /* -*- mode:C++; c-basic-offset:4 -*-
2  Shore-kits -- Benchmark implementations for Shore-MT
3 
4  Copyright (c) 2007-2009
5  Data Intensive Applications and Systems Labaratory (DIAS)
6  Ecole Polytechnique Federale de Lausanne
7 
8  All Rights Reserved.
9 
10  Permission to use, copy, modify and distribute this software and
11  its documentation is hereby granted, provided that both the
12  copyright notice and this permission notice appear in all copies of
13  the software, derivative works or modified versions, and any
14  portions thereof, and that both notices appear in supporting
15  documentation.
16 
17  This code is distributed in the hope that it will be useful, but
18  WITHOUT ANY WARRANTY; without even the implied warranty of
19  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS
20  DISCLAIM ANY LIABILITY OF ANY KIND FOR ANY DAMAGES WHATSOEVER
21  RESULTING FROM THE USE OF THIS SOFTWARE.
22 */
23 
33 #ifndef __RANDOM_INPUT_H
34 #define __RANDOM_INPUT_H
35 
36 #include "zipfian.h"
37 #include "kits_thread.h"
38 
39 int URand(const int low, const int high);
40 
41 bool URandBool();
42 
43 short URandShort(const short low, const short high);
44 
45 void URandFillStrCaps(char* dest, const int sz);
46 
47 void URandFillStrNumbx(char* dest, const int sz);
48 
49 int ZRand(const int low, const int high);
50 
51 void setZipf(const bool isEnabled, const double s);
52 
53 int UZRand(const int low, const int high);
54 
55 #endif // __RANDOM_INPUT_H
int URand(const int low, const int high)
Generates a uniform random number between (low) and (high)
Definition: random_input.cpp:11
void URandFillStrNumbx(char *dest, const int sz)
Definition: random_input.cpp:44
void URandFillStrCaps(char *dest, const int sz)
Definition: random_input.cpp:36
int UZRand(const int low, const int high)
Definition: random_input.cpp:76
short URandShort(const short low, const short high)
Definition: random_input.cpp:25
int ZRand(const int low, const int high)
Definition: random_input.cpp:58
bool URandBool()
Definition: random_input.cpp:20
void setZipf(const bool isEnabled, const double s)
Definition: random_input.cpp:70