blob: e062ed01a5cea69a27955efe567a67f13dad14a8 [file] [log] [blame]
<!DOCTYPE HTML>
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (16) -->
<title>CudaStream (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.cuda, package: com.ibm.cuda, class: CudaStream">
<meta name="generator" content="javadoc/ClassWriterImpl">
<meta name="keywords" content="com.ibm.cuda.CudaStream class">
<meta name="keywords" content="FLAG_DEFAULT">
<meta name="keywords" content="FLAG_NON_BLOCKING">
<meta name="keywords" content="addCallback()">
<meta name="keywords" content="close()">
<meta name="keywords" content="getFlags()">
<meta name="keywords" content="getPriority()">
<meta name="keywords" content="query()">
<meta name="keywords" content="synchronize()">
<meta name="keywords" content="waitFor()">
<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/CudaStream.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:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#field.summary">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#method.summary">Method</a></li>
</ul>
<ul class="sub-nav-list">
<li>Detail:&nbsp;</li>
<li><a href="#field.detail">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</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>&nbsp;<a href="../../../module-summary.html">openj9.cuda</a></div>
<div class="sub-title"><span class="package-label-in-type">Package</span>&nbsp;<a href="package-summary.html">com.ibm.cuda</a></div>
<h1 title="Class CudaStream" class="title">Class CudaStream</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.cuda.CudaStream</div>
</div>
<section class="description">
<dl class="notes">
<dt>All Implemented Interfaces:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/AutoCloseable.html" title="class or interface in java.lang" class="external-link" target="_blank">AutoCloseable</a></code></dd>
</dl>
<hr>
<div class="type-signature"><span class="modifiers">public final class </span><span class="element-name type-name-label">CudaStream</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>
implements <a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/AutoCloseable.html" title="class or interface in java.lang" class="external-link" target="_blank">AutoCloseable</a></span></div>
<div class="block">The <code>CudaStream</code> class represents an independent queue of work for a
specific <a href="CudaDevice.html" title="class in com.ibm.cuda"><code>CudaDevice</code></a>.
<p>
When no longer required, a stream must be <code>close</code>d.</div>
</section>
<section class="summary">
<ul class="summary-list">
<!-- =========== FIELD SUMMARY =========== -->
<li>
<section class="field-summary" id="field.summary">
<h2>Field Summary</h2>
<div class="caption"><span>Fields</span></div>
<div class="summary-table three-column-summary">
<div class="table-header col-first">Modifier and Type</div>
<div class="table-header col-second">Field</div>
<div class="table-header col-last">Description</div>
<div class="col-first even-row-color"><code>static int</code></div>
<div class="col-second even-row-color"><code><span class="member-name-link"><a href="#FLAG_DEFAULT">FLAG_DEFAULT</a></span></code></div>
<div class="col-last even-row-color">
<div class="block">Default stream creation flag.</div>
</div>
<div class="col-first odd-row-color"><code>static int</code></div>
<div class="col-second odd-row-color"><code><span class="member-name-link"><a href="#FLAG_NON_BLOCKING">FLAG_NON_BLOCKING</a></span></code></div>
<div class="col-last odd-row-color">
<div class="block">Stream creation flag requesting no implicit synchronization with the
default stream.</div>
</div>
</div>
</section>
</li>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<li>
<section class="constructor-summary" id="constructor.summary">
<h2>Constructor Summary</h2>
<div class="caption"><span>Constructors</span></div>
<div class="summary-table two-column-summary">
<div class="table-header col-first">Constructor</div>
<div class="table-header col-last">Description</div>
<div class="col-constructor-name even-row-color"><code><span class="member-name-link"><a href="#%3Cinit%3E(com.ibm.cuda.CudaDevice)">CudaStream</a></span>&#8203;(<a href="CudaDevice.html" title="class in com.ibm.cuda">CudaDevice</a>&nbsp;device)</code></div>
<div class="col-last even-row-color">
<div class="block">Creates a new stream on the specified device, with the default flags
and the default priority.</div>
</div>
<div class="col-constructor-name odd-row-color"><code><span class="member-name-link"><a href="#%3Cinit%3E(com.ibm.cuda.CudaDevice,int,int)">CudaStream</a></span>&#8203;(<a href="CudaDevice.html" title="class in com.ibm.cuda">CudaDevice</a>&nbsp;device,
int&nbsp;flags,
int&nbsp;priority)</code></div>
<div class="col-last odd-row-color">
<div class="block">Creates a new stream on the specified device, with the specified flags
and priority.</div>
</div>
</div>
</section>
</li>
<!-- ========== 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-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></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>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="#addCallback(java.lang.Runnable)">addCallback</a></span>&#8203;(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Runnable.html" title="class or interface in java.lang" class="external-link" target="_blank">Runnable</a>&nbsp;callback)</code></div>
<div class="col-last even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table">
<div class="block">Enqueues a callback to be run after all previous work on this stream
has been completed.</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="#close()">close</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">Closes this stream.</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="#getFlags()">getFlags</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">Returns the flags of this stream.</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="#getPriority()">getPriority</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 priority of this stream.</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="#query()">query</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">Queries the state of this stream.</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="#synchronize()">synchronize</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">Synchronizes with this stream.</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="#waitFor(com.ibm.cuda.CudaEvent)">waitFor</a></span>&#8203;(<a href="CudaEvent.html" title="class in com.ibm.cuda">CudaEvent</a>&nbsp;event)</code></div>
<div class="col-last even-row-color method-summary-table-tab2 method-summary-table-tab4 method-summary-table">
<div class="block">Makes all future work submitted to this stream wait for the specified
event to occur.</div>
</div>
</div>
</div>
</div>
<div class="inherited-list">
<h3 id="methods.inherited.from.class.java.lang.Object">Methods declared in class&nbsp;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">
<!-- ============ FIELD DETAIL =========== -->
<li>
<section class="field-details" id="field.detail">
<h2>Field Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="FLAG_DEFAULT">
<h3>FLAG_DEFAULT</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">FLAG_DEFAULT</span></div>
<div class="block">Default stream creation flag.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd><a href="../../../../constant-values.html#com.ibm.cuda.CudaStream.FLAG_DEFAULT">Constant Field Values</a></dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="FLAG_NON_BLOCKING">
<h3>FLAG_NON_BLOCKING</h3>
<div class="member-signature"><span class="modifiers">public static final</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">FLAG_NON_BLOCKING</span></div>
<div class="block">Stream creation flag requesting no implicit synchronization with the
default stream.</div>
<dl class="notes">
<dt>See Also:</dt>
<dd><a href="../../../../constant-values.html#com.ibm.cuda.CudaStream.FLAG_NON_BLOCKING">Constant Field Values</a></dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<li>
<section class="constructor-details" id="constructor.detail">
<h2>Constructor Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="&lt;init&gt;(com.ibm.cuda.CudaDevice)">
<h3>CudaStream</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">CudaStream</span>&#8203;<span class="parameters">(<a href="CudaDevice.html" title="class in com.ibm.cuda">CudaDevice</a>&nbsp;device)</span>
throws <span class="exceptions"><a href="CudaException.html" title="class in com.ibm.cuda">CudaException</a></span></div>
<div class="block">Creates a new stream on the specified device, with the default flags
and the default priority.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>device</code> - the specified device</dd>
<dt>Throws:</dt>
<dd><code><a href="CudaException.html" title="class in com.ibm.cuda">CudaException</a></code> - if a CUDA exception occurs</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="&lt;init&gt;(com.ibm.cuda.CudaDevice,int,int)">
<h3>CudaStream</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="element-name">CudaStream</span>&#8203;<span class="parameters">(<a href="CudaDevice.html" title="class in com.ibm.cuda">CudaDevice</a>&nbsp;device,
int&nbsp;flags,
int&nbsp;priority)</span>
throws <span class="exceptions"><a href="CudaException.html" title="class in com.ibm.cuda">CudaException</a></span></div>
<div class="block">Creates a new stream on the specified device, with the specified flags
and priority.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>device</code> - the specified device</dd>
<dd><code>flags</code> - the desired flags</dd>
<dd><code>priority</code> - the desired priority</dd>
<dt>Throws:</dt>
<dd><code><a href="CudaException.html" title="class in com.ibm.cuda">CudaException</a></code> - if a CUDA exception occurs</dd>
</dl>
</section>
</li>
</ul>
</section>
</li>
<!-- ============ METHOD DETAIL ========== -->
<li>
<section class="method-details" id="method.detail">
<h2>Method Details</h2>
<ul class="member-list">
<li>
<section class="detail" id="addCallback(java.lang.Runnable)">
<h3>addCallback</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">addCallback</span>&#8203;<span class="parameters">(<a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/Runnable.html" title="class or interface in java.lang" class="external-link" target="_blank">Runnable</a>&nbsp;callback)</span>
throws <span class="exceptions"><a href="CudaException.html" title="class in com.ibm.cuda">CudaException</a></span></div>
<div class="block">Enqueues a callback to be run after all previous work on this stream
has been completed.
<p>
Note that the callback will occur on a distinct thread. Further, any
attempts to interact with CUDA devices will fail with a CudaException
with code <a href="CudaError.html#NotPermitted"><code>CudaError.NotPermitted</code></a>.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>callback</code> - the runnable to be run</dd>
<dt>Throws:</dt>
<dd><code><a href="CudaException.html" title="class in com.ibm.cuda">CudaException</a></code> - if a CUDA exception occurs</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="close()">
<h3>close</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">close</span>()
throws <span class="exceptions"><a href="CudaException.html" title="class in com.ibm.cuda">CudaException</a></span></div>
<div class="block">Closes this stream.
Any work queued on this stream will be allowed to complete: this method
does not wait for that work (if any) to complete.</div>
<dl class="notes">
<dt>Specified by:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/AutoCloseable.html#close()" title="class or interface in java.lang" class="external-link" target="_blank">close</a></code>&nbsp;in interface&nbsp;<code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/AutoCloseable.html" title="class or interface in java.lang" class="external-link" target="_blank">AutoCloseable</a></code></dd>
<dt>Throws:</dt>
<dd><code><a href="CudaException.html" title="class in com.ibm.cuda">CudaException</a></code> - if a CUDA exception occurs</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getFlags()">
<h3>getFlags</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getFlags</span>()
throws <span class="exceptions"><a href="CudaException.html" title="class in com.ibm.cuda">CudaException</a></span></div>
<div class="block">Returns the flags of this stream.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the flags of this stream</dd>
<dt>Throws:</dt>
<dd><code><a href="CudaException.html" title="class in com.ibm.cuda">CudaException</a></code> - if a CUDA exception occurs</dd>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link" target="_blank">IllegalStateException</a></code> - if this stream has been closed (see <a href="#close()"><code>close()</code></a>)</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="getPriority()">
<h3>getPriority</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">getPriority</span>()
throws <span class="exceptions"><a href="CudaException.html" title="class in com.ibm.cuda">CudaException</a></span></div>
<div class="block">Returns the priority of this stream.</div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the priority of this stream</dd>
<dt>Throws:</dt>
<dd><code><a href="CudaException.html" title="class in com.ibm.cuda">CudaException</a></code> - if a CUDA exception occurs</dd>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link" target="_blank">IllegalStateException</a></code> - if this stream has been closed (see <a href="#close()"><code>close()</code></a>)</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="query()">
<h3>query</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">int</span>&nbsp;<span class="element-name">query</span>()</div>
<div class="block">Queries the state of this stream.
The common normally occurring states are:
<ul>
<li>CudaError.Success - stream has no pending work</li>
<li>CudaError.NotReady - stream has pending work</li>
</ul></div>
<dl class="notes">
<dt>Returns:</dt>
<dd>the state of this stream</dd>
<dt>Throws:</dt>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link" target="_blank">IllegalStateException</a></code> - if this stream has been closed (see <a href="#close()"><code>close()</code></a>)</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="synchronize()">
<h3>synchronize</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">synchronize</span>()
throws <span class="exceptions"><a href="CudaException.html" title="class in com.ibm.cuda">CudaException</a></span></div>
<div class="block">Synchronizes with this stream.
This method blocks until all work queued on this stream has completed.</div>
<dl class="notes">
<dt>Throws:</dt>
<dd><code><a href="CudaException.html" title="class in com.ibm.cuda">CudaException</a></code> - if a CUDA exception occurs</dd>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link" target="_blank">IllegalStateException</a></code> - if this stream has been closed (see <a href="#close()"><code>close()</code></a>)</dd>
</dl>
</section>
</li>
<li>
<section class="detail" id="waitFor(com.ibm.cuda.CudaEvent)">
<h3>waitFor</h3>
<div class="member-signature"><span class="modifiers">public</span>&nbsp;<span class="return-type">void</span>&nbsp;<span class="element-name">waitFor</span>&#8203;<span class="parameters">(<a href="CudaEvent.html" title="class in com.ibm.cuda">CudaEvent</a>&nbsp;event)</span>
throws <span class="exceptions"><a href="CudaException.html" title="class in com.ibm.cuda">CudaException</a></span></div>
<div class="block">Makes all future work submitted to this stream wait for the specified
event to occur.</div>
<dl class="notes">
<dt>Parameters:</dt>
<dd><code>event</code> - the specified event</dd>
<dt>Throws:</dt>
<dd><code><a href="CudaException.html" title="class in com.ibm.cuda">CudaException</a></code> - if a CUDA exception occurs</dd>
<dd><code><a href="https://docs.oracle.com/en/java/javase/16/docs/api/java.base/java/lang/IllegalStateException.html" title="class or interface in java.lang" class="external-link" target="_blank">IllegalStateException</a></code> - if this stream has been closed (see <a href="#close()"><code>close()</code></a>),
or the event has been closed (see <a href="CudaEvent.html#close()"><code>CudaEvent.close()</code></a>)</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 &copy; 1998, 2021, IBM Corp. and others.</small></p>
</footer>
</div>
</div>
</body>
</html>