Compiles a function to native code and return the optimized function. The new function has the performance of a compiled function written in C.
Parameters: | fkt (function) – function to compile to c |
---|---|
Returns: | function – optimized function |
This function can either be used as decorator
@jit
def sum(x, y):
return x + y
or as a normal function
def sum(x, y):
return x + y
sum_opt = jit(sum)
Write a pickled representation of obj to a file named name inside hope.config.prefix
Parameters: |
|
---|
Read an object named name form hope.config.prefix. If the file does not exits unserialize returns None
Parameters: | name (str) – name of the object |
---|---|
Returns: | mixed – unserialized object |
List of c++ compiler flags. Normally hope does determing the right flags itself.
Disable hope. If hope.config.hopeless is True, hope.jit return the original function. Use this function for debug purpos
Keep the intermediate c++ source and compiler output generated during compilation.
Use ‘’‘sympy’‘’ to simplify expression and exptract common subexpression detection
Prefix of the folder hope saves all data in.
Check if indeces are out of bounds
Print a intermediate representation of each function during compilation.