From f2112bb22ea5d9ea9cb7a008cc5467ec6b265c99 Mon Sep 17 00:00:00 2001 From: OusmBlueNinja <89956790+OusmBlueNinja@users.noreply.github.com> Date: Tue, 24 Dec 2024 11:01:41 -0600 Subject: [PATCH] Update gcml.h --- gcml.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/gcml.h b/gcml.h index dbf9ec6..3d10af8 100644 --- a/gcml.h +++ b/gcml.h @@ -426,6 +426,29 @@ + +#define MAX_OF(...) MAX_OF_IMPL(__VA_ARGS__, MAX_OF_RSEQ_N()) +#define MAX_OF_IMPL(...) MAX_OF_ARG_N(__VA_ARGS__) +#define MAX_OF_ARG_N(_1, _2, _3, _4, _5, N, ...) N +#define MAX_OF_RSEQ_N() 5,4,3,2,1,0 + +#define MIN_OF(...) MIN_OF_IMPL(__VA_ARGS__, MIN_OF_RSEQ_N()) +#define MIN_OF_IMPL(...) MIN_OF_ARG_N(__VA_ARGS__) +#define MIN_OF_ARG_N(_1, _2, _3, _4, _5, N, ...) N +#define MIN_OF_RSEQ_N() 5,4,3,2,1,0 + + +#define ZERO_STRUCT(s) memset(&(s), 0, sizeof(s)) + + +#define PRINT_VAR(var) LOG_INFO(#var " = %d", var) + + + + + + + #endif // GCML_H