Sophie

Sophie

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

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: cuArray3DCreate</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__MEM.html">Memory Management</a>
  </div>
<table cellspacing="0" cellpadding="0" border="0">
  <tr>
   <td valign="top">
      <div class="navtab">
        <table>
          <tr><td class="navtab"><a class="qindexHL" href="group__CUDA__MEM_gc2322c70b38c2984536c90ed118bb1d7.html#gc2322c70b38c2984536c90ed118bb1d7">cuArray3DCreate</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_gb58549f2f3f390b9e0e7c8f3acd53857.html#gb58549f2f3f390b9e0e7c8f3acd53857">cuArray3DGetDescriptor</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g4192ff387a81c3bd5ed8c391ed62ca24.html#g4192ff387a81c3bd5ed8c391ed62ca24">cuArrayCreate</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g982878affbbc023de84874faac838b0b.html#g982878affbbc023de84874faac838b0b">cuArrayDestroy</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g661fe823dbd37bf11f82a71bd4762acf.html#g661fe823dbd37bf11f82a71bd4762acf">cuArrayGetDescriptor</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g7e0bf2261bb1f21743818d3a287ce9cb.html#g7e0bf2261bb1f21743818d3a287ce9cb">cuDeviceGetByPCIBusId</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g85295e7d9745ab8f0aa80dd1e172acfc.html#g85295e7d9745ab8f0aa80dd1e172acfc">cuDeviceGetPCIBusId</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_gd6f5d5bcf6376c6853b64635b0157b9e.html#gd6f5d5bcf6376c6853b64635b0157b9e">cuIpcCloseMemHandle</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_gea02eadd12483de5305878b13288a86c.html#gea02eadd12483de5305878b13288a86c">cuIpcGetEventHandle</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g6f1b5be767b275f016523b2ac49ebec1.html#g6f1b5be767b275f016523b2ac49ebec1">cuIpcGetMemHandle</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_gf1d525918b6c643b99ca8c8e42e36c2e.html#gf1d525918b6c643b99ca8c8e42e36c2e">cuIpcOpenEventHandle</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_ga8bd126fcff919a0c996b7640f197b79.html#ga8bd126fcff919a0c996b7640f197b79">cuIpcOpenMemHandle</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_gb82d2a09844a58dd9e744dc31e8aa467.html#gb82d2a09844a58dd9e744dc31e8aa467">cuMemAlloc</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_gdd8311286d2c2691605362c689bc64e0.html#gdd8311286d2c2691605362c689bc64e0">cuMemAllocHost</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_gcbe9b033f6c4de80f63cc6e58ed9a45a.html#gcbe9b033f6c4de80f63cc6e58ed9a45a">cuMemAllocPitch</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g8d0ff510f26d4b87bd3a51e731e7f698.html#g8d0ff510f26d4b87bd3a51e731e7f698">cuMemcpy</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g27f885b30c34cc20a663a671dbf6fc27.html#g27f885b30c34cc20a663a671dbf6fc27">cuMemcpy2D</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g4acf155faeb969d9d21f5433d3d0f274.html#g4acf155faeb969d9d21f5433d3d0f274">cuMemcpy2DAsync</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g2fa285d47fd7020e596bfeab3deb651b.html#g2fa285d47fd7020e596bfeab3deb651b">cuMemcpy2DUnaligned</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g4b5238975579f002c0199a3800ca44df.html#g4b5238975579f002c0199a3800ca44df">cuMemcpy3D</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g79f4f3fde6ae0f529568d881d9e11987.html#g79f4f3fde6ae0f529568d881d9e11987">cuMemcpy3DAsync</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g11466fd70cde9329a4e16eb1f258c433.html#g11466fd70cde9329a4e16eb1f258c433">cuMemcpy3DPeer</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_gc4e4bfd9f627d3aa3695979e058f1bb8.html#gc4e4bfd9f627d3aa3695979e058f1bb8">cuMemcpy3DPeerAsync</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g5f26aaf5582ade791e5688727a178d78.html#g5f26aaf5582ade791e5688727a178d78">cuMemcpyAsync</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_gf81b218c984a31436ec9e23a85fb604a.html#gf81b218c984a31436ec9e23a85fb604a">cuMemcpyAtoA</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g825b3f037f7f51382cae991bae8173fd.html#g825b3f037f7f51382cae991bae8173fd">cuMemcpyAtoD</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_gf7ad1edb2539cccc352c6b8b76f657f4.html#gf7ad1edb2539cccc352c6b8b76f657f4">cuMemcpyAtoH</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g64cbd2e60436699aebdd0bdbf14d0f01.html#g64cbd2e60436699aebdd0bdbf14d0f01">cuMemcpyAtoHAsync</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_gad6827247af91600b56ce6e2ddb802e1.html#gad6827247af91600b56ce6e2ddb802e1">cuMemcpyDtoA</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g1725774abf8b51b91945f3336b778c8b.html#g1725774abf8b51b91945f3336b778c8b">cuMemcpyDtoD</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g39ea09ba682b8eccc9c3e0c04319b5c8.html#g39ea09ba682b8eccc9c3e0c04319b5c8">cuMemcpyDtoDAsync</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g3480368ee0208a98f75019c9a8450893.html#g3480368ee0208a98f75019c9a8450893">cuMemcpyDtoH</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g56f30236c7c5247f8e061b59d3268362.html#g56f30236c7c5247f8e061b59d3268362">cuMemcpyDtoHAsync</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g57d3d780d165ecc0e3b3ce08e141cd89.html#g57d3d780d165ecc0e3b3ce08e141cd89">cuMemcpyHtoA</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_gb5c4863f64f132b4bc2661818b3fd188.html#gb5c4863f64f132b4bc2661818b3fd188">cuMemcpyHtoAAsync</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g4d32266788c440b0220b1a9ba5795169.html#g4d32266788c440b0220b1a9ba5795169">cuMemcpyHtoD</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g1572263fe2597d7ba4f6964597a354a3.html#g1572263fe2597d7ba4f6964597a354a3">cuMemcpyHtoDAsync</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_ge1f5c7771544fee150ada8853c7cbf4a.html#ge1f5c7771544fee150ada8853c7cbf4a">cuMemcpyPeer</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g82fcecb38018e64b98616a8ac30112f2.html#g82fcecb38018e64b98616a8ac30112f2">cuMemcpyPeerAsync</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g89b3f154e17cc89b6eea277dbdf5c93a.html#g89b3f154e17cc89b6eea277dbdf5c93a">cuMemFree</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g62e0fdbe181dab6b1c90fa1a51c7b92c.html#g62e0fdbe181dab6b1c90fa1a51c7b92c">cuMemFreeHost</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g64fee5711274a2a0573a789c94d8299b.html#g64fee5711274a2a0573a789c94d8299b">cuMemGetAddressRange</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g808f555540d0143a331cc42aa98835c0.html#g808f555540d0143a331cc42aa98835c0">cuMemGetInfo</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g572ca4011bfcb25034888a14d4e035b9.html#g572ca4011bfcb25034888a14d4e035b9">cuMemHostAlloc</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g57a39e5cba26af4d06be67fc77cc62f0.html#g57a39e5cba26af4d06be67fc77cc62f0">cuMemHostGetDevicePointer</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g42066246915fcb0400df2a17a851b35f.html#g42066246915fcb0400df2a17a851b35f">cuMemHostGetFlags</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_gf0a9fe11544326dabd743b7aa6b54223.html#gf0a9fe11544326dabd743b7aa6b54223">cuMemHostRegister</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g63f450c8125359be87b7623b1c0b2a14.html#g63f450c8125359be87b7623b1c0b2a14">cuMemHostUnregister</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g7d805e610054392a4d11e8a8bf5eb35c.html#g7d805e610054392a4d11e8a8bf5eb35c">cuMemsetD16</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_gf731438877dd8ec875e4c43d848c878c.html#gf731438877dd8ec875e4c43d848c878c">cuMemsetD16Async</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g7f561a15a66144fa9f6ab5350edc8a30.html#g7f561a15a66144fa9f6ab5350edc8a30">cuMemsetD2D16</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g64ee197befac3d74d9fefedcf6ef6b10.html#g64ee197befac3d74d9fefedcf6ef6b10">cuMemsetD2D16Async</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g74b359b2d026bfeb7c795b5038d07523.html#g74b359b2d026bfeb7c795b5038d07523">cuMemsetD2D32</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g8a78d3147ac93fac955052c815d9ea3c.html#g8a78d3147ac93fac955052c815d9ea3c">cuMemsetD2D32Async</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_ge88b13e646e2be6ba0e0475ef5205974.html#ge88b13e646e2be6ba0e0475ef5205974">cuMemsetD2D8</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g3f7b6924a3e49c3265b328f534102e97.html#g3f7b6924a3e49c3265b328f534102e97">cuMemsetD2D8Async</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g983e8d8759acd1b64326317481fbf132.html#g983e8d8759acd1b64326317481fbf132">cuMemsetD32</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g58229da5d30f1c0cdf667b320ec2c0f5.html#g58229da5d30f1c0cdf667b320ec2c0f5">cuMemsetD32Async</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_g6e582bf866e9e2fb014297bfaf354d7b.html#g6e582bf866e9e2fb014297bfaf354d7b">cuMemsetD8</a></td></tr>
          <tr><td class="navtab"><a class="qindex" href="group__CUDA__MEM_gaef08a7ccd61112f94e82f2b30d43627.html#gaef08a7ccd61112f94e82f2b30d43627">cuMemsetD8Async</a></td></tr>
        </table>
      </div>
   </td>
   <td valign="top">
<a class="anchor" name="gc2322c70b38c2984536c90ed118bb1d7"></a><!-- doxytag: member="cuda.h::cuArray3DCreate" ref="gc2322c70b38c2984536c90ed118bb1d7" args="(CUarray *pHandle, const CUDA_ARRAY3D_DESCRIPTOR *pAllocateArray)" -->
<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> cuArray3DCreate           </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="group__CUDA__TYPES_gd550651524a56766b60f10f0e7628042.html#gd550651524a56766b60f10f0e7628042">CUarray</a> *&nbsp;</td>
          <td class="paramname"> <em>pHandle</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const <a class="el" href="structCUDA__ARRAY3D__DESCRIPTOR__st.html">CUDA_ARRAY3D_DESCRIPTOR</a> *&nbsp;</td>
          <td class="paramname"> <em>pAllocateArray</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
Creates a CUDA array according to the <a class="el" href="group__CUDA__TYPES_g27ab49144463200473ebe2c0577e5e71.html#g27ab49144463200473ebe2c0577e5e71">CUDA_ARRAY3D_DESCRIPTOR</a> structure <code>pAllocateArray</code> and returns a handle to the new CUDA array in <code>*pHandle</code>. The <a class="el" href="group__CUDA__TYPES_g27ab49144463200473ebe2c0577e5e71.html#g27ab49144463200473ebe2c0577e5e71">CUDA_ARRAY3D_DESCRIPTOR</a> is defined as:<p>
<div class="fragment"><pre class="fragment">    <span class="keyword">typedef</span> <span class="keyword">struct </span>{
        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> Width;
        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> Height;
        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> Depth;
        <a class="code" href="group__CUDA__TYPES_g380890341a1f65e8e6db2601ef89935c.html#g380890341a1f65e8e6db2601ef89935c">CUarray_format</a> Format;
        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> NumChannels;
        <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> Flags;
    } <a class="code" href="structCUDA__ARRAY3D__DESCRIPTOR__st.html">CUDA_ARRAY3D_DESCRIPTOR</a>;
</pre></div> where:<p>
<ul>
<li><code>Width</code>, <code>Height</code>, and <code>Depth</code> are the width, height, and depth of the CUDA array (in elements); the following types of CUDA arrays can be allocated:<ul>
<li>A 1D array is allocated if <code>Height</code> and <code>Depth</code> extents are both zero.</li><li>A 2D array is allocated if only <code>Depth</code> extent is zero.</li><li>A 3D array is allocated if all three extents are non-zero.</li><li>A 1D layered CUDA array is allocated if only <code>Height</code> is zero and the <a class="el" href="group__CUDA__TYPES_ge4adf555c51852623a3dea962ab8ee85.html#ge4adf555c51852623a3dea962ab8ee85">CUDA_ARRAY3D_LAYERED</a> flag is set. Each layer is a 1D array. The number of layers is determined by the depth extent.</li><li>A 2D layered CUDA array is allocated if all three extents are non-zero and the <a class="el" href="group__CUDA__TYPES_ge4adf555c51852623a3dea962ab8ee85.html#ge4adf555c51852623a3dea962ab8ee85">CUDA_ARRAY3D_LAYERED</a> flag is set. Each layer is a 2D array. The number of layers is determined by the depth extent.</li><li>A cubemap CUDA array is allocated if all three extents are non-zero and the <a class="el" href="group__CUDA__TYPES_gfce9ad9aa3df839571b84b47febfb7ae.html#gfce9ad9aa3df839571b84b47febfb7ae">CUDA_ARRAY3D_CUBEMAP</a> flag is set. <code>Width</code> must be equal to <code>Height</code>, and <code>Depth</code> must be six. A cubemap is a special type of 2D layered CUDA array, where the six layers represent the six faces of a cube. The order of the six layers in memory is the same as that listed in <a class="el" href="group__CUDA__TYPES_g01d6f41e67bd2a7fd89e6e0cdde2c082.html#g01d6f41e67bd2a7fd89e6e0cdde2c082">CUarray_cubemap_face</a>.</li><li>A cubemap layered CUDA array is allocated if all three extents are non-zero, and both, <a class="el" href="group__CUDA__TYPES_gfce9ad9aa3df839571b84b47febfb7ae.html#gfce9ad9aa3df839571b84b47febfb7ae">CUDA_ARRAY3D_CUBEMAP</a> and <a class="el" href="group__CUDA__TYPES_ge4adf555c51852623a3dea962ab8ee85.html#ge4adf555c51852623a3dea962ab8ee85">CUDA_ARRAY3D_LAYERED</a> flags are set. <code>Width</code> must be equal to <code>Height</code>, and <code>Depth</code> must be a multiple of six. A cubemap layered CUDA array is a special type of 2D layered CUDA array that consists of a collection of cubemaps. The first six layers represent the first cubemap, the next six layers form the second cubemap, and so on.</li></ul>
</li></ul>
<p>
<ul>
<li>Format specifies the format of the elements; <a class="el" href="group__CUDA__TYPES_g380890341a1f65e8e6db2601ef89935c.html#g380890341a1f65e8e6db2601ef89935c">CUarray_format</a> is defined as: <div class="fragment"><pre class="fragment">    <span class="keyword">typedef</span> <span class="keyword">enum</span> <a class="code" href="group__CUDA__TYPES_gaaeb9ae979fdf3c205114a6a3128a5c7.html#gaaeb9ae979fdf3c205114a6a3128a5c7">CUarray_format_enum</a> {
        <a class="code" href="group__CUDA__TYPES_gaaeb9ae979fdf3c205114a6a3128a5c7.html#ggaaeb9ae979fdf3c205114a6a3128a5c7e0af5f5a0ffa8e16a5c720364ccd5dac">CU_AD_FORMAT_UNSIGNED_INT8</a> = 0x01,
        <a class="code" href="group__CUDA__TYPES_gaaeb9ae979fdf3c205114a6a3128a5c7.html#ggaaeb9ae979fdf3c205114a6a3128a5c7d0f11e851e891af6f204cf05503ba525">CU_AD_FORMAT_UNSIGNED_INT16</a> = 0x02,
        <a class="code" href="group__CUDA__TYPES_gaaeb9ae979fdf3c205114a6a3128a5c7.html#ggaaeb9ae979fdf3c205114a6a3128a5c752b891ad5d4080db0fb2e23fe71614a0">CU_AD_FORMAT_UNSIGNED_INT32</a> = 0x03,
        <a class="code" href="group__CUDA__TYPES_gaaeb9ae979fdf3c205114a6a3128a5c7.html#ggaaeb9ae979fdf3c205114a6a3128a5c7376b799ee12ce9e1de0c34cfa7839284">CU_AD_FORMAT_SIGNED_INT8</a> = 0x08,
        <a class="code" href="group__CUDA__TYPES_gaaeb9ae979fdf3c205114a6a3128a5c7.html#ggaaeb9ae979fdf3c205114a6a3128a5c780864598b1579bd90fab79369072478f">CU_AD_FORMAT_SIGNED_INT16</a> = 0x09,
        <a class="code" href="group__CUDA__TYPES_gaaeb9ae979fdf3c205114a6a3128a5c7.html#ggaaeb9ae979fdf3c205114a6a3128a5c76db055c31d053bd1d5ebbaa98de2bad3">CU_AD_FORMAT_SIGNED_INT32</a> = 0x0a,
        <a class="code" href="group__CUDA__TYPES_gaaeb9ae979fdf3c205114a6a3128a5c7.html#ggaaeb9ae979fdf3c205114a6a3128a5c795c97289b540ff36334722ec745f53a3">CU_AD_FORMAT_HALF</a> = 0x10,
        <a class="code" href="group__CUDA__TYPES_gaaeb9ae979fdf3c205114a6a3128a5c7.html#ggaaeb9ae979fdf3c205114a6a3128a5c78140f3b0de3d87bdbf26964c24840f3c">CU_AD_FORMAT_FLOAT</a> = 0x20
    } <a class="code" href="group__CUDA__TYPES_g380890341a1f65e8e6db2601ef89935c.html#g380890341a1f65e8e6db2601ef89935c">CUarray_format</a>;
</pre></div></li></ul>
<p>
<ul>
<li><code>NumChannels</code> specifies the number of packed components per CUDA array element; it may be 1, 2, or 4;</li></ul>
<p>
<ul>
<li>Flags may be set to<ul>
<li><a class="el" href="group__CUDA__TYPES_ge4adf555c51852623a3dea962ab8ee85.html#ge4adf555c51852623a3dea962ab8ee85">CUDA_ARRAY3D_LAYERED</a> to enable creation of layered CUDA arrays. If this flag is set, <code>Depth</code> specifies the number of layers, not the depth of a 3D array.</li><li><a class="el" href="group__CUDA__TYPES_g7287c43cacf1ed05865d6bcad1a23cd9.html#g7287c43cacf1ed05865d6bcad1a23cd9">CUDA_ARRAY3D_SURFACE_LDST</a> to enable surface references to be bound to the CUDA array. If this flag is not set, <a class="el" href="group__CUDA__SURFREF_g19e4cf8fc0cdcd914e01ecf12fdc5faf.html#g19e4cf8fc0cdcd914e01ecf12fdc5faf" title="Sets the CUDA array for a surface reference.">cuSurfRefSetArray</a> will fail when attempting to bind the CUDA array to a surface reference.</li><li><a class="el" href="group__CUDA__TYPES_gfce9ad9aa3df839571b84b47febfb7ae.html#gfce9ad9aa3df839571b84b47febfb7ae">CUDA_ARRAY3D_CUBEMAP</a> to enable creation of cubemaps. If this flag is set, <code>Width</code> must be equal to <code>Height</code>, and <code>Depth</code> must be six. If the <a class="el" href="group__CUDA__TYPES_ge4adf555c51852623a3dea962ab8ee85.html#ge4adf555c51852623a3dea962ab8ee85">CUDA_ARRAY3D_LAYERED</a> flag is also set, then <code>Depth</code> must be a multiple of six.</li><li><a class="el" href="group__CUDA__TYPES_g0c929c92a91f4d9f9f49bae0131a6ccf.html#g0c929c92a91f4d9f9f49bae0131a6ccf">CUDA_ARRAY3D_TEXTURE_GATHER</a> to indicate that the CUDA array will be used for texture gather. Texture gather can only be performed on 2D CUDA arrays.</li></ul>
</li></ul>
<p>
<code>Width</code>, <code>Height</code> and <code>Depth</code> must meet certain size requirements as listed in the following table. All values are specified in elements. Note that for brevity's sake, the full name of the device attribute is not specified. For ex., TEXTURE1D_WIDTH refers to the device attribute <a class="el" href="group__CUDA__TYPES_g3b9f561d2a42733dde99b2cedcaa413a.html#gg3b9f561d2a42733dde99b2cedcaa413a1f7318312b520cd5bc19eb97659e8215">CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE1D_WIDTH</a>.<p>
Note that 2D CUDA arrays have different size requirements if the <a class="el" href="group__CUDA__TYPES_g0c929c92a91f4d9f9f49bae0131a6ccf.html#g0c929c92a91f4d9f9f49bae0131a6ccf">CUDA_ARRAY3D_TEXTURE_GATHER</a> flag is set. <code>Width</code> and <code>Height</code> must not be greater than <a class="el" href="group__CUDA__TYPES_g3b9f561d2a42733dde99b2cedcaa413a.html#gg3b9f561d2a42733dde99b2cedcaa413aa3d02a5e777b952280c1f8b4fac477ef">CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_WIDTH</a> and <a class="el" href="group__CUDA__TYPES_g3b9f561d2a42733dde99b2cedcaa413a.html#gg3b9f561d2a42733dde99b2cedcaa413a9ceeac801dbf34671de63cc7ca383935">CU_DEVICE_ATTRIBUTE_MAXIMUM_TEXTURE2D_GATHER_HEIGHT</a> respectively, in that case.<p>
<table border="1" cellspacing="3" cellpadding="3">
<tr>
<td><b>CUDA array type</b> </td><td><b>Valid extents that must always be met<br>
{(width range in elements), (height range), (depth range)}</b> </td><td><b>Valid extents with CUDA_ARRAY3D_SURFACE_LDST set<br>
 {(width range in elements), (height range), (depth range)}</b> </td></tr>
<tr>
<td>1D </td><td><small>{ (1,TEXTURE1D_WIDTH), 0, 0 }</small> </td><td><small>{ (1,SURFACE1D_WIDTH), 0, 0 }</small> </td></tr>
<tr>
<td>2D </td><td><small>{ (1,TEXTURE2D_WIDTH), (1,TEXTURE2D_HEIGHT), 0 }</small> </td><td><small>{ (1,SURFACE2D_WIDTH), (1,SURFACE2D_HEIGHT), 0 }</small> </td></tr>
<tr>
<td>3D </td><td><small>{ (1,TEXTURE3D_WIDTH), (1,TEXTURE3D_HEIGHT), (1,TEXTURE3D_DEPTH) } <br>
OR<br>
{ (1,TEXTURE3D_WIDTH_ALTERNATE), (1,TEXTURE3D_HEIGHT_ALTERNATE), (1,TEXTURE3D_DEPTH_ALTERNATE) }</small> </td><td><small>{ (1,SURFACE3D_WIDTH), (1,SURFACE3D_HEIGHT), (1,SURFACE3D_DEPTH) }</small> </td></tr>
<tr>
<td>1D Layered </td><td><small>{ (1,TEXTURE1D_LAYERED_WIDTH), 0, (1,TEXTURE1D_LAYERED_LAYERS) }</small> </td><td><small>{ (1,SURFACE1D_LAYERED_WIDTH), 0, (1,SURFACE1D_LAYERED_LAYERS) }</small> </td></tr>
<tr>
<td>2D Layered </td><td><small>{ (1,TEXTURE2D_LAYERED_WIDTH), (1,TEXTURE2D_LAYERED_HEIGHT), (1,TEXTURE2D_LAYERED_LAYERS) }</small> </td><td><small>{ (1,SURFACE2D_LAYERED_WIDTH), (1,SURFACE2D_LAYERED_HEIGHT), (1,SURFACE2D_LAYERED_LAYERS) }</small> </td></tr>
<tr>
<td>Cubemap </td><td><small>{ (1,TEXTURECUBEMAP_WIDTH), (1,TEXTURECUBEMAP_WIDTH), 6 }</small> </td><td><small>{ (1,SURFACECUBEMAP_WIDTH), (1,SURFACECUBEMAP_WIDTH), 6 }</small> </td></tr>
<tr>
<td>Cubemap Layered </td><td><small>{ (1,TEXTURECUBEMAP_LAYERED_WIDTH), (1,TEXTURECUBEMAP_LAYERED_WIDTH), (1,TEXTURECUBEMAP_LAYERED_LAYERS) }</small> </td><td><small>{ (1,SURFACECUBEMAP_LAYERED_WIDTH), (1,SURFACECUBEMAP_LAYERED_WIDTH), (1,SURFACECUBEMAP_LAYERED_LAYERS) }</small> </td></tr>
</table>
<p>
Here are examples of CUDA array descriptions:<p>
Description for a CUDA array of 2048 floats: <div class="fragment"><pre class="fragment">    <a class="code" href="structCUDA__ARRAY3D__DESCRIPTOR__st.html">CUDA_ARRAY3D_DESCRIPTOR</a> desc;
    desc.<a class="code" href="structCUDA__ARRAY3D__DESCRIPTOR__st_4edbba06d9449d1f507d8caf7068278b.html#4edbba06d9449d1f507d8caf7068278b">Format</a> = <a class="code" href="group__CUDA__TYPES_gaaeb9ae979fdf3c205114a6a3128a5c7.html#ggaaeb9ae979fdf3c205114a6a3128a5c78140f3b0de3d87bdbf26964c24840f3c">CU_AD_FORMAT_FLOAT</a>;
    desc.<a class="code" href="structCUDA__ARRAY3D__DESCRIPTOR__st_e32b43b6998a7527eb19a861b6c39057.html#e32b43b6998a7527eb19a861b6c39057">NumChannels</a> = 1;
    desc.<a class="code" href="structCUDA__ARRAY3D__DESCRIPTOR__st_536bbde6dce857e3594e197255aefdb7.html#536bbde6dce857e3594e197255aefdb7">Width</a> = 2048;
    desc.<a class="code" href="structCUDA__ARRAY3D__DESCRIPTOR__st_248b0ec8033863cb2f89caba9fbaca47.html#248b0ec8033863cb2f89caba9fbaca47">Height</a> = 0;
    desc.<a class="code" href="structCUDA__ARRAY3D__DESCRIPTOR__st_e619e5247969949d81e718596ec42209.html#e619e5247969949d81e718596ec42209">Depth</a> = 0;
</pre></div><p>
Description for a 64 x 64 CUDA array of floats: <div class="fragment"><pre class="fragment">    <a class="code" href="structCUDA__ARRAY3D__DESCRIPTOR__st.html">CUDA_ARRAY3D_DESCRIPTOR</a> desc;
    desc.<a class="code" href="structCUDA__ARRAY3D__DESCRIPTOR__st_4edbba06d9449d1f507d8caf7068278b.html#4edbba06d9449d1f507d8caf7068278b">Format</a> = <a class="code" href="group__CUDA__TYPES_gaaeb9ae979fdf3c205114a6a3128a5c7.html#ggaaeb9ae979fdf3c205114a6a3128a5c78140f3b0de3d87bdbf26964c24840f3c">CU_AD_FORMAT_FLOAT</a>;
    desc.<a class="code" href="structCUDA__ARRAY3D__DESCRIPTOR__st_e32b43b6998a7527eb19a861b6c39057.html#e32b43b6998a7527eb19a861b6c39057">NumChannels</a> = 1;
    desc.<a class="code" href="structCUDA__ARRAY3D__DESCRIPTOR__st_536bbde6dce857e3594e197255aefdb7.html#536bbde6dce857e3594e197255aefdb7">Width</a> = 64;
    desc.<a class="code" href="structCUDA__ARRAY3D__DESCRIPTOR__st_248b0ec8033863cb2f89caba9fbaca47.html#248b0ec8033863cb2f89caba9fbaca47">Height</a> = 64;
    desc.<a class="code" href="structCUDA__ARRAY3D__DESCRIPTOR__st_e619e5247969949d81e718596ec42209.html#e619e5247969949d81e718596ec42209">Depth</a> = 0;
</pre></div><p>
Description for a <code>width</code> x <code>height</code> x <code>depth</code> CUDA array of 64-bit, 4x16-bit float16's: <div class="fragment"><pre class="fragment">    <a class="code" href="structCUDA__ARRAY3D__DESCRIPTOR__st.html">CUDA_ARRAY3D_DESCRIPTOR</a> desc;
    desc.FormatFlags = <a class="code" href="group__CUDA__TYPES_gaaeb9ae979fdf3c205114a6a3128a5c7.html#ggaaeb9ae979fdf3c205114a6a3128a5c795c97289b540ff36334722ec745f53a3">CU_AD_FORMAT_HALF</a>;
    desc.<a class="code" href="structCUDA__ARRAY3D__DESCRIPTOR__st_e32b43b6998a7527eb19a861b6c39057.html#e32b43b6998a7527eb19a861b6c39057">NumChannels</a> = 4;
    desc.<a class="code" href="structCUDA__ARRAY3D__DESCRIPTOR__st_536bbde6dce857e3594e197255aefdb7.html#536bbde6dce857e3594e197255aefdb7">Width</a> = width;
    desc.<a class="code" href="structCUDA__ARRAY3D__DESCRIPTOR__st_248b0ec8033863cb2f89caba9fbaca47.html#248b0ec8033863cb2f89caba9fbaca47">Height</a> = height;
    desc.<a class="code" href="structCUDA__ARRAY3D__DESCRIPTOR__st_e619e5247969949d81e718596ec42209.html#e619e5247969949d81e718596ec42209">Depth</a> = depth;
</pre></div><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>pHandle</em>&nbsp;</td><td>- Returned array </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>pAllocateArray</em>&nbsp;</td><td>- 3D array descriptor</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>, <a class="el" href="group__CUDA__TYPES_g0cdead942fd5028d157641eef6bdeeaa.html#gg0cdead942fd5028d157641eef6bdeeaa264c50688ed110e8476b591befe60c02">CUDA_ERROR_OUT_OF_MEMORY</a>, <a class="el" href="group__CUDA__TYPES_g0cdead942fd5028d157641eef6bdeeaa.html#gg0cdead942fd5028d157641eef6bdeeaac5a6ab0245179d297f1fa56ed0097183">CUDA_ERROR_UNKNOWN</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__CUDA__MEM_gb58549f2f3f390b9e0e7c8f3acd53857.html#gb58549f2f3f390b9e0e7c8f3acd53857" title="Get a 3D CUDA array descriptor.">cuArray3DGetDescriptor</a>, <a class="el" href="group__CUDA__MEM_g4192ff387a81c3bd5ed8c391ed62ca24.html#g4192ff387a81c3bd5ed8c391ed62ca24" title="Creates a 1D or 2D CUDA array.">cuArrayCreate</a>, <a class="el" href="group__CUDA__MEM_g982878affbbc023de84874faac838b0b.html#g982878affbbc023de84874faac838b0b" title="Destroys a CUDA array.">cuArrayDestroy</a>, <a class="el" href="group__CUDA__MEM_g661fe823dbd37bf11f82a71bd4762acf.html#g661fe823dbd37bf11f82a71bd4762acf" title="Get a 1D or 2D CUDA array descriptor.">cuArrayGetDescriptor</a>, <a class="el" href="group__CUDA__MEM_gb82d2a09844a58dd9e744dc31e8aa467.html#gb82d2a09844a58dd9e744dc31e8aa467" title="Allocates device memory.">cuMemAlloc</a>, <a class="el" href="group__CUDA__MEM_gdd8311286d2c2691605362c689bc64e0.html#gdd8311286d2c2691605362c689bc64e0" title="Allocates page-locked host memory.">cuMemAllocHost</a>, <a class="el" href="group__CUDA__MEM_gcbe9b033f6c4de80f63cc6e58ed9a45a.html#gcbe9b033f6c4de80f63cc6e58ed9a45a" title="Allocates pitched device memory.">cuMemAllocPitch</a>, <a class="el" href="group__CUDA__MEM_g27f885b30c34cc20a663a671dbf6fc27.html#g27f885b30c34cc20a663a671dbf6fc27" title="Copies memory for 2D arrays.">cuMemcpy2D</a>, <a class="el" href="group__CUDA__MEM_g4acf155faeb969d9d21f5433d3d0f274.html#g4acf155faeb969d9d21f5433d3d0f274" title="Copies memory for 2D arrays.">cuMemcpy2DAsync</a>, <a class="el" href="group__CUDA__MEM_g2fa285d47fd7020e596bfeab3deb651b.html#g2fa285d47fd7020e596bfeab3deb651b" title="Copies memory for 2D arrays.">cuMemcpy2DUnaligned</a>, <a class="el" href="group__CUDA__MEM_g4b5238975579f002c0199a3800ca44df.html#g4b5238975579f002c0199a3800ca44df" title="Copies memory for 3D arrays.">cuMemcpy3D</a>, <a class="el" href="group__CUDA__MEM_g79f4f3fde6ae0f529568d881d9e11987.html#g79f4f3fde6ae0f529568d881d9e11987" title="Copies memory for 3D arrays.">cuMemcpy3DAsync</a>, <a class="el" href="group__CUDA__MEM_gf81b218c984a31436ec9e23a85fb604a.html#gf81b218c984a31436ec9e23a85fb604a" title="Copies memory from Array to Array.">cuMemcpyAtoA</a>, <a class="el" href="group__CUDA__MEM_g825b3f037f7f51382cae991bae8173fd.html#g825b3f037f7f51382cae991bae8173fd" title="Copies memory from Array to Device.">cuMemcpyAtoD</a>, <a class="el" href="group__CUDA__MEM_gf7ad1edb2539cccc352c6b8b76f657f4.html#gf7ad1edb2539cccc352c6b8b76f657f4" title="Copies memory from Array to Host.">cuMemcpyAtoH</a>, <a class="el" href="group__CUDA__MEM_g64cbd2e60436699aebdd0bdbf14d0f01.html#g64cbd2e60436699aebdd0bdbf14d0f01" title="Copies memory from Array to Host.">cuMemcpyAtoHAsync</a>, <a class="el" href="group__CUDA__MEM_gad6827247af91600b56ce6e2ddb802e1.html#gad6827247af91600b56ce6e2ddb802e1" title="Copies memory from Device to Array.">cuMemcpyDtoA</a>, <a class="el" href="group__CUDA__MEM_g1725774abf8b51b91945f3336b778c8b.html#g1725774abf8b51b91945f3336b778c8b" title="Copies memory from Device to Device.">cuMemcpyDtoD</a>, <a class="el" href="group__CUDA__MEM_g39ea09ba682b8eccc9c3e0c04319b5c8.html#g39ea09ba682b8eccc9c3e0c04319b5c8" title="Copies memory from Device to Device.">cuMemcpyDtoDAsync</a>, <a class="el" href="group__CUDA__MEM_g3480368ee0208a98f75019c9a8450893.html#g3480368ee0208a98f75019c9a8450893" title="Copies memory from Device to Host.">cuMemcpyDtoH</a>, <a class="el" href="group__CUDA__MEM_g56f30236c7c5247f8e061b59d3268362.html#g56f30236c7c5247f8e061b59d3268362" title="Copies memory from Device to Host.">cuMemcpyDtoHAsync</a>, <a class="el" href="group__CUDA__MEM_g57d3d780d165ecc0e3b3ce08e141cd89.html#g57d3d780d165ecc0e3b3ce08e141cd89" title="Copies memory from Host to Array.">cuMemcpyHtoA</a>, <a class="el" href="group__CUDA__MEM_gb5c4863f64f132b4bc2661818b3fd188.html#gb5c4863f64f132b4bc2661818b3fd188" title="Copies memory from Host to Array.">cuMemcpyHtoAAsync</a>, <a class="el" href="group__CUDA__MEM_g4d32266788c440b0220b1a9ba5795169.html#g4d32266788c440b0220b1a9ba5795169" title="Copies memory from Host to Device.">cuMemcpyHtoD</a>, <a class="el" href="group__CUDA__MEM_g1572263fe2597d7ba4f6964597a354a3.html#g1572263fe2597d7ba4f6964597a354a3" title="Copies memory from Host to Device.">cuMemcpyHtoDAsync</a>, <a class="el" href="group__CUDA__MEM_g89b3f154e17cc89b6eea277dbdf5c93a.html#g89b3f154e17cc89b6eea277dbdf5c93a" title="Frees device memory.">cuMemFree</a>, <a class="el" href="group__CUDA__MEM_g62e0fdbe181dab6b1c90fa1a51c7b92c.html#g62e0fdbe181dab6b1c90fa1a51c7b92c" title="Frees page-locked host memory.">cuMemFreeHost</a>, <a class="el" href="group__CUDA__MEM_g64fee5711274a2a0573a789c94d8299b.html#g64fee5711274a2a0573a789c94d8299b" title="Get information on memory allocations.">cuMemGetAddressRange</a>, <a class="el" href="group__CUDA__MEM_g808f555540d0143a331cc42aa98835c0.html#g808f555540d0143a331cc42aa98835c0" title="Gets free and total memory.">cuMemGetInfo</a>, <a class="el" href="group__CUDA__MEM_g572ca4011bfcb25034888a14d4e035b9.html#g572ca4011bfcb25034888a14d4e035b9" title="Allocates page-locked host memory.">cuMemHostAlloc</a>, <a class="el" href="group__CUDA__MEM_g57a39e5cba26af4d06be67fc77cc62f0.html#g57a39e5cba26af4d06be67fc77cc62f0" title="Passes back device pointer of mapped pinned memory.">cuMemHostGetDevicePointer</a>, <a class="el" href="group__CUDA__MEM_ge88b13e646e2be6ba0e0475ef5205974.html#ge88b13e646e2be6ba0e0475ef5205974" title="Initializes device memory.">cuMemsetD2D8</a>, <a class="el" href="group__CUDA__MEM_g7f561a15a66144fa9f6ab5350edc8a30.html#g7f561a15a66144fa9f6ab5350edc8a30" title="Initializes device memory.">cuMemsetD2D16</a>, <a class="el" href="group__CUDA__MEM_g74b359b2d026bfeb7c795b5038d07523.html#g74b359b2d026bfeb7c795b5038d07523" title="Initializes device memory.">cuMemsetD2D32</a>, <a class="el" href="group__CUDA__MEM_g6e582bf866e9e2fb014297bfaf354d7b.html#g6e582bf866e9e2fb014297bfaf354d7b" title="Initializes device memory.">cuMemsetD8</a>, <a class="el" href="group__CUDA__MEM_g7d805e610054392a4d11e8a8bf5eb35c.html#g7d805e610054392a4d11e8a8bf5eb35c" title="Initializes device memory.">cuMemsetD16</a>, <a class="el" href="group__CUDA__MEM_g983e8d8759acd1b64326317481fbf132.html#g983e8d8759acd1b64326317481fbf132" title="Initializes device memory.">cuMemsetD32</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>