<!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: cudaVDPAUSetVDPAUDevice</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__VDPAU.html">VDPAU Interoperability</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__VDPAU_gb864c88fba4dbd24e23ec2899f324ca3.html#gb864c88fba4dbd24e23ec2899f324ca3">cudaGraphicsVDPAURegisterOutputSurface</a></td></tr> <tr><td class="navtab"><a class="qindex" href="group__CUDART__VDPAU_gdf0001f0229590a2baeea9060dfdc678.html#gdf0001f0229590a2baeea9060dfdc678">cudaGraphicsVDPAURegisterVideoSurface</a></td></tr> <tr><td class="navtab"><a class="qindex" href="group__CUDART__VDPAU_g187f707a42b59d17ae737c12033db3c5.html#g187f707a42b59d17ae737c12033db3c5">cudaVDPAUGetDevice</a></td></tr> <tr><td class="navtab"><a class="qindexHL" href="group__CUDART__VDPAU_g93a9727b90c526a3493918bceafcb3f7.html#g93a9727b90c526a3493918bceafcb3f7">cudaVDPAUSetVDPAUDevice</a></td></tr> </table> </div> </td> <td valign="top"> <a class="anchor" name="g93a9727b90c526a3493918bceafcb3f7"></a><!-- doxytag: member="cuda_vdpau_interop.h::cudaVDPAUSetVDPAUDevice" ref="g93a9727b90c526a3493918bceafcb3f7" args="(int device, VdpDevice vdpDevice, VdpGetProcAddress *vdpGetProcAddress)" --> <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> cudaVDPAUSetVDPAUDevice </td> <td>(</td> <td class="paramtype">int </td> <td class="paramname"> <em>device</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">VdpDevice </td> <td class="paramname"> <em>vdpDevice</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">VdpGetProcAddress * </td> <td class="paramname"> <em>vdpGetProcAddress</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p> Records <code>vdpDevice</code> as the VdpDevice for VDPAU interoperability with the CUDA device <code>device</code> and sets <code>device</code> as the current device for the calling host thread.<p> If <code>device</code> has already been initialized then this call will fail with the error <a class="el" href="group__CUDART__TYPES_g3f51e3575c2178246db0a94a430e0038.html#gg3f51e3575c2178246db0a94a430e0038a906ddf08d574274bf7334adb1497550">cudaErrorSetOnActiveProcess</a>. In this case it is necessary to reset <code>device</code> using <a class="el" href="group__CUDART__DEVICE_gdcc2c6f914eb9461565b12648faa5e28.html#gdcc2c6f914eb9461565b12648faa5e28" title="Destroy all allocations and reset all state on the current device in the current...">cudaDeviceReset()</a> before VDPAU interoperability on <code>device</code> may be enabled.<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>device</em> </td><td>- Device to use for VDPAU interoperability </td></tr> <tr><td valign="top"></td><td valign="top"><em>vdpDevice</em> </td><td>- The VdpDevice to interoperate with </td></tr> <tr><td valign="top"></td><td valign="top"><em>vdpGetProcAddress</em> </td><td>- VDPAU's VdpGetProcAddress function pointer</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#gg3f51e3575c2178246db0a94a430e0038938c6e8b96ecde62e3ab5137156f739a">cudaErrorInvalidDevice</a>, <a class="el" href="group__CUDART__TYPES_g3f51e3575c2178246db0a94a430e0038.html#gg3f51e3575c2178246db0a94a430e0038a906ddf08d574274bf7334adb1497550">cudaErrorSetOnActiveProcess</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__VDPAU_gdf0001f0229590a2baeea9060dfdc678.html#gdf0001f0229590a2baeea9060dfdc678" title="Register a VdpVideoSurface object.">cudaGraphicsVDPAURegisterVideoSurface</a>, <a class="el" href="group__CUDART__VDPAU_gb864c88fba4dbd24e23ec2899f324ca3.html#gb864c88fba4dbd24e23ec2899f324ca3" title="Register a VdpOutputSurface object.">cudaGraphicsVDPAURegisterOutputSurface</a>, <a class="el" href="group__CUDART__DEVICE_gdcc2c6f914eb9461565b12648faa5e28.html#gdcc2c6f914eb9461565b12648faa5e28" title="Destroy all allocations and reset all state on the current device in the current...">cudaDeviceReset</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>