<!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: cuDeviceGetCount</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__CUDA__DEVICE.html">Device 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__DEVICE_ge2091bbac7e1fb18c2821612115607ea.html#ge2091bbac7e1fb18c2821612115607ea">cuDeviceComputeCapability</a></td></tr> <tr><td class="navtab"><a class="qindex" href="group__CUDA__DEVICE_g8bdd1cc7201304b01357b8034f6587cb.html#g8bdd1cc7201304b01357b8034f6587cb">cuDeviceGet</a></td></tr> <tr><td class="navtab"><a class="qindex" href="group__CUDA__DEVICE_g9c3e1414f0ad901d3278a4d6645fc266.html#g9c3e1414f0ad901d3278a4d6645fc266">cuDeviceGetAttribute</a></td></tr> <tr><td class="navtab"><a class="qindexHL" href="group__CUDA__DEVICE_g52b5ce05cb8c5fb6831b2c0ff2887c74.html#g52b5ce05cb8c5fb6831b2c0ff2887c74">cuDeviceGetCount</a></td></tr> <tr><td class="navtab"><a class="qindex" href="group__CUDA__DEVICE_gef75aa30df95446a845f2a7b9fffbb7f.html#gef75aa30df95446a845f2a7b9fffbb7f">cuDeviceGetName</a></td></tr> <tr><td class="navtab"><a class="qindex" href="group__CUDA__DEVICE_g65a5b4e25186bd257df80b98c98cffe6.html#g65a5b4e25186bd257df80b98c98cffe6">cuDeviceGetProperties</a></td></tr> <tr><td class="navtab"><a class="qindex" href="group__CUDA__DEVICE_gc6a0d6551335a3780f9f3c967a0fde5d.html#gc6a0d6551335a3780f9f3c967a0fde5d">cuDeviceTotalMem</a></td></tr> </table> </div> </td> <td valign="top"> <a class="anchor" name="g52b5ce05cb8c5fb6831b2c0ff2887c74"></a><!-- doxytag: member="cuda.h::cuDeviceGetCount" ref="g52b5ce05cb8c5fb6831b2c0ff2887c74" args="(int *count)" --> <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> cuDeviceGetCount </td> <td>(</td> <td class="paramtype">int * </td> <td class="paramname"> <em>count</em> </td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p> Returns in <code>*count</code> the number of devices with compute capability greater than or equal to 1.0 that are available for execution. If there is no such device, <a class="el" href="group__CUDA__DEVICE_g52b5ce05cb8c5fb6831b2c0ff2887c74.html#g52b5ce05cb8c5fb6831b2c0ff2887c74" title="Returns the number of compute-capable devices.">cuDeviceGetCount()</a> returns 0.<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>count</em> </td><td>- Returned number of compute-capable devices</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="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__DEVICE_ge2091bbac7e1fb18c2821612115607ea.html#ge2091bbac7e1fb18c2821612115607ea" title="Returns the compute capability of the device.">cuDeviceComputeCapability</a>, <a class="el" href="group__CUDA__DEVICE_g9c3e1414f0ad901d3278a4d6645fc266.html#g9c3e1414f0ad901d3278a4d6645fc266" title="Returns information about the device.">cuDeviceGetAttribute</a>, <a class="el" href="group__CUDA__DEVICE_gef75aa30df95446a845f2a7b9fffbb7f.html#gef75aa30df95446a845f2a7b9fffbb7f" title="Returns an identifer string for the device.">cuDeviceGetName</a>, <a class="el" href="group__CUDA__DEVICE_g8bdd1cc7201304b01357b8034f6587cb.html#g8bdd1cc7201304b01357b8034f6587cb" title="Returns a handle to a compute device.">cuDeviceGet</a>, <a class="el" href="group__CUDA__DEVICE_g65a5b4e25186bd257df80b98c98cffe6.html#g65a5b4e25186bd257df80b98c98cffe6" title="Returns properties for a selected device.">cuDeviceGetProperties</a>, <a class="el" href="group__CUDA__DEVICE_gc6a0d6551335a3780f9f3c967a0fde5d.html#gc6a0d6551335a3780f9f3c967a0fde5d" title="Returns the total amount of memory on the device.">cuDeviceTotalMem</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>