<!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: cudaBindTextureToArray</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 Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> </ul> </div> </div> <div class="contents"> <div class="navpath"><a class="el" href="group__CUDART__TEXTURE.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__CUDART__TEXTURE_g3ea5f64f8e1255f2adfa393e0b4a7622.html#g3ea5f64f8e1255f2adfa393e0b4a7622">cudaBindTexture</a></td></tr> <tr><td class="navtab"><a class="qindex" href="group__CUDART__TEXTURE_gdc3ad1bb212e76043659f7e57a5ffba6.html#gdc3ad1bb212e76043659f7e57a5ffba6">cudaBindTexture2D</a></td></tr> <tr><td class="navtab"><a class="qindexHL" href="group__CUDART__TEXTURE_g9de7148e386948c05458d3670f7386cf.html#g9de7148e386948c05458d3670f7386cf">cudaBindTextureToArray</a></td></tr> <tr><td class="navtab"><a class="qindex" href="group__CUDART__TEXTURE_g0ea6897bcf8184a501659dfefc58b563.html#g0ea6897bcf8184a501659dfefc58b563">cudaCreateChannelDesc</a></td></tr> <tr><td class="navtab"><a class="qindex" href="group__CUDART__TEXTURE_g85b045ff1ea082ed580e2a578a689df3.html#g85b045ff1ea082ed580e2a578a689df3">cudaGetChannelDesc</a></td></tr> <tr><td class="navtab"><a class="qindex" href="group__CUDART__TEXTURE_g6076c6bf0b1f2e52a36cd51af9d78fb4.html#g6076c6bf0b1f2e52a36cd51af9d78fb4">cudaGetTextureAlignmentOffset</a></td></tr> <tr><td class="navtab"><a class="qindex" href="group__CUDART__TEXTURE_gfa1b9c9e178a98d64bb648443cc4004a.html#gfa1b9c9e178a98d64bb648443cc4004a">cudaUnbindTexture</a></td></tr> </table> </div> </td> <td valign="top"> <a class="anchor" name="g9de7148e386948c05458d3670f7386cf"></a><!-- doxytag: member="cuda_runtime_api.h::cudaBindTextureToArray" ref="g9de7148e386948c05458d3670f7386cf" args="(const struct textureReference *texref, const struct cudaArray *array, const struct cudaChannelFormatDesc *desc)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="group__CUDART__TYPES_gf599e5b8b829ce7db0f5216928f6ecb6.html#gf599e5b8b829ce7db0f5216928f6ecb6">cudaError_t</a> cudaBindTextureToArray </td> <td>(</td> <td class="paramtype">const struct <a class="el" href="structtextureReference.html">textureReference</a> * </td> <td class="paramname"> <em>texref</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const struct cudaArray * </td> <td class="paramname"> <em>array</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const struct <a class="el" href="structcudaChannelFormatDesc.html">cudaChannelFormatDesc</a> * </td> <td class="paramname"> <em>desc</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Binds the CUDA array <code>array</code> to the texture reference <code>texref</code>. <code>desc</code> describes how the memory is interpreted when fetching values from the texture. Any CUDA array previously bound to <code>texref</code> is unbound.<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>texref</em> </td><td>- Texture to bind </td></tr> <tr><td valign="top"></td><td valign="top"><em>array</em> </td><td>- Memory array on device </td></tr> <tr><td valign="top"></td><td valign="top"><em>desc</em> </td><td>- Channel format</td></tr> </table> </dl> <dl class="return" compact><dt><b>Returns:</b></dt><dd><a class="el" href="group__CUDART__TYPES_g3f51e3575c2178246db0a94a430e0038.html#gg3f51e3575c2178246db0a94a430e0038e355f04607d824883b4a50662830d591">cudaSuccess</a>, <a class="el" href="group__CUDART__TYPES_g3f51e3575c2178246db0a94a430e0038.html#gg3f51e3575c2178246db0a94a430e00383e8aef5398ee38e28ed41e357b48917c">cudaErrorInvalidValue</a>, <a class="el" href="group__CUDART__TYPES_g3f51e3575c2178246db0a94a430e0038.html#gg3f51e3575c2178246db0a94a430e00385fa2f00ab72ab5cf649a0a32351a20bf">cudaErrorInvalidDevicePointer</a>, <a class="el" href="group__CUDART__TYPES_g3f51e3575c2178246db0a94a430e0038.html#gg3f51e3575c2178246db0a94a430e0038e4312b7621ebad05ce494249474a7e11">cudaErrorInvalidTexture</a> </dd></dl> <dl class="note" compact><dt><b>Note:</b></dt><dd>Note that this function may also return error codes from previous, asynchronous launches.</dd></dl> <dl class="see" compact><dt><b>See also:</b></dt><dd><a class="el" href="group__CUDART__TEXTURE_g0ea6897bcf8184a501659dfefc58b563.html#g0ea6897bcf8184a501659dfefc58b563">cudaCreateChannelDesc (C API)</a>, <a class="el" href="group__CUDART__TEXTURE_g85b045ff1ea082ed580e2a578a689df3.html#g85b045ff1ea082ed580e2a578a689df3" title="Get the channel descriptor of an array.">cudaGetChannelDesc</a>, <a class="el" href="group__CUDART__TEXTURE__DEPRECATED_gc86c8aca553c7d6dcd8c57e5b93882a8.html#gc86c8aca553c7d6dcd8c57e5b93882a8" title="Get the texture reference associated with a symbol.">cudaGetTextureReference</a>, <a class="el" href="group__CUDART__TEXTURE_g3ea5f64f8e1255f2adfa393e0b4a7622.html#g3ea5f64f8e1255f2adfa393e0b4a7622">cudaBindTexture (C API)</a>, <a class="el" href="group__CUDART__TEXTURE_gdc3ad1bb212e76043659f7e57a5ffba6.html#gdc3ad1bb212e76043659f7e57a5ffba6">cudaBindTexture2D (C API)</a>, <a class="el" href="group__CUDART__HIGHLEVEL_gbd400c5d860e2a9d4cee3be528a98fc9.html#gbd400c5d860e2a9d4cee3be528a98fc9">cudaBindTextureToArray (C++ API)</a>, <a class="el" href="group__CUDART__TEXTURE_gfa1b9c9e178a98d64bb648443cc4004a.html#gfa1b9c9e178a98d64bb648443cc4004a">cudaUnbindTexture (C API)</a>, <a class="el" href="group__CUDART__TEXTURE_g6076c6bf0b1f2e52a36cd51af9d78fb4.html#g6076c6bf0b1f2e52a36cd51af9d78fb4">cudaGetTextureAlignmentOffset (C API)</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 <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>