4#ifndef _delayload_legacy_h_
5#define _delayload_legacy_h_
15 #pragma comment(lib, "delayimp")
16 #pragma comment(lib, "user32")
31#if !defined(_WIN32) && defined(PLM_USE_GPU_PLUGINS)
32 #define LOAD_LIBRARY(lib) \
33 void* lib = dlopen_ex (#lib".so");
35 #define LOAD_LIBRARY(lib) \
42#if !defined(_WIN32) && defined(PLM_USE_GPU_PLUGINS)
43 #define LOAD_SYMBOL(sym, lib) \
44 sym##_##t* sym = (sym##_##t*) dlsym (lib, #sym);
46 #define LOAD_SYMBOL(sym, lib) \
58#if !defined(_WIN32) && defined(PLM_USE_GPU_PLUGINS)
59 #define LOAD_LIBRARY_SAFE(lib) \
60 if (!delayload_##lib()) { exit (0); } \
61 void* lib = dlopen_ex (#lib".so");
63 #define LOAD_LIBRARY_SAFE(lib) \
64 if (!delayload_##lib()) { exit (0); } \
71#if !defined(_WIN32) && defined(PLM_USE_GPU_PLUGINS)
72 #define UNLOAD_LIBRARY(lib) \
77 #define UNLOAD_LIBRARY(lib) \
81#define DELAYLOAD_WRAP(f, ...) \
82 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