Files
rocm-systems/docs/RuntimeAPI/html/group__Device.html
T

472 خطوط
33 KiB
HTML

2016-01-26 20:14:33 -06:00
<!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: Device 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>Macros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><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">Device 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:gaefdc2847fb1d6c3fb1354e827a191ebd"><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__Device.html#gaefdc2847fb1d6c3fb1354e827a191ebd">hipDeviceSynchronize</a> (void)</td></tr>
<tr class="memdesc:gaefdc2847fb1d6c3fb1354e827a191ebd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Blocks until the default device has completed all preceding requested tasks. <a href="#gaefdc2847fb1d6c3fb1354e827a191ebd">More...</a><br/></td></tr>
<tr class="separator:gaefdc2847fb1d6c3fb1354e827a191ebd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8d57161ae56a8edc46eeda447417bf6c"><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__Device.html#ga8d57161ae56a8edc46eeda447417bf6c">hipDeviceReset</a> (void)</td></tr>
<tr class="memdesc:ga8d57161ae56a8edc46eeda447417bf6c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Destroy all resources and reset all state on the default device in the current process. <a href="#ga8d57161ae56a8edc46eeda447417bf6c">More...</a><br/></td></tr>
<tr class="separator:ga8d57161ae56a8edc46eeda447417bf6c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8ec0b093af0adadc7fe98bf33fa21620"><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__Device.html#ga8ec0b093af0adadc7fe98bf33fa21620">hipSetDevice</a> (int device)</td></tr>
<tr class="memdesc:ga8ec0b093af0adadc7fe98bf33fa21620"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set default device to be used for subsequent hip API calls from this thread. <a href="#ga8ec0b093af0adadc7fe98bf33fa21620">More...</a><br/></td></tr>
<tr class="separator:ga8ec0b093af0adadc7fe98bf33fa21620"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaffc83567f2df3bbe2d37a19872d60f24"><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__Device.html#gaffc83567f2df3bbe2d37a19872d60f24">hipGetDevice</a> (int *device)</td></tr>
<tr class="memdesc:gaffc83567f2df3bbe2d37a19872d60f24"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return the default device id for the calling host thread. <a href="#gaffc83567f2df3bbe2d37a19872d60f24">More...</a><br/></td></tr>
<tr class="separator:gaffc83567f2df3bbe2d37a19872d60f24"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8555d5c76d88c50ddbf54ae70b568394"><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__Device.html#ga8555d5c76d88c50ddbf54ae70b568394">hipGetDeviceCount</a> (int *count)</td></tr>
<tr class="memdesc:ga8555d5c76d88c50ddbf54ae70b568394"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return number of compute-capable devices. <a href="#ga8555d5c76d88c50ddbf54ae70b568394">More...</a><br/></td></tr>
<tr class="separator:ga8555d5c76d88c50ddbf54ae70b568394"><td class="memSeparator" colspan="2">&#160;</td></tr>
2016-02-18 20:43:03 -06:00
<tr class="memitem:gac49518ff2b26b98ea2ec9e9268761a24"><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__Device.html#gac49518ff2b26b98ea2ec9e9268761a24">hipDeviceGetAttribute</a> (int *pi, <a class="el" href="group__GlobalDefs.html#gacc0acd7b9bda126c6bb3dfd6e2796d7c">hipDeviceAttribute_t</a> attr, int device)</td></tr>
<tr class="memdesc:gac49518ff2b26b98ea2ec9e9268761a24"><td class="mdescLeft">&#160;</td><td class="mdescRight">Query device attribute. <a href="#gac49518ff2b26b98ea2ec9e9268761a24">More...</a><br/></td></tr>
<tr class="separator:gac49518ff2b26b98ea2ec9e9268761a24"><td class="memSeparator" colspan="2">&#160;</td></tr>
2016-03-23 23:11:15 -05:00
<tr class="memitem:ga77c20744e2a88c31440992d6c7754b5f"><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__Device.html#ga77c20744e2a88c31440992d6c7754b5f">hipGetDeviceProperties</a> (<a class="el" href="structhipDeviceProp__t.html">hipDeviceProp_t</a> *prop, int device)</td></tr>
<tr class="memdesc:ga77c20744e2a88c31440992d6c7754b5f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns device properties. <a href="#ga77c20744e2a88c31440992d6c7754b5f">More...</a><br/></td></tr>
<tr class="separator:ga77c20744e2a88c31440992d6c7754b5f"><td class="memSeparator" colspan="2">&#160;</td></tr>
2016-01-26 20:14:33 -06:00
<tr class="memitem:gac2b282179f29c4c0ca7b5391242c6a4c"><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__Device.html#gac2b282179f29c4c0ca7b5391242c6a4c">hipDeviceSetCacheConfig</a> (<a class="el" href="group__GlobalDefs.html#gac7e4bfd88340fc06642136c839a3d822">hipFuncCache</a> cacheConfig)</td></tr>
<tr class="memdesc:gac2b282179f29c4c0ca7b5391242c6a4c"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set L1/Shared cache partition. <a href="#gac2b282179f29c4c0ca7b5391242c6a4c">More...</a><br/></td></tr>
<tr class="separator:gac2b282179f29c4c0ca7b5391242c6a4c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaeeffa2456c5430400bea75ecd6ad1e68"><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__Device.html#gaeeffa2456c5430400bea75ecd6ad1e68">hipDeviceGetCacheConfig</a> (<a class="el" href="group__GlobalDefs.html#gac7e4bfd88340fc06642136c839a3d822">hipFuncCache</a> *cacheConfig)</td></tr>
<tr class="memdesc:gaeeffa2456c5430400bea75ecd6ad1e68"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set Cache configuration for a specific function. <a href="#gaeeffa2456c5430400bea75ecd6ad1e68">More...</a><br/></td></tr>
<tr class="separator:gaeeffa2456c5430400bea75ecd6ad1e68"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gadd94a910c2b840833cc325b1e5425702"><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__Device.html#gadd94a910c2b840833cc325b1e5425702">hipFuncSetCacheConfig</a> (<a class="el" href="group__GlobalDefs.html#gac7e4bfd88340fc06642136c839a3d822">hipFuncCache</a> config)</td></tr>
<tr class="memdesc:gadd94a910c2b840833cc325b1e5425702"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set Cache configuration for a specific function. <a href="#gadd94a910c2b840833cc325b1e5425702">More...</a><br/></td></tr>
<tr class="separator:gadd94a910c2b840833cc325b1e5425702"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga1bb08f774a34a468d969a8a04791c9bb"><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__Device.html#ga1bb08f774a34a468d969a8a04791c9bb">hipDeviceGetSharedMemConfig</a> (<a class="el" href="group__GlobalDefs.html#ga2e17b71d94ac350f2ccd914fd49d104e">hipSharedMemConfig</a> *pConfig)</td></tr>
<tr class="memdesc:ga1bb08f774a34a468d969a8a04791c9bb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Get Shared memory bank configuration. <a href="#ga1bb08f774a34a468d969a8a04791c9bb">More...</a><br/></td></tr>
<tr class="separator:ga1bb08f774a34a468d969a8a04791c9bb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga9b1f279084e76691cedfbfadf9c717ee"><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__Device.html#ga9b1f279084e76691cedfbfadf9c717ee">hipDeviceSetSharedMemConfig</a> (<a class="el" href="group__GlobalDefs.html#ga2e17b71d94ac350f2ccd914fd49d104e">hipSharedMemConfig</a> config)</td></tr>
<tr class="memdesc:ga9b1f279084e76691cedfbfadf9c717ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set Shared memory bank configuration. <a href="#ga9b1f279084e76691cedfbfadf9c717ee">More...</a><br/></td></tr>
<tr class="separator:ga9b1f279084e76691cedfbfadf9c717ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
2016-04-16 14:55:10 +05:30
<tr class="memitem:ga6e54db382768827e84725632018307aa"><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__Device.html#ga6e54db382768827e84725632018307aa">hipSetDeviceFlags</a> (unsigned flags)</td></tr>
<tr class="memdesc:ga6e54db382768827e84725632018307aa"><td class="mdescLeft">&#160;</td><td class="mdescRight">Set Device flags. <a href="#ga6e54db382768827e84725632018307aa">More...</a><br/></td></tr>
<tr class="separator:ga6e54db382768827e84725632018307aa"><td class="memSeparator" colspan="2">&#160;</td></tr>
2016-01-26 20:14:33 -06:00
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<h2>----------------------------------------------------------------------------------------------&mdash; </h2>
<h2 class="groupheader">Function Documentation</h2>
2016-02-18 20:43:03 -06:00
<a class="anchor" id="gac49518ff2b26b98ea2ec9e9268761a24"></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> hipDeviceGetAttribute </td>
<td>(</td>
<td class="paramtype">int *&#160;</td>
<td class="paramname"><em>pi</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype"><a class="el" href="group__GlobalDefs.html#gacc0acd7b9bda126c6bb3dfd6e2796d7c">hipDeviceAttribute_t</a>&#160;</td>
<td class="paramname"><em>attr</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>device</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Query device attribute. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">pi</td><td>pointer to value to return </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">attr</td><td>attribute to query </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">device</td><td>which device to query for information </td></tr>
</table>
</dd>
</dl>
</div>
</div>
2016-01-26 20:14:33 -06:00
<a class="anchor" id="gaeeffa2456c5430400bea75ecd6ad1e68"></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> hipDeviceGetCacheConfig </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__GlobalDefs.html#gac7e4bfd88340fc06642136c839a3d822">hipFuncCache</a> *&#160;</td>
<td class="paramname"><em>cacheConfig</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set Cache configuration for a specific function. </p>
2016-02-18 20:43:03 -06:00
<p>Note: AMD devices and recent Nvidia GPUS do not support reconfigurable cache. This hint is ignored on those architectures.</p>
2016-01-26 20:14:33 -06:00
<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="ga1bb08f774a34a468d969a8a04791c9bb"></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> hipDeviceGetSharedMemConfig </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__GlobalDefs.html#ga2e17b71d94ac350f2ccd914fd49d104e">hipSharedMemConfig</a> *&#160;</td>
<td class="paramname"><em>pConfig</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Get Shared memory bank configuration. </p>
2016-02-18 20:43:03 -06:00
<p>Note: AMD devices and recent Nvidia GPUS do not support shared cache banking, and the hint is ignored on those architectures.</p>
2016-01-26 20:14:33 -06:00
<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="ga8d57161ae56a8edc46eeda447417bf6c"></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> hipDeviceReset </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Destroy all resources and reset all state on the default device in the current process. </p>
<p>Explicity destroy all memory allocations, events, and queues associated with the default device in the current process.</p>
<p>This function will reset the device immmediately, and then return after all resources have been freed. The caller must ensure that the device is not being accessed by any other host threads from the active process when this function is called.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__Device.html#gaefdc2847fb1d6c3fb1354e827a191ebd" title="Blocks until the default device has completed all preceding requested tasks. ">hipDeviceSynchronize</a></dd></dl>
<dl class="section return"><dt>Returns</dt><dd><a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063">hipSuccess</a> </dd></dl>
</div>
</div>
<a class="anchor" id="gac2b282179f29c4c0ca7b5391242c6a4c"></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> hipDeviceSetCacheConfig </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__GlobalDefs.html#gac7e4bfd88340fc06642136c839a3d822">hipFuncCache</a>&#160;</td>
<td class="paramname"><em>cacheConfig</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set L1/Shared cache partition. </p>
2016-02-18 20:43:03 -06:00
<p>Note: AMD devices and recent Nvidia GPUS do not support reconfigurable cache. This hint is ignored on those architectures.</p>
2016-01-26 20:14:33 -06:00
<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="ga9b1f279084e76691cedfbfadf9c717ee"></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> hipDeviceSetSharedMemConfig </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__GlobalDefs.html#ga2e17b71d94ac350f2ccd914fd49d104e">hipSharedMemConfig</a>&#160;</td>
<td class="paramname"><em>config</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set Shared memory bank configuration. </p>
2016-02-18 20:43:03 -06:00
<p>Note: AMD devices and recent Nvidia GPUS do not support shared cache banking, and the hint is ignored on those architectures.</p>
2016-01-26 20:14:33 -06:00
<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="gaefdc2847fb1d6c3fb1354e827a191ebd"></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> hipDeviceSynchronize </td>
<td>(</td>
<td class="paramtype">void&#160;</td>
<td class="paramname"></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Blocks until the default device has completed all preceding requested tasks. </p>
<p>This function waits for all streams on the default device to complete execution, and then returns.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__Device.html#ga8ec0b093af0adadc7fe98bf33fa21620" title="Set default device to be used for subsequent hip API calls from this thread. ">hipSetDevice</a>, <a class="el" href="group__Device.html#ga8d57161ae56a8edc46eeda447417bf6c" title="Destroy all resources and reset all state on the default device in the current process. ">hipDeviceReset</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="gadd94a910c2b840833cc325b1e5425702"></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> hipFuncSetCacheConfig </td>
<td>(</td>
<td class="paramtype"><a class="el" href="group__GlobalDefs.html#gac7e4bfd88340fc06642136c839a3d822">hipFuncCache</a>&#160;</td>
<td class="paramname"><em>cacheConfig</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set Cache configuration for a specific function. </p>
2016-02-18 20:43:03 -06:00
<p>Note: AMD devices and recent Nvidia GPUS do not support reconfigurable cache. This hint is ignored on those architectures.</p>
2016-01-26 20:14:33 -06:00
<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="gaffc83567f2df3bbe2d37a19872d60f24"></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> hipGetDevice </td>
<td>(</td>
<td class="paramtype">int *&#160;</td>
<td class="paramname"><em>device</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return the default device id for the calling host thread. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">device</td><td>*device is written with the default device</td></tr>
</table>
</dd>
</dl>
<p>HIP maintains an default device for each thread using thread-local-storage. This device is used implicitly for HIP runtime APIs called by this thread. hipGetDevice returns in * <code>device</code> the default device for the calling host thread.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__Device.html#ga8ec0b093af0adadc7fe98bf33fa21620" title="Set default device to be used for subsequent hip API calls from this thread. ">hipSetDevice</a>, hipGetDevicesizeBytes</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="ga8555d5c76d88c50ddbf54ae70b568394"></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> hipGetDeviceCount </td>
<td>(</td>
<td class="paramtype">int *&#160;</td>
<td class="paramname"><em>count</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Return number of compute-capable devices. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramname">[output]</td><td>count Returns number of compute-capable devices.</td></tr>
</table>
</dd>
</dl>
2016-02-18 20:43:03 -06:00
<p>Returns in <code>*count</code> the number of devices that have ability to run compute commands. If there are no such devices, then <a class="el" href="group__Device.html#ga8555d5c76d88c50ddbf54ae70b568394">hipGetDeviceCount</a> will return <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594ad4406972c318df36d231310a15131c24" title="Call to hipGetDeviceCount returned 0 devices. ">hipErrorNoDevice</a>. If 1 or more devices can be found, then hipGetDeviceCount returns <a class="el" href="group__GlobalDefs.html#ggadf5010f6e140a53ecbdf949e73e87594aadfbdb847b149723c684ebd764556063" title="Successful completion. ">hipSuccess</a>.</p>
<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#ggadf5010f6e140a53ecbdf949e73e87594ad4406972c318df36d231310a15131c24" title="Call to hipGetDeviceCount returned 0 devices. ">hipErrorNoDevice</a> </dd></dl>
2016-01-26 20:14:33 -06:00
2016-03-23 23:11:15 -05:00
</div>
</div>
<a class="anchor" id="ga77c20744e2a88c31440992d6c7754b5f"></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> hipGetDeviceProperties </td>
<td>(</td>
<td class="paramtype"><a class="el" href="structhipDeviceProp__t.html">hipDeviceProp_t</a> *&#160;</td>
<td class="paramname"><em>props</em>, </td>
</tr>
<tr>
<td class="paramkey"></td>
<td></td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>device</em>&#160;</td>
</tr>
<tr>
<td></td>
<td>)</td>
<td></td><td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Returns device properties. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[out]</td><td class="paramname">prop</td><td>written with device properties </td></tr>
<tr><td class="paramdir">[in]</td><td class="paramname">device</td><td>which device to query for information</td></tr>
</table>
</dd>
</dl>
<p>Populates hipGetDeviceProperties with information for the specified device.</p>
<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#ggadf5010f6e140a53ecbdf949e73e87594a07ab9b704ea693c1781a52741c60cd0d" title="DeviceID must be in range 0...#compute-devices. ">hipErrorInvalidDevice</a> </dd></dl>
2016-04-16 14:55:10 +05:30
<dl class="bug"><dt><b><a class="el" href="bug.html#_bug000001">Bug:</a></b></dt><dd><p class="startdd">HCC always returns 0 for maxThreadsPerMultiProcessor </p>
2016-03-23 23:11:15 -05:00
<p>HCC always returns 0 for regsPerBlock </p>
<p class="enddd">HCC always returns 0 for l2CacheSize </p>
</dd></dl>
2016-01-26 20:14:33 -06:00
</div>
</div>
<a class="anchor" id="ga8ec0b093af0adadc7fe98bf33fa21620"></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> hipSetDevice </td>
<td>(</td>
<td class="paramtype">int&#160;</td>
<td class="paramname"><em>device</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set default device to be used for subsequent hip API calls from this thread. </p>
<dl class="params"><dt>Parameters</dt><dd>
<table class="params">
<tr><td class="paramdir">[in]</td><td class="paramname">device</td><td>Valid device in range 0...<a class="el" href="group__Device.html#ga8555d5c76d88c50ddbf54ae70b568394" title="Return number of compute-capable devices. ">hipGetDeviceCount()</a>.</td></tr>
</table>
</dd>
</dl>
<p>Sets <code>device</code> as the default device for the calling host thread. Valid device id's are 0... (<a class="el" href="group__Device.html#ga8555d5c76d88c50ddbf54ae70b568394" title="Return number of compute-capable devices. ">hipGetDeviceCount()</a>-1).</p>
<p>Many HIP APIs implicitly use the "default device" :</p>
<ul>
<li>Any device memory subsequently allocated from this host thread (using hipMalloc) will be allocated on device.</li>
<li>Any streams or events created from this host thread will be associated with device.</li>
<li>Any kernels launched from this host thread (using hipLaunchKernel) will be executed on device (unless a specific stream is specified, in which case the device associated with that stream will be used).</li>
</ul>
<p>This function may be called from any host thread. Multiple host threads may use the same device. This function does no synchronization with the previous or new device, and has very little runtime overhead. Applications can use hipSetDevice to quickly switch the default device before making a HIP runtime call which uses the default device.</p>
<p>The default device is stored in thread-local-storage for each thread. Thread-pool implementations may inherit the default device of the previous thread. A good practice is to always call hipSetDevice at the start of HIP coding sequency to establish a known standard device.</p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="group__Device.html#gaffc83567f2df3bbe2d37a19872d60f24" title="Return the default device id for the calling host thread. ">hipGetDevice</a>, <a class="el" href="group__Device.html#ga8555d5c76d88c50ddbf54ae70b568394" title="Return number of compute-capable devices. ">hipGetDeviceCount</a></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#ggadf5010f6e140a53ecbdf949e73e87594a07ab9b704ea693c1781a52741c60cd0d" title="DeviceID must be in range 0...#compute-devices. ">hipErrorInvalidDevice</a> </dd></dl>
2016-04-16 14:55:10 +05:30
</div>
</div>
<a class="anchor" id="ga6e54db382768827e84725632018307aa"></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> hipSetDeviceFlags </td>
<td>(</td>
<td class="paramtype">unsigned&#160;</td>
<td class="paramname"><em>flags</em></td><td>)</td>
<td></td>
</tr>
</table>
</div><div class="memdoc">
<p>Set Device flags. </p>
<p>Note: Only hipDeviceScheduleAuto and hipDeviceMapHost are supported </p>
2016-01-26 20:14:33 -06:00
</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
2016-04-19 22:44:58 +05:30
Generated on Tue Apr 19 2016 22:44:02 for HIP: Heterogenous-computing Interface for Portability by &#160;<a href="http://www.doxygen.org/index.html">
2016-01-26 20:14:33 -06:00
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.6
</small></address>
</body>
</html>