char-fork/llama.cpp
git clone https://git.t4t.associates/char-fork/llama.cpp
ce38a4db4
char/aliceai-t5-moe
1#pragma once 2 3#ifdef _WIN32 4# define WIN32_LEAN_AND_MEAN 5# ifndef NOMINMAX 6# define NOMINMAX 7# endif 8# include <windows.h> 9# include <winevt.h> 10#else 11# include <dlfcn.h> 12# include <unistd.h> 13#endif 14#include <filesystem> 15 16namespace fs = std ::filesystem ; 17 18#ifdef _WIN32 19 20using dl_handle = std ::remove_pointer_t < HMODULE > ; 21 22struct dl_handle_deleter { 23void operator ()(HMODULE handle ) { 24FreeLibrary (handle ); 25 } 26}; 27 28#else 29 30using dl_handle = void ; 31 32struct dl_handle_deleter { 33void operator ()(void * handle ) { 34dlclose (handle ); 35 } 36}; 37 38#endif 39 40using dl_handle_ptr = std ::unique_ptr < dl_handle ,dl_handle_deleter > ; 41 42dl_handle * dl_load_library (const fs ::path & path ); 43void * dl_get_sym (dl_handle * handle ,const char * name ); 44const char * dl_error (); 45