packages/CudaUtils/cuda_utils/Hardware.cc
//---------------------------------------------------------------------------//
// STATIC METHODS
//---------------------------------------------------------------------------//
/*!
 * \brief Return whether a valid device exists.
 *
 * If CUDA support is not enabled, this will always return false
 */
STATIC METHODS
\brief Return whether a valid device exists.

If CUDA support is not enabled, this will always return false
STATIC METHODS \ brief Return whether a valid device exists . If CUDA support is not enabled this will always return false
bool Hardware<Device>::valid_device_exists()
{
    int num_devices = -1;
#ifdef USE_CUDA
    CudaCall(cudaGetDeviceCount(&num_devices));
#endif
    return num_devices > 0;
}
bool Hardware < Device > :: valid_device_exists ( ) { int num_devices = -1 ; #ifdef USE_CUDA CudaCall ( cudaGetDeviceCount ( & num_devices ) ) ; #endif return num_devices > 0 ; }
STATIC METHODS
 \brief Return whether a valid device exists.
STATIC METHODS \ brief Return whether a valid device exists .