Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(91)

Side by Side Diff: src/IceRNG.cpp

Issue 1488913002: fix doxygen brief in subzero header files (Closed) Base URL: https://chromium.googlesource.com/native_client/pnacl-subzero.git@master
Patch Set: Make changes suggested by stichnot. Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/IceRNG.h ('k') | src/IceRegAlloc.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- subzero/src/IceRNG.cpp - PRNG implementation -----------------------===// 1 //===- subzero/src/IceRNG.cpp - PRNG implementation -----------------------===//
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 /// \file 10 /// \file
11 /// This file implements the random number generator. 11 /// \brief Implements the random number generator.
12 /// 12 ///
13 //===----------------------------------------------------------------------===// 13 //===----------------------------------------------------------------------===//
14 14
15 #include "IceRNG.h" 15 #include "IceRNG.h"
16 16
17 #include <ctime> 17 #include <ctime>
18 18
19 namespace Ice { 19 namespace Ice {
20 20
21 namespace { 21 namespace {
(...skipping 23 matching lines...) Expand all
45 // Lewis, Goodman, and Miller (1969) 45 // Lewis, Goodman, and Miller (1969)
46 State = (16807 * State) % MAX; 46 State = (16807 * State) % MAX;
47 return State % Max; 47 return State % Max;
48 } 48 }
49 49
50 bool RandomNumberGeneratorWrapper::getTrueWithProbability(float Probability) { 50 bool RandomNumberGeneratorWrapper::getTrueWithProbability(float Probability) {
51 return RNG.next(MAX) < Probability * MAX; 51 return RNG.next(MAX) < Probability * MAX;
52 } 52 }
53 53
54 } // end of namespace Ice 54 } // end of namespace Ice
OLDNEW
« no previous file with comments | « src/IceRNG.h ('k') | src/IceRegAlloc.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698