diff options
Diffstat (limited to 'tests/do_jit.h')
-rw-r--r-- | tests/do_jit.h | 48 |
1 files changed, 42 insertions, 6 deletions
diff --git a/tests/do_jit.h b/tests/do_jit.h index 5be682b..08e39c6 100644 --- a/tests/do_jit.h +++ b/tests/do_jit.h @@ -1,12 +1,48 @@ #ifndef DOJIT_H #define DOJIT_H -#define erf3 ejit_run_func_3 -#define erf2 ejit_run_func_2 -#define erf1 ejit_run_func_1 +static inline long erfi1(struct ejit_func *f, struct ejit_arg a0) +{ + return ejit_run_func_i(f, 1, &a0); +} -#define erff3 ejit_run_func_f_3 -#define erff2 ejit_run_func_f_2 -#define erff1 ejit_run_func_f_1 +static inline long erfi2(struct ejit_func *f, struct ejit_arg a0, struct ejit_arg a1) +{ + struct ejit_arg args[2] = {a0, a1}; + return ejit_run_func_i(f, 2, args); +} + +static inline int64_t erfl1(struct ejit_func *f, struct ejit_arg a0) +{ + return ejit_run_func_l(f, 1, &a0); +} + +static inline int64_t erfl2(struct ejit_func *f, struct ejit_arg a0, struct ejit_arg a1) +{ + struct ejit_arg args[2] = {a0, a1}; + return ejit_run_func_l(f, 2, args); +} + +static inline float erff1(struct ejit_func *f, struct ejit_arg a0) +{ + return ejit_run_func_f(f, 1, &a0); +} + +static inline float erff2(struct ejit_func *f, struct ejit_arg a0, struct ejit_arg a1) +{ + struct ejit_arg args[2] = {a0, a1}; + return ejit_run_func_f(f, 2, args); +} + +static inline double erfd1(struct ejit_func *f, struct ejit_arg a0) +{ + return ejit_run_func_d(f, 1, &a0); +} + +static inline double erfd2(struct ejit_func *f, struct ejit_arg a0, struct ejit_arg a1) +{ + struct ejit_arg args[2] = {a0, a1}; + return ejit_run_func_d(f, 2, args); +} #endif /* DOJIT_H */ |