497 lines
23 KiB
HTML
497 lines
23 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>GpuMatrix (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="GpuMatrix (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/GpuMatrix.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/GpuLongVbl.html" title="class in edu.rit.gpu"><span class="strong">Prev Class</span></a></li>
|
|
<li><a href="../../../edu/rit/gpu/GpuNotSupportedException.html" title="class in edu.rit.gpu"><span class="strong">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../index.html?edu/rit/gpu/GpuMatrix.html" target="_top">Frames</a></li>
|
|
<li><a href="GpuMatrix.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: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method_summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </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</div>
|
|
<h2 title="Class GpuMatrix" class="title">Class GpuMatrix</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/GpuVbl.html" title="class in edu.rit.gpu">edu.rit.gpu.GpuVbl</a></li>
|
|
<li>
|
|
<ul class="inheritance">
|
|
<li>edu.rit.gpu.GpuMatrix</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
</li>
|
|
</ul>
|
|
<div class="description">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<dl>
|
|
<dt>Direct Known Subclasses:</dt>
|
|
<dd><a href="../../../edu/rit/gpu/GpuByteMatrix.html" title="class in edu.rit.gpu">GpuByteMatrix</a>, <a href="../../../edu/rit/gpu/GpuDoubleMatrix.html" title="class in edu.rit.gpu">GpuDoubleMatrix</a>, <a href="../../../edu/rit/gpu/GpuFloatMatrix.html" title="class in edu.rit.gpu">GpuFloatMatrix</a>, <a href="../../../edu/rit/gpu/GpuIntMatrix.html" title="class in edu.rit.gpu">GpuIntMatrix</a>, <a href="../../../edu/rit/gpu/GpuLongMatrix.html" title="class in edu.rit.gpu">GpuLongMatrix</a>, <a href="../../../edu/rit/gpu/GpuShortMatrix.html" title="class in edu.rit.gpu">GpuShortMatrix</a></dd>
|
|
</dl>
|
|
<hr>
|
|
<br>
|
|
<pre>public abstract class <span class="strong">GpuMatrix</span>
|
|
extends <a href="../../../edu/rit/gpu/GpuVbl.html" title="class in edu.rit.gpu">GpuVbl</a></pre>
|
|
<div class="block">Class GpuMatrix is the abstract base class for a GPU matrix variable. This is
|
|
a two-dimensional array of data stored in the GPU's memory and mirrored in
|
|
the CPU's memory. Construct an instance of a subclass of class GpuMatrix by
|
|
calling a factory method on a <a href="../../../edu/rit/gpu/Gpu.html" title="class in edu.rit.gpu">Gpu</a> object.
|
|
<P>
|
|
Class GpuMatrix supports mirroring all of the GPU's data matrix in the CPU's
|
|
memory, mirroring only a portion of the GPU's data matrix in the CPU's
|
|
memory, or mirroring none of the GPU's data matrix. Class GpuMatrix provides
|
|
operations for copying all or portions of the data matrix from the CPU to the
|
|
GPU or from the GPU to the CPU.
|
|
<P>
|
|
In the GPU memory, the matrix is implemented as a pointer to an array of
|
|
<I>R</I> row pointers, where <I>R</I> is the number of rows in the matrix.
|
|
Each row pointer points to an array of <I>C</I> data elements, where <I>C</I>
|
|
is the number of columns in the matrix.</div>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div class="summary">
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<!-- ========== 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"> </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>int</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/gpu/GpuMatrix.html#cols()">cols</a></strong>()</code>
|
|
<div class="block">Returns the number of columns in the GPU matrix in the GPU device's
|
|
memory.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/gpu/GpuMatrix.html#cpuCols()">cpuCols</a></strong>()</code>
|
|
<div class="block">Returns the number of columns in the GPU matrix mirrored in the host
|
|
CPU's memory.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/gpu/GpuMatrix.html#cpuRows()">cpuRows</a></strong>()</code>
|
|
<div class="block">Returns the number of rows in the GPU matrix mirrored in the host CPU's
|
|
memory.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/gpu/GpuMatrix.html#devToHost()">devToHost</a></strong>()</code>
|
|
<div class="block">Copy this GPU matrix from the GPU device's memory to the host CPU's
|
|
memory.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/gpu/GpuMatrix.html#devToHost(int, int)">devToHost</a></strong>(int rowlen,
|
|
int collen)</code>
|
|
<div class="block">Copy the initial portion of this GPU matrix from the GPU device's memory
|
|
to the host CPU's memory.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>abstract void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/gpu/GpuMatrix.html#devToHost(int, int, int, int, int, int)">devToHost</a></strong>(int dstrow,
|
|
int dstcol,
|
|
int srcrow,
|
|
int srccol,
|
|
int rowlen,
|
|
int collen)</code>
|
|
<div class="block">Copy the given portion of this GPU matrix from the GPU device's memory to
|
|
the host CPU's memory.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/gpu/GpuMatrix.html#hostToDev()">hostToDev</a></strong>()</code>
|
|
<div class="block">Copy this GPU matrix from the host CPU's memory to the GPU device's
|
|
memory.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/gpu/GpuMatrix.html#hostToDev(int, int)">hostToDev</a></strong>(int rowlen,
|
|
int collen)</code>
|
|
<div class="block">Copy the initial portion of this GPU matrix from the host CPU's memory to
|
|
the GPU device's memory.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="altColor">
|
|
<td class="colFirst"><code>abstract void</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/gpu/GpuMatrix.html#hostToDev(int, int, int, int, int, int)">hostToDev</a></strong>(int dstrow,
|
|
int dstcol,
|
|
int srcrow,
|
|
int srccol,
|
|
int rowlen,
|
|
int collen)</code>
|
|
<div class="block">Copy the given portion of this GPU matrix from the host CPU's memory to
|
|
the GPU device's memory.</div>
|
|
</td>
|
|
</tr>
|
|
<tr class="rowColor">
|
|
<td class="colFirst"><code>int</code></td>
|
|
<td class="colLast"><code><strong><a href="../../../edu/rit/gpu/GpuMatrix.html#rows()">rows</a></strong>()</code>
|
|
<div class="block">Returns the number of rows in the GPU matrix in the GPU device's memory.</div>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods_inherited_from_class_edu.rit.gpu.GpuVbl">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class edu.rit.gpu.<a href="../../../edu/rit/gpu/GpuVbl.html" title="class in edu.rit.gpu">GpuVbl</a></h3>
|
|
<code><a href="../../../edu/rit/gpu/GpuVbl.html#finalize()">finalize</a>, <a href="../../../edu/rit/gpu/GpuVbl.html#free()">free</a></code></li>
|
|
</ul>
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="methods_inherited_from_class_java.lang.Object">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Methods inherited from class 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#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">
|
|
<!-- ============ METHOD DETAIL ========== -->
|
|
<ul class="blockList">
|
|
<li class="blockList"><a name="method_detail">
|
|
<!-- -->
|
|
</a>
|
|
<h3>Method Detail</h3>
|
|
<a name="rows()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>rows</h4>
|
|
<pre>public int rows()</pre>
|
|
<div class="block">Returns the number of rows in the GPU matrix in the GPU device's memory.</div>
|
|
<dl><dt><span class="strong">Returns:</span></dt><dd>Number of rows in the GPU matrix.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="cols()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>cols</h4>
|
|
<pre>public int cols()</pre>
|
|
<div class="block">Returns the number of columns in the GPU matrix in the GPU device's
|
|
memory.</div>
|
|
<dl><dt><span class="strong">Returns:</span></dt><dd>Number of columns in the GPU matrix.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="cpuRows()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>cpuRows</h4>
|
|
<pre>public int cpuRows()</pre>
|
|
<div class="block">Returns the number of rows in the GPU matrix mirrored in the host CPU's
|
|
memory.</div>
|
|
<dl><dt><span class="strong">Returns:</span></dt><dd>Number of rows in the CPU matrix.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="cpuCols()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>cpuCols</h4>
|
|
<pre>public int cpuCols()</pre>
|
|
<div class="block">Returns the number of columns in the GPU matrix mirrored in the host
|
|
CPU's memory.</div>
|
|
<dl><dt><span class="strong">Returns:</span></dt><dd>Number of columns in the CPU matrix.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="hostToDev()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>hostToDev</h4>
|
|
<pre>public void hostToDev()</pre>
|
|
<div class="block">Copy this GPU matrix from the host CPU's memory to the GPU device's
|
|
memory. This is equivalent to the call
|
|
<TT>hostToDev(0,0,0,0,cpuRows(),cpuCols())</TT>.</div>
|
|
<dl>
|
|
<dt><strong>Specified by:</strong></dt>
|
|
<dd><code><a href="../../../edu/rit/gpu/GpuVbl.html#hostToDev()">hostToDev</a></code> in class <code><a href="../../../edu/rit/gpu/GpuVbl.html" title="class in edu.rit.gpu">GpuVbl</a></code></dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="../../../edu/rit/gpu/GpuException.html" title="class in edu.rit.gpu">GpuException</a></code> - (unchecked exception) Thrown if a GPU error occurred.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="hostToDev(int, int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>hostToDev</h4>
|
|
<pre>public void hostToDev(int rowlen,
|
|
int collen)</pre>
|
|
<div class="block">Copy the initial portion of this GPU matrix from the host CPU's memory to
|
|
the GPU device's memory. This is equivalent to the call
|
|
<TT>hostToDev(0,0,0,0,rowlen,collen)</TT>.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>rowlen</code> - Number of rows to copy.</dd><dd><code>collen</code> - Number of columns to copy.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</a></code> - (unchecked exception) Thrown if <TT>rowlen</TT> < 0,
|
|
<TT>rowlen</TT> > <TT>cpuRows()</TT>, <TT>collen</TT> < 0, or
|
|
<TT>collen</TT> > <TT>cpuCols()</TT>.</dd>
|
|
<dd><code><a href="../../../edu/rit/gpu/GpuException.html" title="class in edu.rit.gpu">GpuException</a></code> - (unchecked exception) Thrown if a GPU error occurred.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="hostToDev(int, int, int, int, int, int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>hostToDev</h4>
|
|
<pre>public abstract void hostToDev(int dstrow,
|
|
int dstcol,
|
|
int srcrow,
|
|
int srccol,
|
|
int rowlen,
|
|
int collen)</pre>
|
|
<div class="block">Copy the given portion of this GPU matrix from the host CPU's memory to
|
|
the GPU device's memory. <TT>rowlen</TT>×<TT>collen</TT> elements
|
|
starting at indexes <TT>[srcrow][srccol]</TT> in the CPU matrix are
|
|
copied to the GPU matrix starting at indexes <TT>[dstrow][dstcol]</TT>.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dstrow</code> - GPU matrix starting row index.</dd><dd><code>dstcol</code> - GPU matrix starting column index.</dd><dd><code>srcrow</code> - CPU matrix starting row index.</dd><dd><code>srccol</code> - CPU matrix starting column index.</dd><dd><code>rowlen</code> - Number of rows to copy.</dd><dd><code>collen</code> - Number of columns to copy.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</a></code> - (unchecked exception) Thrown if <TT>dstrow</TT> < 0,
|
|
<TT>dstcol</TT> < 0, <TT>srcrow</TT> < 0, <TT>srccol</TT> <
|
|
0, <TT>rowlen</TT> < 0, <TT>collen</TT> < 0,
|
|
<TT>dstrow+rowlen</TT> > <TT>rows()</TT>, <TT>dstcol+collen</TT>
|
|
> <TT>cols()</TT>, <TT>srcrow+rowlen</TT> > <TT>cpuRows()</TT>,
|
|
or <TT>srccol+collen</TT> > <TT>cpuCols()</TT>.</dd>
|
|
<dd><code><a href="../../../edu/rit/gpu/GpuException.html" title="class in edu.rit.gpu">GpuException</a></code> - (unchecked exception) Thrown if a GPU error occurred.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="devToHost()">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>devToHost</h4>
|
|
<pre>public void devToHost()</pre>
|
|
<div class="block">Copy this GPU matrix from the GPU device's memory to the host CPU's
|
|
memory. This is equivalent to the call
|
|
<TT>devToHost(0,0,0,0,cpuRows(),cpuCols())</TT>.</div>
|
|
<dl>
|
|
<dt><strong>Specified by:</strong></dt>
|
|
<dd><code><a href="../../../edu/rit/gpu/GpuVbl.html#devToHost()">devToHost</a></code> in class <code><a href="../../../edu/rit/gpu/GpuVbl.html" title="class in edu.rit.gpu">GpuVbl</a></code></dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="../../../edu/rit/gpu/GpuException.html" title="class in edu.rit.gpu">GpuException</a></code> - (unchecked exception) Thrown if a GPU error occurred.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="devToHost(int, int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockList">
|
|
<li class="blockList">
|
|
<h4>devToHost</h4>
|
|
<pre>public void devToHost(int rowlen,
|
|
int collen)</pre>
|
|
<div class="block">Copy the initial portion of this GPU matrix from the GPU device's memory
|
|
to the host CPU's memory. This is equivalent to the call
|
|
<TT>devToHost(0,0,0,0,rowlen,collen)</TT>.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>rowlen</code> - Number of rows to copy.</dd><dd><code>collen</code> - Number of columns to copy.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</a></code> - (unchecked exception) Thrown if <TT>rowlen</TT> < 0,
|
|
<TT>rowlen</TT> > <TT>cpuRows()</TT>, <TT>collen</TT> < 0, or
|
|
<TT>collen</TT> > <TT>cpuCols()</TT>.</dd>
|
|
<dd><code><a href="../../../edu/rit/gpu/GpuException.html" title="class in edu.rit.gpu">GpuException</a></code> - (unchecked exception) Thrown if a GPU error occurred.</dd></dl>
|
|
</li>
|
|
</ul>
|
|
<a name="devToHost(int, int, int, int, int, int)">
|
|
<!-- -->
|
|
</a>
|
|
<ul class="blockListLast">
|
|
<li class="blockList">
|
|
<h4>devToHost</h4>
|
|
<pre>public abstract void devToHost(int dstrow,
|
|
int dstcol,
|
|
int srcrow,
|
|
int srccol,
|
|
int rowlen,
|
|
int collen)</pre>
|
|
<div class="block">Copy the given portion of this GPU matrix from the GPU device's memory to
|
|
the host CPU's memory. <TT>rowlen</TT>×<TT>collen</TT> elements
|
|
starting at indexes <TT>[srcrow][srccol]</TT> in the GPU matrix are
|
|
copied to the CPU matrix starting at indexes <TT>[dstrow][dstcol]</TT>.</div>
|
|
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>dstrow</code> - CPU matrix starting row index.</dd><dd><code>dstcol</code> - CPU matrix starting column index.</dd><dd><code>srcrow</code> - GPU matrix starting row index.</dd><dd><code>srccol</code> - GPU matrix starting column index.</dd><dd><code>rowlen</code> - Number of rows to copy.</dd><dd><code>collen</code> - Number of columns to copy.</dd>
|
|
<dt><span class="strong">Throws:</span></dt>
|
|
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IndexOutOfBoundsException.html?is-external=true" title="class or interface in java.lang">IndexOutOfBoundsException</a></code> - (unchecked exception) Thrown if <TT>dstrow</TT> < 0,
|
|
<TT>dstcol</TT> < 0, <TT>srcrow</TT> < 0, <TT>srccol</TT> <
|
|
0, <TT>rowlen</TT> < 0, <TT>collen</TT> < 0,
|
|
<TT>dstrow+rowlen</TT> > <TT>cpuRows()</TT>,
|
|
<TT>dstcol+collen</TT> > <TT>cpuCols()</TT>,
|
|
<TT>srcrow+rowlen</TT> > <TT>rows()</TT>, or
|
|
<TT>srccol+collen</TT> > <TT>cols()</TT>.</dd>
|
|
<dd><code><a href="../../../edu/rit/gpu/GpuException.html" title="class in edu.rit.gpu">GpuException</a></code> - (unchecked exception) Thrown if a GPU error occurred.</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/GpuMatrix.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/GpuLongVbl.html" title="class in edu.rit.gpu"><span class="strong">Prev Class</span></a></li>
|
|
<li><a href="../../../edu/rit/gpu/GpuNotSupportedException.html" title="class in edu.rit.gpu"><span class="strong">Next Class</span></a></li>
|
|
</ul>
|
|
<ul class="navList">
|
|
<li><a href="../../../index.html?edu/rit/gpu/GpuMatrix.html" target="_top">Frames</a></li>
|
|
<li><a href="GpuMatrix.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: </li>
|
|
<li>Nested | </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </li>
|
|
<li><a href="#method_summary">Method</a></li>
|
|
</ul>
|
|
<ul class="subNavList">
|
|
<li>Detail: </li>
|
|
<li>Field | </li>
|
|
<li>Constr | </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 © 2013–2016 by Alan Kaminsky. All rights reserved. Send comments to ark</FONT><FONT SIZE="1" COLOR="#FFFFFF">­</FONT><FONT SIZE="-2">@</FONT><FONT SIZE="1" COLOR="#FFFFFF">­</FONT><FONT SIZE="-2">cs.rit.edu.</FONT></small></p>
|
|
</body>
|
|
</html>
|