RecFilter
|
#include <Halide.h>
Go to the source code of this file.
Functions | |
bool | is_undef (Halide::Expr e) |
Return true if all Expr in the vector are undef. More... | |
bool | is_undef (std::vector< Halide::Expr > e) |
Return true if all Expr in the vector are undef. More... | |
bool | is_undef (Halide::Tuple t) |
Return true if all elements of the Tuple are undef. More... | |
bool | expr_depends_on_var (Halide::Expr expr, std::string var) |
Check if a given expression depends upon a variable. More... | |
bool | expr_depends_on_func (Halide::Expr expr, std::string func_name) |
Check if a given expression contains calls to a Function. More... | |
Halide::Expr | substitute_in_func_call (std::string func_name, std::string var, Halide::Expr replace, Halide::Expr original) |
Substitute a variable in all calls to a particular Function in a given expression. More... | |
Halide::Expr | substitute_func_call_with_args (std::string func_name, std::vector< Halide::Expr > call_args, Halide::Expr replace, Halide::Expr original) |
Substitute all calls to a particular Function by a given expression the calling args match the given list. More... | |
Halide::Expr | insert_arg_in_func_call (std::string func_name, size_t pos, Halide::Expr arg, Halide::Expr original) |
Add a calling argument to all calls to a particular Function. More... | |
Halide::Expr | remove_arg_from_func_call (std::string func_name, size_t pos, Halide::Expr original) |
Remove a calling argument from all calls to a particular Function. More... | |
Halide::Expr | swap_args_in_func_call (std::string func_name, size_t va_idx, size_t vb_idx, Halide::Expr original) |
Swap two calling arguments of given function in the expression. More... | |
Halide::Expr | substitute_arg_in_feedforward_func_call (std::string func_name, std::vector< Halide::Expr > def_arg, size_t pos, Halide::Expr new_arg, Halide::Expr original) |
Substitute a calling arg in feed forward recursive calls to a Func; feedforward calls are those where all args in the Function call are identical to args in Function definition. More... | |
Halide::Expr | apply_zero_boundary_in_func_call (std::string func_name, size_t dim, Halide::Expr def_arg, Halide::Expr boundary, Halide::Expr cond, Halide::Expr original) |
Apply zero boundary condition on all tiles except tiles that touch image borders; this pads tiles by zeros if the intra tile index is out of range -. More... | |
Halide::Expr | augment_func_call (std::string func_name, std::vector< std::string > func_args, std::vector< Halide::Expr > extra, Halide::Expr original) |
Mathematically add an expression to all calls to a particular Function; the expression to be added is selected from a list of expressions depending upon the value index of the Function call; all occurances of arguments of the Function must be replaced by calling arguments in the selected expression before adding. More... | |
Halide::Expr | substitute_func_call (std::string func_name, Halide::Internal::Function replace, Halide::Expr original) |
Substitute all calls to a particular Function by a new Function with the same calling arguments. More... | |
Halide::Expr | remove_func_calls (std::string func_name, bool matching, Halide::Expr original) |
Remove all calls to a particular Function or to all Functions except for a particular Function by identity as determined by a boolean flag argument, all calls to the Function are removed if flag is set. More... | |
Halide::Expr | increment_value_index_in_func_call (std::string func_name, int increment, Halide::Expr original) |
Find all calls to a particular Function and increment the value_index (Halide::Internal::Call::value_index) of the call by a given offset. More... | |
Halide::Expr | swap_vars_in_expr (std::string a, std::string b, Halide::Expr original) |
Swaps two variables in an expression. More... | |
Halide::Expr | remove_lets (Halide::Expr) |
Remove all lets by inlining; all sub-expressions will exist once in memory, but may have many pointers to them, so this doesn't cause a combinatorial explosion; if you walk over this as if it were a tree, however, you're going to have a bad time. More... | |
std::map< std::string, Halide::Buffer > | extract_buffer_calls (Halide::Func func) |
Extract the list of buffers called in the definition a function. More... | |
void | reassign_vartag_counts (std::map< std::string, VarTag > &var_tags, std::vector< std::string > args, std::map< std::string, std::string > var_splits) |
Make sure that all vars with tags INNER, OUTER or FULL have VarTag count in the same order as they appear in the function definition; this continuity was broken during tiling or by RecFilterSchedule::split() More... | |
void | reassign_vartag_counts (std::map< std::string, VarTag > &var_tags, std::vector< Halide::Expr > args, std::map< std::string, std::string > var_splits) |
Make sure that all vars with tags INNER, OUTER or FULL have VarTag count in the same order as they appear in the function definition; this continuity was broken during tiling or by RecFilterSchedule::split() More... | |
void | inline_function (Halide::Internal::Function f, std::vector< Halide::Func > func_list) |
Inline a pure function in a list of other functions. More... | |
bool is_undef | ( | Halide::Expr | e | ) |
Return true if all Expr in the vector are undef.
bool is_undef | ( | std::vector< Halide::Expr > | e | ) |
Return true if all Expr in the vector are undef.
bool is_undef | ( | Halide::Tuple | t | ) |
Return true if all elements of the Tuple are undef.
bool expr_depends_on_var | ( | Halide::Expr | expr, |
std::string | var | ||
) |
Check if a given expression depends upon a variable.
expr | expression to be checked |
var | variable name |
bool expr_depends_on_func | ( | Halide::Expr | expr, |
std::string | func_name | ||
) |
Check if a given expression contains calls to a Function.
expr | expression to be checked |
func_name | name of Function |
Halide::Expr substitute_in_func_call | ( | std::string | func_name, |
std::string | var, | ||
Halide::Expr | replace, | ||
Halide::Expr | original | ||
) |
Substitute a variable in all calls to a particular Function in a given expression.
func_name | name of Function |
var | variable to be substituted |
replace | replacement expression |
original | original expression |
Halide::Expr substitute_func_call_with_args | ( | std::string | func_name, |
std::vector< Halide::Expr > | call_args, | ||
Halide::Expr | replace, | ||
Halide::Expr | original | ||
) |
Substitute all calls to a particular Function by a given expression the calling args match the given list.
func_name | name of Function |
call_args | list of calling args to match |
replace | replacement expression |
original | original expression |
Halide::Expr insert_arg_in_func_call | ( | std::string | func_name, |
size_t | pos, | ||
Halide::Expr | arg, | ||
Halide::Expr | original | ||
) |
Add a calling argument to all calls to a particular Function.
func_name | name of Function |
pos | position to add calling arg within list |
arg | calling argument to add |
original | original expression |
Halide::Expr remove_arg_from_func_call | ( | std::string | func_name, |
size_t | pos, | ||
Halide::Expr | original | ||
) |
Remove a calling argument from all calls to a particular Function.
func_name | name of Function |
pos | calling arg index within list to be removed |
original | original expression |
Halide::Expr swap_args_in_func_call | ( | std::string | func_name, |
size_t | va_idx, | ||
size_t | vb_idx, | ||
Halide::Expr | original | ||
) |
Swap two calling arguments of given function in the expression.
func_name | name of function to modify |
va_idx | index of first calling arg |
vb_idx | index of second calling arg |
original | original expression |
Halide::Expr substitute_arg_in_feedforward_func_call | ( | std::string | func_name, |
std::vector< Halide::Expr > | def_arg, | ||
size_t | pos, | ||
Halide::Expr | new_arg, | ||
Halide::Expr | original | ||
) |
Substitute a calling arg in feed forward recursive calls to a Func; feedforward calls are those where all args in the Function call are identical to args in Function definition.
func_name | name of function to modify |
def_arg | args in Function definition |
pos | index of calling arg to be replaced |
new_arg | new calling arg |
original | original expression |
Halide::Expr apply_zero_boundary_in_func_call | ( | std::string | func_name, |
size_t | dim, | ||
Halide::Expr | def_arg, | ||
Halide::Expr | boundary, | ||
Halide::Expr | cond, | ||
Halide::Expr | original | ||
) |
Apply zero boundary condition on all tiles except tiles that touch image borders; this pads tiles by zeros if the intra tile index is out of range -.
func_name | name of function to modify |
dim | dimension containing the RVar |
def_arg | args in Function definition |
boundary | tile width |
cond | condition to check tiles touching borders |
original | original expression |
Halide::Expr augment_func_call | ( | std::string | func_name, |
std::vector< std::string > | func_args, | ||
std::vector< Halide::Expr > | extra, | ||
Halide::Expr | original | ||
) |
Mathematically add an expression to all calls to a particular Function; the expression to be added is selected from a list of expressions depending upon the value index of the Function call; all occurances of arguments of the Function must be replaced by calling arguments in the selected expression before adding.
func_name | name of Function |
func_args | arguments of Function |
extra | list of exprs to be algebraically added |
original | original expression |
Halide::Expr substitute_func_call | ( | std::string | func_name, |
Halide::Internal::Function | replace, | ||
Halide::Expr | original | ||
) |
Substitute all calls to a particular Function by a new Function with the same calling arguments.
func_name | name of Function |
replace | replacement Function |
original | original expression |
Halide::Expr remove_func_calls | ( | std::string | func_name, |
bool | matching, | ||
Halide::Expr | original | ||
) |
Remove all calls to a particular Function or to all Functions except for a particular Function by identity as determined by a boolean flag argument, all calls to the Function are removed if flag is set.
func_name | name of Function |
matching | remove calls matching or not matching |
original | original expression |
Halide::Expr increment_value_index_in_func_call | ( | std::string | func_name, |
int | increment, | ||
Halide::Expr | original | ||
) |
Find all calls to a particular Function and increment the value_index (Halide::Internal::Call::value_index) of the call by a given offset.
func_name | name of Function |
increment | increment to value_index, can be negative |
original | original expression |
Halide::Expr swap_vars_in_expr | ( | std::string | a, |
std::string | b, | ||
Halide::Expr | original | ||
) |
Swaps two variables in an expression.
a | first variable name for swapping |
b | second variable name for swapping |
original | original expression |
Halide::Expr remove_lets | ( | Halide::Expr | ) |
Remove all lets by inlining; all sub-expressions will exist once in memory, but may have many pointers to them, so this doesn't cause a combinatorial explosion; if you walk over this as if it were a tree, however, you're going to have a bad time.
std::map<std::string, Halide::Buffer> extract_buffer_calls | ( | Halide::Func | func | ) |
Extract the list of buffers called in the definition a function.
void reassign_vartag_counts | ( | std::map< std::string, VarTag > & | var_tags, |
std::vector< std::string > | args, | ||
std::map< std::string, std::string > | var_splits | ||
) |
Make sure that all vars with tags INNER, OUTER or FULL have VarTag count in the same order as they appear in the function definition; this continuity was broken during tiling or by RecFilterSchedule::split()
[in,out] | var_tags | list of variable tags to be modified |
[in] | args | pure definition args |
[in] | var_splits | list of variables created by RecFilterSchedule::split() and the corresponding old variables for the pure definition |
void reassign_vartag_counts | ( | std::map< std::string, VarTag > & | var_tags, |
std::vector< Halide::Expr > | args, | ||
std::map< std::string, std::string > | var_splits | ||
) |
Make sure that all vars with tags INNER, OUTER or FULL have VarTag count in the same order as they appear in the function definition; this continuity was broken during tiling or by RecFilterSchedule::split()
[in,out] | var_tags | list of variable tags to be modified |
[in] | args | update definition args |
[in] | var_splits | list of variables created by RecFilterSchedule::split() and the corresponding old variables for this update definition |
void inline_function | ( | Halide::Internal::Function | f, |
std::vector< Halide::Func > | func_list | ||
) |
Inline a pure function in a list of other functions.
[in] | f | function to be inlined |
[in,out] | func_list | list of functions in which calls to first parameter must be inlined |