Coverage Control Library
Loading...
Searching...
No Matches
CudaUtils Class Reference

Static class for CUDA utilities This class provides utility functions for CUDA It is a static class and cannot be instantiated. More...

#include <cuda_utils.h>

Public Member Functions

 CudaUtils ()=delete
 

Static Public Member Functions

static bool UseCuda ()
 
static void SetUseCuda (bool use_cuda)
 
static bool IsCudaAvailable ()
 
static bool IsCudaInitialized ()
 
static bool InitializeCUDA ()
 Initializes a CUDA device use_cuda_ must be set to true before calling this function.
 

Detailed Description

Static class for CUDA utilities This class provides utility functions for CUDA It is a static class and cannot be instantiated.

Definition at line 45 of file cuda_utils.h.

Constructor & Destructor Documentation

◆ CudaUtils()

CudaUtils ( )
delete

Constructor deleted as we don't want to create an instance of this class

Member Function Documentation

◆ InitializeCUDA()

static bool InitializeCUDA ( )
inlinestatic

Initializes a CUDA device use_cuda_ must be set to true before calling this function.

Returns
True if successful

Definition at line 91 of file cuda_utils.h.

◆ IsCudaAvailable()

static bool IsCudaAvailable ( )
inlinestatic

Check if CUDA enabled GPU is available

Returns
True if CUDA enabled GPU is available

Definition at line 67 of file cuda_utils.h.

◆ IsCudaInitialized()

static bool IsCudaInitialized ( )
inlinestatic

Check if CUDA is initialized

Returns
True if CUDA is initialized

Definition at line 79 of file cuda_utils.h.

◆ SetUseCuda()

static void SetUseCuda ( bool use_cuda)
inlinestatic

Definition at line 61 of file cuda_utils.h.

◆ UseCuda()

static bool UseCuda ( )
inlinestatic

Definition at line 59 of file cuda_utils.h.