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.cpp # 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.cpp` 26 lines ยท 738 bytes Raw Blame History 1 #include "ggml-impl.h" 2 3 #include 4 #include 5 6 static std::terminate_handler previous_terminate_handler; 7 8 GGML_NORETURN static void ggml_uncaught_exception() { 9 ggml_print_backtrace(); 10 if (previous_terminate_handler) { 11 previous_terminate_handler(); 12 } 13 abort(); // unreachable unless previous_terminate_handler was nullptr 14 } 15 16 static bool ggml_uncaught_exception_init = []{ 17 const char * GGML_NO_BACKTRACE = getenv("GGML_NO_BACKTRACE"); 18 if (GGML_NO_BACKTRACE) { 19 return false; 20 } 21 const auto prev{std::get_terminate()}; 22 GGML_ASSERT(prev != ggml_uncaught_exception); 23 previous_terminate_handler = prev; 24 std::set_terminate(ggml_uncaught_exception); 25 return true; 26 }();