Files
2016-04-27 01:07:35 -04:00

604 lines
25 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_51) on Wed Apr 06 13:11:03 EDT 2016 -->
<title>Prng (Parallel Java 2 Library Documentation)</title>
<meta name="date" content="2016-04-06">
<link rel="stylesheet" type="text/css" href="../../../../stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Prng (Parallel Java 2 Library Documentation)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Prng.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../edu/rit/gpu/example/Powers.html" title="class in edu.rit.gpu.example"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../edu/rit/gpu/example/WalkSackGpu.html" title="class in edu.rit.gpu.example"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?edu/rit/gpu/example/Prng.html" target="_top">Frames</a></li>
<li><a href="Prng.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">edu.rit.gpu.example</div>
<h2 title="Class Prng" class="title">Class Prng</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../edu/rit/gpu/Struct.html" title="class in edu.rit.gpu">edu.rit.gpu.Struct</a></li>
<li>
<ul class="inheritance">
<li>edu.rit.gpu.example.Prng</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public class <span class="strong">Prng</span>
extends <a href="../../../../edu/rit/gpu/Struct.html" title="class in edu.rit.gpu">Struct</a></pre>
<div class="block">Class Prng provides a pseudorandom number generator (PRNG). It is the Java
version of the CUDA <TT>prng_t</TT> structure in file Prng.cu. Class Prng can
be used to mirror PRNG objects between the CPU and the GPU.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><strong><a href="../../../../edu/rit/gpu/example/Prng.html#Prng()">Prng</a></strong>()</code>
<div class="block">Construct a new PRNG.</div>
</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method_summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<table class="overviewSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
<caption><span>Methods</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colFirst" scope="col">Modifier and Type</th>
<th class="colLast" scope="col">Method and Description</th>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/gpu/example/Prng.html#fromStruct(java.nio.ByteBuffer)">fromStruct</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buf)</code>
<div class="block">Read this Java object from the given byte buffer in the form of a C
struct.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>boolean</code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/gpu/example/Prng.html#nextBoolean()">nextBoolean</a></strong>()</code>
<div class="block">Return the Boolean value from the next pseudorandom value in this PRNG's
sequence.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>byte</code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/gpu/example/Prng.html#nextByte()">nextByte</a></strong>()</code>
<div class="block">Return the byte value from the next pseudorandom value in this PRNG's
sequence.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>double</code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/gpu/example/Prng.html#nextDouble()">nextDouble</a></strong>()</code>
<div class="block">Return the double precision floating point value from the next
pseudorandom value in this PRNG's sequence.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>float</code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/gpu/example/Prng.html#nextFloat()">nextFloat</a></strong>()</code>
<div class="block">Return the single precision floating point value from the next
pseudorandom value in this PRNG's sequence.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/gpu/example/Prng.html#nextInt(int)">nextInt</a></strong>(int&nbsp;n)</code>
<div class="block">Return the integer value in the given range from the next pseudorandom
value in this PRNG's sequence.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/gpu/example/Prng.html#nextInteger()">nextInteger</a></strong>()</code>
<div class="block">Return the integer value from the next pseudorandom value in this PRNG's
sequence.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/gpu/example/Prng.html#nextLong()">nextLong</a></strong>()</code>
<div class="block">Return the long value from the next pseudorandom value in this PRNG's
sequence.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>short</code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/gpu/example/Prng.html#nextShort()">nextShort</a></strong>()</code>
<div class="block">Return the short value from the next pseudorandom value in this PRNG's
sequence.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/gpu/example/Prng.html#nextUnsignedByte()">nextUnsignedByte</a></strong>()</code>
<div class="block">Return the unsigned byte value from the next pseudorandom value in this
PRNG's sequence.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/gpu/example/Prng.html#nextUnsignedInteger()">nextUnsignedInteger</a></strong>()</code>
<div class="block">Return the unsigned integer value from the next pseudorandom value in
this PRNG's sequence.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>long</code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/gpu/example/Prng.html#nextUnsignedLong()">nextUnsignedLong</a></strong>()</code>
<div class="block">Return the unsigned long value from the next pseudorandom value in this
PRNG's sequence.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>int</code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/gpu/example/Prng.html#nextUnsignedShort()">nextUnsignedShort</a></strong>()</code>
<div class="block">Return the unsigned short value from the next pseudorandom value in this
PRNG's sequence.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/gpu/example/Prng.html#setSeed(long)">setSeed</a></strong>(long&nbsp;seed)</code>
<div class="block">Set this PRNG's seed.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>static long</code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/gpu/example/Prng.html#sizeof()">sizeof</a></strong>()</code>
<div class="block">Returns the size in bytes of the C struct.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/gpu/example/Prng.html#skip(long)">skip</a></strong>(long&nbsp;n)</code>
<div class="block">Skip this PRNG the given number of positions ahead in this PRNG's
sequence.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../../edu/rit/gpu/example/Prng.html#toStruct(java.nio.ByteBuffer)">toStruct</a></strong>(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buf)</code>
<div class="block">Write this Java object to the given byte buffer in the form of a C
struct.</div>
</td>
</tr>
</table>
<ul class="blockList">
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor_detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="Prng()">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>Prng</h4>
<pre>public&nbsp;Prng()</pre>
<div class="block">Construct a new PRNG.</div>
</li>
</ul>
</li>
</ul>
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method_detail">
<!-- -->
</a>
<h3>Method Detail</h3>
<a name="setSeed(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setSeed</h4>
<pre>public&nbsp;void&nbsp;setSeed(long&nbsp;seed)</pre>
<div class="block">Set this PRNG's seed.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>seed</code> - Seed.</dd></dl>
</li>
</ul>
<a name="skip(long)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>skip</h4>
<pre>public&nbsp;void&nbsp;skip(long&nbsp;n)</pre>
<div class="block">Skip this PRNG the given number of positions ahead in this PRNG's
sequence.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>n</code> - Number of positions to skip.</dd></dl>
</li>
</ul>
<a name="nextBoolean()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nextBoolean</h4>
<pre>public&nbsp;boolean&nbsp;nextBoolean()</pre>
<div class="block">Return the Boolean value from the next pseudorandom value in this PRNG's
sequence. With a probability of 0.5 true is returned, with a probability
of 0.5 false is returned.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Boolean value.</dd></dl>
</li>
</ul>
<a name="nextByte()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nextByte</h4>
<pre>public&nbsp;byte&nbsp;nextByte()</pre>
<div class="block">Return the byte value from the next pseudorandom value in this PRNG's
sequence. Each value in the range -128 through 127 is returned with a
probability of 1/2<SUP>8</SUP>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Byte value.</dd></dl>
</li>
</ul>
<a name="nextUnsignedByte()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nextUnsignedByte</h4>
<pre>public&nbsp;int&nbsp;nextUnsignedByte()</pre>
<div class="block">Return the unsigned byte value from the next pseudorandom value in this
PRNG's sequence. Each value in the range 0 through 255 is returned with a
probability of 1/2<SUP>8</SUP>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Unsigned byte value.</dd></dl>
</li>
</ul>
<a name="nextShort()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nextShort</h4>
<pre>public&nbsp;short&nbsp;nextShort()</pre>
<div class="block">Return the short value from the next pseudorandom value in this PRNG's
sequence. Each value in the range -32768 through 32767 is returned with a
probability of 1/2<SUP>16</SUP>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Short value.</dd></dl>
</li>
</ul>
<a name="nextUnsignedShort()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nextUnsignedShort</h4>
<pre>public&nbsp;int&nbsp;nextUnsignedShort()</pre>
<div class="block">Return the unsigned short value from the next pseudorandom value in this
PRNG's sequence. Each value in the range 0 through 65535 is returned with
a probability of 1/2<SUP>16</SUP>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Unsigned short value.</dd></dl>
</li>
</ul>
<a name="nextInteger()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nextInteger</h4>
<pre>public&nbsp;int&nbsp;nextInteger()</pre>
<div class="block">Return the integer value from the next pseudorandom value in this PRNG's
sequence. Each value in the range -2147483648 through 2147483647 is
returned with a probability of 1/2<SUP>32</SUP>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Integer value.</dd></dl>
</li>
</ul>
<a name="nextUnsignedInteger()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nextUnsignedInteger</h4>
<pre>public&nbsp;int&nbsp;nextUnsignedInteger()</pre>
<div class="block">Return the unsigned integer value from the next pseudorandom value in
this PRNG's sequence. Each value in the range 0 through 4294967296 is
returned with a probability of 1/2<SUP>32</SUP>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Unsigned integer value.</dd></dl>
</li>
</ul>
<a name="nextLong()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nextLong</h4>
<pre>public&nbsp;long&nbsp;nextLong()</pre>
<div class="block">Return the long value from the next pseudorandom value in this PRNG's
sequence. Each value in the range -9223372036854775808 through
9223372036854775807 is returned with a probability of 1/2<SUP>64</SUP>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Long value.</dd></dl>
</li>
</ul>
<a name="nextUnsignedLong()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nextUnsignedLong</h4>
<pre>public&nbsp;long&nbsp;nextUnsignedLong()</pre>
<div class="block">Return the unsigned long value from the next pseudorandom value in this
PRNG's sequence. Each value in the range 0 through 18446744073709551615
is returned with a probability of 1/2<SUP>64</SUP>.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Unsigned long value.</dd></dl>
</li>
</ul>
<a name="nextDouble()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nextDouble</h4>
<pre>public&nbsp;double&nbsp;nextDouble()</pre>
<div class="block">Return the double precision floating point value from the next
pseudorandom value in this PRNG's sequence. The returned numbers have a
uniform distribution in the range 0.0 (inclusive) to 1.0 (exclusive).</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Double value.</dd></dl>
</li>
</ul>
<a name="nextFloat()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nextFloat</h4>
<pre>public&nbsp;float&nbsp;nextFloat()</pre>
<div class="block">Return the single precision floating point value from the next
pseudorandom value in this PRNG's sequence. The returned numbers have a
uniform distribution in the range 0.0 (inclusive) to 1.0 (exclusive).</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Float value.</dd></dl>
</li>
</ul>
<a name="nextInt(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>nextInt</h4>
<pre>public&nbsp;int&nbsp;nextInt(int&nbsp;n)</pre>
<div class="block">Return the integer value in the given range from the next pseudorandom
value in this PRNG's sequence. Each value in the range 0 through
<TT>n</TT>&minus;1 is returned with a probability of 1/<TT>n</TT>.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>n</code> - Range of values to return.</dd>
<dt><span class="strong">Returns:</span></dt><dd>Integer value in the range 0 through <TT>n</TT>&minus;1
inclusive.</dd></dl>
</li>
</ul>
<a name="sizeof()">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>sizeof</h4>
<pre>public static&nbsp;long&nbsp;sizeof()</pre>
<div class="block">Returns the size in bytes of the C struct. The size must include any
internal padding bytes needed to align the fields of the C struct. The
size must include any padding bytes at the end needed to align a series
of C structs in an array.</div>
<dl><dt><span class="strong">Returns:</span></dt><dd>Size of C struct (bytes).</dd></dl>
</li>
</ul>
<a name="toStruct(java.nio.ByteBuffer)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>toStruct</h4>
<pre>public&nbsp;void&nbsp;toStruct(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buf)</pre>
<div class="block">Write this Java object to the given byte buffer in the form of a C
struct. The byte buffer's byte order is little endian. The byte buffer is
positioned at the first byte of the C struct. The <TT>toStruct()</TT>
method must write this object's fields into the byte buffer exactly as
the C struct is laid out in GPU memory.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../edu/rit/gpu/Struct.html#toStruct(java.nio.ByteBuffer)">toStruct</a></code>&nbsp;in class&nbsp;<code><a href="../../../../edu/rit/gpu/Struct.html" title="class in edu.rit.gpu">Struct</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>buf</code> - Byte buffer to write.</dd></dl>
</li>
</ul>
<a name="fromStruct(java.nio.ByteBuffer)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>fromStruct</h4>
<pre>public&nbsp;void&nbsp;fromStruct(<a href="http://docs.oracle.com/javase/7/docs/api/java/nio/ByteBuffer.html?is-external=true" title="class or interface in java.nio">ByteBuffer</a>&nbsp;buf)</pre>
<div class="block">Read this Java object from the given byte buffer in the form of a C
struct. The byte buffer's byte order is little endian. The byte buffer is
positioned at the first byte of the C struct. The <TT>fromStruct()</TT>
method must read this object's fields from the byte buffer exactly as the
C struct is laid out in GPU memory.</div>
<dl>
<dt><strong>Specified by:</strong></dt>
<dd><code><a href="../../../../edu/rit/gpu/Struct.html#fromStruct(java.nio.ByteBuffer)">fromStruct</a></code>&nbsp;in class&nbsp;<code><a href="../../../../edu/rit/gpu/Struct.html" title="class in edu.rit.gpu">Struct</a></code></dd>
<dt><span class="strong">Parameters:</span></dt><dd><code>buf</code> - Byte buffer to read.</dd></dl>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/Prng.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../index-files/index-1.html">Index</a></li>
<li><a href="../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../edu/rit/gpu/example/Powers.html" title="class in edu.rit.gpu.example"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../../edu/rit/gpu/example/WalkSackGpu.html" title="class in edu.rit.gpu.example"><span class="strong">Next Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../index.html?edu/rit/gpu/example/Prng.html" target="_top">Frames</a></li>
<li><a href="Prng.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_summary">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor_detail">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method_detail">Method</a></li>
</ul>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small><FONT SIZE="-2">Copyright &copy; 2013&ndash;2016 by Alan Kaminsky. All rights reserved. Send comments to ark</FONT><FONT SIZE="1" COLOR="#FFFFFF">&shy;</FONT><FONT SIZE="-2">&#64;</FONT><FONT SIZE="1" COLOR="#FFFFFF">&shy;</FONT><FONT SIZE="-2">cs.rit.edu.</FONT></small></p>
</body>
</html>