| <!DOCTYPE HTML> |
| <!-- NewPage --> |
| <html lang="en"> |
| <head> |
| <!-- Generated by javadoc (16) --> |
| <title>CUDAManager (OpenJ9 JDK 16)</title> |
| <meta name="viewport" content="width=device-width, initial-scale=1"> |
| <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <meta name="description" content="declaration: module: openj9.gpu, package: com.ibm.gpu, class: CUDAManager"> |
| <meta name="generator" content="javadoc/ClassWriterImpl"> |
| <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"> |
| <link rel="stylesheet" type="text/css" href="../../../../script-dir/jquery-ui.min.css" title="Style"> |
| <link rel="stylesheet" type="text/css" href="../../../../jquery-ui.overrides.css" title="Style"> |
| <script type="text/javascript" src="../../../../script.js"></script> |
| <script type="text/javascript" src="../../../../script-dir/jquery-3.5.1.min.js"></script> |
| <script type="text/javascript" src="../../../../script-dir/jquery-ui.min.js"></script> |
| </head> |
| <body class="class-declaration-page"> |
| <script type="text/javascript">var evenRowColor = "even-row-color"; |
| var oddRowColor = "odd-row-color"; |
| var tableTab = "table-tab"; |
| var activeTableTab = "active-table-tab"; |
| var pathtoroot = "../../../../"; |
| loadScripts(document, 'script');</script> |
| <noscript> |
| <div>JavaScript is disabled on your browser.</div> |
| </noscript> |
| <div class="flex-box"> |
| <header role="banner" class="flex-header"> |
| <nav role="navigation"> |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <div class="top-nav" id="navbar.top"> |
| <div class="skip-nav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div> |
| <div class="about-language"><div style="margin-top: 9px;"><strong>OpenJ9 JDK 16</strong></div></div> |
| <ul id="navbar.top.firstrow" class="nav-list" title="Navigation"> |
| <li><a href="../../../../index.html">Overview</a></li> |
| <li><a href="../../../module-summary.html">Module</a></li> |
| <li><a href="package-summary.html">Package</a></li> |
| <li class="nav-bar-cell1-rev">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-files/index-1.html">Index</a></li> |
| <li><a href="../../../../help-doc.html">Help</a></li> |
| </ul> |
| </div> |
| <div class="sub-nav"> |
| <div> |
| <ul class="sub-nav-list"> |
| <li>Summary: </li> |
| <li>Nested | </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.summary">Method</a></li> |
| </ul> |
| <ul class="sub-nav-list"> |
| <li>Detail: </li> |
| <li>Field | </li> |
| <li>Constr | </li> |
| <li><a href="#method.detail">Method</a></li> |
| </ul> |
| </div> |
| <div class="nav-list-search"><label for="search">SEARCH:</label> |
| <input type="text" id="search" value="search" disabled="disabled"> |
| <input type="reset" id="reset" value="reset" disabled="disabled"> |
| </div> |
| </div> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| <span class="skip-nav" id="skip.navbar.top"> |
| <!-- --> |
| </span></nav> |
| </header> |
| <div class="flex-content"> |
| <main role="main"> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <div class="header"> |
| <div class="sub-title"><span class="module-label-in-type">Module</span> <a href="../../../module-summary.html">openj9.gpu</a></div> |
| <div class="sub-title"><span class="package-label-in-type">Package</span> <a href="package-summary.html">com.ibm.gpu</a></div> |
| <h1 title="Class CUDAManager" class="title">Class CUDAManager</h1> |
| </div> |
| <div class="inheritance" title="Inheritance Tree"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link" target="_blank">java.lang.Object</a> |
| <div class="inheritance">com.ibm.gpu.CUDAManager</div> |
| </div> |
| <section class="description"> |
| <hr> |
| <div class="type-signature"><span class="modifiers">public final class </span><span class="element-name type-name-label">CUDAManager</span> |
| <span class="extends-implements">extends <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link" target="_blank">Object</a></span></div> |
| <div class="block">This class contains information important to IBM GPU enabled functions.</div> |
| </section> |
| <section class="summary"> |
| <ul class="summary-list"> |
| <!-- ========== METHOD SUMMARY =========== --> |
| <li> |
| <section class="method-summary" id="method.summary"> |
| <h2>Method Summary</h2> |
| <div id="method-summary-table"> |
| <div class="table-tabs" role="tablist" aria-orientation="horizontal"><button id="method-summary-table-tab0" role="tab" aria-selected="true" aria-controls="method-summary-table.tabpanel" tabindex="0" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table', 3)" class="active-table-tab">All Methods</button><button id="method-summary-table-tab1" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab1', 3)" class="table-tab">Static Methods</button><button id="method-summary-table-tab2" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab2', 3)" class="table-tab">Instance Methods</button><button id="method-summary-table-tab4" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab4', 3)" class="table-tab">Concrete Methods</button><button id="method-summary-table-tab6" role="tab" aria-selected="false" aria-controls="method-summary-table.tabpanel" tabindex="-1" onkeydown="switchTab(event)" onclick="show('method-summary-table', 'method-summary-table-tab6', 3)" class="table-tab">Deprecated Methods</button></div> |
| <div id="method-summary-table.tabpanel" role="tabpanel"> |
| <div class="summary-table three-column-summary" aria-labelledby="method-summary-table-tab0"> |
| <div class="table-header col-first">Modifier and Type</div> |
| <div class="table-header col-second">Method</div> |
| <div class="table-header col-last">Description</div> |
| <div class="col-first even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>int</code></div> |
| <div class="col-second even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#acquireFreeDevice()">acquireFreeDevice</a></span>()</code></div> |
| <div class="col-last even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"> |
| <div class="block">Look for the next free device and mark it as busy.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/ArrayList.html" title="class or interface in java.util" class="external-link" target="_blank">ArrayList</a><<a href="CUDADevice.html" title="class in com.ibm.gpu">CUDADevice</a>></code></div> |
| <div class="col-second odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#getCUDADevices()">getCUDADevices</a></span>()</code></div> |
| <div class="col-last odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"> |
| <div class="block">Use this method to obtain a reference to an ArrayList containing |
| references to all discovered CUDA devices.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>int</code></div> |
| <div class="col-second even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#getDefaultDevice()">getDefaultDevice</a></span>()</code></div> |
| <div class="col-last even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"> |
| <div class="block">Gets the ID of the default device, set to 0 by default.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><a href="CUDADevice.html" title="class in com.ibm.gpu">CUDADevice</a></code></div> |
| <div class="col-second odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#getDevice(int)">getDevice</a></span>​(int deviceId)</code></div> |
| <div class="col-last odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"> |
| <div class="block">Get a reference to the CUDA device by means of its index (with 0 being the first).</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>int</code></div> |
| <div class="col-second even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#getDeviceCount()">getDeviceCount</a></span>()</code></div> |
| <div class="col-last even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"> |
| <div class="block">Identifies the number of available CUDA devices.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><a href="CUDADevice.html" title="class in com.ibm.gpu">CUDADevice</a></code></div> |
| <div class="col-second odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#getDeviceWithMostAvailableMemory()">getDeviceWithMostAvailableMemory</a></span>()</code></div> |
| <div class="col-last odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"> |
| <div class="block">Identifies the CUDA device that has the most memory available.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>int</code></div> |
| <div class="col-second even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#getDoubleThreshold()">getDoubleThreshold</a></span>()</code></div> |
| <div class="col-last even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"> |
| <div class="block">Gets the minimum length of a double array that will be |
| sorted using a GPU if enabled.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><a href="CUDADevice.html" title="class in com.ibm.gpu">CUDADevice</a>[]</code></div> |
| <div class="col-second odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#getEnabledCUDADevices()">getEnabledCUDADevices</a></span>()</code></div> |
| <div class="col-last odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"> |
| <div class="block">Use this method to return an array of enabled CUDA devices.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>int</code></div> |
| <div class="col-second even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#getFloatThreshold()">getFloatThreshold</a></span>()</code></div> |
| <div class="col-last even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"> |
| <div class="block">Gets the minimum length of a float array that will be |
| sorted using a GPU if enabled.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>long</code></div> |
| <div class="col-second odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#getFreeMemoryForDevice(int)">getFreeMemoryForDevice</a></span>​(int deviceId)</code></div> |
| <div class="col-last odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"> |
| <div class="block">Get the amount of free memory (in bytes) available for the provided CUDA device.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table-tab1 method-summary-table-tab6 method-summary-table-tab4 method-summary-table"><code>static <a href="CUDAManager.html" title="class in com.ibm.gpu">CUDAManager</a></code></div> |
| <div class="col-second even-row-color method-summary-table-tab1 method-summary-table-tab6 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#getInstance()">getInstance</a></span>()</code></div> |
| <div class="col-last even-row-color method-summary-table-tab1 method-summary-table-tab6 method-summary-table-tab4 method-summary-table"> |
| <div class="block"><span class="deprecated-label">Deprecated.</span> |
| <div class="deprecation-comment">Use <code>instance()</code> instead.</div> |
| </div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>int</code></div> |
| <div class="col-second odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#getIntThreshold()">getIntThreshold</a></span>()</code></div> |
| <div class="col-last odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"> |
| <div class="block">Gets the minimum length of an int array that will be |
| sorted using a GPU if enabled.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>int</code></div> |
| <div class="col-second even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#getLongThreshold()">getLongThreshold</a></span>()</code></div> |
| <div class="col-last even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"> |
| <div class="block">Gets the minimum length of a long array that will be |
| sorted using a GPU if enabled.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>int</code></div> |
| <div class="col-second odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#getNextAvailableDevice()">getNextAvailableDevice</a></span>()</code></div> |
| <div class="col-last odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"> |
| <div class="block">Returns the next CUDA device that is available to run calculations on.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table-tab1 method-summary-table-tab4 method-summary-table"><code>static <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link" target="_blank">String</a></code></div> |
| <div class="col-second even-row-color method-summary-table-tab1 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#getOutputHeader()">getOutputHeader</a></span>()</code></div> |
| <div class="col-last even-row-color method-summary-table-tab1 method-summary-table-tab4 method-summary-table"> |
| <div class="block">Get the header used to prefix all IBM GPU related output.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>boolean</code></div> |
| <div class="col-second odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#getVerboseGPUOutput()">getVerboseGPUOutput</a></span>()</code></div> |
| <div class="col-last odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"> |
| <div class="block">Get the value of the verboseGPUOutput flag.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table-tab1 method-summary-table-tab4 method-summary-table"><code>static <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link" target="_blank">String</a></code></div> |
| <div class="col-second even-row-color method-summary-table-tab1 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#getVersion()">getVersion</a></span>()</code></div> |
| <div class="col-last even-row-color method-summary-table-tab1 method-summary-table-tab4 method-summary-table"> |
| <div class="block">Get the version of this class.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>boolean</code></div> |
| <div class="col-second odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#hasCUDASupport()">hasCUDASupport</a></span>()</code></div> |
| <div class="col-last odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"> |
| <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> |
| </div> |
| <div class="col-first even-row-color method-summary-table-tab1 method-summary-table-tab4 method-summary-table"><code>static <a href="CUDAManager.html" title="class in com.ibm.gpu">CUDAManager</a></code></div> |
| <div class="col-second even-row-color method-summary-table-tab1 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#instance()">instance</a></span>()</code></div> |
| <div class="col-last even-row-color method-summary-table-tab1 method-summary-table-tab4 method-summary-table"> |
| <div class="block">Return a CUDAManager instance.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>boolean</code></div> |
| <div class="col-second odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#isSortEnabledOnGPU()">isSortEnabledOnGPU</a></span>()</code></div> |
| <div class="col-last odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"> |
| <div class="block">This method provides a means to determine if sort is |
| enabled to be used by any available CUDA device.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>boolean</code></div> |
| <div class="col-second even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#isSortEnforcedOnGPU()">isSortEnforcedOnGPU</a></span>()</code></div> |
| <div class="col-last even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"> |
| <div class="block">This method provides a means to determine if sort is |
| forced to be used by any available CUDA device.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#printAllDeviceInfo()">printAllDeviceInfo</a></span>()</code></div> |
| <div class="col-last odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"> |
| <div class="block">Print information for each detected CUDA device.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#releaseDevice(int)">releaseDevice</a></span>​(int deviceId)</code></div> |
| <div class="col-last even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"> |
| <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> |
| </div> |
| <div class="col-first odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#setDefaultDevice(int)">setDefaultDevice</a></span>​(int deviceId)</code></div> |
| <div class="col-last odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"> |
| <div class="block">Sets the default device to the given device ID.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>void</code></div> |
| <div class="col-second even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#setDevice(int)">setDevice</a></span>​(int deviceId)</code></div> |
| <div class="col-last even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"> |
| <div class="block">Use this method to set the device to use for subsequent calls.</div> |
| </div> |
| <div class="col-first odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code>void</code></div> |
| <div class="col-second odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#setVerboseGPU(boolean)">setVerboseGPU</a></span>​(boolean condition)</code></div> |
| <div class="col-last odd-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table"> |
| <div class="block">Set the value of the verboseGPUOutput flag.</div> |
| </div> |
| <div class="col-first even-row-color method-summary-table-tab1 method-summary-table-tab6 method-summary-table-tab4 method-summary-table"><code>static void</code></div> |
| <div class="col-second even-row-color method-summary-table-tab1 method-summary-table-tab6 method-summary-table-tab4 method-summary-table"><code><span class="member-name-link"><a href="#tearDown()">tearDown</a></span>()</code></div> |
| <div class="col-last even-row-color method-summary-table-tab1 method-summary-table-tab6 method-summary-table-tab4 method-summary-table"> |
| <div class="block"><span class="deprecated-label">Deprecated.</span> |
| <div class="deprecation-comment">This method has no effect; it will be removed in a future version.</div> |
| </div> |
| </div> |
| </div> |
| </div> |
| </div> |
| <div class="inherited-list"> |
| <h3 id="methods.inherited.from.class.java.lang.Object">Methods declared in class java.lang.<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html" title="class or interface in java.lang" class="external-link" target="_blank">Object</a></h3> |
| <code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#clone()" title="class or interface in java.lang" class="external-link" target="_blank">clone</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang" class="external-link" target="_blank">equals</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#finalize()" title="class or interface in java.lang" class="external-link" target="_blank">finalize</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#getClass()" title="class or interface in java.lang" class="external-link" target="_blank">getClass</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#hashCode()" title="class or interface in java.lang" class="external-link" target="_blank">hashCode</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#notify()" title="class or interface in java.lang" class="external-link" target="_blank">notify</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#notifyAll()" title="class or interface in java.lang" class="external-link" target="_blank">notifyAll</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#toString()" title="class or interface in java.lang" class="external-link" target="_blank">toString</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait()" title="class or interface in java.lang" class="external-link" target="_blank">wait</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait(long)" title="class or interface in java.lang" class="external-link" target="_blank">wait</a>, <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Object.html#wait(long,int)" title="class or interface in java.lang" class="external-link" target="_blank">wait</a></code></div> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <section class="details"> |
| <ul class="details-list"> |
| <!-- ============ METHOD DETAIL ========== --> |
| <li> |
| <section class="method-details" id="method.detail"> |
| <h2>Method Details</h2> |
| <ul class="member-list"> |
| <li> |
| <section class="detail" id="getInstance()"> |
| <h3>getInstance</h3> |
| <div class="member-signature"><span class="annotations"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link" target="_blank">@Deprecated</a> |
| </span><span class="modifiers">public static</span> <span class="return-type"><a href="CUDAManager.html" title="class in com.ibm.gpu">CUDAManager</a></span> <span class="element-name">getInstance</span>() |
| throws <span class="exceptions"><a href="GPUConfigurationException.html" title="class in com.ibm.gpu">GPUConfigurationException</a>, |
| <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/SecurityException.html" title="class or interface in java.lang" class="external-link" target="_blank">SecurityException</a></span></div> |
| <div class="deprecation-block"><span class="deprecated-label">Deprecated.</span> |
| <div class="deprecation-comment">Use <code>instance()</code> instead.</div> |
| </div> |
| <div class="block">Return a CUDAManager instance.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>a CUDAManager instance</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="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/en/java/javase/16/docs/api/java.base/java/lang/SecurityException.html" title="class or interface in java.lang" class="external-link" target="_blank">SecurityException</a></code> - If a security manager exists and the calling thread does not |
| have permission to access the CUDAManager instance.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="instance()"> |
| <h3>instance</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="CUDAManager.html" title="class in com.ibm.gpu">CUDAManager</a></span> <span class="element-name">instance</span>() |
| throws <span class="exceptions"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/SecurityException.html" title="class or interface in java.lang" class="external-link" target="_blank">SecurityException</a></span></div> |
| <div class="block">Return a CUDAManager instance.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>a CUDAManager instance</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/SecurityException.html" title="class or interface in java.lang" class="external-link" target="_blank">SecurityException</a></code> - If a security manager exists and the calling thread does not |
| have permission to access the CUDAManager instance.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getOutputHeader()"> |
| <h3>getOutputHeader</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link" target="_blank">String</a></span> <span class="element-name">getOutputHeader</span>()</div> |
| <div class="block">Get the header used to prefix all IBM GPU related output.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>The header used for IBM GPU related output.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getVersion()"> |
| <h3>getVersion</h3> |
| <div class="member-signature"><span class="modifiers">public static</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/String.html" title="class or interface in java.lang" class="external-link" target="_blank">String</a></span> <span class="element-name">getVersion</span>()</div> |
| <div class="block">Get the version of this class.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>Returns the version of this class.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="tearDown()"> |
| <h3>tearDown</h3> |
| <div class="member-signature"><span class="annotations"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Deprecated.html" title="class or interface in java.lang" class="external-link" target="_blank">@Deprecated</a> |
| </span><span class="modifiers">public static</span> <span class="return-type">void</span> <span class="element-name">tearDown</span>()</div> |
| <div class="deprecation-block"><span class="deprecated-label">Deprecated.</span> |
| <div class="deprecation-comment">This method has no effect; it will be removed in a future version.</div> |
| </div> |
| <div class="block">Performs cleanup on the CUDAManager class.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="acquireFreeDevice()"> |
| <h3>acquireFreeDevice</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">acquireFreeDevice</span>()</div> |
| <div class="block">Look for the next free device and mark it as busy.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>Returns the device ID of the next free device.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getCUDADevices()"> |
| <h3>getCUDADevices</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/util/ArrayList.html" title="class or interface in java.util" class="external-link" target="_blank">ArrayList</a><<a href="CUDADevice.html" title="class in com.ibm.gpu">CUDADevice</a>></span> <span class="element-name">getCUDADevices</span>()</div> |
| <div class="block">Use this method to obtain a reference to an ArrayList containing |
| references to all discovered CUDA devices.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>Returns an ArrayList containing all discovered CUDA |
| devices - see <a href="CUDADevice.html" title="class in com.ibm.gpu"><code>CUDADevice</code></a> for details.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getDefaultDevice()"> |
| <h3>getDefaultDevice</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">getDefaultDevice</span>()</div> |
| <div class="block">Gets the ID of the default device, set to 0 by default.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>Returns the device ID of the current default device.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getDevice(int)"> |
| <h3>getDevice</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="CUDADevice.html" title="class in com.ibm.gpu">CUDADevice</a></span> <span class="element-name">getDevice</span>​<span class="parameters">(int deviceId)</span> |
| throws <span class="exceptions"><a href="GPUConfigurationException.html" title="class in com.ibm.gpu">GPUConfigurationException</a></span></div> |
| <div class="block">Get a reference to the CUDA device by means of its index (with 0 being the first).</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>deviceId</code> - The index of the device to retrieve (with 0 being the first).</dd> |
| <dt>Returns:</dt> |
| <dd>Returns a CUDA device at the specified index - see |
| <a href="CUDADevice.html" title="class in com.ibm.gpu"><code>CUDADevice</code></a> for details.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="GPUConfigurationException.html" title="class in com.ibm.gpu">GPUConfigurationException</a></code> - Throws this exception if an invalid deviceId |
| has been specified.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getDeviceCount()"> |
| <h3>getDeviceCount</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">getDeviceCount</span>()</div> |
| <div class="block">Identifies the number of available CUDA devices.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>Returns how many CUDA devices have been detected.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getDeviceWithMostAvailableMemory()"> |
| <h3>getDeviceWithMostAvailableMemory</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="CUDADevice.html" title="class in com.ibm.gpu">CUDADevice</a></span> <span class="element-name">getDeviceWithMostAvailableMemory</span>() |
| throws <span class="exceptions"><a href="GPUConfigurationException.html" title="class in com.ibm.gpu">GPUConfigurationException</a></span></div> |
| <div class="block">Identifies the CUDA device that has the most memory available.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>Returns a reference to the CUDA device with the most memory available.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="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> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getDoubleThreshold()"> |
| <h3>getDoubleThreshold</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">getDoubleThreshold</span>()</div> |
| <div class="block">Gets the minimum length of a double array that will be |
| sorted using a GPU if enabled.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>The minimum length of a double array that will be |
| sorted using a GPU.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getEnabledCUDADevices()"> |
| <h3>getEnabledCUDADevices</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type"><a href="CUDADevice.html" title="class in com.ibm.gpu">CUDADevice</a>[]</span> <span class="element-name">getEnabledCUDADevices</span>()</div> |
| <div class="block">Use this method to return an array of enabled CUDA devices.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>Returns an array containing enabled CUDA devices - |
| see <a href="CUDADevice.html" title="class in com.ibm.gpu"><code>CUDADevice</code></a> for details.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getFloatThreshold()"> |
| <h3>getFloatThreshold</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">getFloatThreshold</span>()</div> |
| <div class="block">Gets the minimum length of a float array that will be |
| sorted using a GPU if enabled.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>The minimum length of a float array that will be |
| sorted using a GPU.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getFreeMemoryForDevice(int)"> |
| <h3>getFreeMemoryForDevice</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">long</span> <span class="element-name">getFreeMemoryForDevice</span>​<span class="parameters">(int deviceId)</span> |
| throws <span class="exceptions"><a href="GPUConfigurationException.html" title="class in com.ibm.gpu">GPUConfigurationException</a></span></div> |
| <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 class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>deviceId</code> - The index of the device to query (with 0 being the first).</dd> |
| <dt>Returns:</dt> |
| <dd>Returns the amount of free memory available.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="GPUConfigurationException.html" title="class in com.ibm.gpu">GPUConfigurationException</a></code> - Throw this exception if cannot get free memory amount.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getIntThreshold()"> |
| <h3>getIntThreshold</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">getIntThreshold</span>()</div> |
| <div class="block">Gets the minimum length of an int array that will be |
| sorted using a GPU if enabled.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>The minimum length of an int array that will be |
| sorted using a GPU.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getLongThreshold()"> |
| <h3>getLongThreshold</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">getLongThreshold</span>()</div> |
| <div class="block">Gets the minimum length of a long array that will be |
| sorted using a GPU if enabled.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>The minimum length of a long array that will be |
| sorted using a GPU.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getNextAvailableDevice()"> |
| <h3>getNextAvailableDevice</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">int</span> <span class="element-name">getNextAvailableDevice</span>()</div> |
| <div class="block">Returns the next CUDA device that is available to run calculations on.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>-1 if there are no free devices, otherwise returns |
| the ID of the free CUDA device.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="getVerboseGPUOutput()"> |
| <h3>getVerboseGPUOutput</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">getVerboseGPUOutput</span>()</div> |
| <div class="block">Get the value of the verboseGPUOutput flag.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>Whether or not verbose output should be produced.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="hasCUDASupport()"> |
| <h3>hasCUDASupport</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">hasCUDASupport</span>()</div> |
| <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 class="notes"> |
| <dt>Returns:</dt> |
| <dd>Returns true if one or more CUDA devices have been detected.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="isSortEnabledOnGPU()"> |
| <h3>isSortEnabledOnGPU</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">isSortEnabledOnGPU</span>()</div> |
| <div class="block">This method provides a means to determine if sort is |
| enabled to be used by any available CUDA device.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>Returns true if GPU sort is enabled.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="isSortEnforcedOnGPU()"> |
| <h3>isSortEnforcedOnGPU</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">boolean</span> <span class="element-name">isSortEnforcedOnGPU</span>()</div> |
| <div class="block">This method provides a means to determine if sort is |
| forced to be used by any available CUDA device.</div> |
| <dl class="notes"> |
| <dt>Returns:</dt> |
| <dd>Returns true if GPU sort is forced.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="printAllDeviceInfo()"> |
| <h3>printAllDeviceInfo</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">printAllDeviceInfo</span>()</div> |
| <div class="block">Print information for each detected CUDA device.</div> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="releaseDevice(int)"> |
| <h3>releaseDevice</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">releaseDevice</span>​<span class="parameters">(int deviceId)</span></div> |
| <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 class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>deviceId</code> - The device to be marked as free.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setDefaultDevice(int)"> |
| <h3>setDefaultDevice</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setDefaultDevice</span>​<span class="parameters">(int deviceId)</span></div> |
| <div class="block">Sets the default device to the given device ID.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>deviceId</code> - The new default device.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setDevice(int)"> |
| <h3>setDevice</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setDevice</span>​<span class="parameters">(int deviceId)</span> |
| throws <span class="exceptions"><a href="GPUConfigurationException.html" title="class in com.ibm.gpu">GPUConfigurationException</a></span></div> |
| <div class="block">Use this method to set the device to use for subsequent calls.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>deviceId</code> - Set the default device ID to be this.</dd> |
| <dt>Throws:</dt> |
| <dd><code><a href="GPUConfigurationException.html" title="class in com.ibm.gpu">GPUConfigurationException</a></code> - Throws this exception if an invalid device |
| number was specified.</dd> |
| </dl> |
| </section> |
| </li> |
| <li> |
| <section class="detail" id="setVerboseGPU(boolean)"> |
| <h3>setVerboseGPU</h3> |
| <div class="member-signature"><span class="modifiers">public</span> <span class="return-type">void</span> <span class="element-name">setVerboseGPU</span>​<span class="parameters">(boolean condition)</span></div> |
| <div class="block">Set the value of the verboseGPUOutput flag. When this flag is true, GPU |
| output will be produced.</div> |
| <dl class="notes"> |
| <dt>Parameters:</dt> |
| <dd><code>condition</code> - Whether or not verbose output should be produced.</dd> |
| </dl> |
| </section> |
| </li> |
| </ul> |
| </section> |
| </li> |
| </ul> |
| </section> |
| <!-- ========= END OF CLASS DATA ========= --> |
| </main> |
| <footer role="contentinfo"> |
| <hr> |
| <p class="legal-copy"><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/openj9/issues" target="_blank">Eclipse Openj9 issue.</a><br> Copyright © 1998, 2021, IBM Corp. and others.</small></p> |
| </footer> |
| </div> |
| </div> |
| </body> |
| </html> |