Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/ggml/blob/master/src/ggml-backend-dl.h # ggml [Ported from github.com/ggml-org/ggml] docs : sync ggml_type enum in gguf.md (#1685) Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `ggml / src / ggml-backend-dl.h` 45 lines ยท 791 bytes Raw Blame History 1 #pragma once 2 3 #ifdef _WIN32 4 # define WIN32_LEAN_AND_MEAN 5 # ifndef NOMINMAX 6 # define NOMINMAX 7 # endif 8 # include 9 # include 10 #else 11 # include 12 # include 13 #endif 14 #include 15 16 namespace fs = std::filesystem; 17 18 #ifdef _WIN32 19 20 using dl_handle = std::remove_pointer_t; 21 22 struct dl_handle_deleter { 23 void operator()(HMODULE handle) { 24 FreeLibrary(handle); 25 } 26 }; 27 28 #else 29 30 using dl_handle = void; 31 32 struct dl_handle_deleter { 33 void operator()(void * handle) { 34 dlclose(handle); 35 } 36 }; 37 38 #endif 39 40 using dl_handle_ptr = std::unique_ptr; 41 42 dl_handle * dl_load_library(const fs::path & path); 43 void * dl_get_sym(dl_handle * handle, const char * name); 44 const char * dl_error(); 45