mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-12-28 18:41:14 +00:00
nvidia/cuda: Use reinterpret_case instead of static_cast
This commit is contained in:
parent
01f16e6d1f
commit
b0ac0b724a
1 changed files with 3 additions and 3 deletions
|
@ -29,19 +29,19 @@
|
|||
|
||||
#define CUDA_LOAD_SYMBOL(NAME) \
|
||||
{ \
|
||||
NAME = static_cast<decltype(NAME)>(os_dlsym(_library, #NAME)); \
|
||||
NAME = reinterpret_cast<decltype(NAME)>(os_dlsym(_library, #NAME)); \
|
||||
if (!NAME) \
|
||||
throw std::runtime_error("Failed to load '" #NAME "' from '" CUDA_NAME "'."); \
|
||||
}
|
||||
#define CUDA_LOAD_SYMBOL_V2(NAME) \
|
||||
{ \
|
||||
NAME = static_cast<decltype(NAME)>(os_dlsym(_library, #NAME "_v2")); \
|
||||
NAME = reinterpret_cast<decltype(NAME)>(os_dlsym(_library, #NAME "_v2")); \
|
||||
if (!NAME) \
|
||||
throw std::runtime_error("Failed to load '" #NAME "' from '" CUDA_NAME "'."); \
|
||||
}
|
||||
#define CUDA_LOAD_SYMBOL_EX(NAME, OVERRIDE) \
|
||||
{ \
|
||||
NAME = static_cast<decltype(NAME)>(os_dlsym(_library, #OVERRIDE)); \
|
||||
NAME = reinterpret_cast<decltype(NAME)>(os_dlsym(_library, #OVERRIDE)); \
|
||||
if (!NAME) \
|
||||
throw std::runtime_error("Failed to load '" #NAME "' from '" CUDA_NAME "'."); \
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue