jit_blocks 0.1.0
|
expr engine has special support for these operations by inlining, leading to much faster execution. More...
Functions | |
JIT_BLOCKS_EXPORT void | jit_blocks_expr_op_plus (jit_blocks_expr_context *ctx) |
Pops two doubles from the stack, adds them, and pushes the result back. | |
JIT_BLOCKS_EXPORT void | jit_blocks_expr_op_minus (jit_blocks_expr_context *ctx) |
Pops two doubles from the stack, subtracts the second from the first, and pushes the result back. | |
JIT_BLOCKS_EXPORT void | jit_blocks_expr_op_multiply (jit_blocks_expr_context *ctx) |
Pops two doubles from the stack, multiplies them, and pushes the result back. | |
JIT_BLOCKS_EXPORT void | jit_blocks_expr_op_divide (jit_blocks_expr_context *ctx) |
Pops two doubles from the stack, divides the first by the second, and pushes the result back. | |
JIT_BLOCKS_EXPORT void | jit_blocks_expr_op_negate (jit_blocks_expr_context *ctx) |
Pops a double from the stack, negates it, and pushes the result back. | |
JIT_BLOCKS_EXPORT void | jit_blocks_expr_op_abs (jit_blocks_expr_context *ctx) |
Pops 1 double from the stack, converts it to its absolute value, and pushes the result back. | |
JIT_BLOCKS_EXPORT void | jit_blocks_expr_pow (jit_blocks_expr_context *ctx) |
Pops 2 doubles from the stack, computes the power of the first number to the second number, and pushes the result back. | |
JIT_BLOCKS_EXPORT void | jit_blocks_expr_ops_parse (const char *ops[], int ops_cnt, jit_blocks_expr_func_t *out_funcs) |
Parses arithmetic operations from the given string, and stores the parsed operations into out_funcs array. | |
expr engine has special support for these operations by inlining, leading to much faster execution.
JIT_BLOCKS_EXPORT void jit_blocks_expr_op_abs | ( | jit_blocks_expr_context * | ctx | ) |
Pops 1 double from the stack, converts it to its absolute value, and pushes the result back.
JIT_BLOCKS_EXPORT void jit_blocks_expr_op_divide | ( | jit_blocks_expr_context * | ctx | ) |
Pops two doubles from the stack, divides the first by the second, and pushes the result back.
If the divisor is zero, the function will push std::nan()
JIT_BLOCKS_EXPORT void jit_blocks_expr_op_minus | ( | jit_blocks_expr_context * | ctx | ) |
Pops two doubles from the stack, subtracts the second from the first, and pushes the result back.
JIT_BLOCKS_EXPORT void jit_blocks_expr_op_multiply | ( | jit_blocks_expr_context * | ctx | ) |
Pops two doubles from the stack, multiplies them, and pushes the result back.
JIT_BLOCKS_EXPORT void jit_blocks_expr_op_negate | ( | jit_blocks_expr_context * | ctx | ) |
Pops a double from the stack, negates it, and pushes the result back.
JIT_BLOCKS_EXPORT void jit_blocks_expr_op_plus | ( | jit_blocks_expr_context * | ctx | ) |
Pops two doubles from the stack, adds them, and pushes the result back.
JIT_BLOCKS_EXPORT void jit_blocks_expr_ops_parse | ( | const char * | ops[], |
int | ops_cnt, | ||
jit_blocks_expr_func_t * | out_funcs | ||
) |
Parses arithmetic operations from the given string, and stores the parsed operations into out_funcs array.
ops | Arithmetic expression to parse:
|
ops_cnt | Number of operations in ops array. |
out_funcs | Array to store parsed operations. |
JIT_BLOCKS_EXPORT void jit_blocks_expr_pow | ( | jit_blocks_expr_context * | ctx | ) |
Pops 2 doubles from the stack, computes the power of the first number to the second number, and pushes the result back.
If the first number is zero, and the second number is negative, the function will push nan()