From: Milind Bhandarkar
Date: Thu, 29 Oct 1998 23:05:48 +0000 (+0000)
Subject: Added the Crn module documentation to the conv-ext manual.
X-Git-Tag: charm499~12
X-Git-Url: https://charm.cs.illinois.edu/gerrit/gitweb?p=charm.git;a=commitdiff_plain;h=daa587727485ea293cab5a4e5f554960c6a15a39
Added the Crn module documentation to the conv-ext manual.
---
diff --git a/doc/convext/manual.tex b/doc/convext/manual.tex
index 126a4827ae..a3dc669c77 100644
--- a/doc/convext/manual.tex
+++ b/doc/convext/manual.tex
@@ -74,6 +74,7 @@ these modules along with Converse as a convenience. {\em You don't
need to read any part of this manual to use Converse.}
\input{msgmgr}
+\input{random}
\input{cpm}
\input{cldb}
\input{futures}
diff --git a/doc/convext/random.tex b/doc/convext/random.tex
new file mode 100644
index 0000000000..0b034cac80
--- /dev/null
+++ b/doc/convext/random.tex
@@ -0,0 +1,51 @@
+\chapter{Converse Pseudorandom Number Generator}
+
+Converse provides three different Linear Congruential Random Number Generators.
+Each random number stream has a cycle length of $2^{64}$ as opposed to
+ANSI C standard's $2^{48}$.
+Also, each of the three random number streams can be split into a number of
+per processor streams, so that the random number sequences can be computed
+in parallel, and are reproducible. Furthermore, there is no implicit critical
+section in the random number generator,and yet, this functionality is
+thread-safe, because all the state information is stored in the structure
+allocated by the programmer. Further, this state information is stored in a
+first class object, and can be passed to other processors through messages.
+This module of Converse is based on the public-domain
+SPRNG\footnote{URL:{\tt http://www.ncsa.uiuc.edu/Apps/SPRNG/www/}}
+package developed
+by Ashok Srinivasan\footnote{Email:{\tt ashoks@ncsa.uiuc.edu}} at NCSA.
+
+Interface to the Converse Pseudorandom Number Generator module is as follows:
+
+\function{typedef ... CrnStream;}
+\index{CrnStream}
+\desc{State information for generating the next random number in the sequence.}
+
+\function{void CrnInitStream(CrnStream *stream, int seed, int type)}
+\index{CrnInitStream}
+\desc{Initializes the new random number stream \param{stream}
+of \param{type} using \param{seed}. \param{type} can have values 0, 1, or 2
+to represent three types of linear congruential random number generators.}
+
+
+\function{int CrnInt(CrnStream *stream)}
+\index{CrnInt}
+\desc{Returns an integer between 0 and $2^{31}-1$ corresponding to the next
+random number in the sequence associated with \param{stream}.
+Advances \param{stream} by one in the sequence.}
+
+\function{double CrnDouble(CrnStream *stream)}
+\index{CrnDouble}
+\desc{Returns an double precision floating point number between 0 and 1
+corresponding to the next
+random number in the sequence associated with \param{stream}.
+Advances \param{stream} by one in the sequence.}
+\desc{}
+
+\function{float CrnFloat(CrnStream *stream)}
+\index{CrnFloat}
+\desc{Returns a single precision floating point number between 0 and 1
+corresponding to the next
+random number in the sequence associated with \param{stream}.
+Advances \param{stream} by one in the sequence.}
+