Non-templated class to hold any callable that returns CUresult.
More...
#include <cuda.hpp>
|
| template<typename Callable > |
| void | set (Callable &&c) |
| | Assign a callable to the object. More...
|
| |
|
void | reset () |
| | Destroy the contained callable.
|
| |
| template<typename... Args> |
| CUresult | operator() (Args... args) |
| | Invoke the container callable. More...
|
| |
|
| operator bool () const |
| | Check if the object holds a callable.
|
| |
Non-templated class to hold any callable that returns CUresult.
Definition at line 31 of file cuda.hpp.
◆ operator()()
template<typename... Args>
| CUresult kvikio::detail::AnyCallable::operator() |
( |
Args... |
args | ) |
|
|
inline |
Invoke the container callable.
- Template Parameters
-
| Args | Types of the argument. Must exactly match the parameter types of the contained callable. For example, if the parameter is std::size_t*, an argument of nullptr must be explicitly cast to std::size_t*. |
- Parameters
-
| args | Arguments to be passed |
- Returns
- CUDA driver API error code
- Exceptions
-
| std::bad_any_cast | if any argument type does not exactly match the parameter type of the contained callable. |
Definition at line 65 of file cuda.hpp.
◆ set()
template<typename Callable >
| void kvikio::detail::AnyCallable::set |
( |
Callable && |
c | ) |
|
|
inline |
Assign a callable to the object.
- Template Parameters
-
| Callable | A callable that must return CUresult |
- Parameters
-
Definition at line 43 of file cuda.hpp.
The documentation for this class was generated from the following file: