2
0
Ficheiros
rocm-systems/docs/RuntimeAPI/html/group__Event.html
T
Maneesh Gupta f052f43b3b Updated doxygen documentation
Change-Id: If04d1155173fba8d3e050f3259da8b3edc60e076
2016-12-19 04:04:06 +00:00

357 linhas
38 KiB
HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.6"/>
<title>HIP: Heterogenous-computing Interface for Portability: Event Management</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">HIP: Heterogenous-computing Interface for Portability
</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.6 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<div id="navrow1" class="tabs">
<ul class="tablist">
<li><a href="index.html"><span>Main&#160;Page</span></a></li>
<li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
<li><a href="modules.html"><span>Modules</span></a></li>
<li><a href="annotated.html"><span>Classes</span></a></li>
<li><a href="files.html"><span>Files</span></a></li>
<li>
<div id="MSearchBox" class="MSearchBoxInactive">
<span class="left">
<img id="MSearchSelect" src="search/mag_sel.png"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
alt=""/>
<input type="text" id="MSearchField" value="Search" accesskey="S"
onfocus="searchBox.OnSearchFieldFocus(true)"
onblur="searchBox.OnSearchFieldFocus(false)"
onkeyup="searchBox.OnSearchFieldChange(event)"/>
</span><span class="right">
<a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
</span>
</div>
</li>
</ul>
</div>
</div><!-- top -->
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
onmouseover="return searchBox.OnSearchSelectShow()"
onmouseout="return searchBox.OnSearchSelectHide()"
onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(11)"><span class="SelectionMark">&#160;</span>Pages</a></div>
<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0"
name="MSearchResults" id="MSearchResults">
</iframe>
</div>
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Event Management<div class="ingroups"><a class="el" href="group__API.html">HIP API</a></div></div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gae86a5acb1b22b61bc9ecb9c28fc71b75"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Event.html#gae86a5acb1b22b61bc9ecb9c28fc71b75">hipEventCreateWithFlags</a> (<a class="el" href="structihipEvent__t.html">hipEvent_t</a> *event, unsigned flags)</td></tr>
<tr class="memdesc:gae86a5acb1b22b61bc9ecb9c28fc71b75"><td class="mdescLeft">&#160;</td><td class="mdescRight">Create an event with the specified flags. <a href="#gae86a5acb1b22b61bc9ecb9c28fc71b75">More...</a><br/></td></tr>
<tr class="separator:gae86a5acb1b22b61bc9ecb9c28fc71b75"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5df2309c9f29ca4c8e669db658d411b4"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Event.html#ga5df2309c9f29ca4c8e669db658d411b4">hipEventCreate</a> (<a class="el" href="structihipEvent__t.html">hipEvent_t</a> *event)</td></tr>
<tr class="separator:ga5df2309c9f29ca4c8e669db658d411b4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga553b6f7a8e7b7dd9536d8a64c24d7e29"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Event.html#ga553b6f7a8e7b7dd9536d8a64c24d7e29">hipEventRecord</a> (<a class="el" href="structihipEvent__t.html">hipEvent_t</a> event, <a class="el" href="classihipStream__t.html">hipStream_t</a> stream)</td></tr>
<tr class="memdesc:ga553b6f7a8e7b7dd9536d8a64c24d7e29"><td class="mdescLeft">&#160;</td><td class="mdescRight">Record an event in the specified stream. <a href="#ga553b6f7a8e7b7dd9536d8a64c24d7e29">More...</a><br/></td></tr>
<tr class="separator:ga553b6f7a8e7b7dd9536d8a64c24d7e29"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga83260357dce0c39e8c6a3c74ec97484c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Event.html#ga83260357dce0c39e8c6a3c74ec97484c">hipEventDestroy</a> (<a class="el" href="structihipEvent__t.html">hipEvent_t</a> event)</td></tr>
<tr class="memdesc:ga83260357dce0c39e8c6a3c74ec97484c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy the specified event. <a href="#ga83260357dce0c39e8c6a3c74ec97484c">More...</a><br/></td></tr>
<tr class="separator:ga83260357dce0c39e8c6a3c74ec97484c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1f72d98ba5d6f7dc3da54e0c41fe38b1"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Event.html#ga1f72d98ba5d6f7dc3da54e0c41fe38b1">hipEventSynchronize</a> (<a class="el" href="structihipEvent__t.html">hipEvent_t</a> event)</td></tr>
<tr class="memdesc:ga1f72d98ba5d6f7dc3da54e0c41fe38b1"><td class="mdescLeft">&#160;</td><td class="mdescRight">Wait for an event to complete. <a href="#ga1f72d98ba5d6f7dc3da54e0c41fe38b1">More...</a><br/></td></tr>
<tr class="separator:ga1f72d98ba5d6f7dc3da54e0c41fe38b1"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gad4128b815cb475c8e13c7e66ff6250b7"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Event.html#gad4128b815cb475c8e13c7e66ff6250b7">hipEventElapsedTime</a> (float *ms, <a class="el" href="structihipEvent__t.html">hipEvent_t</a> start, <a class="el" href="structihipEvent__t.html">hipEvent_t</a> stop)</td></tr>
<tr class="memdesc:gad4128b815cb475c8e13c7e66ff6250b7"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the elapsed time between two events. <a href="#gad4128b815cb475c8e13c7e66ff6250b7">More...</a><br/></td></tr>
<tr class="separator:gad4128b815cb475c8e13c7e66ff6250b7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga5d12d7b798b5ceb5932d1ac21f5ac776"><td class="memItemLeft" align="right" valign="top"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="group__Event.html#ga5d12d7b798b5ceb5932d1ac21f5ac776">hipEventQuery</a> (<a class="el" href="structihipEvent__t.html">hipEvent_t</a> event)</td></tr>
<tr class="memdesc:ga5d12d7b798b5ceb5932d1ac21f5ac776"><td class="mdescLeft">&#160;</td><td class="mdescRight">Query event status. <a href="#ga5d12d7b798b5ceb5932d1ac21f5ac776">More...</a><br/></td></tr>
<tr class="separator:ga5d12d7b798b5ceb5932d1ac21f5ac776"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2>----------------------------------------------------------------------------------------------&mdash; </h2>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="ga5df2309c9f29ca4c8e669db658d411b4"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> hipEventCreate </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structihipEvent__t.html">hipEvent_t</a> *&#160;</td>
<td class="paramname"><em>event</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create an event</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in,out]</td><td class="paramname">event</td><td>Returns the newly created event.</td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a7e935ae88ee1f9ff3920156ac6864520" title="TODO comment from hipErrorInitializationError. ">hipErrorInitializationError</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a1e8215fe1108a508bad3944bce7b4d83" title="One or more of the parameters passed to the API call is NULL or not in an acceptable range...">hipErrorInvalidValue</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a3df72146e762c5a901d3af06027a1de9" title="An exception occurred on the device while executing a kernel. ">hipErrorLaunchFailure</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a8293288a10109874749afe2562db09f2" title="Memory allocation error. ">hipErrorMemoryAllocation</a></dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__Event.html#gae86a5acb1b22b61bc9ecb9c28fc71b75" title="Create an event with the specified flags. ">hipEventCreateWithFlags</a>, <a class="el" href="group__Event.html#ga553b6f7a8e7b7dd9536d8a64c24d7e29" title="Record an event in the specified stream. ">hipEventRecord</a>, <a class="el" href="group__Event.html#ga5d12d7b798b5ceb5932d1ac21f5ac776" title="Query event status. ">hipEventQuery</a>, <a class="el" href="group__Event.html#ga1f72d98ba5d6f7dc3da54e0c41fe38b1" title="Wait for an event to complete. ">hipEventSynchronize</a>, <a class="el" href="group__Event.html#ga83260357dce0c39e8c6a3c74ec97484c" title="Destroy the specified event. ">hipEventDestroy</a>, <a class="el" href="group__Event.html#gad4128b815cb475c8e13c7e66ff6250b7" title="Return the elapsed time between two events. ">hipEventElapsedTime</a> </dd></dl>
</div>
</div>
<a class="anchor" id="gae86a5acb1b22b61bc9ecb9c28fc71b75"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> hipEventCreateWithFlags </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structihipEvent__t.html">hipEvent_t</a> *&#160;</td>
<td class="paramname"><em>event</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">unsigned&#160;</td>
<td class="paramname"><em>flags</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Create an event with the specified flags. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in,out]</td><td class="paramname">event</td><td>Returns the newly created event. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">flags</td><td>Flags to control event behavior. Valid values are <a class="el" href="group__GlobalDefs.html#ga122a5853359eba97cf047ddd153740f0" title="Flags that can be used with hipEventCreateWithFlags: ">hipEventDefault</a>, <a class="el" href="group__GlobalDefs.html#gafa1c076a5b991763a98695063f1ea11d" title="Waiting will yield CPU. Power-friendly and usage-friendly but may increase latency. ">hipEventBlockingSync</a>, <a class="el" href="group__GlobalDefs.html#ga3c0f44a85e36a4c67671da6bcdad0351" title="Disable event&#39;s capability to record timing information. May improve performance. ...">hipEventDisableTiming</a>, <a class="el" href="group__GlobalDefs.html#ga0f01d74059baa704e42aeff8222166bb" title="Event can support IPC. ">hipEventInterprocess</a></td></tr>
</table>
</dd>
</dl>
<p><a class="el" href="group__GlobalDefs.html#ga122a5853359eba97cf047ddd153740f0" title="Flags that can be used with hipEventCreateWithFlags: ">hipEventDefault</a> : Default flag. The event will use active synchronization and will support timing. Blocking synchronization provides lowest possible latency at the expense of dedicating a CPU to poll on the eevent. <a class="el" href="group__GlobalDefs.html#gafa1c076a5b991763a98695063f1ea11d" title="Waiting will yield CPU. Power-friendly and usage-friendly but may increase latency. ">hipEventBlockingSync</a> : The event will use blocking synchronization : if hipEventSynchronize is called on this event, the thread will block until the event completes. This can increase latency for the synchroniation but can result in lower power and more resources for other CPU threads. <a class="el" href="group__GlobalDefs.html#ga3c0f44a85e36a4c67671da6bcdad0351" title="Disable event&#39;s capability to record timing information. May improve performance. ...">hipEventDisableTiming</a> : Disable recording of timing information. On ROCM platform, timing information is always recorded and this flag has no performance benefit.</p>
<dl class="section warning"><dt>Warning</dt><dd>On HCC platform, hipEventInterprocess support is under development. Use of this flag will return an error.</dd></dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a7e935ae88ee1f9ff3920156ac6864520" title="TODO comment from hipErrorInitializationError. ">hipErrorInitializationError</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a1e8215fe1108a508bad3944bce7b4d83" title="One or more of the parameters passed to the API call is NULL or not in an acceptable range...">hipErrorInvalidValue</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a3df72146e762c5a901d3af06027a1de9" title="An exception occurred on the device while executing a kernel. ">hipErrorLaunchFailure</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a8293288a10109874749afe2562db09f2" title="Memory allocation error. ">hipErrorMemoryAllocation</a></dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__Event.html#ga5df2309c9f29ca4c8e669db658d411b4">hipEventCreate</a>, <a class="el" href="group__Event.html#ga1f72d98ba5d6f7dc3da54e0c41fe38b1" title="Wait for an event to complete. ">hipEventSynchronize</a>, <a class="el" href="group__Event.html#ga83260357dce0c39e8c6a3c74ec97484c" title="Destroy the specified event. ">hipEventDestroy</a>, <a class="el" href="group__Event.html#gad4128b815cb475c8e13c7e66ff6250b7" title="Return the elapsed time between two events. ">hipEventElapsedTime</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ga83260357dce0c39e8c6a3c74ec97484c"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> hipEventDestroy </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structihipEvent__t.html">hipEvent_t</a>&#160;</td>
<td class="paramname"><em>event</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Destroy the specified event. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">event</td><td>Event to destroy. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a7e935ae88ee1f9ff3920156ac6864520" title="TODO comment from hipErrorInitializationError. ">hipErrorInitializationError</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a1e8215fe1108a508bad3944bce7b4d83" title="One or more of the parameters passed to the API call is NULL or not in an acceptable range...">hipErrorInvalidValue</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a3df72146e762c5a901d3af06027a1de9" title="An exception occurred on the device while executing a kernel. ">hipErrorLaunchFailure</a></dd></dl>
<p>Releases memory associated with the event. If the event is recording but has not completed recording when <a class="el" href="group__Event.html#ga83260357dce0c39e8c6a3c74ec97484c" title="Destroy the specified event. ">hipEventDestroy()</a> is called, the function will return immediately and the completion_future resources will be released later, when the hipDevice is synchronized.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__Event.html#ga5df2309c9f29ca4c8e669db658d411b4">hipEventCreate</a>, <a class="el" href="group__Event.html#gae86a5acb1b22b61bc9ecb9c28fc71b75" title="Create an event with the specified flags. ">hipEventCreateWithFlags</a>, <a class="el" href="group__Event.html#ga5d12d7b798b5ceb5932d1ac21f5ac776" title="Query event status. ">hipEventQuery</a>, <a class="el" href="group__Event.html#ga1f72d98ba5d6f7dc3da54e0c41fe38b1" title="Wait for an event to complete. ">hipEventSynchronize</a>, <a class="el" href="group__Event.html#ga553b6f7a8e7b7dd9536d8a64c24d7e29" title="Record an event in the specified stream. ">hipEventRecord</a>, <a class="el" href="group__Event.html#gad4128b815cb475c8e13c7e66ff6250b7" title="Return the elapsed time between two events. ">hipEventElapsedTime</a></dd></dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a> </dd></dl>
</div>
</div>
<a class="anchor" id="gad4128b815cb475c8e13c7e66ff6250b7"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> hipEventElapsedTime </td>
<td>(</td>
<td class="paramtype">float *&#160;</td>
<td class="paramname"><em>ms</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structihipEvent__t.html">hipEvent_t</a>&#160;</td>
<td class="paramname"><em>start</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="structihipEvent__t.html">hipEvent_t</a>&#160;</td>
<td class="paramname"><em>stop</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the elapsed time between two events. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">ms</td><td>: Return time between start and stop in ms. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">start</td><td>: Start event. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">stop</td><td>: Stop event. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a1e8215fe1108a508bad3944bce7b4d83" title="One or more of the parameters passed to the API call is NULL or not in an acceptable range...">hipErrorInvalidValue</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aa9638063c8746a9d1fda2b2069a0a9f1" title="Indicates that asynchronous operations enqueued earlier are not ready. This is not actually an error...">hipErrorNotReady</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a88e525a7c8f35552dfada58e9f2f6d3a" title="Resource handle (hipEvent_t or hipStream_t) invalid. ">hipErrorInvalidResourceHandle</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a7e935ae88ee1f9ff3920156ac6864520" title="TODO comment from hipErrorInitializationError. ">hipErrorInitializationError</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a3df72146e762c5a901d3af06027a1de9" title="An exception occurred on the device while executing a kernel. ">hipErrorLaunchFailure</a></dd></dl>
<p>Computes the elapsed time between two events. Time is computed in ms, with a resolution of approximately 1 us.</p>
<p>Events which are recorded in a NULL stream will block until all commands on all other streams complete execution, and then record the timestamp.</p>
<p>Events which are recorded in a non-NULL stream will record their timestamp when they reach the head of the specified stream, after all previous commands in that stream have completed executing. Thus the time that the event recorded may be significantly after the host calls <a class="el" href="group__Event.html#ga553b6f7a8e7b7dd9536d8a64c24d7e29" title="Record an event in the specified stream. ">hipEventRecord()</a>.</p>
<p>If <a class="el" href="group__Event.html#ga553b6f7a8e7b7dd9536d8a64c24d7e29" title="Record an event in the specified stream. ">hipEventRecord()</a> has not been called on either event, then <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a88e525a7c8f35552dfada58e9f2f6d3a" title="Resource handle (hipEvent_t or hipStream_t) invalid. ">hipErrorInvalidResourceHandle</a> is returned. If <a class="el" href="group__Event.html#ga553b6f7a8e7b7dd9536d8a64c24d7e29" title="Record an event in the specified stream. ">hipEventRecord()</a> has been called on both events, but the timestamp has not yet been recorded on one or both events (that is, <a class="el" href="group__Event.html#ga5d12d7b798b5ceb5932d1ac21f5ac776" title="Query event status. ">hipEventQuery()</a> would return <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aa9638063c8746a9d1fda2b2069a0a9f1" title="Indicates that asynchronous operations enqueued earlier are not ready. This is not actually an error...">hipErrorNotReady</a> on at least one of the events), then <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aa9638063c8746a9d1fda2b2069a0a9f1" title="Indicates that asynchronous operations enqueued earlier are not ready. This is not actually an error...">hipErrorNotReady</a> is returned.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__Event.html#ga5df2309c9f29ca4c8e669db658d411b4">hipEventCreate</a>, <a class="el" href="group__Event.html#gae86a5acb1b22b61bc9ecb9c28fc71b75" title="Create an event with the specified flags. ">hipEventCreateWithFlags</a>, <a class="el" href="group__Event.html#ga5d12d7b798b5ceb5932d1ac21f5ac776" title="Query event status. ">hipEventQuery</a>, <a class="el" href="group__Event.html#ga83260357dce0c39e8c6a3c74ec97484c" title="Destroy the specified event. ">hipEventDestroy</a>, <a class="el" href="group__Event.html#ga553b6f7a8e7b7dd9536d8a64c24d7e29" title="Record an event in the specified stream. ">hipEventRecord</a>, <a class="el" href="group__Event.html#ga1f72d98ba5d6f7dc3da54e0c41fe38b1" title="Wait for an event to complete. ">hipEventSynchronize</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ga5d12d7b798b5ceb5932d1ac21f5ac776"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> hipEventQuery </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structihipEvent__t.html">hipEvent_t</a>&#160;</td>
<td class="paramname"><em>event</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Query event status. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">event</td><td>Event to query. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aa9638063c8746a9d1fda2b2069a0a9f1" title="Indicates that asynchronous operations enqueued earlier are not ready. This is not actually an error...">hipErrorNotReady</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a88e525a7c8f35552dfada58e9f2f6d3a" title="Resource handle (hipEvent_t or hipStream_t) invalid. ">hipErrorInvalidResourceHandle</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a1e8215fe1108a508bad3944bce7b4d83" title="One or more of the parameters passed to the API call is NULL or not in an acceptable range...">hipErrorInvalidValue</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a7e935ae88ee1f9ff3920156ac6864520" title="TODO comment from hipErrorInitializationError. ">hipErrorInitializationError</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a3df72146e762c5a901d3af06027a1de9" title="An exception occurred on the device while executing a kernel. ">hipErrorLaunchFailure</a></dd></dl>
<p>Query the status of the specified event. This function will return <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aa9638063c8746a9d1fda2b2069a0a9f1" title="Indicates that asynchronous operations enqueued earlier are not ready. This is not actually an error...">hipErrorNotReady</a> if all commands in the appropriate stream (specified to <a class="el" href="group__Event.html#ga553b6f7a8e7b7dd9536d8a64c24d7e29" title="Record an event in the specified stream. ">hipEventRecord()</a>) have completed. If that work has not completed, or if <a class="el" href="group__Event.html#ga553b6f7a8e7b7dd9536d8a64c24d7e29" title="Record an event in the specified stream. ">hipEventRecord()</a> was not called on the event, then <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a> is returned.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__Event.html#ga5df2309c9f29ca4c8e669db658d411b4">hipEventCreate</a>, <a class="el" href="group__Event.html#gae86a5acb1b22b61bc9ecb9c28fc71b75" title="Create an event with the specified flags. ">hipEventCreateWithFlags</a>, <a class="el" href="group__Event.html#ga553b6f7a8e7b7dd9536d8a64c24d7e29" title="Record an event in the specified stream. ">hipEventRecord</a>, <a class="el" href="group__Event.html#ga83260357dce0c39e8c6a3c74ec97484c" title="Destroy the specified event. ">hipEventDestroy</a>, <a class="el" href="group__Event.html#ga1f72d98ba5d6f7dc3da54e0c41fe38b1" title="Wait for an event to complete. ">hipEventSynchronize</a>, <a class="el" href="group__Event.html#gad4128b815cb475c8e13c7e66ff6250b7" title="Return the elapsed time between two events. ">hipEventElapsedTime</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ga553b6f7a8e7b7dd9536d8a64c24d7e29"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> hipEventRecord </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structihipEvent__t.html">hipEvent_t</a>&#160;</td>
<td class="paramname"><em>event</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="classihipStream__t.html">hipStream_t</a>&#160;</td>
<td class="paramname"><em>stream</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Record an event in the specified stream. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">event</td><td>event to record. </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">stream</td><td>stream in which to record event. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a1e8215fe1108a508bad3944bce7b4d83" title="One or more of the parameters passed to the API call is NULL or not in an acceptable range...">hipErrorInvalidValue</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a7e935ae88ee1f9ff3920156ac6864520" title="TODO comment from hipErrorInitializationError. ">hipErrorInitializationError</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a88e525a7c8f35552dfada58e9f2f6d3a" title="Resource handle (hipEvent_t or hipStream_t) invalid. ">hipErrorInvalidResourceHandle</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a3df72146e762c5a901d3af06027a1de9" title="An exception occurred on the device while executing a kernel. ">hipErrorLaunchFailure</a></dd></dl>
<p><a class="el" href="group__Event.html#ga5d12d7b798b5ceb5932d1ac21f5ac776" title="Query event status. ">hipEventQuery()</a> or <a class="el" href="group__Event.html#ga1f72d98ba5d6f7dc3da54e0c41fe38b1" title="Wait for an event to complete. ">hipEventSynchronize()</a> must be used to determine when the event transitions from "recording" (after <a class="el" href="group__Event.html#ga553b6f7a8e7b7dd9536d8a64c24d7e29" title="Record an event in the specified stream. ">hipEventRecord()</a> is called) to "recorded" (when timestamps are set, if requested).</p>
<p>Events which are recorded in a non-NULL stream will transition to from recording to "recorded" state when they reach the head of the specified stream, after all previous commands in that stream have completed executing.</p>
<p>If <a class="el" href="group__Event.html#ga553b6f7a8e7b7dd9536d8a64c24d7e29" title="Record an event in the specified stream. ">hipEventRecord()</a> has been previously called aon event, then this call will overwrite any existing state in event.</p>
<p>If this function is called on a an event that is currently being recorded, results are undefined - either outstanding recording may save state into the event, and the order is not guaranteed. This shoul be avoided.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__Event.html#ga5df2309c9f29ca4c8e669db658d411b4">hipEventCreate</a>, <a class="el" href="group__Event.html#gae86a5acb1b22b61bc9ecb9c28fc71b75" title="Create an event with the specified flags. ">hipEventCreateWithFlags</a>, <a class="el" href="group__Event.html#ga5d12d7b798b5ceb5932d1ac21f5ac776" title="Query event status. ">hipEventQuery</a>, <a class="el" href="group__Event.html#ga1f72d98ba5d6f7dc3da54e0c41fe38b1" title="Wait for an event to complete. ">hipEventSynchronize</a>, <a class="el" href="group__Event.html#ga83260357dce0c39e8c6a3c74ec97484c" title="Destroy the specified event. ">hipEventDestroy</a>, <a class="el" href="group__Event.html#gad4128b815cb475c8e13c7e66ff6250b7" title="Return the elapsed time between two events. ">hipEventElapsedTime</a> </dd></dl>
</div>
</div>
<a class="anchor" id="ga1f72d98ba5d6f7dc3da54e0c41fe38b1"></a>
<div class="memitem">
<div class="memproto">
<table class="memname">
<tr>
<td class="memname"><a class="el" href="group__GlobalDefs.html#gadf5010f6e140a53ecbdf949e73e87594">hipError_t</a> hipEventSynchronize </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structihipEvent__t.html">hipEvent_t</a>&#160;</td>
<td class="paramname"><em>event</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Wait for an event to complete. </p>
<p>This function will block until the event is ready, waiting for all previous work in the stream specified when event was recorded with <a class="el" href="group__Event.html#ga553b6f7a8e7b7dd9536d8a64c24d7e29" title="Record an event in the specified stream. ">hipEventRecord()</a>.</p>
<p>If <a class="el" href="group__Event.html#ga553b6f7a8e7b7dd9536d8a64c24d7e29" title="Record an event in the specified stream. ">hipEventRecord()</a> has not been called on <code>event</code>, this function returns immediately.</p>
<p>TODO-hcc - This function needs to support hipEventBlockingSync parameter.</p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">event</td><td>Event on which to wait. </td></tr>
</table>
</dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a1e8215fe1108a508bad3944bce7b4d83" title="One or more of the parameters passed to the API call is NULL or not in an acceptable range...">hipErrorInvalidValue</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a7e935ae88ee1f9ff3920156ac6864520" title="TODO comment from hipErrorInitializationError. ">hipErrorInitializationError</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a88e525a7c8f35552dfada58e9f2f6d3a" title="Resource handle (hipEvent_t or hipStream_t) invalid. ">hipErrorInvalidResourceHandle</a>, <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594a3df72146e762c5a901d3af06027a1de9" title="An exception occurred on the device while executing a kernel. ">hipErrorLaunchFailure</a></dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__Event.html#ga5df2309c9f29ca4c8e669db658d411b4">hipEventCreate</a>, <a class="el" href="group__Event.html#gae86a5acb1b22b61bc9ecb9c28fc71b75" title="Create an event with the specified flags. ">hipEventCreateWithFlags</a>, <a class="el" href="group__Event.html#ga5d12d7b798b5ceb5932d1ac21f5ac776" title="Query event status. ">hipEventQuery</a>, <a class="el" href="group__Event.html#ga83260357dce0c39e8c6a3c74ec97484c" title="Destroy the specified event. ">hipEventDestroy</a>, <a class="el" href="group__Event.html#ga553b6f7a8e7b7dd9536d8a64c24d7e29" title="Record an event in the specified stream. ">hipEventRecord</a>, <a class="el" href="group__Event.html#gad4128b815cb475c8e13c7e66ff6250b7" title="Return the elapsed time between two events. ">hipEventElapsedTime</a> </dd></dl>
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Dec 19 2016 04:03:43 for HIP: Heterogenous-computing Interface for Portability by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>