OLD | NEW |
1 //===- subzero/src/IceRNG.h - Random number generator -----------*- C++ -*-===// | 1 //===- subzero/src/IceRNG.h - Random number generator -----------*- C++ -*-===// |
2 // | 2 // |
3 // The Subzero Code Generator | 3 // The Subzero Code Generator |
4 // | 4 // |
5 // This file is distributed under the University of Illinois Open Source | 5 // This file is distributed under the University of Illinois Open Source |
6 // License. See LICENSE.TXT for details. | 6 // License. See LICENSE.TXT for details. |
7 // | 7 // |
8 //===----------------------------------------------------------------------===// | 8 //===----------------------------------------------------------------------===// |
9 // | 9 // |
10 // This file declares a random number generator. | 10 // This file declares a random number generator. |
11 // | 11 // |
12 //===----------------------------------------------------------------------===// | 12 //===----------------------------------------------------------------------===// |
13 | 13 |
14 #ifndef SUBZERO_SRC_ICERNG_H | 14 #ifndef SUBZERO_SRC_ICERNG_H |
15 #define SUBZERO_SRC_ICERNG_H | 15 #define SUBZERO_SRC_ICERNG_H |
16 | 16 |
17 #include <stdint.h> | 17 #include <cstdint> |
| 18 |
18 #include "llvm/ADT/StringRef.h" | 19 #include "llvm/ADT/StringRef.h" |
19 #include "llvm/Support/Compiler.h" | 20 #include "llvm/Support/Compiler.h" |
20 | 21 |
21 namespace Ice { | 22 namespace Ice { |
22 | 23 |
23 class RandomNumberGenerator { | 24 class RandomNumberGenerator { |
24 public: | 25 public: |
25 RandomNumberGenerator(llvm::StringRef Salt); | 26 RandomNumberGenerator(llvm::StringRef Salt); |
26 uint64_t next(uint64_t Max); | 27 uint64_t next(uint64_t Max); |
27 | 28 |
(...skipping 19 matching lines...) Expand all Loading... |
47 LLVM_DELETED_FUNCTION; | 48 LLVM_DELETED_FUNCTION; |
48 RandomNumberGeneratorWrapper & | 49 RandomNumberGeneratorWrapper & |
49 operator=(const RandomNumberGeneratorWrapper &) LLVM_DELETED_FUNCTION; | 50 operator=(const RandomNumberGeneratorWrapper &) LLVM_DELETED_FUNCTION; |
50 | 51 |
51 RandomNumberGenerator &RNG; | 52 RandomNumberGenerator &RNG; |
52 }; | 53 }; |
53 | 54 |
54 } // end of namespace Ice | 55 } // end of namespace Ice |
55 | 56 |
56 #endif // SUBZERO_SRC_ICERNG_H | 57 #endif // SUBZERO_SRC_ICERNG_H |
OLD | NEW |