25 #include "pips_config.h"
42 #include "resources.h"
75 fprintf(stderr,
"Undefined task\n");
78 (void)
fprintf(stderr,
"Arg. \"t\"is not a task.\n");
92 tprivate =
"task_private_data={";
98 return concatenate(tid, tprivate, tcluster, tsync, (
char *) NULL);
105 #define PRAGMA_DISTRIBUTED "distributed"
123 fprintf(stderr,
"pragma info:\n");
159 return concatenate(
"\nUnknown ", s,
" parameter.\n"
160 "Allowed parameters are:\n"
161 "\ton_cluster=n with n a positive number\n"
162 "\tnowait|wait\n", NULL);
203 pips_debug(6,
"begin\n parse pragma %p\n", p);
209 if(strncasecmp(str,
"on_cluster=", 11) == 0) {
220 else if(strncasecmp(str,
"nowait", 7) == 0) {
224 else if(strncasecmp(str,
"wait", 5) == 0) {
322 fprintf(stderr,
"private list entities:\n");
433 bool good_result_p =
true;
435 debug_on(
"MPI_GENERATION_DEBUG_LEVEL");
478 return (good_result_p);
float a2sf[2] __attribute__((aligned(16)))
USER generates a user error (i.e., non fatal) by printing the given MSG according to the FMT.
bool statement_consistent_p(statement p)
task make_task(intptr_t a1, list a2, intptr_t a3, bool a4)
static statement module_statement
const char * module_name(const char *s)
Return the module part of an entity name.
#define gen_context_recurse(start, ctxt, domain_number, flt, rwt)
void reset_current_module_entity(void)
Reset the current module entity.
void reset_current_module_statement(void)
Reset the current module statement.
statement set_current_module_statement(statement)
Set the current module statement.
statement get_current_module_statement(void)
Get the current module statement.
entity set_current_module_entity(entity)
static.c
entity get_current_module_entity(void)
Get the entity of the current module.
bool gen_true2(__attribute__((unused)) gen_chunk *u1, __attribute__((unused)) void *u2)
#define NIL
The empty list (nil in Lisp)
list gen_copy_seq(list l)
Copy a list structure.
size_t gen_length(const list l)
list gen_nconc(list cp1, list cp2)
physically concatenates CP1 and CP2 but do not duplicates the elements
#define CAR(pcons)
Get the value of the first element of a list.
list gen_last(list l)
Return the last element of a list.
#define FOREACH(_fe_CASTER, _fe_item, _fe_list)
Apply/map an instruction block on all the elements of a list.
#define CDR(pcons)
Get the list less its first element.
gen_chunk gen_nth(int n, const list l)
to be used as ENTITY(gen_nth(3, l))...
string db_get_memory_resource(const char *rname, const char *oname, bool pure)
Return the pointer to the resource, whatever it is.
#define DB_PUT_MEMORY_RESOURCE(res_name, own_name, res_val)
conform to old interface.
sequence statement_sequence(statement)
Get the sequence of a statement sequence.
bool statement_sequence_p(statement)
Statement classes induced from instruction type.
bool statement_with_pragma_p(statement)
Test if a statement has some pragma.
list statement_pragmas(statement)
get the list of pragma of a statement s
bool declaration_statement_p(statement)
Had to be optimized according to Beatrice Creusillet.
#define pips_debug
these macros use the GNU extensions that allow variadic macros, including with an empty list.
#define pips_user_warning
#define pips_assert(what, predicate)
common macros, two flavors depending on NDEBUG
#define pips_internal_error
list strsplit(const char *, const char *)
string concatenate(const char *,...)
Return the concatenation of the given strings.
#define GENERIC_GLOBAL_FUNCTION(name, type)
void print_entity_variable(entity e)
print_entity_variable(e)
void print_statement(statement)
Print a statement on stderr.
const char * entity_user_name(entity e)
Since entity_local_name may contain PIPS special characters such as prefixes (label,...
const char * entity_local_name(entity e)
entity_local_name modified so that it does not core when used in vect_fprint, since someone thought t...
entity module_name_to_entity(const char *mn)
This is an alias for local_name_to_top_level_entity.
bool expression_call_p(expression e)
call expression_call(expression e)
#define pragma_expression_p(x)
#define pragma_string_p(x)
#define statement_domain
newgen_sizeofexpression_domain_defined
#define EXPRESSION(x)
EXPRESSION.
#define pragma_expression(x)
#define sequence_statements(x)
#define statement_declarations(x)
#define STATEMENT(x)
STATEMENT.
int fprintf()
test sc_min : ce test s'appelle par : programme fichier1.data fichier2.data ...
The structure used to build lists in NewGen.
ctx_pragma_t: on_cluster on which cluster the pragma may be run (=-1 if run on all cluster) synchro i...
ctx_task_t: pragma information from the pragma task_id id of the task private list of entity,...
struct ctx_pragma ctx_pragma_t
ctx_pragma_t: on_cluster on which cluster the pragma may be run (=-1 if run on all cluster) synchro i...
static ctx_pragma_t pragma_parse_PRAGMA_DISTRIBUTED(pragma p)
parse the pragma to generate a ctx_pragma_t need to checked that the pragma sended is a PRAGMA_DISTRI...
static bool make_task_mapping(__attribute__((unused)) entity module, statement module_statement)
compute the task mapping requires the module statement as param only parse pragma on fisrt level stat...
static void assign_statement_task_mapping(statement st, ctx_task_t *ctx)
assign a task for the statement st
static string pragma_parameter_unknown_message(string s)
**
static void compute_private_entity_list(statement st, ctx_task_t *ctx)
compute what it must be add in the private entity list essentially internal declaration of the statem...
bool task_mapping(const char *module_name)
PIPS pass.
struct ctx_task ctx_task_t
ctx_task_t: pragma information from the pragma task_id id of the task private list of entity,...
#define PRAGMA_DISTRIBUTED
static ctx_pragma_t init_ctx_pragma()
init a ctx_pragma_t by default ctx.on_cluster = -1 run on all cluster ctx.synchro = true com synchro
static ctx_pragma_t ctx_pragma_merge(ctx_pragma_t ctx1, ctx_pragma_t ctx2)
Merge value of 2 ctx_pragma_t, the 2 ctx_pragma_t can't conflict on value.
static void print_ctx_pragma(const ctx_pragma_t ctx)
string task_to_string(task t, bool pretty_print)
void print_task(task t)
Pass: TASK_MAPPING Debug mode: MPI_GENERATION_DEBUG_LEVEL Resource generated:
static void print_ctx_task(const ctx_task_t ctx)
static bool pragma_PRAGMA_DISTRIBUTED_p(pragma p)
Test if the pragma is a PRAGMA_DISTRIBUTED check the first element f the pragma.
task load_parallel_task_mapping(statement)
void store_or_update_parallel_task_mapping(statement, task)
void init_parallel_task_mapping(void)
void reset_parallel_task_mapping(void)
statement_task get_parallel_task_mapping(void)
#define task_synchronization(x)
#define task_undefined_p(x)
#define task_domain_number(x)
#define task_on_cluster(x)
#define task_domain
newgen_statement_task_domain_defined
#define task_private_data(x)