mirror of
https://github.com/Xaymar/obs-StreamFX
synced 2024-12-29 11:01:23 +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) \
|
#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) \
|
if (!NAME) \
|
||||||
throw std::runtime_error("Failed to load '" #NAME "' from '" CUDA_NAME "'."); \
|
throw std::runtime_error("Failed to load '" #NAME "' from '" CUDA_NAME "'."); \
|
||||||
}
|
}
|
||||||
#define CUDA_LOAD_SYMBOL_V2(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) \
|
if (!NAME) \
|
||||||
throw std::runtime_error("Failed to load '" #NAME "' from '" CUDA_NAME "'."); \
|
throw std::runtime_error("Failed to load '" #NAME "' from '" CUDA_NAME "'."); \
|
||||||
}
|
}
|
||||||
#define CUDA_LOAD_SYMBOL_EX(NAME, OVERRIDE) \
|
#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) \
|
if (!NAME) \
|
||||||
throw std::runtime_error("Failed to load '" #NAME "' from '" CUDA_NAME "'."); \
|
throw std::runtime_error("Failed to load '" #NAME "' from '" CUDA_NAME "'."); \
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue