radiance 1.0.0

This commit is contained in:
Deadcode committed 2026-10-04 12:02:41 +02:00
commit ae74a8aebf
616 files changed
+338692

No files matched your search

+28
View File
@@ -0,0 +1,28 @@
/* vendor/shim/ggml.h -- NOT a lift. This file is ours.
*
* The lifted chat and PEG-parser sources include "ggml.h" for exactly two macros. Taking ggml to
* get them would take the thing spec §12 says we do not take, and editing the lifts to drop the
* include would make them unpatchable. A shim is the third option: the lifted files compile
* BYTE-FOR-BYTE unchanged, and everything they needed from outside is here where it is visible.
*/
#pragma once
#include <cstdio>
#include <cstdlib>
/* GGML_ABORT is reached only on an invariant the lifted code believes cannot break. It behaves
* the way rad::fatal() does -- print and exit non-zero rather than continue from a broken state
* (spec §17) -- and is spelt without including rad_internal.h so that vendor/ stays free of any
* dependency on core/. */
#define GGML_ABORT(...) \
do { \
fprintf(stderr, "fatal: %s:%d: ", __FILE__, __LINE__); \
fprintf(stderr, __VA_ARGS__); \
fputc('\n', stderr); \
abort(); \
} while (0)
#define GGML_ASSERT(x) \
do { \
if (!(x)) GGML_ABORT("assertion failed: %s", #x); \
} while (0)