97 if (relation != NULL) {
98 switch (relation->
type) {
149 fprintf(file,
"%s",
string);
168 for (j = 0; j < level; j++)
169 fprintf(file,
"|\t");
171 if (relation != NULL) {
172 fprintf(file,
"+-- osl_relation_t (");
176 fprintf(file,
")\n");
179 fprintf(file,
"+-- NULL relation\n");
182 while (relation != NULL) {
185 for (j = 0; j < level; j++)
186 fprintf(file,
"|\t");
187 fprintf(file,
"| osl_relation_t (");
191 fprintf(file,
")\n");
197 for(j = 0; j <= level; j++)
198 fprintf(file,
"|\t");
199 fprintf(file,
"%d %d %d %d %d %d\n",
205 for (i = 0; i < relation->
nb_rows; i++) {
206 for (j = 0; j <= level; j++)
207 fprintf(file,
"|\t");
216 fprintf(file,
"]\n");
219 relation = relation->
next;
222 if (relation != NULL) {
223 for (j = 0; j <= level; j++)
224 fprintf(file,
"|\t");
225 fprintf(file,
"|\n");
226 for (j = 0; j <= level; j++)
227 fprintf(file,
"|\t");
228 fprintf(file,
"V\n");
233 for (j = 0; j <= level; j++)
234 fprintf(file,
"|\t");
267 int precision,
int * first,
268 int cst,
char * name) {
269 char * temp, * body, * sval;
282 sprintf(sval,
"%s", name);
286 sprintf(sval,
"-%s", name);
290 sprintf(temp,
"*%s", name);
298 sprintf(sval,
"+%s", name);
304 sprintf(temp,
"*%s", name);
348 if ((relation == NULL) || (names == NULL)) {
349 OSL_debug(
"no names or relation to build the name array");
365 for (i = offset + 1; i < relation->
nb_output_dims + offset; i++) {
366 sprintf(temp,
"[%d]", i - 1);
421 int row,
int start,
int stop,
int oppose,
423 int i, first = 1, constant;
431 for (i = start; i <= stop; i++) {
434 &relation->
m[row][i], relation->
m[row][i]);
443 relation->
precision, &first, constant, strings[i]);
447 &relation->
m[row][i], relation->
m[row][i]);
467 int row,
char ** strings) {
492 if ((relation == NULL) ||
493 (relation->
m == NULL) ||
497 if ((row < 0) || (row > relation->
nb_rows))
498 OSL_error(
"the specified row does not exist in the relation");
541 char ** strings,
char ** arrays) {
544 char *
string = NULL;
548 OSL_malloc(
string,
char *, high_water_mark *
sizeof(
char));
551 if ((relation == NULL) || (strings == NULL)) {
552 OSL_debug(
"no relation or names while asked to print a comment");
616 int index_output_dims;
617 int index_input_dims;
618 int index_local_dims;
619 int index_parameters;
621 int space, length, left, right;
627 index_output_dims = 1;
629 index_local_dims = index_input_dims + relation->
nb_input_dims;
630 index_parameters = index_local_dims + relation->
nb_local_dims;
634 sprintf(scolumn,
"#");
636 strcat(scolumn,
" ");
639 while (strings[i] != NULL) {
641 length = (space > (int)strlen(strings[i])) ? (
int)strlen(strings[i]) : space;
643 left = space - length - right;
646 for (j = 0; j < left; j++)
647 strcat(scolumn,
" ");
650 for (j = 0; j < length - 1; j++) {
651 sprintf(temp,
"%c", strings[i][j]);
652 strcat(scolumn, temp);
654 if (length >= (
int)strlen(strings[i]))
655 sprintf(temp,
"%c", strings[i][j]);
658 strcat(scolumn, temp);
661 for (j = 0; j < right; j++)
662 strcat(scolumn,
" ");
665 if ((i == index_output_dims) ||
666 (i == index_input_dims) ||
667 (i == index_local_dims) ||
668 (i == index_parameters) ||
670 strcat(scolumn,
"|");
672 strcat(scolumn,
" ");
674 strcat(scolumn,
"\n");
693 int index_output_dims;
694 int index_input_dims;
695 int index_local_dims;
696 int index_parameters;
698 int space, length, left, right;
704 index_output_dims = 1;
706 index_local_dims = index_input_dims + relation->
nb_input_dims;
707 index_parameters = index_local_dims + relation->
nb_local_dims;
711 sprintf(scolumn,
"#");
713 strcat(scolumn,
" ");
716 while (strings[i] != NULL) {
721 i >= index_parameters) {
723 length = (space > (int)strlen(strings[i])) ? (
int)strlen(strings[i]) : space;
725 left = space - length - right;
728 for (j = 0; j < left; j++)
729 strcat(scolumn,
" ");
732 for (j = 0; j < length - 1; j++) {
733 sprintf(temp,
"%c", strings[i][j]);
734 strcat(scolumn, temp);
736 if (length >= (
int)strlen(strings[i]))
737 sprintf(temp,
"%c", strings[i][j]);
740 strcat(scolumn, temp);
743 for (j = 0; j < right; j++)
744 strcat(scolumn,
" ");
746 if ((i == index_output_dims-1) ||
747 (i == index_input_dims-1) ||
748 (i == index_local_dims-1) ||
749 (i == index_parameters-1) ||
750 (i == index_scalar-1))
751 strcat(scolumn,
"|");
753 strcat(scolumn,
" ");
758 strcat(scolumn,
"\n");
780 &nb_scattdims, &nb_localdims, &array_id);
798 int nb_components = 0;
800 while (relation != NULL) {
802 relation = relation->
next;
805 return nb_components;
822 int generated_names = 0;
824 char *
string = NULL;
826 char ** name_array = NULL;
830 if (relation == NULL)
833 OSL_malloc(
string,
char *, high_water_mark *
sizeof(
char));
851 for (part = 1; part <= nb_parts; part++) {
873 for (i = 0; i < relation->
nb_rows; i++) {
881 if (name_array != NULL) {
892 if (name_array != NULL) {
898 relation = relation->
next;
925 int generated_names = 0;
929 int index_output_dims;
930 int index_input_dims;
932 char *
string = NULL;
934 char ** name_array = NULL;
938 if (relation == NULL)
941 OSL_malloc(
string,
char *, high_water_mark *
sizeof(
char));
962 for (part = 1; part <= nb_parts; part++) {
964 index_output_dims = 1;
976 if (print_nth_part) {
983 if (!is_access_array) {
1050 for (i = start_row; i < relation->
nb_rows; i++) {
1053 if (!is_access_array) {
1076 for (j = 1; j < index_input_dims; j++) {
1084 for (j = index_params; j < relation->
nb_columns; j++) {
1094 for (j = index_input_dims; j < index_params; j++) {
1095 if (is_access_array && relation->
nb_rows == 1 &&
1113 if (is_access_array && relation->
nb_rows == 1 &&
1127 if (name_array != NULL) {
1137 if (relation->
nb_rows > 0 && add_fakeiter &&
1140 for (i = 0 ; i < 2 ; i++) {
1142 if (j == index_output_dims && i == 0)
1156 if (name_array != NULL) {
1158 free(name_array[i]);
1162 relation = relation->
next;
1165 if (generated_names)
1182 char *
string = NULL;
1185 OSL_malloc(
string,
char *, high_water_mark *
sizeof(
char));
1216 int print_nth_part,
int add_fakeiter) {
1218 char *
string = NULL;
1220 OSL_malloc(
string,
char *, high_water_mark *
sizeof(
char));
1225 print_nth_part, add_fakeiter);
1245 fprintf(file,
"%s",
string);
1264 print_nth_part, add_fakeiter);
1265 fprintf(file,
"%s",
string);
1317 if ((file != NULL && str != NULL) || (file == NULL && str == NULL))
1318 OSL_error(
"one and only one of the two parameters can be non-NULL");
1326 OSL_warning(
"uninterpreted information (after the relation type)");
1366 OSL_error(
"relation type not supported");
1383 int i, j, k, n, read = 0;
1384 int nb_rows, nb_columns;
1385 int nb_output_dims, nb_input_dims, nb_local_dims, nb_parameters;
1386 int nb_union_parts = 1;
1387 int may_read_nb_union_parts = 1;
1388 int read_attributes = 1;
1397 for (k = 0; k < nb_union_parts; k++) {
1399 while (read_attributes) {
1400 read_attributes = 0;
1404 read = sscanf(c,
" %d %d %d %d %d %d", &nb_rows, &nb_columns,
1405 &nb_output_dims, &nb_input_dims,
1406 &nb_local_dims, &nb_parameters);
1408 if (((read != 1) && (read != 6)) ||
1409 ((read == 1) && (may_read_nb_union_parts != 1)))
1410 OSL_error(
"not 1 or 6 integers on the first relation line");
1414 nb_union_parts = nb_rows;
1415 if (nb_union_parts < 1)
1416 OSL_error(
"negative nb of union parts");
1419 read_attributes = 1;
1422 may_read_nb_union_parts = 0;
1427 relation->
type = type;
1434 for (i = 0; i < relation->
nb_rows; i++) {
1440 if (c == NULL || *c ==
'#' || *c ==
'\n')
1442 if (sscanf(c,
"%s%n", str, &n) == 0)
1454 relation_union = relation;
1458 previous->
next = relation;
1461 previous = relation;
1462 read_attributes = 1;
1465 return relation_union;
1481 relation->
type = type;
1498 int i, j, k, n, read = 0;
1499 int nb_rows, nb_columns;
1500 int nb_output_dims, nb_input_dims, nb_local_dims, nb_parameters;
1501 int nb_union_parts = 1;
1502 int may_read_nb_union_parts = 1;
1503 int read_attributes = 1;
1509 for (k = 0; k < nb_union_parts; k++) {
1511 while (read_attributes) {
1512 read_attributes = 0;
1516 size_t row_size = 0;
1518 while ((*tmp !=
'\0') && (*tmp !=
'\n')) {
1522 strncpy(str, *input,
sizeof(
char) * row_size);
1523 str[(tmp-*input)] =
'\0';
1525 read = sscanf(str,
" %d %d %d %d %d %d",
1526 &nb_rows, &nb_columns,
1527 &nb_output_dims, &nb_input_dims,
1528 &nb_local_dims, &nb_parameters);
1531 if (((read != 1) && (read != 6)) ||
1532 ((read == 1) && (may_read_nb_union_parts != 1)))
1533 OSL_error(
"not 1 or 6 integers on the first relation line");
1537 nb_union_parts = nb_rows;
1538 if (nb_union_parts < 1)
1539 OSL_error(
"negative nb of union parts");
1542 read_attributes = 1;
1545 may_read_nb_union_parts = 0;
1556 for (i = 0; i < relation->
nb_rows; i++) {
1562 if (*input == NULL || **input ==
'#' || **input ==
'\n')
1564 if (sscanf(*input,
"%s%n", str, &n) == 0)
1576 relation_union = relation;
1580 previous->
next = relation;
1583 previous = relation;
1584 read_attributes = 1;
1587 return relation_union;
1646 int nb_rows,
int nb_columns) {
1656 if ((nb_rows < 0) || (nb_columns < 0))
1669 if ((nb_rows == 0) || (nb_columns == 0) ||
1677 for (i = 0; i < nb_rows; i++) {
1678 relation->
m[i] = q + i * nb_columns ;
1679 for (j = 0; j < nb_columns; j++)
1684 relation->
next = NULL;
1712 if (relation == NULL)
1717 for (i = 0; i < nb_elements; i++)
1720 if (relation->
m != NULL) {
1721 if (nb_elements > 0)
1722 free(relation->
m[0]);
1737 while (relation != NULL) {
1738 tmp = relation->
next;
1763 int first = 1, nb_components, nb_parts;
1767 nb_parts = (n == -1) ? nb_components : n;
1768 if (nb_components < nb_parts)
1769 OSL_error(
"not enough union parts to clone");
1771 for (k = 0; k < nb_parts; k++) {
1774 node->type = relation->
type;
1780 for (i = 0; i < relation->
nb_rows; i++)
1783 &node->m[i][j], relation->
m[i][j]);
1791 previous->
next = node;
1792 previous = previous->
next;
1795 relation = relation->
next;
1817 int first = 1, all_rows = 0;
1823 while (relation != NULL) {
1828 OSL_error(
"not enough rows to clone in the relation");
1831 node->type = relation->
type;
1837 for (i = 0; i < n; i++)
1840 &node->m[i][j], relation->
m[i][j]);
1848 previous->
next = node;
1849 previous = previous->
next;
1852 relation = relation->
next;
1867 if (relation == NULL)
1885 r1 = &((*r1)->next);
1904 if ((r1 == NULL) && (r2 == NULL))
1928 if ((relation == NULL) || (vector == NULL) ||
1931 (row >= relation->
nb_rows) || (row < 0))
1932 OSL_error(
"vector cannot replace relation row");
1934 for (i = 0; i < vector->
size; i++)
1952 if ((relation == NULL) || (vector == NULL) ||
1955 (row >= relation->
nb_rows) || (row < 0))
1956 OSL_error(
"vector cannot be added to relation");
1961 for (i = 1; i < vector->
size; i++)
1963 &relation->
m[row][i], relation->
m[row][i], vector->
v[i]);
1980 if ((relation == NULL) || (vector == NULL) ||
1983 (row >= relation->
nb_rows) || (row < 0))
1984 OSL_error(
"vector cannot be subtracted to row");
1989 for (i = 1; i < vector->
size; i++)
1991 &relation->
m[row][i], relation->
m[row][i], vector->
v[i]);
2050 if (relation != NULL) {
2071 if (relation == NULL)
2074 if ((column < 0) || (column > relation->
nb_columns))
2081 for (i = 0; i < relation->
nb_rows; i++) {
2082 for (j = 0; j < column; j++)
2085 for (j = column; j < relation->
nb_columns; j++)
2093 relation->
m = temp->
m;
2132 if ((r1 == NULL) || (r2 == NULL) ||
2136 OSL_error(
"relation rows could not be replaced");
2138 for (i = 0; i < r2->
nb_rows; i++)
2161 if ((r1 == NULL) || (r2 == NULL))
2169 (row > r1->
nb_rows) || (row < 0))
2170 OSL_error(
"constraints cannot be inserted");
2176 for (i = 0; i < row; i++)
2208 if ((relation == NULL) || (c1 == c2))
2211 if ((c1 >= relation->
nb_rows) || (c1 < 0) ||
2212 (c2 >= relation->
nb_rows) || (c2 < 0))
2217 &relation->
m[c1][i], &relation->
m[c2][i]);
2235 if ((row < 0) || (row >= r->
nb_rows))
2242 for (i = 0; i < row; i++)
2246 for (i = row + 1; i < r->
nb_rows; i++)
2275 if ((column < 0) || (column >= r->
nb_columns))
2282 for (i = 0; i < r->
nb_rows; i++) {
2283 for (j = 0; j < column; j++)
2317 if ((relation == NULL) || (insert == NULL))
2322 (column < 0) || (column > relation->
nb_columns))
2323 OSL_error(
"columns cannot be inserted");
2329 for (i = 0; i < relation->
nb_rows; i++) {
2330 for (j = 0; j < column; j++)
2333 for (j = column; j < column + insert->
nb_columns; j++)
2335 &temp->
m[i][j], insert->
m[i][j - column]);
2338 j < insert->nb_columns + relation->
nb_columns; j++)
2340 &temp->
m[i][j], relation->
m[i][j - insert->
nb_columns]);
2347 relation->
m = temp->
m;
2377 OSL_error(
"incompatible sizes for concatenation");
2380 OSL_warning(
"relation concatenation is done on the first elements " 2407 if (((r1 == NULL) && (r2 != NULL)) ||
2408 ((r1 != NULL) && (r2 == NULL)))
2421 for (i = 0; i < r1->
nb_rows; ++i)
2439 while ((r1 != NULL) && (r2 != NULL)) {
2447 if (((r1 == NULL) && (r2 != NULL)) || ((r1 != NULL) && (r2 == NULL)))
2471 (actual != *expected)) {
2499 int expected_nb_output_dims,
2500 int expected_nb_input_dims,
2501 int expected_nb_parameters) {
2502 int expected_nb_local_dims, expected_nb_columns;
2509 expected_nb_local_dims = 0;
2513 expected_nb_columns = expected_nb_output_dims +
2514 expected_nb_input_dims +
2515 expected_nb_local_dims +
2516 expected_nb_parameters +
2519 if (expected_nb_columns != relation->
nb_columns) {
2545 int expected_nb_output_dims,
2546 int expected_nb_input_dims,
2547 int expected_nb_parameters) {
2551 if (relation == NULL) {
2555 OSL_debug(
"NULL relation with some expected attibutes");
2564 (expected_type != relation->
type)) ||
2585 OSL_warning(
"context without 0 as number of output dimensions");
2594 OSL_warning(
"domain or context without 0 input dimensions");
2611 while (relation != NULL) {
2625 expected_nb_output_dims,
2626 expected_nb_input_dims,
2627 expected_nb_parameters)) {
2635 for (i = 0; i < relation->
nb_rows; i++) {
2639 "strictly made of 0 or 1");
2653 relation = relation->
next;
2671 int nb_output_dims,
int nb_input_dims,
2672 int nb_local_dims,
int nb_parameters) {
2673 if (relation != NULL) {
2693 int nb_output_dims,
int nb_input_dims,
2694 int nb_local_dims,
int nb_parameters) {
2695 while (relation != NULL) {
2697 nb_output_dims, nb_input_dims,
2698 nb_local_dims, nb_parameters);
2699 relation = relation->
next;
2713 while (relation != NULL) {
2714 relation->
type = type;
2715 relation = relation->
next;
2737 if (relation == NULL)
2741 OSL_warning(
"asked for an array id of non-array relation");
2745 while (relation != NULL) {
2749 if ((relation->
nb_rows < 1) ||
2751 OSL_warning(
"no array identifier in an access function");
2762 for (i = 0; i < relation->
nb_rows; i++) {
2768 if (nb_array_id == 0) {
2769 OSL_warning(
"no array identifier in an access function");
2772 if (nb_array_id > 1) {
2773 OSL_warning(
"several array identifiers in one access function");
2776 for (i = 0; i < relation->
nb_columns - 1; i++) {
2777 if ((i != 1) && !
osl_int_zero(precision, relation->
m[row_id][i])) {
2784 relation->
m[row_id][1])) {
2791 if (array_id <= 0) {
2792 OSL_warning(
"negative or 0 identifier in access function");
2798 reference_array_id = array_id;
2802 if (reference_array_id != array_id) {
2803 OSL_warning(
"inconsistency of array identifiers in an " 2804 "union of access relations");
2809 relation = relation->
next;
2825 if (relation == NULL)
2857 int * nb_parameters,
2869 while (relation != NULL) {
2873 type = relation->
type;
2879 local_nb_iterators = 0;
2880 local_nb_scattdims = 0;
2888 local_nb_scattdims = 0;
2904 local_nb_scattdims = 0;
2918 *nb_parameters =
OSL_max(*nb_parameters, local_nb_parameters);
2919 *nb_iterators =
OSL_max(*nb_iterators, local_nb_iterators);
2920 *nb_scattdims =
OSL_max(*nb_scattdims, local_nb_scattdims);
2921 *nb_localdims =
OSL_max(*nb_localdims, local_nb_localdims);
2922 *array_id =
OSL_max(*array_id, local_array_id);
2923 relation = relation->
next;
2946 while (relation != NULL) {
2948 OSL_error(
"Number of output dims is greater than required extension");
2955 node->type = relation->
type;
2963 for (i = 0; i < relation->
nb_rows; i++) {
2968 j < relation->nb_columns + offset; j++)
2969 osl_int_assign(precision, &node->m[i][j], relation->
m[i][j - offset]);
2973 for (i = relation->
nb_rows; i < relation->nb_rows + offset; i++) {
2974 for (j = 0; j < relation->
nb_columns + offset; j++) {
2986 previous->
next = node;
2987 previous = previous->
next;
2990 relation = relation->
next;
3030 for (i = 0; i < (size_t)r->
nb_rows; ++i) {
3031 for (j = 0; j < (size_t)r->
nb_columns; ++j) {
3074 if (relation_list == NULL || *relation_list == NULL || part == NULL) {
3078 if (*relation_list == part) {
3079 *relation_list = (*relation_list)->
next;
3083 previous = *relation_list;
3084 for (relation = (*relation_list)->
next; relation != NULL;
3085 relation = relation->
next) {
3086 if (relation == part) {
3088 relation->
next = NULL;
3092 previous = relation;
int osl_int_divisible(int precision, osl_const_int_t val1, osl_const_int_t val2)
(val1 % val2) == 0
void *(* osl_clone_f)(void *)
void osl_int_print(FILE *file, int precision, osl_const_int_t value)
void osl_relation_print(FILE *file, osl_relation_p relation)
void *(* osl_sread_f)(char **)
void osl_int_dump_precision(FILE *file, int precision)
osl_relation_p osl_relation_clone_nconstraints(osl_relation_p relation, int n)
int osl_int_get_si(int precision, osl_const_int_t value)
Get the value in a int.
void osl_int_swap(int precision, osl_int_const_p var1, osl_int_const_p var2)
Swap the osl ints.
#define OSL_STRING_MAY_WRITE
osl_interface_p osl_relation_interface(void)
void osl_relation_free_inside(osl_relation_p relation)
osl_relation_p osl_relation_extend_output(osl_relation_p relation, int dim)
void(* osl_idump_f)(FILE *, void *, int)
void osl_int_set_si(int precision, osl_int_const_p variable, int i)
variable = i
osl_names_p osl_names_generate(char *parameter_prefix, int nb_parameters, char *iterator_prefix, int nb_iterators, char *scatt_dim_prefix, int nb_scatt_dims, char *local_dim_prefix, int nb_local_dims, char *array_prefix, int nb_arrays)
static char * osl_relation_sprint_type(osl_relation_p relation)
int osl_int_one(int precision, osl_const_int_t value)
value == 1
osl_interface_p osl_interface_malloc(void)
char * osl_relation_spprint_polylib_scoplib(osl_relation_p relation, osl_names_p names, int print_nth_part, int add_fakeiter)
int osl_relation_get_array_id(osl_relation_p relation)
void osl_int_add(int precision, osl_int_const_p variable, osl_const_int_t val1, osl_const_int_t val2)
variable = val1 + val2
void osl_relation_free(osl_relation_p relation)
void osl_relation_idump(FILE *file, osl_relation_p relation, int level)
void osl_util_safe_strcat(char **dst, char *src, size_t *hwm)
char *(* osl_sprint_f)(void *)
void osl_int_sprint(char *string, int precision, osl_const_int_t value)
void osl_relation_pprint_scoplib(FILE *file, osl_relation_p relation, osl_names_p names, int print_nth_part, int add_fakeiter)
static char * osl_relation_column_string(osl_relation_p relation, char **strings)
static char * osl_relation_sprint_comment(osl_relation_p relation, int row, char **strings, char **arrays)
osl_relation_p osl_relation_read(FILE *foo)
void osl_relation_insert_constraints(osl_relation_p r1, osl_relation_p r2, int row)
static int osl_relation_read_type(FILE *file, char **str)
void osl_relation_pprint(FILE *file, osl_relation_p relation, osl_names_p names)
void osl_int_set_precision(int const precision, int const new_precision, osl_int_p i)
Change the precision of the osl_int.
#define OSL_strdup(destination, source)
int osl_int_ne(int precision, osl_const_int_t val1, osl_const_int_t val2)
val1 != val2
void *(* osl_malloc_f)(void)
osl_vector_p osl_vector_pmalloc(int precision, int size)
osl_relation_p osl_relation_union(osl_relation_p r1, osl_relation_p r2)
#define OSL_TYPE_MAY_WRITE
#define OSL_STRING_CONTEXT
static char * osl_relation_column_string_scoplib(osl_relation_p relation, char **strings)
static int osl_relation_is_simple_output(osl_relation_p relation, int row)
void osl_relation_insert_blank_column(osl_relation_p relation, int column)
osl_relation_p osl_relation_sread(char **input)
char * osl_util_strdup(char const *str)
String duplicate.
char * osl_relation_sprint(osl_relation_p relation)
int(* osl_equal_f)(void *, void *)
void osl_relation_dump(FILE *file, osl_relation_p relation)
osl_relation_p osl_relation_clone(osl_relation_p relation)
char * osl_relation_spprint_scoplib(osl_relation_p relation, osl_names_p names, int print_nth_part, int add_fakeiter)
int osl_relation_equal(osl_relation_p r1, osl_relation_p r2)
char * osl_relation_spprint_polylib(osl_relation_p relation, osl_names_p names)
static void osl_relation_print_type(FILE *file, osl_relation_p relation)
osl_relation_p osl_relation_malloc(int nb_rows, int nb_columns)
static char * osl_relation_subexpression(osl_relation_p relation, int row, int start, int stop, int oppose, char **strings)
void osl_int_sprint_txt(char *string, int precision, osl_const_int_t value)
void osl_relation_remove_row(osl_relation_p r, int row)
osl_strings_p osl_strings_read(FILE *file)
int osl_relation_integrity_check(osl_relation_p relation, int expected_type, int expected_nb_output_dims, int expected_nb_input_dims, int expected_nb_parameters)
void osl_int_oppose(int precision, osl_int_const_p variable, osl_const_int_t value)
variable = - value
void osl_relation_swap_constraints(osl_relation_p relation, int c1, int c2)
void osl_int_init_set_si(int precision, osl_int_const_p variable, int i)
variable = i // including initialization for GMP
void osl_relation_insert_columns(osl_relation_p relation, osl_relation_p insert, int column)
void osl_relation_set_attributes_one(osl_relation_p relation, int nb_output_dims, int nb_input_dims, int nb_local_dims, int nb_parameters)
void osl_relation_set_precision(int const precision, osl_relation_p r)
#define OSL_STRING_DOMAIN
void osl_names_free(osl_names_p names)
void osl_relation_insert_blank_row(osl_relation_p relation, int row)
#define OSL_STRING_SCATTERING
osl_relation_p osl_relation_sread_polylib(char **input)
void osl_strings_free(osl_strings_p strings)
void osl_relation_add(osl_relation_p *r1, osl_relation_p r2)
void(* osl_free_f)(void *)
int osl_int_mone(int precision, osl_const_int_t value)
value == -1
int osl_relation_is_access(osl_relation_p relation)
int osl_relation_nb_components(osl_relation_p relation)
void osl_int_sread(char **string, int precision, osl_int_const_p i)
sread for osl int
void osl_util_sskip_blank_and_comments(char **str)
void osl_relation_set_same_precision(osl_relation_p a, osl_relation_p b)
#define OSL_STRING_UNDEFINED
void osl_relation_replace_constraints(osl_relation_p r1, osl_relation_p r2, int row)
void osl_relation_sub_vector(osl_relation_p relation, osl_vector_p vector, int row)
size_t osl_strings_size(osl_const_strings_const_p strings)
char * osl_relation_spprint(osl_relation_p relation, osl_names_p names)
void osl_relation_replace_vector(osl_relation_p relation, osl_vector_p vector, int row)
void osl_relation_insert_vector(osl_relation_p relation, osl_vector_p vector, int row)
void osl_relation_set_type(osl_relation_p relation, int type)
osl_relation_p osl_relation_psread_polylib(char **input, int precision)
static char ** osl_relation_strings(osl_relation_p relation, osl_names_p names)
void osl_relation_get_attributes(osl_relation_p relation, int *nb_parameters, int *nb_iterators, int *nb_scattdims, int *nb_localdims, int *array_id)
osl_relation_p osl_relation_psread(char **input, int precision)
osl_relation_p osl_relation_concat_constraints(osl_relation_p r1, osl_relation_p r2)
int osl_relation_part_equal(osl_relation_p r1, osl_relation_p r2)
static int osl_relation_check_attribute(int *expected, int actual)
int osl_int_neg(int precision, osl_const_int_t value)
value < 0
static int osl_relation_check_nb_columns(osl_relation_p relation, int expected_nb_output_dims, int expected_nb_input_dims, int expected_nb_parameters)
osl_strings_p osl_strings_sread(char **input)
osl_relation_p osl_relation_pmalloc(int precision, int nb_rows, int nb_columns)
int osl_int_pos(int precision, osl_const_int_t value)
value > 0
osl_relation_p osl_relation_from_vector(osl_vector_p vector)
void osl_int_sub(int precision, osl_int_const_p variable, osl_const_int_t val1, osl_const_int_t val2)
variable = val1 - val2
int osl_util_get_precision(void)
osl_relation_p osl_relation_pread(FILE *foo, int precision)
void osl_relation_remove_part(osl_relation_p *relation_list, osl_relation_p part)
void osl_relation_set_attributes(osl_relation_p relation, int nb_output_dims, int nb_input_dims, int nb_local_dims, int nb_parameters)
osl_relation_p osl_relation_concat_vector(osl_relation_p relation, osl_vector_p vector)
void osl_int_clear(int precision, osl_int_const_p variable)
variable = 0 // including cleaning for GMP
static osl_names_p osl_relation_names(osl_relation_p relation)
void osl_int_assign(int precision, osl_int_const_p variable, osl_const_int_t value)
variable = value
char * osl_util_skip_blank_and_comments(FILE *file, char *str)
struct osl_relation * next
void osl_relation_remove_column(osl_relation_p r, int column)
void osl_relation_add_vector(osl_relation_p relation, osl_vector_p vector, int row)
char * osl_relation_expression(osl_relation_p relation, int row, char **strings)
int osl_int_zero(int precision, osl_const_int_t value)
value == 0
osl_relation_p osl_relation_nclone(osl_relation_p relation, int n)
void osl_vector_free(osl_vector_p vector)
#define OSL_TYPE_SCATTERING
static char * osl_relation_expression_element(osl_int_t val, int precision, int *first, int cst, char *name)
#define OSL_malloc(ptr, type, size)