fix macros
This commit is contained in:
parent
24bba6bde0
commit
58614720c3
@ -8,6 +8,7 @@
|
|||||||
1 // Multiplier to increase all waiting periods to make the schedule more
|
1 // Multiplier to increase all waiting periods to make the schedule more
|
||||||
// tight and force preemptions
|
// tight and force preemptions
|
||||||
#define NUM_TASKS 15
|
#define NUM_TASKS 15
|
||||||
|
#define MACRO_ONLY 1
|
||||||
#include "fuzzhelper.c"
|
#include "fuzzhelper.c"
|
||||||
#include "polynomic_functions.h"
|
#include "polynomic_functions.h"
|
||||||
|
|
||||||
|
@ -30,7 +30,6 @@
|
|||||||
#define __UTIL_RNG_C 12345ull
|
#define __UTIL_RNG_C 12345ull
|
||||||
#define RNG_FROM(X) ((__UTIL_RNG_A*(X)+__UTIL_RNG_C) % __UTIL_RNG_M)
|
#define RNG_FROM(X) ((__UTIL_RNG_A*(X)+__UTIL_RNG_C) % __UTIL_RNG_M)
|
||||||
|
|
||||||
#define IF_ELSE(X,Y,Z) ((X) ? (Y) : (Z))
|
|
||||||
|
|
||||||
// Challanges =======
|
// 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
|
#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 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 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 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 VALLEY(X, OFF, H, W) (CLAMP_CEILING(SADD(H,CHECKED_SQUARE(ABS_DIFF(X,OFF)/W)),0))
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user