42 #include <osl/macros.h> 43 #include <osl/relation_list.h> 44 #include <clan/macros.h> 67 for (j = 0; j < level; j++)
71 fprintf(file,
"+-- clan_domain_t\n");
73 fprintf(file,
"+-- NULL clan_domain_t\n");
75 while (domain != NULL) {
78 for (j = 0; j < level; j++)
80 fprintf(file,
"| clan_domain_t\n");
86 for (j = 0; j <= level + 1; j++)
91 osl_relation_list_idump(file, domain->
constraints, level + 1);
93 domain = domain->
next;
97 for (j = 0; j <= level; j++)
104 for (j = 0; j <= level; j++)
105 fprintf(file,
"|\t");
157 while (list != NULL) {
182 while (list != NULL) {
184 node->constraints = osl_relation_list_clone(list->
constraints);
192 previous->
next = node;
193 previous = previous->
next;
232 *head = (*head)->
next;
277 osl_relation_list_p base_constraints = domain->
constraints;
279 while (base_constraints != NULL) {
281 base_constraints = base_constraints->next;
294 osl_relation_list_p base_constraints = domain->
constraints;
295 osl_relation_p stride_constraints;
297 if ((stride != 1) && (stride != -1)) {
298 while (base_constraints != NULL) {
301 osl_relation_free(base_constraints->elt);
303 base_constraints = base_constraints->next;
323 osl_relation_p initialization,
324 osl_relation_p condition,
327 osl_vector_p iterator_term;
328 osl_relation_p iterator_relation;
329 osl_relation_p init_constraints;
334 osl_int_set_si(options->
precision, &iterator_term->v[depth], 1);
335 iterator_relation = osl_relation_from_vector(iterator_term);
341 iterator_relation, 0);
343 osl_vector_free(iterator_term);
344 osl_relation_free(iterator_relation);
357 osl_relation_free(init_constraints);
375 osl_relation_list_p initialization,
376 osl_relation_list_p condition,
382 osl_relation_list_p base,
new = NULL;
396 if (nb_constraint_sets == 1) {
397 for (i = 0; i < nb_indices - 1; i++) {
400 }
else if (nb_constraint_sets != nb_indices) {
401 CLAN_error(
"incorrect number of indices in an xfor loop");
409 for (i = 0; i < nb_indices; i++) {
411 shell->
constraints->elt = osl_relation_clone(base->elt);
414 condition->elt, stride[i], options);
418 iterator = iterator->
next;
419 initialization = initialization->
next;
420 condition = condition->
next;
osl_vector_p clan_vector_term(clan_symbol_p symbol, int coefficient, char *identifier, int precision)
clan_domain_p clan_domain_clone(clan_domain_p list)
osl_relation_p clan_relation_greater(osl_relation_p min, osl_relation_p max, int strict)
void clan_domain_dup(clan_domain_p *head)
osl_relation_p clan_relation_stride(osl_relation_p r, int depth, int stride)
struct clan_symbol * next
void clan_domain_idump(FILE *file, clan_domain_p domain, int level)
clan_domain_p clan_domain_pop(clan_domain_p *head)
void clan_domain_stride(clan_domain_p domain, int depth, int stride)
void clan_relation_and(osl_relation_p dest, osl_relation_p src)
void clan_domain_push(clan_domain_p *head, clan_domain_p node)
void clan_domain_free(clan_domain_p list)
void clan_domain_drop(clan_domain_p *head)
struct clan_domain * next
void clan_domain_and(clan_domain_p domain, osl_relation_p new_constraints)
void clan_domain_dump(FILE *file, clan_domain_p list)
clan_domain_p clan_domain_malloc()
void clan_relation_loop_context(osl_relation_p condition, osl_relation_p initialization, int depth)
struct osl_relation_list * constraints
void clan_domain_xfor(clan_domain_p domain, int depth, clan_symbol_p iterator, osl_relation_list_p initialization, osl_relation_list_p condition, int *stride, clan_options_p options)
void clan_domain_for(clan_domain_p domain, int depth, clan_symbol_p iterator, osl_relation_p initialization, osl_relation_p condition, int stride, clan_options_p options)
int clan_relation_list_nb_elements(osl_relation_list_p list)