<!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" lang="en-us" xml:lang="en-us"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta> <meta http-equiv="X-UA-Compatible" content="IE=edge"></meta> <meta name="copyright" content="(C) Copyright 2005"></meta> <meta name="DC.rights.owner" content="(C) Copyright 2005"></meta> <meta name="DC.Type" content="cppModule"></meta> <meta name="DC.Title" content="Grid Properties"></meta> <meta name="abstract" content=""></meta> <meta name="description" content=""></meta> <meta name="DC.Format" content="XHTML"></meta> <meta name="DC.Identifier" content="group__GRID"></meta> <link rel="stylesheet" type="text/css" href="../common/formatting/commonltr.css"></link> <link rel="stylesheet" type="text/css" href="../common/formatting/site.css"></link> <title>Debugger API :: CUDA Toolkit Documentation</title> <!--[if lt IE 9]> <script src="../common/formatting/html5shiv-printshiv.min.js"></script> <![endif]--> <script type="text/javascript" charset="utf-8" src="../common/scripts/tynt/tynt.js"></script> <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.min.js"></script> <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.ba-hashchange.min.js"></script> <script type="text/javascript" charset="utf-8" src="../common/formatting/jquery.scrollintoview.min.js"></script> <script type="text/javascript" src="../search/htmlFileList.js"></script> <script type="text/javascript" src="../search/htmlFileInfoList.js"></script> <script type="text/javascript" src="../search/nwSearchFnt.min.js"></script> <script type="text/javascript" src="../search/stemmers/en_stemmer.min.js"></script> <script type="text/javascript" src="../search/index-1.js"></script> <script type="text/javascript" src="../search/index-2.js"></script> <script type="text/javascript" src="../search/index-3.js"></script> <link rel="canonical" href="http://docs.nvidia.com/cuda/debugger-api/index.html"></link> <link rel="stylesheet" type="text/css" href="../common/formatting/qwcode.highlight.css"></link> </head> <body> <header id="header"><span id="company">NVIDIA</span><span id="site-title">CUDA Toolkit Documentation</span><form id="search" method="get" action="search"> <input type="text" name="search-text"></input><fieldset id="search-location"> <legend>Search In:</legend> <label><input type="radio" name="search-type" value="site"></input>Entire Site</label> <label><input type="radio" name="search-type" value="document"></input>Just This Document</label></fieldset> <button type="reset">clear search</button> <button id="submit" type="submit">search</button></form> </header> <div id="site-content"> <nav id="site-nav"> <div class="category closed"><a href="../index.html" title="The root of the site.">CUDA Toolkit v6.5</a></div> <div class="category"><a href="index.html" title="Debugger API">Debugger API</a></div> <ul> <li> <div class="section-link"><a href="release-notes.html#release-notes">1. Release Notes</a></div> <ul> <li> <div class="section-link"><a href="release-notes.html#about-this-document">1.1. 6.5 Release</a></div> </li> </ul> </li> <li> <div class="section-link"><a href="r_main.html#r_main">2. Introduction</a></div> <ul> <li> <div class="section-link"><a href="r_main.html#r_api">2.1. Debugger API</a></div> </li> <li> <div class="section-link"><a href="r_main.html#r_elf">2.2. ELF and DWARF</a></div> </li> <li> <div class="section-link"><a href="r_main.html#r_abi31">2.3. ABI Support</a></div> </li> <li> <div class="section-link"><a href="r_main.html#r_exceptions31">2.4. Exception Reporting</a></div> </li> <li> <div class="section-link"><a href="r_main.html#r_attach">2.5. Attaching and Detaching</a></div> </li> </ul> </li> <li> <div class="section-link"><a href="modules.html#modules">3. Modules</a></div> <ul> <li> <div class="section-link"><a href="group__GENERAL.html#group__GENERAL">3.1. General</a></div> </li> <li> <div class="section-link"><a href="group__INIT.html#group__INIT">3.2. Initialization</a></div> </li> <li> <div class="section-link"><a href="group__EXEC.html#group__EXEC">3.3. Device Execution Control</a></div> </li> <li> <div class="section-link"><a href="group__BP.html#group__BP">3.4. Breakpoints</a></div> </li> <li> <div class="section-link"><a href="group__READ.html#group__READ">3.5. Device State Inspection</a></div> </li> <li> <div class="section-link"><a href="group__WRITE.html#group__WRITE">3.6. Device State Alteration</a></div> </li> <li> <div class="section-link"><a href="group__GRID.html#group__GRID">3.7. Grid Properties</a></div> </li> <li> <div class="section-link"><a href="group__DEV.html#group__DEV">3.8. Device Properties</a></div> </li> <li> <div class="section-link"><a href="group__DWARF.html#group__DWARF">3.9. DWARF Utilities</a></div> </li> <li> <div class="section-link"><a href="group__EVENT.html#group__EVENT">3.10. Events</a></div> </li> </ul> </li> <li> <div class="section-link"><a href="annotated.html#annotated">4. Data Structures</a></div> <ul> <li> <div class="section-link"><a href="structCUDBGAPI__st.html#structCUDBGAPI__st">4.1. CUDBGAPI_st</a></div> </li> <li> <div class="section-link"><a href="structCUDBGEvent.html#structCUDBGEvent">4.2. CUDBGEvent</a></div> </li> <li> <div class="section-link"><a href="unionCUDBGEvent_1_1cases__st.html#unionCUDBGEvent_1_1cases__st">4.3. CUDBGEvent::cases_st</a></div> </li> <li> <div class="section-link"><a href="structCUDBGEvent_1_1cases__st_1_1contextCreate__st.html#structCUDBGEvent_1_1cases__st_1_1contextCreate__st">4.4. CUDBGEvent::cases_st::contextCreate_st</a></div> </li> <li> <div class="section-link"><a href="structCUDBGEvent_1_1cases__st_1_1contextDestroy__st.html#structCUDBGEvent_1_1cases__st_1_1contextDestroy__st">4.5. CUDBGEvent::cases_st::contextDestroy_st</a></div> </li> <li> <div class="section-link"><a href="structCUDBGEvent_1_1cases__st_1_1contextPop__st.html#structCUDBGEvent_1_1cases__st_1_1contextPop__st">4.6. CUDBGEvent::cases_st::contextPop_st</a></div> </li> <li> <div class="section-link"><a href="structCUDBGEvent_1_1cases__st_1_1contextPush__st.html#structCUDBGEvent_1_1cases__st_1_1contextPush__st">4.7. CUDBGEvent::cases_st::contextPush_st</a></div> </li> <li> <div class="section-link"><a href="structCUDBGEvent_1_1cases__st_1_1elfImageLoaded__st.html#structCUDBGEvent_1_1cases__st_1_1elfImageLoaded__st">4.8. CUDBGEvent::cases_st::elfImageLoaded_st</a></div> </li> <li> <div class="section-link"><a href="structCUDBGEvent_1_1cases__st_1_1internalError__st.html#structCUDBGEvent_1_1cases__st_1_1internalError__st">4.9. CUDBGEvent::cases_st::internalError_st</a></div> </li> <li> <div class="section-link"><a href="structCUDBGEvent_1_1cases__st_1_1kernelFinished__st.html#structCUDBGEvent_1_1cases__st_1_1kernelFinished__st">4.10. CUDBGEvent::cases_st::kernelFinished_st</a></div> </li> <li> <div class="section-link"><a href="structCUDBGEvent_1_1cases__st_1_1kernelReady__st.html#structCUDBGEvent_1_1cases__st_1_1kernelReady__st">4.11. CUDBGEvent::cases_st::kernelReady_st</a></div> </li> <li> <div class="section-link"><a href="structCUDBGEventCallbackData.html#structCUDBGEventCallbackData">4.12. CUDBGEventCallbackData</a></div> </li> <li> <div class="section-link"><a href="structCUDBGEventCallbackData40.html#structCUDBGEventCallbackData40">4.13. CUDBGEventCallbackData40</a></div> </li> <li> <div class="section-link"><a href="structCUDBGGridInfo.html#structCUDBGGridInfo">4.14. CUDBGGridInfo</a></div> </li> </ul> </li> <li> <div class="section-link"><a href="functions.html#functions">5. Data Fields</a></div> </li> <li> <div class="section-link"><a href="deprecated.html#deprecated">6. Deprecated List</a></div> </li> <li> <div class="section-link"><a href="notices-header.html#notices-header">Notices</a></div> <ul></ul> </li> </ul> </nav> <div id="resize-nav"></div> <nav id="search-results"> <h2>Search Results</h2> <ol></ol> </nav> <div id="contents-container"> <div id="breadcrumbs-container"> <div id="breadcrumbs"><a href="group__WRITE.html" shape="rect">< Previous</a> | <a href="group__DEV.html" shape="rect">Next ></a></div> <div id="release-info">Debugger API (<a href="../../pdf/CUDA_Debugger_API.pdf">PDF</a>) - v6.5 (<a href="https://developer.nvidia.com/cuda-toolkit-archive">older</a>) - Last updated August 1, 2014 - <a href="mailto:cudatools@nvidia.com?subject=CUDA Toolkit Documentation Feedback: Debugger API">Send Feedback</a> - <span class="st_facebook"></span><span class="st_twitter"></span><span class="st_linkedin"></span><span class="st_reddit"></span><span class="st_slashdot"></span><span class="st_tumblr"></span><span class="st_sharethis"></span></div> </div> <article id="contents"> <div class="topic reference apiRef apiPackage cppModule" id="group__GRID"><a name="group__GRID" shape="rect"> <!-- --></a><h2 class="topictitle2 cppModule">3.7. Grid Properties</h2> <div class="section"> <p></p> </div> <h3 class="fake_sectiontitle member_header">Classes</h3> <dl class="members"> <dt><span class="member_type">struct </span><span class="member_name"> <div><a class="link" href="structCUDBGGridInfo.html#structCUDBGGridInfo" title="Grid info." shape="rect">CUDBGGridInfo</a></div></span></dt> <dd class="shortdesc"><span></span><span class="desc">Grid info. </span><a href="structCUDBGGridInfo.html#structCUDBGGridInfo" class="link" title="Grid info." shape="rect"></a></dd> </dl> <h3 class="fake_sectiontitle member_header">Enumerations</h3> <dl class="members"> <dt><span class="member_type">enum </span><span class="member_name"><a href="#group__GRID_1g4e4b2731e68116a5a73997edb73b09dc" shape="rect">CUDBGGridStatus</a></span></dt> <dd class="shortdesc"><span></span><span class="desc">Grid status. </span></dd> </dl> <h3 class="fake_sectiontitle member_header">Variables</h3> <dl class="members"> <dt><span class="member_type"><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> </span><span class="member_name">( *<a href="#group__GRID_1g06e21287848c46c04af1e70dc6b0ba26" shape="rect">CUDBGAPI_st::getBlockDim</a> )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">sm</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">wp</span>, CuDim3*<span> </span><span class="keyword keyword apiItemName">blockDim</span> )</span></dt> <dd class="shortdesc"><span></span><span class="desc">Get the number of threads in the given block. </span></dd> <dt><span class="member_type"><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> </span><span class="member_name">( *<a href="#group__GRID_1gc6053e8472b9bb02b23eec2aa6195d3f" shape="rect">CUDBGAPI_st::getElfImage</a> )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">sm</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">wp</span>, bool <span> </span><span class="keyword keyword apiItemName">relocated</span>, void*<span> </span><span class="keyword keyword apiItemName">*elfImage</span>, uint64_t*<span> </span><span class="keyword keyword apiItemName">size</span> )</span></dt> <dd class="shortdesc"><span></span><span class="desc">Get the relocated or non-relocated ELF image and size for the grid on the given device. </span></dd> <dt><span class="member_type"><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> </span><span class="member_name">( *<a href="#group__GRID_1gdda735fe23afd70e7b20df70d2259df3" shape="rect">CUDBGAPI_st::getElfImage32</a> )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">sm</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">wp</span>, bool <span> </span><span class="keyword keyword apiItemName">relocated</span>, void*<span> </span><span class="keyword keyword apiItemName">*elfImage</span>, uint32_t*<span> </span><span class="keyword keyword apiItemName">size</span> )</span></dt> <dd class="shortdesc"><span></span><span class="desc">Get the relocated or non-relocated ELF image and size for the grid on the given device. </span></dd> <dt><span class="member_type"><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> </span><span class="member_name">( *<a href="#group__GRID_1g92cfc2d9cd4d4a75159192871001bcaa" shape="rect">CUDBGAPI_st::getGridAttribute</a> )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">sm</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">wp</span>, CUDBGAttribute<span> </span><span class="keyword keyword apiItemName">attr</span>, uint64_t*<span> </span><span class="keyword keyword apiItemName">value</span> )</span></dt> <dd class="shortdesc"><span></span><span class="desc">Get the value of a grid attribute. </span></dd> <dt><span class="member_type"><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> </span><span class="member_name">( *<a href="#group__GRID_1gf7e8cb09256c9cb5405e480a9cb4f193" shape="rect">CUDBGAPI_st::getGridAttributes</a> )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">sm</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">wp</span>, CUDBGAttributeValuePair*<span> </span><span class="keyword keyword apiItemName">pairs</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">numPairs</span> )</span></dt> <dd class="shortdesc"><span></span><span class="desc">Get several grid attribute values in a single API call. </span></dd> <dt><span class="member_type"><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> </span><span class="member_name">( *<a href="#group__GRID_1g62dc0a59cbc0a9a07cbdb8acb930c93f" shape="rect">CUDBGAPI_st::getGridDim</a> )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">sm</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">wp</span>, CuDim3*<span> </span><span class="keyword keyword apiItemName">gridDim</span> )</span></dt> <dd class="shortdesc"><span></span><span class="desc">Get the number of blocks in the given grid. </span></dd> <dt><span class="member_type"><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> </span><span class="member_name">( *<a href="#group__GRID_1g0b3d841328dc79b852f20893b72123ad" shape="rect">CUDBGAPI_st::getGridDim32</a> )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">sm</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">wp</span>, CuDim2*<span> </span><span class="keyword keyword apiItemName">gridDim</span> )</span></dt> <dd class="shortdesc"><span></span><span class="desc">Get the number of blocks in the given grid. </span></dd> <dt><span class="member_type"><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> </span><span class="member_name">( *<a href="#group__GRID_1gcbe47612bdf775af63ca5393ea3a7281" shape="rect">CUDBGAPI_st::getGridInfo</a> )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint64_t<span> </span><span class="keyword keyword apiItemName">gridId64</span>, CUDBGGridInfo*<span> </span><span class="keyword keyword apiItemName">gridInfo</span> )</span></dt> <dd class="shortdesc"><span></span><span class="desc">Get information about the specified grid. If the context of the grid has already been destroyed, the function will return CUDBG_ERROR_INVALID_GRID, although the grid id is correct. </span></dd> <dt><span class="member_type"><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> </span><span class="member_name">( *<a href="#group__GRID_1gd1ae3c5604d9e113855ee8620406aa88" shape="rect">CUDBGAPI_st::getGridStatus</a> )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint64_t<span> </span><span class="keyword keyword apiItemName">gridId64</span>, CUDBGGridStatus*<span> </span><span class="keyword keyword apiItemName">status</span> )</span></dt> <dd class="shortdesc"><span></span><span class="desc">Check whether the grid corresponding to the given gridId is still present on the device. </span></dd> <dt><span class="member_type"><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> </span><span class="member_name">( *<a href="#group__GRID_1g9c4c2530636cb90bbc1d11ad70fba960" shape="rect">CUDBGAPI_st::getGridStatus50</a> )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">gridId</span>, CUDBGGridStatus*<span> </span><span class="keyword keyword apiItemName">status</span> )</span></dt> <dd class="shortdesc"><span></span><span class="desc">Check whether the grid corresponding to the given gridId is still present on the device. </span></dd> <dt><span class="member_type"><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> </span><span class="member_name">( *<a href="#group__GRID_1ge5eb7bdedae26df688d84dd4e2d3c441" shape="rect">CUDBGAPI_st::getTID</a> )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">sm</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">wp</span>, uint32_t*<span> </span><span class="keyword keyword apiItemName">tid</span> )</span></dt> <dd class="shortdesc"><span></span><span class="desc">Get the ID of the Linux thread hosting the context of the grid. </span></dd> </dl> <div class="description"> <h3 class="sectiontitle">Enumerations</h3> <dl class="description"> <dt class="description"><a name="group__GRID_1g4e4b2731e68116a5a73997edb73b09dc" id="group__GRID_1g4e4b2731e68116a5a73997edb73b09dc" shape="rect"> <!-- --></a><span>enum CUDBGGridStatus</span></dt> <dd class="description"> <div class="section"> <p></p> </div> <div class="enum-members"> <h6 class="enumerator_header"> Values </h6> <dl class="enumerator"> <dt><span class="enum-member-name-def">CUDBG_GRID_STATUS_INVALID</span></dt> <dd>An invalid grid ID was passed, or an error occurred during status lookup. </dd> <dt><span class="enum-member-name-def">CUDBG_GRID_STATUS_PENDING</span></dt> <dd>The grid was launched but is not running on the HW yet. </dd> <dt><span class="enum-member-name-def">CUDBG_GRID_STATUS_ACTIVE</span></dt> <dd>The grid is currently running on the HW. </dd> <dt><span class="enum-member-name-def">CUDBG_GRID_STATUS_SLEEPING</span></dt> <dd>The grid is on the device, doing a join. </dd> <dt><span class="enum-member-name-def">CUDBG_GRID_STATUS_TERMINATED</span></dt> <dd>The grid has finished executing. </dd> <dt><span class="enum-member-name-def">CUDBG_GRID_STATUS_UNDETERMINED</span></dt> <dd>The grid is either QUEUED or TERMINATED. </dd> </dl> </div> </dd> </dl> </div> <div class="description"> <h3 class="sectiontitle">Variables</h3> <dl class="description"> <dt class="description"><a name="group__GRID_1g06e21287848c46c04af1e70dc6b0ba26" id="group__GRID_1g06e21287848c46c04af1e70dc6b0ba26" shape="rect"> <!-- --></a><span><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> ( *CUDBGAPI_st::getBlockDim )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">sm</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">wp</span>, CuDim3*<span> </span><span class="keyword keyword apiItemName">blockDim</span> )</span></dt> <dd class="description"> <div class="section"> <p>Get the number of threads in the given block. Since CUDA 3.0.</p> <p class="p"></p> <p class="p"></p> <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p> <p class="p see_subsection"><a class="xref" href="group__GRID.html#group__GRID_1g62dc0a59cbc0a9a07cbdb8acb930c93f" title="Get the number of blocks in the given grid." shape="rect">getGridDim</a></p> <p class="p"></p> </div> <div class="section"> <h6 class="parameter_header"> Parameters </h6> <dl class="table-display-params"> <dt><tt class="code"><span class="keyword keyword apiItemName">dev</span></tt></dt> <dd>- device index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">sm</span></tt></dt> <dd>- SM index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">wp</span></tt></dt> <dd>- warp index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">blockDim</span></tt></dt> <dd>- the returned number of threads in the block</dd> </dl> </div> <div class="section"> <h6 class="return_header">Returns</h6> <p class="return">CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_UNINITIALIZED</p> </div> </dd> <dt class="description"><a name="group__GRID_1gc6053e8472b9bb02b23eec2aa6195d3f" id="group__GRID_1gc6053e8472b9bb02b23eec2aa6195d3f" shape="rect"> <!-- --></a><span><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> ( *CUDBGAPI_st::getElfImage )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">sm</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">wp</span>, bool <span> </span><span class="keyword keyword apiItemName">relocated</span>, void*<span> </span><span class="keyword keyword apiItemName">*elfImage</span>, uint64_t*<span> </span><span class="keyword keyword apiItemName">size</span> )</span></dt> <dd class="description"> <div class="section"> <p>Get the relocated or non-relocated ELF image and size for the grid on the given device. Since CUDA 4.0.</p> <p class="p"></p> <p class="p"></p> </div> <div class="section"> <h6 class="parameter_header"> Parameters </h6> <dl class="table-display-params"> <dt><tt class="code"><span class="keyword keyword apiItemName">dev</span></tt></dt> <dd>- device index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">sm</span></tt></dt> <dd>- SM index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">wp</span></tt></dt> <dd>- warp index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">relocated</span></tt></dt> <dd>- set to true to specify the relocated ELF image, false otherwise </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">*elfImage</span></tt></dt> <dd>- pointer to the ELF image </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">size</span></tt></dt> <dd>- size of the ELF image (64 bits)</dd> </dl> </div> <div class="section"> <h6 class="return_header">Returns</h6> <p class="return">CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_UNINITIALIZED </p> </div> </dd> <dt class="description"><a name="group__GRID_1gdda735fe23afd70e7b20df70d2259df3" id="group__GRID_1gdda735fe23afd70e7b20df70d2259df3" shape="rect"> <!-- --></a><span><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> ( *CUDBGAPI_st::getElfImage32 )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">sm</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">wp</span>, bool <span> </span><span class="keyword keyword apiItemName">relocated</span>, void*<span> </span><span class="keyword keyword apiItemName">*elfImage</span>, uint32_t*<span> </span><span class="keyword keyword apiItemName">size</span> )</span></dt> <dd class="description"> <div class="section"> <p>Get the relocated or non-relocated ELF image and size for the grid on the given device. Since CUDA 3.0.</p> <p class="p"></p> <p class="p"></p> <p class="p"></p> </div> <div class="section"> <h6 class="parameter_header"> Parameters </h6> <dl class="table-display-params"> <dt><tt class="code"><span class="keyword keyword apiItemName">dev</span></tt></dt> <dd>- device index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">sm</span></tt></dt> <dd>- SM index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">wp</span></tt></dt> <dd>- warp index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">relocated</span></tt></dt> <dd>- set to true to specify the relocated ELF image, false otherwise </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">*elfImage</span></tt></dt> <dd>- pointer to the ELF image </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">size</span></tt></dt> <dd>- size of the ELF image (32 bits)</dd> </dl> </div> <div class="section"> <h6 class="return_header">Returns</h6> <p class="return">CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_UNINITIALIZED </p> </div> </dd> <dt class="description"><a name="group__GRID_1g92cfc2d9cd4d4a75159192871001bcaa" id="group__GRID_1g92cfc2d9cd4d4a75159192871001bcaa" shape="rect"> <!-- --></a><span><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> ( *CUDBGAPI_st::getGridAttribute )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">sm</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">wp</span>, CUDBGAttribute<span> </span><span class="keyword keyword apiItemName">attr</span>, uint64_t*<span> </span><span class="keyword keyword apiItemName">value</span> )</span></dt> <dd class="description"> <div class="section"> <p>Get the value of a grid attribute. Since CUDA 3.1.</p> <p class="p"></p> <p class="p"></p> </div> <div class="section"> <h6 class="parameter_header"> Parameters </h6> <dl class="table-display-params"> <dt><tt class="code"><span class="keyword keyword apiItemName">dev</span></tt></dt> <dd>- device index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">sm</span></tt></dt> <dd>- SM index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">wp</span></tt></dt> <dd>- warp index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">attr</span></tt></dt> <dd>- the attribute </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">value</span></tt></dt> <dd>- the returned value of the attribute</dd> </dl> </div> <div class="section"> <h6 class="return_header">Returns</h6> <p class="return">CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_INVALID_ATTRIBUTE, CUDBG_ERROR_UNINITIALIZED </p> </div> </dd> <dt class="description"><a name="group__GRID_1gf7e8cb09256c9cb5405e480a9cb4f193" id="group__GRID_1gf7e8cb09256c9cb5405e480a9cb4f193" shape="rect"> <!-- --></a><span><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> ( *CUDBGAPI_st::getGridAttributes )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">sm</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">wp</span>, CUDBGAttributeValuePair*<span> </span><span class="keyword keyword apiItemName">pairs</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">numPairs</span> )</span></dt> <dd class="description"> <div class="section"> <p>Get several grid attribute values in a single API call. Since CUDA 3.1.</p> <p class="p"></p> <p class="p"></p> </div> <div class="section"> <h6 class="parameter_header"> Parameters </h6> <dl class="table-display-params"> <dt><tt class="code"><span class="keyword keyword apiItemName">dev</span></tt></dt> <dd>- device index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">sm</span></tt></dt> <dd>- SM index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">wp</span></tt></dt> <dd>- warp index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">pairs</span></tt></dt> <dd>- array of attribute/value pairs </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">numPairs</span></tt></dt> <dd>- the number of attribute/values pairs in the array</dd> </dl> </div> <div class="section"> <h6 class="return_header">Returns</h6> <p class="return">CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_INVALID_ATTRIBUTE, CUDBG_ERROR_UNINITIALIZED </p> </div> </dd> <dt class="description"><a name="group__GRID_1g62dc0a59cbc0a9a07cbdb8acb930c93f" id="group__GRID_1g62dc0a59cbc0a9a07cbdb8acb930c93f" shape="rect"> <!-- --></a><span><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> ( *CUDBGAPI_st::getGridDim )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">sm</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">wp</span>, CuDim3*<span> </span><span class="keyword keyword apiItemName">gridDim</span> )</span></dt> <dd class="description"> <div class="section"> <p>Get the number of blocks in the given grid. Since CUDA 4.0.</p> <p class="p"></p> <p class="p"></p> <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p> <p class="p see_subsection"><a class="xref" href="group__GRID.html#group__GRID_1g06e21287848c46c04af1e70dc6b0ba26" title="Get the number of threads in the given block." shape="rect">getBlockDim</a></p> <p class="p"></p> </div> <div class="section"> <h6 class="parameter_header"> Parameters </h6> <dl class="table-display-params"> <dt><tt class="code"><span class="keyword keyword apiItemName">dev</span></tt></dt> <dd>- device index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">sm</span></tt></dt> <dd>- SM index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">wp</span></tt></dt> <dd>- warp index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">gridDim</span></tt></dt> <dd>- the returned number of blocks in the grid</dd> </dl> </div> <div class="section"> <h6 class="return_header">Returns</h6> <p class="return">CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_UNINITIALIZED</p> </div> </dd> <dt class="description"><a name="group__GRID_1g0b3d841328dc79b852f20893b72123ad" id="group__GRID_1g0b3d841328dc79b852f20893b72123ad" shape="rect"> <!-- --></a><span><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> ( *CUDBGAPI_st::getGridDim32 )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">sm</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">wp</span>, CuDim2*<span> </span><span class="keyword keyword apiItemName">gridDim</span> )</span></dt> <dd class="description"> <div class="section"> <p>Get the number of blocks in the given grid. Since CUDA 3.0.</p> <p class="p"></p> <p class="p"></p> <p class="p"></p> <p class="p apiDesc_subtitle"><strong class="ph b">See also:</strong></p> <p class="p see_subsection"><a class="xref" href="group__GRID.html#group__GRID_1g06e21287848c46c04af1e70dc6b0ba26" title="Get the number of threads in the given block." shape="rect">getBlockDim</a></p> <p class="p"></p> </div> <div class="section"> <h6 class="parameter_header"> Parameters </h6> <dl class="table-display-params"> <dt><tt class="code"><span class="keyword keyword apiItemName">dev</span></tt></dt> <dd>- device index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">sm</span></tt></dt> <dd>- SM index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">wp</span></tt></dt> <dd>- warp index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">gridDim</span></tt></dt> <dd>- the returned number of blocks in the grid</dd> </dl> </div> <div class="section"> <h6 class="return_header">Returns</h6> <p class="return">CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_UNINITIALIZED</p> </div> </dd> <dt class="description"><a name="group__GRID_1gcbe47612bdf775af63ca5393ea3a7281" id="group__GRID_1gcbe47612bdf775af63ca5393ea3a7281" shape="rect"> <!-- --></a><span><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> ( *CUDBGAPI_st::getGridInfo )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint64_t<span> </span><span class="keyword keyword apiItemName">gridId64</span>, CUDBGGridInfo*<span> </span><span class="keyword keyword apiItemName">gridInfo</span> )</span></dt> <dd class="description"> <div class="section"> <p>Get information about the specified grid. If the context of the grid has already been destroyed, the function will return CUDBG_ERROR_INVALID_GRID, although the grid id is correct. Since CUDA 5.5. </p> <p class="p"></p> <p class="p"></p> </div> <div class="section"> <h6 class="parameter_header"> Parameters </h6> <dl class="table-display-params"> <dt><tt class="code"><span class="keyword keyword apiItemName">dev</span></tt></dt> <dd></dd> <dt><tt class="code"><span class="keyword keyword apiItemName">gridId64</span></tt></dt> <dd></dd> <dt><tt class="code"><span class="keyword keyword apiItemName">gridInfo</span></tt></dt> <dd>- pointer to a client allocated structure in which grid info will be returned.</dd> </dl> </div> <div class="section"> <h6 class="return_header">Returns</h6> <p class="return">CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_GRID, CUDBG_SUCCESS </p> </div> </dd> <dt class="description"><a name="group__GRID_1gd1ae3c5604d9e113855ee8620406aa88" id="group__GRID_1gd1ae3c5604d9e113855ee8620406aa88" shape="rect"> <!-- --></a><span><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> ( *CUDBGAPI_st::getGridStatus )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint64_t<span> </span><span class="keyword keyword apiItemName">gridId64</span>, CUDBGGridStatus*<span> </span><span class="keyword keyword apiItemName">status</span> )</span></dt> <dd class="description"> <div class="section"> <p>Check whether the grid corresponding to the given gridId is still present on the device. Since CUDA 5.5.</p> <p class="p"></p> <p class="p"></p> </div> <div class="section"> <h6 class="parameter_header"> Parameters </h6> <dl class="table-display-params"> <dt><tt class="code"><span class="keyword keyword apiItemName">dev</span></tt></dt> <dd></dd> <dt><tt class="code"><span class="keyword keyword apiItemName">gridId64</span></tt></dt> <dd>- 64-bit grid ID </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">status</span></tt></dt> <dd>- enum indicating whether the grid status is INVALID, PENDING, ACTIVE, SLEEPING, TERMINATED or UNDETERMINED</dd> </dl> </div> <div class="section"> <h6 class="return_header">Returns</h6> <p class="return">CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_INTERNAL </p> </div> </dd> <dt class="description"><a name="group__GRID_1g9c4c2530636cb90bbc1d11ad70fba960" id="group__GRID_1g9c4c2530636cb90bbc1d11ad70fba960" shape="rect"> <!-- --></a><span><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> ( *CUDBGAPI_st::getGridStatus50 )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">gridId</span>, CUDBGGridStatus*<span> </span><span class="keyword keyword apiItemName">status</span> )</span></dt> <dd class="description"> <div class="section"> <p>Check whether the grid corresponding to the given gridId is still present on the device. Since CUDA 5.0.</p> <p class="p"></p> <p class="p"></p> <p class="p"></p> </div> <div class="section"> <h6 class="parameter_header"> Parameters </h6> <dl class="table-display-params"> <dt><tt class="code"><span class="keyword keyword apiItemName">dev</span></tt></dt> <dd></dd> <dt><tt class="code"><span class="keyword keyword apiItemName">gridId</span></tt></dt> <dd>- grid ID </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">status</span></tt></dt> <dd>- enum indicating whether the grid status is INVALID, PENDING, ACTIVE, SLEEPING, TERMINATED or UNDETERMINED</dd> </dl> </div> <div class="section"> <h6 class="return_header">Returns</h6> <p class="return">CUDBG_ERROR_INVALID_DEVICE, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_INTERNAL </p> </div> </dd> <dt class="description"><a name="group__GRID_1ge5eb7bdedae26df688d84dd4e2d3c441" id="group__GRID_1ge5eb7bdedae26df688d84dd4e2d3c441" shape="rect"> <!-- --></a><span><a href="group__GENERAL.html#group__GENERAL_1gb6db1f210c2e621fabb0820e8cee28ce" title="Result values of all the API routines. " shape="rect">CUDBGResult</a> ( *CUDBGAPI_st::getTID )( uint32_t<span> </span><span class="keyword keyword apiItemName">dev</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">sm</span>, uint32_t<span> </span><span class="keyword keyword apiItemName">wp</span>, uint32_t*<span> </span><span class="keyword keyword apiItemName">tid</span> )</span></dt> <dd class="description"> <div class="section"> <p>Get the ID of the Linux thread hosting the context of the grid. Since CUDA 3.0.</p> <p class="p"></p> <p class="p"></p> </div> <div class="section"> <h6 class="parameter_header"> Parameters </h6> <dl class="table-display-params"> <dt><tt class="code"><span class="keyword keyword apiItemName">dev</span></tt></dt> <dd>- device index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">sm</span></tt></dt> <dd>- SM index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">wp</span></tt></dt> <dd>- warp index </dd> <dt><tt class="code"><span class="keyword keyword apiItemName">tid</span></tt></dt> <dd>- the returned thread id</dd> </dl> </div> <div class="section"> <h6 class="return_header">Returns</h6> <p class="return">CUDBG_SUCCESS, CUDBG_ERROR_INVALID_ARGS, CUDBG_ERROR_INVALID_GRID, CUDBG_ERROR_UNINITIALIZED </p> </div> </dd> </dl> </div> </div> <hr id="contents-end"></hr> </article> </div> </div> <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/formatting/common.min.js"></script> <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/scripts/google-analytics/google-analytics-write.js"></script> <script language="JavaScript" type="text/javascript" charset="utf-8" src="../common/scripts/google-analytics/google-analytics-tracker.js"></script> <script type="text/javascript">var switchTo5x=true;</script><script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script><script type="text/javascript">stLight.options({publisher: "998dc202-a267-4d8e-bce9-14debadb8d92", doNotHash: false, doNotCopy: false, hashAddressBar: false});</script></body> </html>