OLD | NEW |
(Empty) | |
| 1 //===- subzero/src/IceRNG.h - Random number generator -----------*- C++ -*-===// |
| 2 // |
| 3 // The Subzero Code Generator |
| 4 // |
| 5 // This file is distributed under the University of Illinois Open Source |
| 6 // License. See LICENSE.TXT for details. |
| 7 // |
| 8 //===----------------------------------------------------------------------===// |
| 9 // |
| 10 // This file declares a random number generator. |
| 11 // |
| 12 //===----------------------------------------------------------------------===// |
| 13 |
| 14 #ifndef SUBZERO_SRC_ICERNG_H |
| 15 #define SUBZERO_SRC_ICERNG_H |
| 16 |
| 17 #include <stdint.h> |
| 18 #include "llvm/ADT/StringRef.h" |
| 19 |
| 20 namespace Ice { |
| 21 |
| 22 class RandomNumberGenerator { |
| 23 public: |
| 24 RandomNumberGenerator(llvm::StringRef Salt); |
| 25 uint64_t next(uint64_t Max); |
| 26 |
| 27 private: |
| 28 uint64_t State; |
| 29 }; |
| 30 |
| 31 } // end of namespace Ice |
| 32 |
| 33 #endif // SUBZERO_SRC_ICERNG_H |
OLD | NEW |