| <!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 --> |
| <title>CUDAManager (OpenJ9 GPU Classes)</title> |
| <meta name="keywords" content="com.ibm.gpu.CUDAManager class"> |
| <meta name="keywords" content="getInstance()"> |
| <meta name="keywords" content="instance()"> |
| <meta name="keywords" content="getOutputHeader()"> |
| <meta name="keywords" content="getVersion()"> |
| <meta name="keywords" content="tearDown()"> |
| <meta name="keywords" content="acquireFreeDevice()"> |
| <meta name="keywords" content="getCUDADevices()"> |
| <meta name="keywords" content="getDefaultDevice()"> |
| <meta name="keywords" content="getDevice()"> |
| <meta name="keywords" content="getDeviceCount()"> |
| <meta name="keywords" content="getDeviceWithMostAvailableMemory()"> |
| <meta name="keywords" content="getDoubleThreshold()"> |
| <meta name="keywords" content="getEnabledCUDADevices()"> |
| <meta name="keywords" content="getFloatThreshold()"> |
| <meta name="keywords" content="getFreeMemoryForDevice()"> |
| <meta name="keywords" content="getIntThreshold()"> |
| <meta name="keywords" content="getLongThreshold()"> |
| <meta name="keywords" content="getNextAvailableDevice()"> |
| <meta name="keywords" content="getVerboseGPUOutput()"> |
| <meta name="keywords" content="hasCUDASupport()"> |
| <meta name="keywords" content="isSortEnabledOnGPU()"> |
| <meta name="keywords" content="isSortEnforcedOnGPU()"> |
| <meta name="keywords" content="printAllDeviceInfo()"> |
| <meta name="keywords" content="releaseDevice()"> |
| <meta name="keywords" content="setDefaultDevice()"> |
| <meta name="keywords" content="setDevice()"> |
| <meta name="keywords" content="setVerboseGPU()"> |
| <link rel="stylesheet" type="text/css" href="../../../stylesheet.css" title="Style"> |
| <script type="text/javascript" src="../../../script.js"></script> |
| </head> |
| <body> |
| <script type="text/javascript"><!-- |
| try { |
| if (location.href.indexOf('is-external=true') == -1) { |
| parent.document.title="CUDAManager (OpenJ9 GPU Classes)"; |
| } |
| } |
| catch(err) { |
| } |
| //--> |
| var methods = {"i0":10,"i1":10,"i2":10,"i3":10,"i4":10,"i5":10,"i6":10,"i7":10,"i8":10,"i9":10,"i10":41,"i11":10,"i12":10,"i13":10,"i14":9,"i15":10,"i16":9,"i17":10,"i18":9,"i19":10,"i20":10,"i21":10,"i22":10,"i23":10,"i24":10,"i25":10,"i26":41}; |
| var tabs = {65535:["t0","All Methods"],1:["t1","Static Methods"],2:["t2","Instance Methods"],8:["t4","Concrete Methods"],32:["t6","Deprecated Methods"]}; |
| var altColor = "altColor"; |
| var rowColor = "rowColor"; |
| var tableTab = "tableTab"; |
| var activeTableTab = "activeTableTab"; |
| </script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="topNav"><a name="navbar.top"> |
| <!-- --> |
| </a> |
| <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.top.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../com/ibm/gpu/package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/CUDAManager.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-all.html">Index</a></li> |
| <li><a href="../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage"><strong>OpenJ9 GPU Classes</strong></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../com/ibm/gpu/CUDADevice.html" title="class in com.ibm.gpu"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../com/ibm/gpu/GPUConfigurationException.html" title="class in com.ibm.gpu"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?com/ibm/gpu/CUDAManager.html" target="_top">Frames</a></li> |
| <li><a href="CUDAManager.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">com.ibm.gpu</div> |
| <h2 title="Class CUDAManager" class="title">Class CUDAManager</h2> |
| </div> |
| <div class="contentContainer"> |
| <ul class="inheritance"> |
| <li><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" target="_blank" title="class or interface in java.lang">java.lang.Object</a></li> |
| <li> |
| <ul class="inheritance"> |
| <li>com.ibm.gpu.CUDAManager</li> |
| </ul> |
| </li> |
| </ul> |
| <div class="description"> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <hr> |
| <br> |
| <pre>public final class <span class="typeNameLabel">CUDAManager</span> |
| extends <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" target="_blank" title="class or interface in java.lang">Object</a></pre> |
| <div class="block">This class contains information important to IBM GPU enabled functions.</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="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation"> |
| <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd"> </span></span><span id="t1" class="tableTab"><span><a href="javascript:show(1);">Static Methods</a></span><span class="tabEnd"> </span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd"> </span></span><span id="t4" class="tableTab"><span><a href="javascript:show(8);">Concrete Methods</a></span><span class="tabEnd"> </span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd"> </span></span></caption> |
| <tr> |
| <th class="colFirst" scope="col">Modifier and Type</th> |
| <th class="colLast" scope="col">Method and Description</th> |
| </tr> |
| <tr id="i0" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#acquireFreeDevice--">acquireFreeDevice</a></span>()</code> |
| <div class="block">Look for the next free device and mark it as busy.</div> |
| </td> |
| </tr> |
| <tr id="i1" class="rowColor"> |
| <td class="colFirst"><code><a href="https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html?is-external=true" target="_blank" title="class or interface in java.util">ArrayList</a><<a href="../../../com/ibm/gpu/CUDADevice.html" title="class in com.ibm.gpu">CUDADevice</a>></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#getCUDADevices--">getCUDADevices</a></span>()</code> |
| <div class="block">Use this method to obtain a reference to an ArrayList containing |
| references to all discovered CUDA devices.</div> |
| </td> |
| </tr> |
| <tr id="i2" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#getDefaultDevice--">getDefaultDevice</a></span>()</code> |
| <div class="block">Gets the ID of the default device, set to 0 by default.</div> |
| </td> |
| </tr> |
| <tr id="i3" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../com/ibm/gpu/CUDADevice.html" title="class in com.ibm.gpu">CUDADevice</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#getDevice-int-">getDevice</a></span>(int deviceId)</code> |
| <div class="block">Get a reference to the CUDA device by means of its index (with 0 being the first).</div> |
| </td> |
| </tr> |
| <tr id="i4" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#getDeviceCount--">getDeviceCount</a></span>()</code> |
| <div class="block">Identifies the number of available CUDA devices.</div> |
| </td> |
| </tr> |
| <tr id="i5" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../com/ibm/gpu/CUDADevice.html" title="class in com.ibm.gpu">CUDADevice</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#getDeviceWithMostAvailableMemory--">getDeviceWithMostAvailableMemory</a></span>()</code> |
| <div class="block">Identifies the CUDA device that has the most memory available.</div> |
| </td> |
| </tr> |
| <tr id="i6" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#getDoubleThreshold--">getDoubleThreshold</a></span>()</code> |
| <div class="block">Gets the minimum length of a double array that will be |
| sorted using a GPU if enabled.</div> |
| </td> |
| </tr> |
| <tr id="i7" class="rowColor"> |
| <td class="colFirst"><code><a href="../../../com/ibm/gpu/CUDADevice.html" title="class in com.ibm.gpu">CUDADevice</a>[]</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#getEnabledCUDADevices--">getEnabledCUDADevices</a></span>()</code> |
| <div class="block">Use this method to return an array of enabled CUDA devices.</div> |
| </td> |
| </tr> |
| <tr id="i8" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#getFloatThreshold--">getFloatThreshold</a></span>()</code> |
| <div class="block">Gets the minimum length of a float array that will be |
| sorted using a GPU if enabled.</div> |
| </td> |
| </tr> |
| <tr id="i9" class="rowColor"> |
| <td class="colFirst"><code>long</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#getFreeMemoryForDevice-int-">getFreeMemoryForDevice</a></span>(int deviceId)</code> |
| <div class="block">Get the amount of free memory (in bytes) available for the provided CUDA device.</div> |
| </td> |
| </tr> |
| <tr id="i10" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../com/ibm/gpu/CUDAManager.html" title="class in com.ibm.gpu">CUDAManager</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#getInstance--">getInstance</a></span>()</code> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="block"><span class="deprecationComment">Use <code>instance()</code> instead.</span></div> |
| </div> |
| </td> |
| </tr> |
| <tr id="i11" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#getIntThreshold--">getIntThreshold</a></span>()</code> |
| <div class="block">Gets the minimum length of an int array that will be |
| sorted using a GPU if enabled.</div> |
| </td> |
| </tr> |
| <tr id="i12" class="altColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#getLongThreshold--">getLongThreshold</a></span>()</code> |
| <div class="block">Gets the minimum length of a long array that will be |
| sorted using a GPU if enabled.</div> |
| </td> |
| </tr> |
| <tr id="i13" class="rowColor"> |
| <td class="colFirst"><code>int</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#getNextAvailableDevice--">getNextAvailableDevice</a></span>()</code> |
| <div class="block">Returns the next CUDA device that is available to run calculations on.</div> |
| </td> |
| </tr> |
| <tr id="i14" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" target="_blank" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#getOutputHeader--">getOutputHeader</a></span>()</code> |
| <div class="block">Get the header used to prefix all IBM GPU related output.</div> |
| </td> |
| </tr> |
| <tr id="i15" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#getVerboseGPUOutput--">getVerboseGPUOutput</a></span>()</code> |
| <div class="block">Get the value of the verboseGPUOutput flag.</div> |
| </td> |
| </tr> |
| <tr id="i16" class="altColor"> |
| <td class="colFirst"><code>static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" target="_blank" title="class or interface in java.lang">String</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#getVersion--">getVersion</a></span>()</code> |
| <div class="block">Get the version of this class.</div> |
| </td> |
| </tr> |
| <tr id="i17" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#hasCUDASupport--">hasCUDASupport</a></span>()</code> |
| <div class="block">Use this method to identify if CUDA is supported on this machine and |
| within this environment: returns true if the number of CUDA devices |
| detected is greater than 0.</div> |
| </td> |
| </tr> |
| <tr id="i18" class="altColor"> |
| <td class="colFirst"><code>static <a href="../../../com/ibm/gpu/CUDAManager.html" title="class in com.ibm.gpu">CUDAManager</a></code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#instance--">instance</a></span>()</code> |
| <div class="block">Return a CUDAManager instance.</div> |
| </td> |
| </tr> |
| <tr id="i19" class="rowColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#isSortEnabledOnGPU--">isSortEnabledOnGPU</a></span>()</code> |
| <div class="block">This method provides a means to determine if sort is |
| enabled to be used by any available CUDA device.</div> |
| </td> |
| </tr> |
| <tr id="i20" class="altColor"> |
| <td class="colFirst"><code>boolean</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#isSortEnforcedOnGPU--">isSortEnforcedOnGPU</a></span>()</code> |
| <div class="block">This method provides a means to determine if sort is |
| forced to be used by any available CUDA device.</div> |
| </td> |
| </tr> |
| <tr id="i21" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#printAllDeviceInfo--">printAllDeviceInfo</a></span>()</code> |
| <div class="block">Print information for each detected CUDA device.</div> |
| </td> |
| </tr> |
| <tr id="i22" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#releaseDevice-int-">releaseDevice</a></span>(int deviceId)</code> |
| <div class="block">Mark a device as being free; must be in a try finally block as we MUST |
| release the handle regardless of whether or not a sort was successful.</div> |
| </td> |
| </tr> |
| <tr id="i23" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#setDefaultDevice-int-">setDefaultDevice</a></span>(int deviceId)</code> |
| <div class="block">Sets the default device to the given device ID.</div> |
| </td> |
| </tr> |
| <tr id="i24" class="altColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#setDevice-int-">setDevice</a></span>(int deviceId)</code> |
| <div class="block">Use this method to set the device to use for subsequent calls.</div> |
| </td> |
| </tr> |
| <tr id="i25" class="rowColor"> |
| <td class="colFirst"><code>void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#setVerboseGPU-boolean-">setVerboseGPU</a></span>(boolean condition)</code> |
| <div class="block">Set the value of the verboseGPUOutput flag.</div> |
| </td> |
| </tr> |
| <tr id="i26" class="altColor"> |
| <td class="colFirst"><code>static void</code></td> |
| <td class="colLast"><code><span class="memberNameLink"><a href="../../../com/ibm/gpu/CUDAManager.html#tearDown--">tearDown</a></span>()</code> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> |
| <div class="block"><span class="deprecationComment">This method has no effect; it will be removed in a future version.</span></div> |
| </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 java.lang.<a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true" target="_blank" title="class or interface in java.lang">Object</a></h3> |
| <code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="https://docs.oracle.com/javase/8/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="getInstance--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getInstance</h4> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" target="_blank" title="class or interface in java.lang">@Deprecated</a> |
| public static <a href="../../../com/ibm/gpu/CUDAManager.html" title="class in com.ibm.gpu">CUDAManager</a> getInstance() |
| throws <a href="../../../com/ibm/gpu/GPUConfigurationException.html" title="class in com.ibm.gpu">GPUConfigurationException</a>, |
| <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/SecurityException.html?is-external=true" target="_blank" title="class or interface in java.lang">SecurityException</a></pre> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">Use <code>instance()</code> instead.</span></div> |
| <div class="block">Return a CUDAManager instance.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a CUDAManager instance</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../com/ibm/gpu/GPUConfigurationException.html" title="class in com.ibm.gpu">GPUConfigurationException</a></code> - This exception is not actually thrown; use <code>instance()</code> instead.</dd> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/SecurityException.html?is-external=true" target="_blank" title="class or interface in java.lang">SecurityException</a></code> - If a security manager exists and the calling thread does not |
| have permission to access the CUDAManager instance.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="instance--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>instance</h4> |
| <pre>public static <a href="../../../com/ibm/gpu/CUDAManager.html" title="class in com.ibm.gpu">CUDAManager</a> instance() |
| throws <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/SecurityException.html?is-external=true" target="_blank" title="class or interface in java.lang">SecurityException</a></pre> |
| <div class="block">Return a CUDAManager instance.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>a CUDAManager instance</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/SecurityException.html?is-external=true" target="_blank" title="class or interface in java.lang">SecurityException</a></code> - If a security manager exists and the calling thread does not |
| have permission to access the CUDAManager instance.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getOutputHeader--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getOutputHeader</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" target="_blank" title="class or interface in java.lang">String</a> getOutputHeader()</pre> |
| <div class="block">Get the header used to prefix all IBM GPU related output.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The header used for IBM GPU related output.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getVersion--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getVersion</h4> |
| <pre>public static <a href="https://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" target="_blank" title="class or interface in java.lang">String</a> getVersion()</pre> |
| <div class="block">Get the version of this class.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Returns the version of this class.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="tearDown--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>tearDown</h4> |
| <pre><a href="https://docs.oracle.com/javase/8/docs/api/java/lang/Deprecated.html?is-external=true" target="_blank" title="class or interface in java.lang">@Deprecated</a> |
| public static void tearDown()</pre> |
| <div class="block"><span class="deprecatedLabel">Deprecated.</span> <span class="deprecationComment">This method has no effect; it will be removed in a future version.</span></div> |
| <div class="block">Performs cleanup on the CUDAManager class.</div> |
| </li> |
| </ul> |
| <a name="acquireFreeDevice--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>acquireFreeDevice</h4> |
| <pre>public int acquireFreeDevice()</pre> |
| <div class="block">Look for the next free device and mark it as busy.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Returns the device ID of the next free device.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getCUDADevices--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getCUDADevices</h4> |
| <pre>public <a href="https://docs.oracle.com/javase/8/docs/api/java/util/ArrayList.html?is-external=true" target="_blank" title="class or interface in java.util">ArrayList</a><<a href="../../../com/ibm/gpu/CUDADevice.html" title="class in com.ibm.gpu">CUDADevice</a>> getCUDADevices()</pre> |
| <div class="block">Use this method to obtain a reference to an ArrayList containing |
| references to all discovered CUDA devices.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Returns an ArrayList containing all discovered CUDA |
| devices - see <a href="../../../com/ibm/gpu/CUDADevice.html" title="class in com.ibm.gpu"><code>CUDADevice</code></a> for details.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getDefaultDevice--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getDefaultDevice</h4> |
| <pre>public int getDefaultDevice()</pre> |
| <div class="block">Gets the ID of the default device, set to 0 by default.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Returns the device ID of the current default device.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getDevice-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getDevice</h4> |
| <pre>public <a href="../../../com/ibm/gpu/CUDADevice.html" title="class in com.ibm.gpu">CUDADevice</a> getDevice(int deviceId) |
| throws <a href="../../../com/ibm/gpu/GPUConfigurationException.html" title="class in com.ibm.gpu">GPUConfigurationException</a></pre> |
| <div class="block">Get a reference to the CUDA device by means of its index (with 0 being the first).</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>deviceId</code> - The index of the device to retrieve (with 0 being the first).</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Returns a CUDA device at the specified index - see |
| <a href="../../../com/ibm/gpu/CUDADevice.html" title="class in com.ibm.gpu"><code>CUDADevice</code></a> for details.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../com/ibm/gpu/GPUConfigurationException.html" title="class in com.ibm.gpu">GPUConfigurationException</a></code> - Throws this exception if an invalid deviceId |
| has been specified.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getDeviceCount--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getDeviceCount</h4> |
| <pre>public int getDeviceCount()</pre> |
| <div class="block">Identifies the number of available CUDA devices.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Returns how many CUDA devices have been detected.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getDeviceWithMostAvailableMemory--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getDeviceWithMostAvailableMemory</h4> |
| <pre>public <a href="../../../com/ibm/gpu/CUDADevice.html" title="class in com.ibm.gpu">CUDADevice</a> getDeviceWithMostAvailableMemory() |
| throws <a href="../../../com/ibm/gpu/GPUConfigurationException.html" title="class in com.ibm.gpu">GPUConfigurationException</a></pre> |
| <div class="block">Identifies the CUDA device that has the most memory available.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Returns a reference to the CUDA device with the most memory available.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../com/ibm/gpu/GPUConfigurationException.html" title="class in com.ibm.gpu">GPUConfigurationException</a></code> - Throws this exception if an |
| attempt was made to access an invalid device (no longer available).</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getDoubleThreshold--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getDoubleThreshold</h4> |
| <pre>public int getDoubleThreshold()</pre> |
| <div class="block">Gets the minimum length of a double array that will be |
| sorted using a GPU if enabled.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The minimum length of a double array that will be |
| sorted using a GPU.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getEnabledCUDADevices--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getEnabledCUDADevices</h4> |
| <pre>public <a href="../../../com/ibm/gpu/CUDADevice.html" title="class in com.ibm.gpu">CUDADevice</a>[] getEnabledCUDADevices()</pre> |
| <div class="block">Use this method to return an array of enabled CUDA devices.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Returns an array containing enabled CUDA devices - |
| see <a href="../../../com/ibm/gpu/CUDADevice.html" title="class in com.ibm.gpu"><code>CUDADevice</code></a> for details.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getFloatThreshold--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFloatThreshold</h4> |
| <pre>public int getFloatThreshold()</pre> |
| <div class="block">Gets the minimum length of a float array that will be |
| sorted using a GPU if enabled.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The minimum length of a float array that will be |
| sorted using a GPU.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getFreeMemoryForDevice-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getFreeMemoryForDevice</h4> |
| <pre>public long getFreeMemoryForDevice(int deviceId) |
| throws <a href="../../../com/ibm/gpu/GPUConfigurationException.html" title="class in com.ibm.gpu">GPUConfigurationException</a></pre> |
| <div class="block">Get the amount of free memory (in bytes) available for the provided CUDA device. |
| Does not persistently change the current device.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>deviceId</code> - The index of the device to query (with 0 being the first).</dd> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Returns the amount of free memory available.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../com/ibm/gpu/GPUConfigurationException.html" title="class in com.ibm.gpu">GPUConfigurationException</a></code> - Throw this exception if cannot get free memory amount.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getIntThreshold--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getIntThreshold</h4> |
| <pre>public int getIntThreshold()</pre> |
| <div class="block">Gets the minimum length of an int array that will be |
| sorted using a GPU if enabled.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The minimum length of an int array that will be |
| sorted using a GPU.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getLongThreshold--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getLongThreshold</h4> |
| <pre>public int getLongThreshold()</pre> |
| <div class="block">Gets the minimum length of a long array that will be |
| sorted using a GPU if enabled.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>The minimum length of a long array that will be |
| sorted using a GPU.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getNextAvailableDevice--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getNextAvailableDevice</h4> |
| <pre>public int getNextAvailableDevice()</pre> |
| <div class="block">Returns the next CUDA device that is available to run calculations on.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>-1 if there are no free devices, otherwise returns |
| the ID of the free CUDA device.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="getVerboseGPUOutput--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>getVerboseGPUOutput</h4> |
| <pre>public boolean getVerboseGPUOutput()</pre> |
| <div class="block">Get the value of the verboseGPUOutput flag.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Whether or not verbose output should be produced.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="hasCUDASupport--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>hasCUDASupport</h4> |
| <pre>public boolean hasCUDASupport()</pre> |
| <div class="block">Use this method to identify if CUDA is supported on this machine and |
| within this environment: returns true if the number of CUDA devices |
| detected is greater than 0.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Returns true if one or more CUDA devices have been detected.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isSortEnabledOnGPU--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isSortEnabledOnGPU</h4> |
| <pre>public boolean isSortEnabledOnGPU()</pre> |
| <div class="block">This method provides a means to determine if sort is |
| enabled to be used by any available CUDA device.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Returns true if GPU sort is enabled.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="isSortEnforcedOnGPU--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>isSortEnforcedOnGPU</h4> |
| <pre>public boolean isSortEnforcedOnGPU()</pre> |
| <div class="block">This method provides a means to determine if sort is |
| forced to be used by any available CUDA device.</div> |
| <dl> |
| <dt><span class="returnLabel">Returns:</span></dt> |
| <dd>Returns true if GPU sort is forced.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="printAllDeviceInfo--"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>printAllDeviceInfo</h4> |
| <pre>public void printAllDeviceInfo()</pre> |
| <div class="block">Print information for each detected CUDA device.</div> |
| </li> |
| </ul> |
| <a name="releaseDevice-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>releaseDevice</h4> |
| <pre>public void releaseDevice(int deviceId)</pre> |
| <div class="block">Mark a device as being free; must be in a try finally block as we MUST |
| release the handle regardless of whether or not a sort was successful.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>deviceId</code> - The device to be marked as free.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setDefaultDevice-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setDefaultDevice</h4> |
| <pre>public void setDefaultDevice(int deviceId)</pre> |
| <div class="block">Sets the default device to the given device ID.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>deviceId</code> - The new default device.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setDevice-int-"> |
| <!-- --> |
| </a> |
| <ul class="blockList"> |
| <li class="blockList"> |
| <h4>setDevice</h4> |
| <pre>public void setDevice(int deviceId) |
| throws <a href="../../../com/ibm/gpu/GPUConfigurationException.html" title="class in com.ibm.gpu">GPUConfigurationException</a></pre> |
| <div class="block">Use this method to set the device to use for subsequent calls.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>deviceId</code> - Set the default device ID to be this.</dd> |
| <dt><span class="throwsLabel">Throws:</span></dt> |
| <dd><code><a href="../../../com/ibm/gpu/GPUConfigurationException.html" title="class in com.ibm.gpu">GPUConfigurationException</a></code> - Throws this exception if an invalid device |
| number was specified.</dd> |
| </dl> |
| </li> |
| </ul> |
| <a name="setVerboseGPU-boolean-"> |
| <!-- --> |
| </a> |
| <ul class="blockListLast"> |
| <li class="blockList"> |
| <h4>setVerboseGPU</h4> |
| <pre>public void setVerboseGPU(boolean condition)</pre> |
| <div class="block">Set the value of the verboseGPUOutput flag. When this flag is true, GPU |
| output will be produced.</div> |
| <dl> |
| <dt><span class="paramLabel">Parameters:</span></dt> |
| <dd><code>condition</code> - Whether or not verbose output should be produced.</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> |
| <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div> |
| <a name="navbar.bottom.firstrow"> |
| <!-- --> |
| </a> |
| <ul class="navList" title="Navigation"> |
| <li><a href="../../../com/ibm/gpu/package-summary.html">Package</a></li> |
| <li class="navBarCell1Rev">Class</li> |
| <li><a href="class-use/CUDAManager.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-all.html">Index</a></li> |
| <li><a href="../../../help-doc.html">Help</a></li> |
| </ul> |
| <div class="aboutLanguage"><strong>OpenJ9 GPU Classes</strong></div> |
| </div> |
| <div class="subNav"> |
| <ul class="navList"> |
| <li><a href="../../../com/ibm/gpu/CUDADevice.html" title="class in com.ibm.gpu"><span class="typeNameLink">Prev Class</span></a></li> |
| <li><a href="../../../com/ibm/gpu/GPUConfigurationException.html" title="class in com.ibm.gpu"><span class="typeNameLink">Next Class</span></a></li> |
| </ul> |
| <ul class="navList"> |
| <li><a href="../../../index.html?com/ibm/gpu/CUDAManager.html" target="_top">Frames</a></li> |
| <li><a href="CUDAManager.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><a href="https://www.eclipse.org/openj9/" target="_blank">Eclipse OpenJ9 website.</a><br> To raise a bug report or suggest an improvement create an <a href="https://github.com/eclipse/openj9/issues" target="_blank">Eclipse OpenJ9 issue.</a><br> Copyright © 2014, 2021, IBM Corp. and others.</small></p> |
| </body> |
| </html> |