mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-11-24 04:15:11 +00:00
nvidia/cuda: Add custom exception for CUDA
This commit is contained in:
parent
98f711523e
commit
9332d9377c
1 changed files with 13 additions and 0 deletions
|
@ -126,6 +126,19 @@ namespace nvidia::cuda {
|
|||
array_format format;
|
||||
};
|
||||
|
||||
class cuda_error : public std::exception {
|
||||
::nvidia::cuda::result _code;
|
||||
|
||||
public:
|
||||
cuda_error(::nvidia::cuda::result code) : _code(code) {}
|
||||
~cuda_error(){};
|
||||
|
||||
::nvidia::cuda::result code()
|
||||
{
|
||||
return _code;
|
||||
}
|
||||
};
|
||||
|
||||
class cuda {
|
||||
std::shared_ptr<util::library> _library;
|
||||
|
||||
|
|
Loading…
Reference in a new issue