Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > nonfree-updates > by-pkgid > fd8445e7e4d58b8cfe6e0150bd441ee1 > files > 1089

nvidia-cuda-toolkit-devel-6.5.14-6.1.mga5.nonfree.x86_64.rpm

<!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="Unified Addressing"></meta>
      <meta name="abstract" content=""></meta>
      <meta name="description" content=""></meta>
      <meta name="DC.Format" content="XHTML"></meta>
      <meta name="DC.Identifier" content="group__CUDA__UNIFIED"></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>CUDA Driver 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/cuda-driver-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="CUDA Driver API">CUDA Driver API</a></div>
            <ul>
               <li>
                  <div class="section-link"><a href="api-sync-behavior.html#api-sync-behavior">1.&nbsp;API synchronization behavior </a></div>
               </li>
               <li>
                  <div class="section-link"><a href="stream-sync-behavior.html#stream-sync-behavior">2.&nbsp;Stream synchronization behavior</a></div>
               </li>
               <li>
                  <div class="section-link"><a href="modules.html#modules">3.&nbsp;Modules</a></div>
                  <ul>
                     <li>
                        <div class="section-link"><a href="group__CUDA__TYPES.html#group__CUDA__TYPES">3.1.&nbsp;Data types used by CUDA driver</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__ERROR.html#group__CUDA__ERROR">3.2.&nbsp;Error Handling</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__INITIALIZE.html#group__CUDA__INITIALIZE">3.3.&nbsp;Initialization</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__VERSION.html#group__CUDA__VERSION">3.4.&nbsp;Version Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__DEVICE.html#group__CUDA__DEVICE">3.5.&nbsp;Device Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__DEVICE__DEPRECATED.html#group__CUDA__DEVICE__DEPRECATED">3.6.&nbsp;Device Management [DEPRECATED]</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__CTX.html#group__CUDA__CTX">3.7.&nbsp;Context Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__CTX__DEPRECATED.html#group__CUDA__CTX__DEPRECATED">3.8.&nbsp;Context Management [DEPRECATED]</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__MODULE.html#group__CUDA__MODULE">3.9.&nbsp;Module Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__MEM.html#group__CUDA__MEM">3.10.&nbsp;Memory Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__UNIFIED.html#group__CUDA__UNIFIED">3.11.&nbsp;Unified Addressing</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__STREAM.html#group__CUDA__STREAM">3.12.&nbsp;Stream Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__EVENT.html#group__CUDA__EVENT">3.13.&nbsp;Event Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__EXEC.html#group__CUDA__EXEC">3.14.&nbsp;Execution Control</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__EXEC__DEPRECATED.html#group__CUDA__EXEC__DEPRECATED">3.15.&nbsp;Execution Control [DEPRECATED]</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__OCCUPANCY.html#group__CUDA__OCCUPANCY">3.16.&nbsp;Occupancy</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__TEXREF.html#group__CUDA__TEXREF">3.17.&nbsp;Texture Reference Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__TEXREF__DEPRECATED.html#group__CUDA__TEXREF__DEPRECATED">3.18.&nbsp;Texture Reference Management [DEPRECATED]</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__SURFREF.html#group__CUDA__SURFREF">3.19.&nbsp;Surface Reference Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__TEXOBJECT.html#group__CUDA__TEXOBJECT">3.20.&nbsp;Texture Object Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__SURFOBJECT.html#group__CUDA__SURFOBJECT">3.21.&nbsp;Surface Object Management</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__PEER__ACCESS.html#group__CUDA__PEER__ACCESS">3.22.&nbsp;Peer Context Memory Access</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__GRAPHICS.html#group__CUDA__GRAPHICS">3.23.&nbsp;Graphics Interoperability</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__PROFILER.html#group__CUDA__PROFILER">3.24.&nbsp;Profiler Control</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__GL.html#group__CUDA__GL">3.25.&nbsp;OpenGL Interoperability</a></div>
                        <ul>
                           <li>
                              <div class="section-link"><a href="group__CUDA__GL__DEPRECATED.html#group__CUDA__GL__DEPRECATED">3.25.1.&nbsp;OpenGL Interoperability [DEPRECATED]</a></div>
                           </li>
                        </ul>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__D3D9.html#group__CUDA__D3D9">3.26.&nbsp;Direct3D 9 Interoperability</a></div>
                        <ul>
                           <li>
                              <div class="section-link"><a href="group__CUDA__D3D9__DEPRECATED.html#group__CUDA__D3D9__DEPRECATED">3.26.1.&nbsp;Direct3D 9 Interoperability [DEPRECATED]</a></div>
                           </li>
                        </ul>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__D3D10.html#group__CUDA__D3D10">3.27.&nbsp;Direct3D 10 Interoperability</a></div>
                        <ul>
                           <li>
                              <div class="section-link"><a href="group__CUDA__D3D10__DEPRECATED.html#group__CUDA__D3D10__DEPRECATED">3.27.1.&nbsp;Direct3D 10 Interoperability [DEPRECATED]</a></div>
                           </li>
                        </ul>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__D3D11.html#group__CUDA__D3D11">3.28.&nbsp;Direct3D 11 Interoperability</a></div>
                        <ul>
                           <li>
                              <div class="section-link"><a href="group__CUDA__D3D11__DEPRECATED.html#group__CUDA__D3D11__DEPRECATED">3.28.1.&nbsp;Direct3D 11 Interoperability [DEPRECATED]</a></div>
                           </li>
                        </ul>
                     </li>
                     <li>
                        <div class="section-link"><a href="group__CUDA__VDPAU.html#group__CUDA__VDPAU">3.29.&nbsp;VDPAU Interoperability</a></div>
                     </li>
                  </ul>
               </li>
               <li>
                  <div class="section-link"><a href="annotated.html#annotated">4.&nbsp;Data Structures</a></div>
                  <ul>
                     <li>
                        <div class="section-link"><a href="structCUDA__ARRAY3D__DESCRIPTOR.html#structCUDA__ARRAY3D__DESCRIPTOR">4.1.&nbsp;CUDA_ARRAY3D_DESCRIPTOR</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUDA__ARRAY__DESCRIPTOR.html#structCUDA__ARRAY__DESCRIPTOR">4.2.&nbsp;CUDA_ARRAY_DESCRIPTOR</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUDA__MEMCPY2D.html#structCUDA__MEMCPY2D">4.3.&nbsp;CUDA_MEMCPY2D</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUDA__MEMCPY3D.html#structCUDA__MEMCPY3D">4.4.&nbsp;CUDA_MEMCPY3D</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUDA__MEMCPY3D__PEER.html#structCUDA__MEMCPY3D__PEER">4.5.&nbsp;CUDA_MEMCPY3D_PEER</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUDA__POINTER__ATTRIBUTE__P2P__TOKENS.html#structCUDA__POINTER__ATTRIBUTE__P2P__TOKENS">4.6.&nbsp;CUDA_POINTER_ATTRIBUTE_P2P_TOKENS</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUDA__RESOURCE__DESC.html#structCUDA__RESOURCE__DESC">4.7.&nbsp;CUDA_RESOURCE_DESC</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUDA__RESOURCE__VIEW__DESC.html#structCUDA__RESOURCE__VIEW__DESC">4.8.&nbsp;CUDA_RESOURCE_VIEW_DESC</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUDA__TEXTURE__DESC.html#structCUDA__TEXTURE__DESC">4.9.&nbsp;CUDA_TEXTURE_DESC</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUdevprop.html#structCUdevprop">4.10.&nbsp;CUdevprop</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUipcEventHandle.html#structCUipcEventHandle">4.11.&nbsp;CUipcEventHandle</a></div>
                     </li>
                     <li>
                        <div class="section-link"><a href="structCUipcMemHandle.html#structCUipcMemHandle">4.12.&nbsp;CUipcMemHandle</a></div>
                     </li>
                  </ul>
               </li>
               <li>
                  <div class="section-link"><a href="functions.html#functions">5.&nbsp;Data Fields</a></div>
               </li>
               <li>
                  <div class="section-link"><a href="deprecated.html#deprecated">6.&nbsp;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__CUDA__MEM.html" shape="rect">&lt; Previous</a> | <a href="group__CUDA__STREAM.html" shape="rect">Next &gt;</a></div>
               <div id="release-info">CUDA Driver API
                  (<a href="../../pdf/CUDA_Driver_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: CUDA Driver 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__CUDA__UNIFIED"><a name="group__CUDA__UNIFIED" shape="rect">
                     <!-- --></a><h2 class="topictitle2 cppModule">3.11.&nbsp;Unified Addressing</h2>
                  <div class="section">
                     <p>This section describes the unified addressing functions of the low-level CUDA driver application programming interface.</p>
                     <p class="p apiDesc_subtitle"><strong class="ph b">Overview</strong></p>
                     <p class="p">CUDA devices can share a unified address space with the host. For these devices there is no distinction between a device pointer
                        and a host pointer -- the same pointer value may be used to access memory from the host program and from a kernel running
                        on the device (with exceptions enumerated below).
                     </p>
                     <p class="p apiDesc_subtitle"><strong class="ph b">Supported Platforms</strong></p>
                     <p class="p">Whether or not a device supports unified addressing may be queried by calling <a class="xref" href="group__CUDA__DEVICE.html#group__CUDA__DEVICE_1g9c3e1414f0ad901d3278a4d6645fc266" title="Returns information about the device." shape="rect">cuDeviceGetAttribute()</a> with the device attribute <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gge12b8a782bebe21b1ac0091bf9f4e2a3dc11dd6d9f149a7bae32499f2b802c0d" shape="rect">CU_DEVICE_ATTRIBUTE_UNIFIED_ADDRESSING</a>.
                     </p>
                     <p class="p">Unified addressing is automatically enabled in 64-bit processes on devices with compute capability greater than or equal to
                        2.0.
                     </p>
                     <p class="p apiDesc_subtitle"><strong class="ph b">Looking Up Information from Pointer Values</strong></p>
                     <p class="p">It is possible to look up information about the memory which backs a pointer value. For instance, one may want to know if
                        a pointer points to host or device memory. As another example, in the case of device memory, one may want to know on which
                        CUDA device the memory resides. These properties may be queried using the function <a class="xref" href="group__CUDA__UNIFIED.html#group__CUDA__UNIFIED_1g0c28ed0aff848042bc0533110e45820c" title="Returns information about a pointer." shape="rect">cuPointerGetAttribute()</a></p>
                     <p class="p">Since pointers are unique, it is not necessary to specify information about the pointers specified to the various copy functions
                        in the CUDA API. The function <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1g8d0ff510f26d4b87bd3a51e731e7f698" title="Copies memory." shape="rect">cuMemcpy()</a> may be used to perform a copy between two pointers, ignoring whether they point to host or device memory (making <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1g4d32266788c440b0220b1a9ba5795169" title="Copies memory from Host to Device." shape="rect">cuMemcpyHtoD()</a>, <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1g1725774abf8b51b91945f3336b778c8b" title="Copies memory from Device to Device." shape="rect">cuMemcpyDtoD()</a>, and <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1g3480368ee0208a98f75019c9a8450893" title="Copies memory from Device to Host." shape="rect">cuMemcpyDtoH()</a> unnecessary for devices supporting unified addressing). For multidimensional copies, the memory type <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg8a114cc994ad2e865c44ef3838eaec727a47ca2de6db5cf82084ad80ce66aa71" shape="rect">CU_MEMORYTYPE_UNIFIED</a> may be used to specify that the CUDA driver should infer the location of the pointer from its value.
                     </p>
                     <p class="p apiDesc_subtitle"><strong class="ph b">Automatic Mapping of Host Allocated Host Memory</strong></p>
                     <p class="p">All host memory allocated in all contexts using <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1gdd8311286d2c2691605362c689bc64e0" title="Allocates page-locked host memory." shape="rect">cuMemAllocHost()</a> and <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1g572ca4011bfcb25034888a14d4e035b9" title="Allocates page-locked host memory." shape="rect">cuMemHostAlloc()</a> is always directly accessible from all contexts on all devices that support unified addressing. This is the case regardless
                        of whether or not the flags <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1g50f4528d46bda58b592551654a7ee0ff" shape="rect">CU_MEMHOSTALLOC_PORTABLE</a> and <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1g054589ee2a0f188e664d93965d81113d" shape="rect">CU_MEMHOSTALLOC_DEVICEMAP</a> are specified.
                     </p>
                     <p class="p">The pointer value through which allocated host memory may be accessed in kernels on all devices that support unified addressing
                        is the same as the pointer value through which that memory is accessed on the host, so it is not necessary to call <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1g57a39e5cba26af4d06be67fc77cc62f0" title="Passes back device pointer of mapped pinned memory." shape="rect">cuMemHostGetDevicePointer()</a> to get the device pointer for these allocations.
                     </p>
                     <p class="p">Note that this is not the case for memory allocated using the flag <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1g7361580951deecace15352c97a210038" shape="rect">CU_MEMHOSTALLOC_WRITECOMBINED</a>, as discussed below.
                     </p>
                     <p class="p apiDesc_subtitle"><strong class="ph b">Automatic Registration of Peer Memory</strong></p>
                     <p class="p">Upon enabling direct access from a context that supports unified addressing to another peer context that supports unified
                        addressing using <a class="xref" href="group__CUDA__PEER__ACCESS.html#group__CUDA__PEER__ACCESS_1g0889ec6728e61c05ed359551d67b3f5a" title="Enables direct access to memory allocations in a peer context." shape="rect">cuCtxEnablePeerAccess()</a> all memory allocated in the peer context using <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1gb82d2a09844a58dd9e744dc31e8aa467" title="Allocates device memory." shape="rect">cuMemAlloc()</a> and <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1gcbe9b033f6c4de80f63cc6e58ed9a45a" title="Allocates pitched device memory." shape="rect">cuMemAllocPitch()</a> will immediately be accessible by the current context. The device pointer value through which any peer memory may be accessed
                        in the current context is the same pointer value through which that memory may be accessed in the peer context.
                     </p>
                     <p class="p apiDesc_subtitle"><strong class="ph b">Exceptions, Disjoint Addressing</strong></p>
                     <p class="p">Not all memory may be accessed on devices through the same pointer value through which they are accessed on the host. These
                        exceptions are host memory registered using <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1gf0a9fe11544326dabd743b7aa6b54223" title="Registers an existing host memory range for use by CUDA." shape="rect">cuMemHostRegister()</a> and host memory allocated using the flag <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1g7361580951deecace15352c97a210038" shape="rect">CU_MEMHOSTALLOC_WRITECOMBINED</a>. For these exceptions, there exists a distinct host and device address for the memory. The device address is guaranteed to
                        not overlap any valid host pointer range and is guaranteed to have the same value across all contexts that support unified
                        addressing.
                     </p>
                     <p class="p">This device address may be queried using <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1g57a39e5cba26af4d06be67fc77cc62f0" title="Passes back device pointer of mapped pinned memory." shape="rect">cuMemHostGetDevicePointer()</a> when a context using unified addressing is current. Either the host or the unified device pointer value may be used to refer
                        to this memory through <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1g8d0ff510f26d4b87bd3a51e731e7f698" title="Copies memory." shape="rect">cuMemcpy()</a> and similar functions using the <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg8a114cc994ad2e865c44ef3838eaec727a47ca2de6db5cf82084ad80ce66aa71" shape="rect">CU_MEMORYTYPE_UNIFIED</a> memory type. 
                     </p>
                  </div>
                  <h3 class="fake_sectiontitle member_header">Functions</h3>
                  <dl class="members">
                     <dt><span class="member_type"><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a>&nbsp;</span><span class="member_name"><a href="#group__CUDA__UNIFIED_1g0c28ed0aff848042bc0533110e45820c" shape="rect">cuPointerGetAttribute</a> (  void*<span>&nbsp;</span><span class="keyword keyword apiItemName">data</span>, <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc2cce590e35080745e72633dfc6e0b60" title="" shape="rect">CUpointer_attribute</a><span>&nbsp;</span><span class="keyword keyword apiItemName">attribute</span>, <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1g5e264ce2ad6a38761e7e04921ef771de" title="" shape="rect">CUdeviceptr</a><span>&nbsp;</span><span class="keyword keyword apiItemName">ptr</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Returns information about a pointer. </span></dd>
                     <dt><span class="member_type"><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a>&nbsp;</span><span class="member_name"><a href="#group__CUDA__UNIFIED_1g89f7ad29a657e574fdea2624b74d138e" shape="rect">cuPointerSetAttribute</a> (  const void*<span>&nbsp;</span><span class="keyword keyword apiItemName">value</span>, <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc2cce590e35080745e72633dfc6e0b60" title="" shape="rect">CUpointer_attribute</a><span>&nbsp;</span><span class="keyword keyword apiItemName">attribute</span>, <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1g5e264ce2ad6a38761e7e04921ef771de" title="" shape="rect">CUdeviceptr</a><span>&nbsp;</span><span class="keyword keyword apiItemName">ptr</span> ) </span></dt>
                     <dd class="shortdesc"><span></span><span class="desc">Set attributes on a previously allocated memory region. </span></dd>
                  </dl>
                  <div class="description">
                     <h3 class="sectiontitle">Functions</h3>
                     <dl class="description">
                        <dt class="description"><a name="group__CUDA__UNIFIED_1g0c28ed0aff848042bc0533110e45820c" id="group__CUDA__UNIFIED_1g0c28ed0aff848042bc0533110e45820c" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuPointerGetAttribute (  void*<span>&nbsp;</span><span class="keyword keyword apiItemName">data</span>, <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc2cce590e35080745e72633dfc6e0b60" title="" shape="rect">CUpointer_attribute</a><span>&nbsp;</span><span class="keyword keyword apiItemName">attribute</span>, <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1g5e264ce2ad6a38761e7e04921ef771de" title="" shape="rect">CUdeviceptr</a><span>&nbsp;</span><span class="keyword keyword apiItemName">ptr</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Returns information about a pointer. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">data</span></tt></dt>
                                 <dd>- Returned pointer attribute value </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">attribute</span></tt></dt>
                                 <dd>- Pointer attribute to query </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">ptr</span></tt></dt>
                                 <dd>- Pointer</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a0eed720f8a87cd1c5fd1c453bc7a03d" shape="rect">CUDA_SUCCESS</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9acf52f132faf29b473cdda6061f0f44a" shape="rect">CUDA_ERROR_DEINITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e98feb999f0af99b4a25ab26b3866f4df8" shape="rect">CUDA_ERROR_NOT_INITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a484e9af32c1e9893ff21f0e0191a12d" shape="rect">CUDA_ERROR_INVALID_CONTEXT</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e990696c86fcee1f536a1ec7d25867feeb" shape="rect">CUDA_ERROR_INVALID_VALUE</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e96f047e7215788ca96c81af92a04bfb6c" shape="rect">CUDA_ERROR_INVALID_DEVICE</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>The supported attributes are:</p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc2cce590e35080745e72633dfc6e0b60f0470fdbd1a5ff72c341f762f49506ab" shape="rect">CU_POINTER_ATTRIBUTE_CONTEXT</a>:
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">Returns in <tt class="ph tt code">*data</tt> the <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" shape="rect">CUcontext</a> in which <tt class="ph tt code">ptr</tt> was allocated or registered. The type of <tt class="ph tt code">data</tt> must be <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" shape="rect">CUcontext</a> *.
                              </p>
                              <p class="p">If <tt class="ph tt code">ptr</tt> was not allocated by, mapped by, or registered with a <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" shape="rect">CUcontext</a> which uses unified virtual addressing then <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e990696c86fcee1f536a1ec7d25867feeb" shape="rect">CUDA_ERROR_INVALID_VALUE</a> is returned.
                              </p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc2cce590e35080745e72633dfc6e0b600409e16293b60b383f30a9b417b2917c" shape="rect">CU_POINTER_ATTRIBUTE_MEMORY_TYPE</a>:
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">Returns in <tt class="ph tt code">*data</tt> the physical memory type of the memory that <tt class="ph tt code">ptr</tt> addresses as a <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1g8a114cc994ad2e865c44ef3838eaec72" shape="rect">CUmemorytype</a> enumerated value. The type of <tt class="ph tt code">data</tt> must be unsigned int.
                              </p>
                              <p class="p">If <tt class="ph tt code">ptr</tt> addresses device memory then <tt class="ph tt code">*data</tt> is set to <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg8a114cc994ad2e865c44ef3838eaec72ec7e15ba4b111a26adb3487023707299" shape="rect">CU_MEMORYTYPE_DEVICE</a>. The particular <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gcd81b70eb9968392bb5cdf582af8eab4" shape="rect">CUdevice</a> on which the memory resides is the <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gcd81b70eb9968392bb5cdf582af8eab4" shape="rect">CUdevice</a> of the <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" shape="rect">CUcontext</a> returned by the <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc2cce590e35080745e72633dfc6e0b60f0470fdbd1a5ff72c341f762f49506ab" shape="rect">CU_POINTER_ATTRIBUTE_CONTEXT</a> attribute of <tt class="ph tt code">ptr</tt>.
                              </p>
                              <p class="p">If <tt class="ph tt code">ptr</tt> addresses host memory then <tt class="ph tt code">*data</tt> is set to <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gg8a114cc994ad2e865c44ef3838eaec727f98a88f26eec8490bfc180c5a73e101" shape="rect">CU_MEMORYTYPE_HOST</a>.
                              </p>
                              <p class="p">If <tt class="ph tt code">ptr</tt> was not allocated by, mapped by, or registered with a <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" shape="rect">CUcontext</a> which uses unified virtual addressing then <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e990696c86fcee1f536a1ec7d25867feeb" shape="rect">CUDA_ERROR_INVALID_VALUE</a> is returned.
                              </p>
                              <p class="p">If the current <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" shape="rect">CUcontext</a> does not support unified virtual addressing then <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a484e9af32c1e9893ff21f0e0191a12d" shape="rect">CUDA_ERROR_INVALID_CONTEXT</a> is returned.
                              </p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc2cce590e35080745e72633dfc6e0b60b5446064bbfa484ea8d13025f1573d5d" shape="rect">CU_POINTER_ATTRIBUTE_DEVICE_POINTER</a>:
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">Returns in <tt class="ph tt code">*data</tt> the device pointer value through which <tt class="ph tt code">ptr</tt> may be accessed by kernels running in the current <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" shape="rect">CUcontext</a>. The type of <tt class="ph tt code">data</tt> must be CUdeviceptr *.
                              </p>
                              <p class="p">If there exists no device pointer value through which kernels running in the current <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" shape="rect">CUcontext</a> may access <tt class="ph tt code">ptr</tt> then <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e990696c86fcee1f536a1ec7d25867feeb" shape="rect">CUDA_ERROR_INVALID_VALUE</a> is returned.
                              </p>
                              <p class="p">If there is no current <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gf9f5bd81658f866613785b3a0bb7d7d9" shape="rect">CUcontext</a> then <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a484e9af32c1e9893ff21f0e0191a12d" shape="rect">CUDA_ERROR_INVALID_CONTEXT</a> is returned.
                              </p>
                              <p class="p">Except in the exceptional disjoint addressing cases discussed below, the value returned in <tt class="ph tt code">*data</tt> will equal the input value <tt class="ph tt code">ptr</tt>.
                              </p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc2cce590e35080745e72633dfc6e0b60ab17d9902b1b631982ae6a3a9a436fdc" shape="rect">CU_POINTER_ATTRIBUTE_HOST_POINTER</a>:
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">Returns in <tt class="ph tt code">*data</tt> the host pointer value through which <tt class="ph tt code">ptr</tt> may be accessed by by the host program. The type of <tt class="ph tt code">data</tt> must be void **. If there exists no host pointer value through which the host program may directly access <tt class="ph tt code">ptr</tt> then <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e990696c86fcee1f536a1ec7d25867feeb" shape="rect">CUDA_ERROR_INVALID_VALUE</a> is returned.
                              </p>
                              <p class="p">Except in the exceptional disjoint addressing cases discussed below, the value returned in <tt class="ph tt code">*data</tt> will equal the input value <tt class="ph tt code">ptr</tt>.
                              </p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc2cce590e35080745e72633dfc6e0b60995003218508cc15bfcf197aa9b30a1b" shape="rect">CU_POINTER_ATTRIBUTE_P2P_TOKENS</a>:
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">Returns in <tt class="ph tt code">*data</tt> two tokens for use with the nv-p2p.h Linux kernel interface. <tt class="ph tt code">data</tt> must be a struct of type <a class="xref" href="structCUDA__POINTER__ATTRIBUTE__P2P__TOKENS.html#structCUDA__POINTER__ATTRIBUTE__P2P__TOKENS" shape="rect">CUDA_POINTER_ATTRIBUTE_P2P_TOKENS</a>.
                              </p>
                              <p class="p"><tt class="ph tt code">ptr</tt> must be a pointer to memory obtained from :<a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1gb82d2a09844a58dd9e744dc31e8aa467" title="Allocates device memory." shape="rect">cuMemAlloc()</a>. Note that p2pToken and vaSpaceToken are only valid for the lifetime of the source allocation. A subsequent allocation at
                                 the same address may return completely different tokens. Querying this attribute has a side effect of setting the attribute
                                 <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc2cce590e35080745e72633dfc6e0b60db5380c3201afdae3556cce8834504e1" shape="rect">CU_POINTER_ATTRIBUTE_SYNC_MEMOPS</a> for the region of memory that <tt class="ph tt code">ptr</tt> points to.
                              </p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc2cce590e35080745e72633dfc6e0b60db5380c3201afdae3556cce8834504e1" shape="rect">CU_POINTER_ATTRIBUTE_SYNC_MEMOPS</a>:
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">A boolean attribute which when set, ensures that synchronous memory operations initiated on the region of memory that <tt class="ph tt code">ptr</tt> points to will always synchronize. See further documentation in the section titled "API synchronization behavior" to learn
                                 more about cases when synchronous memory operations can exhibit asynchronous behavior.
                              </p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc2cce590e35080745e72633dfc6e0b60d891336d10c16c3ea8140fa581c5446f" shape="rect">CU_POINTER_ATTRIBUTE_BUFFER_ID</a>:
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">Returns in <tt class="ph tt code">*data</tt> a buffer ID which is guaranteed to be unique within the process. <tt class="ph tt code">data</tt> must point to an unsigned long long.
                              </p>
                              <p class="p"><tt class="ph tt code">ptr</tt> must be a pointer to memory obtained from a CUDA memory allocation API. Every memory allocation from any of the CUDA memory
                                 allocation APIs will have a unique ID over a process lifetime. Subsequent allocations do not reuse IDs from previous freed
                                 allocations. IDs are only unique within a single process.
                              </p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc2cce590e35080745e72633dfc6e0b60893cfce785d799fb93826537fbb72a1d" shape="rect">CU_POINTER_ATTRIBUTE_IS_MANAGED</a>:
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">Returns in <tt class="ph tt code">*data</tt> a boolean that indicates whether the pointer points to managed memory or not.
                              </p>
                              <p class="p"></p>
                              <p class="p">
                                 Note that for most allocations in the unified virtual address space the host and device pointer for accessing the allocation
                                 will be the same. The exceptions to this are
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p">user memory registered using <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1gf0a9fe11544326dabd743b7aa6b54223" title="Registers an existing host memory range for use by CUDA." shape="rect">cuMemHostRegister</a></p>
                                    </li>
                                    <li class="li">
                                       <p class="p">host memory allocated using <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1g572ca4011bfcb25034888a14d4e035b9" title="Allocates page-locked host memory." shape="rect">cuMemHostAlloc</a> with the <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1g7361580951deecace15352c97a210038" shape="rect">CU_MEMHOSTALLOC_WRITECOMBINED</a> flag For these types of allocation there will exist separate, disjoint host and device addresses for accessing the allocation.
                                          In particular
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p">The host address will correspond to an invalid unmapped device address (which will result in an exception if accessed from
                                          the device)
                                       </p>
                                    </li>
                                    <li class="li">
                                       <p class="p">The device address will correspond to an invalid unmapped host address (which will result in an exception if accessed from
                                          the host). For these types of allocations, querying <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc2cce590e35080745e72633dfc6e0b60ab17d9902b1b631982ae6a3a9a436fdc" shape="rect">CU_POINTER_ATTRIBUTE_HOST_POINTER</a> and <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc2cce590e35080745e72633dfc6e0b60b5446064bbfa484ea8d13025f1573d5d" shape="rect">CU_POINTER_ATTRIBUTE_DEVICE_POINTER</a> may be used to retrieve the host and device addresses from either address.
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><p class="p">Note that this function may also return error codes from previous, asynchronous launches.</p>
                                 </div>
                              </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__CUDA__UNIFIED.html#group__CUDA__UNIFIED_1g89f7ad29a657e574fdea2624b74d138e" title="Set attributes on a previously allocated memory region." shape="rect">cuPointerSetAttribute</a>, <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1gb82d2a09844a58dd9e744dc31e8aa467" title="Allocates device memory." shape="rect">cuMemAlloc</a>, <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1g89b3f154e17cc89b6eea277dbdf5c93a" title="Frees device memory." shape="rect">cuMemFree</a>, <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1gdd8311286d2c2691605362c689bc64e0" title="Allocates page-locked host memory." shape="rect">cuMemAllocHost</a>, <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1g62e0fdbe181dab6b1c90fa1a51c7b92c" title="Frees page-locked host memory." shape="rect">cuMemFreeHost</a>, <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1g572ca4011bfcb25034888a14d4e035b9" title="Allocates page-locked host memory." shape="rect">cuMemHostAlloc</a>, <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1gf0a9fe11544326dabd743b7aa6b54223" title="Registers an existing host memory range for use by CUDA." shape="rect">cuMemHostRegister</a>, <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1g63f450c8125359be87b7623b1c0b2a14" title="Unregisters a memory range that was registered with cuMemHostRegister." shape="rect">cuMemHostUnregister</a></p>
                              <p class="p"></p>
                           </div>
                        </dd>
                        <dt class="description"><a name="group__CUDA__UNIFIED_1g89f7ad29a657e574fdea2624b74d138e" id="group__CUDA__UNIFIED_1g89f7ad29a657e574fdea2624b74d138e" shape="rect">
                              <!-- --></a><span><a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc6c391505e117393cc2558fff6bfc2e9" title="" shape="rect">CUresult</a> cuPointerSetAttribute (  const void*<span>&nbsp;</span><span class="keyword keyword apiItemName">value</span>, <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1gc2cce590e35080745e72633dfc6e0b60" title="" shape="rect">CUpointer_attribute</a><span>&nbsp;</span><span class="keyword keyword apiItemName">attribute</span>, <a href="group__CUDA__TYPES.html#group__CUDA__TYPES_1g5e264ce2ad6a38761e7e04921ef771de" title="" shape="rect">CUdeviceptr</a><span>&nbsp;</span><span class="keyword keyword apiItemName">ptr</span> ) </span></dt>
                        <dd class="description">
                           <div class="section">Set attributes on a previously allocated memory region. </div>
                           <div class="section">
                              <h6 class="parameter_header">
                                 Parameters
                                 
                              </h6>
                              <dl class="table-display-params">
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">value</span></tt></dt>
                                 <dd>- Pointer to memory containing the value to be set </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">attribute</span></tt></dt>
                                 <dd>- Pointer attribute to set </dd>
                                 <dt><tt class="code"><span class="keyword keyword apiItemName">ptr</span></tt></dt>
                                 <dd>- Pointer to a memory region allocated using CUDA memory allocation APIs</dd>
                              </dl>
                           </div>
                           <div class="section">
                              <h6 class="return_header">Returns</h6>
                              <p class="return"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a0eed720f8a87cd1c5fd1c453bc7a03d" shape="rect">CUDA_SUCCESS</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9acf52f132faf29b473cdda6061f0f44a" shape="rect">CUDA_ERROR_DEINITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e98feb999f0af99b4a25ab26b3866f4df8" shape="rect">CUDA_ERROR_NOT_INITIALIZED</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e9a484e9af32c1e9893ff21f0e0191a12d" shape="rect">CUDA_ERROR_INVALID_CONTEXT</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e990696c86fcee1f536a1ec7d25867feeb" shape="rect">CUDA_ERROR_INVALID_VALUE</a>, <a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc6c391505e117393cc2558fff6bfc2e96f047e7215788ca96c81af92a04bfb6c" shape="rect">CUDA_ERROR_INVALID_DEVICE</a></p>
                           </div>
                           <div class="section">
                              <h6 class="description_header">Description</h6>
                              <p>The supported attributes are:</p>
                              <p class="p">
                                 <ul class="ul">
                                    <li class="li">
                                       <p class="p"><a class="xref" href="group__CUDA__TYPES.html#group__CUDA__TYPES_1ggc2cce590e35080745e72633dfc6e0b60db5380c3201afdae3556cce8834504e1" shape="rect">CU_POINTER_ATTRIBUTE_SYNC_MEMOPS</a>:
                                       </p>
                                    </li>
                                 </ul>
                              </p>
                              <p class="p">A boolean attribute that can either be set (1) or unset (0). When set, the region of memory that <tt class="ph tt code">ptr</tt> points to is guaranteed to always synchronize memory operations that are synchronous. If there are some previously initiated
                                 synchronous memory operations that are pending when this attribute is set, the function does not return until those memory
                                 operations are complete. See further documentation in the section titled "API synchronization behavior" to learn more about
                                 cases when synchronous memory operations can exhibit asynchronous behavior. <tt class="ph tt code">value</tt> will be considered as a pointer to an unsigned integer to which this attribute is to be set.
                              </p>
                              <p class="p"></p>
                              <p class="p"></p>
                              <p class="p">
                                 <div class="note note"><span class="notetitle">Note:</span><p class="p">Note that this function may also return error codes from previous, asynchronous launches.</p>
                                 </div>
                              </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__CUDA__UNIFIED.html#group__CUDA__UNIFIED_1g0c28ed0aff848042bc0533110e45820c" title="Returns information about a pointer." shape="rect">cuPointerGetAttribute</a>, <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1gb82d2a09844a58dd9e744dc31e8aa467" title="Allocates device memory." shape="rect">cuMemAlloc</a>, <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1g89b3f154e17cc89b6eea277dbdf5c93a" title="Frees device memory." shape="rect">cuMemFree</a>, <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1gdd8311286d2c2691605362c689bc64e0" title="Allocates page-locked host memory." shape="rect">cuMemAllocHost</a>, <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1g62e0fdbe181dab6b1c90fa1a51c7b92c" title="Frees page-locked host memory." shape="rect">cuMemFreeHost</a>, <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1g572ca4011bfcb25034888a14d4e035b9" title="Allocates page-locked host memory." shape="rect">cuMemHostAlloc</a>, <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1gf0a9fe11544326dabd743b7aa6b54223" title="Registers an existing host memory range for use by CUDA." shape="rect">cuMemHostRegister</a>, <a class="xref" href="group__CUDA__MEM.html#group__CUDA__MEM_1g63f450c8125359be87b7623b1c0b2a14" title="Unregisters a memory range that was registered with cuMemHostRegister." shape="rect">cuMemHostUnregister</a></p>
                              <p class="p"></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>