6 #ifndef hwac_header_included
7 #define hwac_header_included
51 extern list freia_opencl_compile_calls(
string ,
dag ,
sequence ,
list ,
const hash_table ,
hash_table ,
const set , FILE *,
set ,
int ,
hash_table );
55 extern list freia_sigmac_compile_calls(
string ,
dag ,
sequence ,
list ,
const hash_table ,
hash_table ,
const set , FILE *,
set ,
int ,
int );
75 extern void dag_dump(FILE *,
const string ,
const dag );
144 extern bool freia_extract_kernel_vtx(
dagvtx ,
bool ,
intptr_t *,
intptr_t *,
intptr_t *,
intptr_t *,
intptr_t *,
intptr_t *,
intptr_t *,
intptr_t *,
intptr_t *);
call freia_statement_to_call(const statement)
return the actual function call from a statement, dealing with assign and returns....
void freia_clean_image_occurrences(hash_table)
cleanup occurrence data structure
void freia_switch_image_in_statement(statement, entity, entity, bool)
switch read or written image in statement if this is an AIPO call, only substitute output or input de...
void freia_migrate_statements(sequence, const set, const set)
string dagvtx_function_name(const dagvtx)
statement freia_memory_management_statement(entity, const hash_table, bool)
bool freia_aipo_spoc_implemented(const freia_api_t *)
whether api available with SPoC
void hwac_kill_statement(statement)
remove contents of statement s.
bool freia_mppa_compiler(const string)
_int dagvtx_number(const dagvtx)
returns the vertex number, i.e.
string dagvtx_number_str(const dagvtx)
list freia_sigmac_compile_calls(string, dag, sequence, list, const hash_table, hash_table, const set, FILE *, set, int, int)
freia_sigmac.c
dagvtx dagvtx_get_producer(const dag, const dagvtx, const entity, _int)
return (last) producer of image e for vertex sink, or NULL if none found.
list dag_computable_vertices(dag, const set, const set, const set)
return the vertices which may be computed from the list of available images, excluding vertices in ex...
bool freia_some_effects_on_images(statement)
freia.c
void freia_spoc_set_operation(const freia_api_t *, _int *, _int *)
??? beurk: I keep the operation as two ints for code regeneration.
void freia_add_image_arguments(list, list *)
prepend limg images in front of the argument list limg is consummed by the operation.
int dag_computation_count(const dag)
return the number of actual operations in dag d.
list freia_trpx_compile_calls(string, dag, sequence, list, const hash_table, hash_table, const set, FILE *, set, int)
freia_terapix.c
void dag_compute_outputs(dag, const hash_table, const set, const list, bool)
(re)compute the list of GLOBAL input & output images for this dag ??? BUG the output is rather an app...
bool freia_image_variable_p(const entity)
rather approximative?
void freia_insert_added_stats(list, list, bool)
insert statements to actual code sequence in "ls" BEWARE that ls is assumed to be in reverse order....
void freia_hack_fix_global_ins_outs(dag, dag)
catch some cases of missing outs between splits...
int freia_substitute_by_helper_call(dag, set, set, list, const string, list, set, int)
substitute those statement in ls that are in dag d and accelerated by a call to function_name(lparams...
void dagvtx_nb_dump(FILE *, const string, const list)
statement freia_copy_image(const entity, const entity)
expression freia_get_nth_scalar_param(const dagvtx, int)
bool is_freia_alloc(const statement)
string freia_compile(string, statement, string)
freia_compile: compile freia module & statement for target
bool freia_convolution_p(dagvtx)
is it the convolution special case?
list dag_split_connected_components(dag, set)
build connected components
int freia_max_pixel_value(void)
void dag_remove_vertex(dag, const dagvtx)
remove vertex v from dag d.
int hwac_freia_api_index(const string)
returns the index of the description of an AIPO function
const freia_api_t * get_freia_api(int)
void freia_close_dep_cache(void)
bool freia_sigmac_compiler(const string)
bool dagvtx_is_measurement_p(const dagvtx)
returns whether the vertex is an image measurement operation.
list freia_opencl_compile_calls(string, dag, sequence, list, const hash_table, hash_table, const set, FILE *, set, int, hash_table)
freia_opencl.c
void freia_shuffle_move_forward(statement)
list freia_extract_params(const int, list, string_buffer, string_buffer, hash_table, int *)
returns an allocated expression list of the parameters only (i.e.
list freia_aipo_compile_calls(string, dag, list, const hash_table, hash_table, int)
freia_aipo.c
bool freia_assignment_p(const entity)
tell whether it is an assignment to ignore?
dag freia_build_dag(string, list, int, const hash_table, const set, const list, bool)
build a full dag from list of statements ls.
bool is_freia_dealloc(const statement)
bool dagvtx_other_stuff_p(const dagvtx)
a vertex with a non AIPO or image related statement.
bool freia_is_transpose_call(statement)
Detect a call to a se transposition function and transpose the arguments.
bool freia_spoc_compiler(const string)
Warning! Do not modify this file that is automatically generated!
string dagvtx_to_string(const dagvtx)
dag-utils.c
void set_append_vertex_statements(set, list)
string dagvtx_compact_operation(const dagvtx)
void dag_statements(set, const dag)
build the set of actual statements in d
list dag_connected_component(dag, list *, bool(*)(const dagvtx, const set, const dag))
extract a sublist of lv which is a connected component.
bool entity_freia_api_p(const entity)
returns whether the entity is a freia API (AIPO) function.
void dagvtx_dump(FILE *, const string, const dagvtx)
for dag debug.
void dag_dot(FILE *, const string, const dag, const list, const list)
output dag in dot format, for debug or show
bool freia_terapix_compiler(const string)
list freia_spoc_compile_calls(string, dag, sequence, list, const hash_table, hash_table, const set, FILE *, set, int)
freia_spoc.c
bool freia_unroll_while(const string)
freia_transformations.c
statement dagvtx_statement(const dagvtx)
return statement if any, or NULL (for input nodes).
void dag_dot_dump_prefix(const string, const string, int, const dag, const list, const list)
bool freia_aipo_terapix_implemented(const freia_api_t *)
whether api available with Ter@pix
int freia_aipo_count(dag, int *, int *)
list dag_fix_image_reuse(dag, hash_table, const hash_table)
fix intermediate image reuse in dag
void dag_consistency_asserts(dag)
do some consistency checking...
bool freia_opencl_compiler(const string)
bool remove_simple_scalar_pointers(const string)
call freia_ok(void)
build all is well freia constant
void hwac_replace_statement(statement, call, bool)
replace statement contents with call to c, or continue if kill
list dag_vertex_preds(const dag, const dagvtx)
return target predecessor vertices as a list.
list freia_get_vertex_params(const dagvtx)
void dag_dot_dump(const string, const string, const dag, const list, const list)
generate a "dot" format from a dag to a file.
bool freia_remove_scalar_ww_deps(const string)
string what_operation(const _int type)
list freia_allocate_new_images_if_needed(list, list, const hash_table, const hash_table, const hash_table)
insert image allocation if needed, for intermediate image inserted before if an image is used only tw...
list dag_split_on_scalars(const dag, bool(*)(const dagvtx), dagvtx(*)(const list, bool), gen_cmp_func_t, void(*)(const dag), const set)
split a dag on scalar dependencies only, with a greedy heuristics.
void freia_init_dep_cache(void)
expression freia_transpose_kernel(const expression)
Transpose a structuring element expression.
_int dagvtx_opid(const dagvtx)
const freia_api_t * hwac_freia_api(const char *)
freia-utils.c
_int dagvtx_optype(const dagvtx)
string dagvtx_operation(const dagvtx)
dagvtx copy_dagvtx_norec(dagvtx)
copy a vertex, but without its successors.
set freia_compute_current_output_images(void)
string what_operation_shape(const _int type)
SPoC: set shape depending on hardware component used by vertex.
bool freia_aipo_compiler(const string)
bool same_constant_parameters(const dagvtx, const dagvtx)
tell whether v1 and v2 point to statements with the same parameters.
bool single_image_assignement_p(dag)
??? I'm unsure about what happens to dead code in the pipeline...
string helper_file_name(string, string)
return malloc'ed "foo.database/Src/%{module}_helper_functions.c" should it depend on the target?...
list freia_get_params(const freia_api_t *, list)
get freia further parameters, skipping image ones
bool freia_scalar_rw_dep(const statement, const statement, list *)
void freia_dag_optimize(dag, hash_table, list *, list *)
remove dead image operations.
list freia_mppa_compile_calls(string, dag, sequence, list, const hash_table, hash_table, const set, FILE *, set, int)
freia_mppa.c
void dag_dump(FILE *, const string, const dag)
for dag debug
bool freia_extract_kernel_vtx(dagvtx, bool, intptr_t *, intptr_t *, intptr_t *, intptr_t *, intptr_t *, intptr_t *, intptr_t *, intptr_t *, intptr_t *)
vertex-based version
entity freia_create_helper_function(const string, list)
void dag_append_vertex(dag, dagvtx)
append new vertex nv to dag d.
const freia_api_t * get_freia_api_vtx(dagvtx)
void dag_cleanup_other_statements(dag)
remove unneeded statements? you must know they are really un-needed!
bool dag_no_image_operation(dag)
tell whether we have something to do with images ??? hmmm...
entity dagvtx_image(const dagvtx)
return the produced image or NULL
bool freia_convolution_width_height(dagvtx, _int *, _int *, bool)
get width & height of convolution
bool freia_statement_aipo_call_p(const statement)
returns whether the statement is a FREIA call.
set freia_compute_output_images(entity, statement)
hash_table freia_build_image_occurrences(statement, set, hash_table, const hash_table)
int dagvtx_ordering(const dagvtx *, const dagvtx *)
int(* gen_cmp_func_t)(const void *, const void *)
internally defined structure.
FI: I do not understand why the type is duplicated at the set level.
The structure used to build lists in NewGen.
FREIA API function name -> SPoC hardware description (and others?)