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

479 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>Kernel (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="Kernel (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/Kernel.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/InvalidValueCudaException.html" title="class in edu.rit.gpu"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../edu/rit/gpu/LaunchFailedCudaException.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/Kernel.html" target="_top">Frames</a></li>
<li><a href="Kernel.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>Constr&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>Constr&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</div>
<h2 title="Interface Kernel" class="title">Interface Kernel</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public interface <span class="strong">Kernel</span></pre>
<div class="block">Interface Kernel specifies the base interface for a GPU kernel function.
To use a GPU kernel function:
<OL TYPE=1>
<P><LI>
Write the C or C++ code for a CUDA module containing one or more kernel
functions to be executed on the GPU. The kernel function(s) must be declared
to use "C" call syntax; for example:
<BR><TT>&nbsp;&nbsp;&nbsp;&nbsp;extern "C" __global__ void foo (...)</TT>
<BR>Compile the CUDA module using the <TT>nvcc</TT> compiler.
<P><LI>
For each kernel function in the CUDA module, write a <I>separate</I> Java
interface, as follows.
<UL>
<LI>
The interface name can be whatever you want.
<LI>
The interface must extend interface Kernel.
<LI>
The interface must declare <I>one and only one</I> method.
<LI>
The method's name must be identical to that of the kernel function. Suppose
the method's name is <TT>foo</TT>.
<LI>
The <TT>foo</TT> method must return void.
<LI>
The <TT>foo</TT> method's arguments must appear in the same order as those
of the kernel function.
<LI>
Declare each <TT>foo</TT> method argument's data type to correspond with the
kernel function argument's data type as listed in the table below. (Kernel
function arguments of other types are not supported at this time.)
<P>
<TABLE BORDER=0 CELLPADDING=0 CELLSPACING=0>
<TR><TD><I>Java data type</I></TD><TD WIDTH=20> </TD><TD><I>C data type</I></TD></TR>
<TR><TD><TT>boolean</TT></TD><TD WIDTH=20> </TD><TD><TT>int</TT></TD></TR>
<TR><TD><TT>byte</TT></TD><TD WIDTH=20> </TD><TD><TT>char</TT>, <TT>unsigned char</TT></TD></TR>
<TR><TD><TT>char</TT></TD><TD WIDTH=20> </TD><TD><TT>unsigned short int</TT></TD></TR>
<TR><TD><TT>short</TT></TD><TD WIDTH=20> </TD><TD><TT>short int</TT>, <TT>unsigned short int</TT></TD></TR>
<TR><TD><TT>int</TT></TD><TD WIDTH=20> </TD><TD><TT>int</TT>, <TT>unsigned int</TT></TD></TR>
<TR><TD><TT>long</TT></TD><TD WIDTH=20> </TD><TD><TT>long long int</TT>, <TT>unsigned long long int</TT></TD></TR>
<TR><TD><TT>float</TT></TD><TD WIDTH=20> </TD><TD><TT>float</TT></TD></TR>
<TR><TD><TT>double</TT></TD><TD WIDTH=20> </TD><TD><TT>double</TT></TD></TR>
<TR><TD><a href="../../../edu/rit/gpu/GpuByteArray.html" title="class in edu.rit.gpu">GpuByteArray</a></TD><TD WIDTH=20> </TD><TD><TT>char*</TT>, <TT>unsigned char*</TT></TD></TR>
<TR><TD><a href="../../../edu/rit/gpu/GpuShortArray.html" title="class in edu.rit.gpu">GpuShortArray</a></TD><TD WIDTH=20> </TD><TD><TT>short int*</TT>, <TT>unsigned short int*</TT></TD></TR>
<TR><TD><a href="../../../edu/rit/gpu/GpuIntArray.html" title="class in edu.rit.gpu">GpuIntArray</a></TD><TD WIDTH=20> </TD><TD><TT>int*</TT>, <TT>unsigned int*</TT></TD></TR>
<TR><TD><a href="../../../edu/rit/gpu/GpuLongArray.html" title="class in edu.rit.gpu">GpuLongArray</a></TD><TD WIDTH=20> </TD><TD><TT>long long int*</TT>, <TT>unsigned long long int*</TT></TD></TR>
<TR><TD><a href="../../../edu/rit/gpu/GpuFloatArray.html" title="class in edu.rit.gpu">GpuFloatArray</a></TD><TD WIDTH=20> </TD><TD><TT>float*</TT></TD></TR>
<TR><TD><a href="../../../edu/rit/gpu/GpuDoubleArray.html" title="class in edu.rit.gpu">GpuDoubleArray</a></TD><TD WIDTH=20> </TD><TD><TT>double*</TT></TD></TR>
<TR><TD><a href="../../../edu/rit/gpu/GpuByteMatrix.html" title="class in edu.rit.gpu">GpuByteMatrix</a></TD><TD WIDTH=20> </TD><TD><TT>char**</TT>, <TT>unsigned char**</TT></TD></TR>
<TR><TD><a href="../../../edu/rit/gpu/GpuShortMatrix.html" title="class in edu.rit.gpu">GpuShortMatrix</a></TD><TD WIDTH=20> </TD><TD><TT>short int**</TT>, <TT>unsigned short int**</TT></TD></TR>
<TR><TD><a href="../../../edu/rit/gpu/GpuIntMatrix.html" title="class in edu.rit.gpu">GpuIntMatrix</a></TD><TD WIDTH=20> </TD><TD><TT>int**</TT>, <TT>unsigned int**</TT></TD></TR>
<TR><TD><a href="../../../edu/rit/gpu/GpuLongMatrix.html" title="class in edu.rit.gpu">GpuLongMatrix</a></TD><TD WIDTH=20> </TD><TD><TT>long long int**</TT>, <TT>unsigned long long int**</TT></TD></TR>
<TR><TD><a href="../../../edu/rit/gpu/GpuFloatMatrix.html" title="class in edu.rit.gpu">GpuFloatMatrix</a></TD><TD WIDTH=20> </TD><TD><TT>float**</TT></TD></TR>
<TR><TD><a href="../../../edu/rit/gpu/GpuDoubleMatrix.html" title="class in edu.rit.gpu">GpuDoubleMatrix</a></TD><TD WIDTH=20> </TD><TD><TT>double**</TT></TD></TR>
<TR><TD><a href="../../../edu/rit/gpu/GpuStructVbl.html" title="class in edu.rit.gpu">GpuStructVbl</a></TD><TD WIDTH=20> </TD><TD><TT>struct T*</TT></TD></TR>
<TR><TD><a href="../../../edu/rit/gpu/GpuStructArray.html" title="class in edu.rit.gpu">GpuStructArray</a></TD><TD WIDTH=20> </TD><TD><TT>struct T*</TT></TD></TR>
</TABLE>
</UL>
<P><LI>
Call the <a href="../../../edu/rit/gpu/Gpu.html#getModule(java.lang.String)"><code>getModule()</code></a> method on a <a href="../../../edu/rit/gpu/Gpu.html" title="class in edu.rit.gpu">Gpu</a> object, specifying the name of the compiled CUDA module file
relative to the Java class path. This returns a <a href="../../../edu/rit/gpu/Module.html" title="class in edu.rit.gpu">Module</a>
object.
<P><LI>
Suppose the kernel function interface is named Bar. Call the <a href="../../../edu/rit/gpu/Module.html#getKernel(java.lang.Class)"><code>getKernel()</code></a> method on the <a href="../../../edu/rit/gpu/Module.html" title="class in edu.rit.gpu">Module</a> object, as follows:
<BR><TT>&nbsp;&nbsp;&nbsp;&nbsp;Bar proxy = module.getKernel (Bar.class);</TT>
<BR>This returns a reference to a proxy object that implements interface Bar.
<P><LI>
Configure the kernel by calling the <a href="../../../edu/rit/gpu/Kernel.html#setGridDim(int)"><code>setGridDim()</code></a>,
<a href="../../../edu/rit/gpu/Kernel.html#setBlockDim(int)"><code>setBlockDim()</code></a>, <a href="../../../edu/rit/gpu/Kernel.html#setCacheConfig(edu.rit.gpu.CacheConfig)"><code>setCacheConfig()</code></a>, and <a href="../../../edu/rit/gpu/Kernel.html#setDynamicSharedMemorySize(int)"><code>setDynamicSharedMemorySize()</code></a> methods on the Bar proxy object as necessary.
<P><LI>
Set the contents of any input variables (instances of <a href="../../../edu/rit/gpu/GpuVbl.html" title="class in edu.rit.gpu">GpuVbl</a> subclasses), and transfer these from host to device.
<P><LI>
Launch the kernel by calling the <TT>foo</TT> method on the Bar proxy object,
passing in the desired argument values. The <TT>foo</TT> method returns when
the kernel finishes.
<P><LI>
Transfer any output variables (instances of <a href="../../../edu/rit/gpu/GpuVbl.html" title="class in edu.rit.gpu">GpuVbl</a>
subclasses) from device to host, and examine their contents.
</OL>
<P>
Study the source code of the classes in package <a href="../../../edu/rit/gpu/example/package-summary.html">edu.rit.pj2.example</a> to see examples of Parallel Java 2
GPU programs.
<P>
<I>Note:</I> A class that implements interface Kernel is not multiple
thread safe. It is assumed that only one thread at a time will call methods
on a Kernel object.</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">&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/Kernel.html#setBlockDim(int)">setBlockDim</a></strong>(int&nbsp;blockDimX)</code>
<div class="block">Specify that this kernel function will be invoked with a one-dimensional
block.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/gpu/Kernel.html#setBlockDim(int, int)">setBlockDim</a></strong>(int&nbsp;blockDimX,
int&nbsp;blockDimY)</code>
<div class="block">Specify that this kernel function will be invoked with a two-dimensional
block.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/gpu/Kernel.html#setBlockDim(int, int, int)">setBlockDim</a></strong>(int&nbsp;blockDimX,
int&nbsp;blockDimY,
int&nbsp;blockDimZ)</code>
<div class="block">Specify that this kernel function will be invoked with a
three-dimensional block.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/gpu/Kernel.html#setCacheConfig(edu.rit.gpu.CacheConfig)">setCacheConfig</a></strong>(<a href="../../../edu/rit/gpu/CacheConfig.html" title="enum in edu.rit.gpu">CacheConfig</a>&nbsp;config)</code>
<div class="block">Specify that this kernel function will be invoked with the given cache
configuration.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/gpu/Kernel.html#setDynamicSharedMemorySize(int)">setDynamicSharedMemorySize</a></strong>(int&nbsp;bytesize)</code>
<div class="block">Specify that this kernel function will be invoked with the given dynamic
shared memory size.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/gpu/Kernel.html#setGridDim(int)">setGridDim</a></strong>(int&nbsp;gridDimX)</code>
<div class="block">Specify that this kernel function will be invoked with a one-dimensional
grid.</div>
</td>
</tr>
<tr class="altColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/gpu/Kernel.html#setGridDim(int, int)">setGridDim</a></strong>(int&nbsp;gridDimX,
int&nbsp;gridDimY)</code>
<div class="block">Specify that this kernel function will be invoked with a two-dimensional
grid.</div>
</td>
</tr>
<tr class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><strong><a href="../../../edu/rit/gpu/Kernel.html#setGridDim(int, int, int)">setGridDim</a></strong>(int&nbsp;gridDimX,
int&nbsp;gridDimY,
int&nbsp;gridDimZ)</code>
<div class="block">Specify that this kernel function will be invoked with a
three-dimensional grid.</div>
</td>
</tr>
</table>
</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="setGridDim(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setGridDim</h4>
<pre>void&nbsp;setGridDim(int&nbsp;gridDimX)</pre>
<div class="block">Specify that this kernel function will be invoked with a one-dimensional
grid. If not specified, the default is a one-dimensional grid with
<TT>gridDimX</TT> = 1.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>gridDimX</code> - Grid X dimension (&ge; 1).</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - (unchecked exception) Thrown if <TT>gridDimX</TT> &lt; 1.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../edu/rit/gpu/Kernel.html#setGridDim(int, int)"><code>setGridDim(int,int)</code></a>,
<a href="../../../edu/rit/gpu/Kernel.html#setGridDim(int, int, int)"><code>setGridDim(int,int,int)</code></a></dd></dl>
</li>
</ul>
<a name="setGridDim(int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setGridDim</h4>
<pre>void&nbsp;setGridDim(int&nbsp;gridDimX,
int&nbsp;gridDimY)</pre>
<div class="block">Specify that this kernel function will be invoked with a two-dimensional
grid. If not specified, the default is a one-dimensional grid with
<TT>gridDimX</TT> = 1.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>gridDimX</code> - Grid X dimension (&ge; 1).</dd><dd><code>gridDimY</code> - Grid Y dimension (&ge; 1).</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - (unchecked exception) Thrown if <TT>gridDimX</TT> &lt; 1 or
<TT>gridDimY</TT> &lt; 1.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../edu/rit/gpu/Kernel.html#setGridDim(int)"><code>setGridDim(int)</code></a>,
<a href="../../../edu/rit/gpu/Kernel.html#setGridDim(int, int, int)"><code>setGridDim(int,int,int)</code></a></dd></dl>
</li>
</ul>
<a name="setGridDim(int, int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setGridDim</h4>
<pre>void&nbsp;setGridDim(int&nbsp;gridDimX,
int&nbsp;gridDimY,
int&nbsp;gridDimZ)</pre>
<div class="block">Specify that this kernel function will be invoked with a
three-dimensional grid. If not specified, the default is a
one-dimensional grid with <TT>gridDimX</TT> = 1.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>gridDimX</code> - Grid X dimension (&ge; 1).</dd><dd><code>gridDimY</code> - Grid Y dimension (&ge; 1).</dd><dd><code>gridDimZ</code> - Grid Z dimension (&ge; 1).</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - (unchecked exception) Thrown if <TT>gridDimX</TT> &lt; 1 or
<TT>gridDimY</TT> &lt; 1 or <TT>gridDimZ</TT> &lt; 1.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../edu/rit/gpu/Kernel.html#setGridDim(int)"><code>setGridDim(int)</code></a>,
<a href="../../../edu/rit/gpu/Kernel.html#setGridDim(int, int)"><code>setGridDim(int,int)</code></a></dd></dl>
</li>
</ul>
<a name="setBlockDim(int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBlockDim</h4>
<pre>void&nbsp;setBlockDim(int&nbsp;blockDimX)</pre>
<div class="block">Specify that this kernel function will be invoked with a one-dimensional
block. If not specified, the default is a one-dimensional block with
<TT>blockDimX</TT> = 1.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>blockDimX</code> - Block X dimension (&ge; 1).</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - (unchecked exception) Thrown if <TT>blockDimX</TT> &lt; 1.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../edu/rit/gpu/Kernel.html#setBlockDim(int, int)"><code>setBlockDim(int,int)</code></a>,
<a href="../../../edu/rit/gpu/Kernel.html#setBlockDim(int, int, int)"><code>setBlockDim(int,int,int)</code></a></dd></dl>
</li>
</ul>
<a name="setBlockDim(int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBlockDim</h4>
<pre>void&nbsp;setBlockDim(int&nbsp;blockDimX,
int&nbsp;blockDimY)</pre>
<div class="block">Specify that this kernel function will be invoked with a two-dimensional
block. If not specified, the default is a one-dimensional block with
<TT>blockDimX</TT> = 1.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>blockDimX</code> - Block X dimension (&ge; 1).</dd><dd><code>blockDimY</code> - Block Y dimension (&ge; 1).</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - (unchecked exception) Thrown if <TT>blockDimX</TT> &lt; 1 or
<TT>blockDimY</TT> &lt; 1.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../edu/rit/gpu/Kernel.html#setBlockDim(int)"><code>setBlockDim(int)</code></a>,
<a href="../../../edu/rit/gpu/Kernel.html#setBlockDim(int, int, int)"><code>setBlockDim(int,int,int)</code></a></dd></dl>
</li>
</ul>
<a name="setBlockDim(int, int, int)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setBlockDim</h4>
<pre>void&nbsp;setBlockDim(int&nbsp;blockDimX,
int&nbsp;blockDimY,
int&nbsp;blockDimZ)</pre>
<div class="block">Specify that this kernel function will be invoked with a
three-dimensional block. If not specified, the default is a
one-dimensional block with <TT>blockDimX</TT> = 1.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>blockDimX</code> - Block X dimension (&ge; 1).</dd><dd><code>blockDimY</code> - Block Y dimension (&ge; 1).</dd><dd><code>blockDimZ</code> - Block Z dimension (&ge; 1).</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - (unchecked exception) Thrown if <TT>blockDimX</TT> &lt; 1 or
<TT>blockDimY</TT> &lt; 1 or <TT>blockDimZ</TT> &lt; 1.</dd><dt><span class="strong">See Also:</span></dt><dd><a href="../../../edu/rit/gpu/Kernel.html#setBlockDim(int)"><code>setBlockDim(int)</code></a>,
<a href="../../../edu/rit/gpu/Kernel.html#setBlockDim(int, int)"><code>setBlockDim(int,int)</code></a></dd></dl>
</li>
</ul>
<a name="setCacheConfig(edu.rit.gpu.CacheConfig)">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>setCacheConfig</h4>
<pre>void&nbsp;setCacheConfig(<a href="../../../edu/rit/gpu/CacheConfig.html" title="enum in edu.rit.gpu">CacheConfig</a>&nbsp;config)</pre>
<div class="block">Specify that this kernel function will be invoked with the given cache
configuration. If not specified, the default is to use the GPU's cache
configuration setting.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>config</code> - Cache configuration.</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/NullPointerException.html?is-external=true" title="class or interface in java.lang">NullPointerException</a></code> - (unchecked exception) Thrown if <TT>config</TT> is null.</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><dt><span class="strong">See Also:</span></dt><dd><a href="../../../edu/rit/gpu/Gpu.html#setCacheConfig(edu.rit.gpu.CacheConfig)"><code>Gpu.setCacheConfig(CacheConfig)</code></a></dd></dl>
</li>
</ul>
<a name="setDynamicSharedMemorySize(int)">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>setDynamicSharedMemorySize</h4>
<pre>void&nbsp;setDynamicSharedMemorySize(int&nbsp;bytesize)</pre>
<div class="block">Specify that this kernel function will be invoked with the given dynamic
shared memory size. If not specified, the default is 0.</div>
<dl><dt><span class="strong">Parameters:</span></dt><dd><code>bytesize</code> - Number of dynamic shared memory bytes (&ge; 0).</dd>
<dt><span class="strong">Throws:</span></dt>
<dd><code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/IllegalArgumentException.html?is-external=true" title="class or interface in java.lang">IllegalArgumentException</a></code> - (unchecked exception) Thrown if <TT>bytesize</TT> &lt; 0.</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/Kernel.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/InvalidValueCudaException.html" title="class in edu.rit.gpu"><span class="strong">Prev Class</span></a></li>
<li><a href="../../../edu/rit/gpu/LaunchFailedCudaException.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/Kernel.html" target="_top">Frames</a></li>
<li><a href="Kernel.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>Constr&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>Constr&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>