4#ifndef _cuda_delayload_h_
5#define _cuda_delayload_h_
15 #pragma comment(lib, "delayimp")
16 #pragma comment(lib, "user32")
23 #define LOAD_SYMBOL(sym, lib) \
26 #define LOAD_SYMBOL(sym, lib) \
27 sym##_##t* sym = (sym##_##t*) dlsym (lib, #sym);
36 #define LOAD_LIBRARY_SAFE(lib) \
37 if (!delayload_##lib()) { exit (0); } \
40 #define LOAD_LIBRARY_SAFE(lib) \
41 if (!delayload_##lib()) { exit (0); } \
42 void* lib = dlopen_ex (#lib".so");
48#if !defined(_WIN32) && defined(PLM_USE_GPU_PLUGINS)
49 #define UNLOAD_LIBRARY(lib) \
54 #define UNLOAD_LIBRARY(lib) \
58#define DELAYLOAD_WRAP(f, ...) \
59 f (__VA_ARGS__); typedef f##_t(__VA_ARGS__);
EXTERNC int delayload_libplmcuda(void)
Definition cuda_delayload.cxx:194
EXTERNC int delayload_libplmreconstructcuda(void)
Definition cuda_delayload.cxx:200
EXTERNC int delayload_libplmregistercuda(void)
Definition cuda_delayload.cxx:207
EXTERNC int delayload_libplmopencl(void)
Definition cuda_delayload.cxx:215
EXTERNC void * dlopen_ex(const char *lib)
Definition cuda_delayload.cxx:64
#define PLMSYS_C_API
Definition plmsys_config.h:18