ESPResSo
Extensible Simulation Package for Research on Soft Matter Systems
Loading...
Searching...
No Matches
utils.hpp File Reference
#include <config/config.hpp>
#include <exception>
#include <stdexcept>
#include <string>
Include dependency graph for core/cuda/utils.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  cuda_runtime_error
 Wrapper for CUDA runtime exceptions. More...
class  cuda_fatal_error
 Fatal CUDA exception. More...

Functions

template<class F, class... Args>
void invoke_skip_cuda_exceptions (F &&f, Args &&...args)
 Invoke a function and silently ignore any thrown cuda_runtime_error error.

Function Documentation

◆ invoke_skip_cuda_exceptions()

template<class F, class... Args>
void invoke_skip_cuda_exceptions ( F && f,
Args &&... args )

Invoke a function and silently ignore any thrown cuda_runtime_error error.

This is useful when querying the properties of CUDA devices that may not have a suitable CUDA version, or when there is no compatible CUDA device available.

Definition at line 75 of file core/cuda/utils.hpp.

Referenced by cuda_gather_gpus(), cuda_on_program_start(), and ScriptInterface::System::CudaInitHandle::do_call_method().