https://github.com/halide/Halide
Raw File
Tip revision: 346c37ba046f9b8c5b1b65b9194113b33afb9bac authored by Andrew Adams on 07 December 2017, 21:54:28 UTC
Reset branch onto new history
Tip revision: 346c37b
windows_get_symbol.cpp
#include "HalideRuntime.h"

#ifdef BITS_64
#define WIN32API
#else
#define WIN32API __stdcall
#endif

extern "C" {

WIN32API void *LoadLibraryA(const char *);
WIN32API void *GetProcAddress(void *, const char *);

WEAK void *halide_get_symbol(const char *name) {
    return GetProcAddress(NULL, name);
}

WEAK void *halide_load_library(const char *name) {
    return LoadLibraryA(name);
}

WEAK void *halide_get_library_symbol(void *lib, const char *name) {
    return GetProcAddress(lib, name);
}

}
back to top