fix macros

This commit is contained in:
Alwin Berger 2025-08-15 08:24:04 +00:00
parent 24bba6bde0
commit 58614720c3
2 changed files with 3 additions and 3 deletions

View File

@ -8,6 +8,7 @@
1 // Multiplier to increase all waiting periods to make the schedule more
// tight and force preemptions
#define NUM_TASKS 15
#define MACRO_ONLY 1
#include "fuzzhelper.c"
#include "polynomic_functions.h"

View File

@ -30,7 +30,6 @@
#define __UTIL_RNG_C 12345ull
#define RNG_FROM(X) ((__UTIL_RNG_A*(X)+__UTIL_RNG_C) % __UTIL_RNG_M)
#define IF_ELSE(X,Y,Z) ((X) ? (Y) : (Z))
// Challanges =======
#define CHANCE_1_IN_POWOF2(X,Y) (RNG_FROM(X)<(__UTIL_RNG_M>>Y)) // assume the type of x has more than y bits
@ -100,8 +99,8 @@ static inline int32_t valley_i32(int32_t x, int32_t off, int32_t h, int32_t w) {
#define CHECKED_SQUARE(X) IF_ELSE((X)<=0x0000B504,SQUARE(X), INT_MAX) // int32_t safe
#define LIN(X,N,D,C) (C+((N)*((X)/(D))))
#define HILL(X, OFF, H, W) (CLAMP_FLOOR(SSUB(h,CHECKED_SQUARE(ABS_DIFF(x,off)/w)),0))
#define VALLEY(X, OFF, H, W) (CLAMP_CEILING(SADD(h,CHECKED_SQUARE(ABS_DIFF(x,off)/w)),0))
#define HILL(X, OFF, H, W) (CLAMP_FLOOR(SSUB(H,CHECKED_SQUARE(ABS_DIFF(X,OFF)/W)),0))
#define VALLEY(X, OFF, H, W) (CLAMP_CEILING(SADD(H,CHECKED_SQUARE(ABS_DIFF(X,OFF)/W)),0))
#else