Sophie

Sophie

distrib > Mageia > 2 > i586 > media > nonfree-release > by-pkgid > f86555c654b1f4a4c7ccf47789979868 > files > 1728

nvidia-cuda-toolkit-devel-4.2.9-2.mga2.nonfree.i586.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>NVIDIA CUDA Library: cuTexRefSetAddress</title>
<link href="customdoxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.8 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
    </ul>
  </div>
</div>
<div class="contents">
  <div class="navpath"><a class="el" href="group__CUDA__TEXREF.html">Texture Reference Management</a>
  </div>
<table cellspacing="0" cellpadding="0" border="0">
  <tr>
   <td valign="top">
      <div class="navtab">
        <table>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__TEXREF_g4e4674ce0b20a8951b65dead94a338e1.html#g4e4674ce0b20a8951b65dead94a338e1">cuTexRefGetAddress</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__TEXREF_gfb367d93dc1d20aab0cf8ce70d543b33.html#gfb367d93dc1d20aab0cf8ce70d543b33">cuTexRefGetAddressMode</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__TEXREF_g388250d826d74c075b51d0c1648aa6d1.html#g388250d826d74c075b51d0c1648aa6d1">cuTexRefGetArray</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__TEXREF_g2439e069746f69b940f2f4dbc78cdf87.html#g2439e069746f69b940f2f4dbc78cdf87">cuTexRefGetFilterMode</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__TEXREF_g71310eec5c196aa85674b079dea88a04.html#g71310eec5c196aa85674b079dea88a04">cuTexRefGetFlags</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__TEXREF_g90936eb6c7c4434a609e1160c278ae53.html#g90936eb6c7c4434a609e1160c278ae53">cuTexRefGetFormat</a></td></tr>
          <tr><td class="navtab"><a class="qindexHL" href="group__CUDA__TEXREF_g44ef7e5055192d52b3d43456602b50a8.html#g44ef7e5055192d52b3d43456602b50a8">cuTexRefSetAddress</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__TEXREF_g26f709bbe10516681913d1ffe8756ee2.html#g26f709bbe10516681913d1ffe8756ee2">cuTexRefSetAddress2D</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__TEXREF_g85f4a13eeb94c8072f61091489349bcb.html#g85f4a13eeb94c8072f61091489349bcb">cuTexRefSetAddressMode</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__TEXREF_g34435b306682531716243239f0084fed.html#g34435b306682531716243239f0084fed">cuTexRefSetArray</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__TEXREF_g595d0af02c55576f8c835e4efd1f39c0.html#g595d0af02c55576f8c835e4efd1f39c0">cuTexRefSetFilterMode</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__TEXREF_g554ffd896487533c36810f2e45bb7a28.html#g554ffd896487533c36810f2e45bb7a28">cuTexRefSetFlags</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__TEXREF_g05585ef8ea2fec728a03c6c8f87cf07a.html#g05585ef8ea2fec728a03c6c8f87cf07a">cuTexRefSetFormat</a></td></tr>
        </table>
      </div>
   </td>
   <td valign="top">
<a class="anchor" name="g44ef7e5055192d52b3d43456602b50a8"></a><!-- doxytag: member="cuda.h::cuTexRefSetAddress" ref="g44ef7e5055192d52b3d43456602b50a8" args="(size_t *ByteOffset, CUtexref hTexRef, CUdeviceptr dptr, size_t bytes)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="group__CUDA__TYPES_g09da14df1a751dcbfeccb9cf0073d64c.html#g09da14df1a751dcbfeccb9cf0073d64c">CUresult</a> cuTexRefSetAddress           </td>
          <td>(</td>
          <td class="paramtype">size_t *&nbsp;</td>
          <td class="paramname"> <em>ByteOffset</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CUDA__TYPES_gec1e8eb9dc48ad748765d1fcc020d6b5.html#gec1e8eb9dc48ad748765d1fcc020d6b5">CUtexref</a>&nbsp;</td>
          <td class="paramname"> <em>hTexRef</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="group__CUDA__TYPES_g5e264ce2ad6a38761e7e04921ef771de.html#g5e264ce2ad6a38761e7e04921ef771de">CUdeviceptr</a>&nbsp;</td>
          <td class="paramname"> <em>dptr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>bytes</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Binds a linear address range to the texture reference <code>hTexRef</code>. Any previous address or CUDA array state associated with the texture reference is superseded by this function. Any memory previously bound to <code>hTexRef</code> is unbound.<p>
Since the hardware enforces an alignment requirement on texture base addresses, <a class="el" href="group__CUDA__TEXREF_g44ef7e5055192d52b3d43456602b50a8.html#g44ef7e5055192d52b3d43456602b50a8" title="Binds an address as a texture reference.">cuTexRefSetAddress()</a> passes back a byte offset in <code>*ByteOffset</code> that must be applied to texture fetches in order to read from the desired memory. This offset must be divided by the texel size and passed to kernels that read from the texture so they can be applied to the tex1Dfetch() function.<p>
If the device memory pointer was returned from <a class="el" href="group__CUDA__MEM_gb82d2a09844a58dd9e744dc31e8aa467.html#gb82d2a09844a58dd9e744dc31e8aa467" title="Allocates device memory.">cuMemAlloc()</a>, the offset is guaranteed to be 0 and NULL may be passed as the <code>ByteOffset</code> parameter.<p>
The total number of elements (or texels) in the linear address range cannot exceed <a class="el" href="group__CUDA__TYPES_g3b9f561d2a42733dde99b2cedcaa413a.html#gg3b9f561d2a42733dde99b2cedcaa413a335584a4bc5128e2a5ae9a4417f5b758">CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_LINEAR_WIDTH</a>. The number of elements is computed as (<code>bytes</code> / bytesPerElement), where bytesPerElement is determined from the data format and number of components set using <a class="el" href="group__CUDA__TEXREF_g05585ef8ea2fec728a03c6c8f87cf07a.html#g05585ef8ea2fec728a03c6c8f87cf07a" title="Sets the format for a texture reference.">cuTexRefSetFormat()</a>.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>ByteOffset</em>&nbsp;</td><td>- Returned byte offset </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>hTexRef</em>&nbsp;</td><td>- Texture reference to bind </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dptr</em>&nbsp;</td><td>- Device pointer to bind </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>bytes</em>&nbsp;</td><td>- Size of memory to bind in bytes</td></tr>
  </table>
</dl>
<dl class="return" compact><dt><b>Returns:</b></dt><dd><a class="el" href="group__CUDA__TYPES_g0cdead942fd5028d157641eef6bdeeaa.html#gg0cdead942fd5028d157641eef6bdeeaaa0eed720f8a87cd1c5fd1c453bc7a03d">CUDA_SUCCESS</a>, <a class="el" href="group__CUDA__TYPES_g0cdead942fd5028d157641eef6bdeeaa.html#gg0cdead942fd5028d157641eef6bdeeaaacf52f132faf29b473cdda6061f0f44a">CUDA_ERROR_DEINITIALIZED</a>, <a class="el" href="group__CUDA__TYPES_g0cdead942fd5028d157641eef6bdeeaa.html#gg0cdead942fd5028d157641eef6bdeeaa8feb999f0af99b4a25ab26b3866f4df8">CUDA_ERROR_NOT_INITIALIZED</a>, <a class="el" href="group__CUDA__TYPES_g0cdead942fd5028d157641eef6bdeeaa.html#gg0cdead942fd5028d157641eef6bdeeaaa484e9af32c1e9893ff21f0e0191a12d">CUDA_ERROR_INVALID_CONTEXT</a>, <a class="el" href="group__CUDA__TYPES_g0cdead942fd5028d157641eef6bdeeaa.html#gg0cdead942fd5028d157641eef6bdeeaa90696c86fcee1f536a1ec7d25867feeb">CUDA_ERROR_INVALID_VALUE</a></dd></dl>
<dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__CUDA__TEXREF_g26f709bbe10516681913d1ffe8756ee2.html#g26f709bbe10516681913d1ffe8756ee2" title="Binds an address as a 2D texture reference.">cuTexRefSetAddress2D</a>, <a class="el" href="group__CUDA__TEXREF_g85f4a13eeb94c8072f61091489349bcb.html#g85f4a13eeb94c8072f61091489349bcb" title="Sets the addressing mode for a texture reference.">cuTexRefSetAddressMode</a>, <a class="el" href="group__CUDA__TEXREF_g34435b306682531716243239f0084fed.html#g34435b306682531716243239f0084fed" title="Binds an array as a texture reference.">cuTexRefSetArray</a>, <a class="el" href="group__CUDA__TEXREF_g595d0af02c55576f8c835e4efd1f39c0.html#g595d0af02c55576f8c835e4efd1f39c0" title="Sets the filtering mode for a texture reference.">cuTexRefSetFilterMode</a>, <a class="el" href="group__CUDA__TEXREF_g554ffd896487533c36810f2e45bb7a28.html#g554ffd896487533c36810f2e45bb7a28" title="Sets the flags for a texture reference.">cuTexRefSetFlags</a>, <a class="el" href="group__CUDA__TEXREF_g05585ef8ea2fec728a03c6c8f87cf07a.html#g05585ef8ea2fec728a03c6c8f87cf07a" title="Sets the format for a texture reference.">cuTexRefSetFormat</a>, <a class="el" href="group__CUDA__TEXREF_g4e4674ce0b20a8951b65dead94a338e1.html#g4e4674ce0b20a8951b65dead94a338e1" title="Gets the address associated with a texture reference.">cuTexRefGetAddress</a>, <a class="el" href="group__CUDA__TEXREF_gfb367d93dc1d20aab0cf8ce70d543b33.html#gfb367d93dc1d20aab0cf8ce70d543b33" title="Gets the addressing mode used by a texture reference.">cuTexRefGetAddressMode</a>, <a class="el" href="group__CUDA__TEXREF_g388250d826d74c075b51d0c1648aa6d1.html#g388250d826d74c075b51d0c1648aa6d1" title="Gets the array bound to a texture reference.">cuTexRefGetArray</a>, <a class="el" href="group__CUDA__TEXREF_g2439e069746f69b940f2f4dbc78cdf87.html#g2439e069746f69b940f2f4dbc78cdf87" title="Gets the filter-mode used by a texture reference.">cuTexRefGetFilterMode</a>, <a class="el" href="group__CUDA__TEXREF_g71310eec5c196aa85674b079dea88a04.html#g71310eec5c196aa85674b079dea88a04" title="Gets the flags used by a texture reference.">cuTexRefGetFlags</a>, <a class="el" href="group__CUDA__TEXREF_g90936eb6c7c4434a609e1160c278ae53.html#g90936eb6c7c4434a609e1160c278ae53" title="Gets the format used by a texture reference.">cuTexRefGetFormat</a> </dd></dl>

</div>
</div><p>
    </td>
  </tr>
</table>
</div>
<hr size="1"><address style="text-align: right;"><small>
Generated by Doxygen for NVIDIA CUDA Library &nbsp;<a
href="http://www.nvidia.com/cuda"><img src="nvidia_logo.jpg" alt="NVIDIA" align="middle" border="0" height="80"></a></small></address>
</body>
</html>