#include <stdio.h>
#include <osl/names.h>
#include <osl/vector.h>
Go to the source code of this file.
typedef struct osl_relation* osl_relation_p |
Definition at line 118 of file relation.h.
typedef struct osl_relation osl_relation_t |
Definition at line 117 of file relation.h.
void osl_relation_add | ( | osl_relation_p * | r1, | |
osl_relation_p | r2 | |||
) |
osl_relation_add function: this function adds a relation (union) at the end of the relation (union) pointed by r1. No new relation is created: this functions links the two input unions. If the first relation is NULL, it is set to the second relation.
[in,out] | r1 | Pointer to the first relation (union). |
[in] | r2 | The second relation (union). |
Definition at line 1264 of file relation.c.
Referenced by osl_relation_union().
void osl_relation_add_vector | ( | osl_relation_p | relation, | |
osl_vector_p | vector, | |||
int | row | |||
) |
osl_relation_add_vector function: this function adds (meaning, +) a vector to the "row"^th row of a relation "relation". It directly updates the relation union part pointed by "relation" and this part only.
[in,out] | relation | The relation we want to add a vector to a row. |
[in] | vector | The vector that will replace a row of the relation. |
[in] | row | The row of the relation to add the vector. |
Definition at line 1329 of file relation.c.
References osl_relation::m, osl_relation::nb_columns, osl_relation::nb_rows, OSL_error, osl_int_add(), osl_int_assign(), osl_int_get_si(), osl_vector::precision, osl_relation::precision, osl_vector::size, and osl_vector::v.
osl_relation_p osl_relation_clone | ( | osl_relation_p | relation | ) |
osl_relation_clone function: this function builds and returns a "hard copy" (not a pointer copy) of an osl_relation_t data structure (the full union of relation).
[in] | relation | The pointer to the relation we want to clone. |
Definition at line 1247 of file relation.c.
References osl_relation_nclone().
Referenced by osl_relation_concat_constraints(), osl_relation_list_clone(), osl_relation_list_node(), osl_relation_union(), osl_scop_clone(), and osl_statement_clone().
osl_relation_p osl_relation_concat_constraints | ( | osl_relation_p | r1, | |
osl_relation_p | r2 | |||
) |
osl_relation_concat_constraints function: this function builds a new relation from two relations sent as parameters. The new set of constraints is built as the concatenation of the rows of the first elements of the two relation unions r1 and r2. This means, there is no next field in the result.
[in] | r1 | The first relation. |
[in] | r2 | The second relation. |
Definition at line 1722 of file relation.c.
References osl_relation::nb_columns, osl_relation::nb_rows, osl_relation::next, OSL_error, osl_relation_clone(), osl_relation_pmalloc(), osl_relation_replace_constraints(), OSL_warning, and osl_relation::precision.
Referenced by osl_relation_concat_vector().
osl_relation_p osl_relation_concat_vector | ( | osl_relation_p | relation, | |
osl_vector_p | vector | |||
) |
osl_relation_concat_vector function: this function builds a new relation from one relation and a vector sent as parameters. The new set of constraints is built as the concatenation of the rows of the first part of the relation and of the vector constraint. This means, there is no next field in the result.
[in] | r | The input relation. |
[in] | v | The input vector. |
Definition at line 1410 of file relation.c.
References osl_relation_concat_constraints(), osl_relation_free(), and osl_relation_from_vector().
void osl_relation_dump | ( | FILE * | file, | |
osl_relation_p | relation | |||
) |
osl_relation_dump function: this function prints the content of a osl_relation_t structure (*relation) into a file (file, possibly stdout).
[in] | file | File where informations are printed. |
[in] | relation | The relation whose information have to be printed. |
Definition at line 246 of file relation.c.
References osl_relation_idump().
Referenced by osl_relation_integrity_check().
int osl_relation_equal | ( | osl_relation_p | r1, | |
osl_relation_p | r2 | |||
) |
osl_relation_equal function: this function returns true if the two relations provided as parameters are the same, false otherwise.
[in] | r1 | The first relation. |
[in] | r2 | The second relation. |
Definition at line 1757 of file relation.c.
References osl_relation::m, osl_relation::nb_columns, osl_relation::nb_input_dims, osl_relation::nb_local_dims, osl_relation::nb_output_dims, osl_relation::nb_parameters, osl_relation::nb_rows, osl_relation::next, osl_int_ne(), osl_relation::precision, and osl_relation::type.
Referenced by osl_relation_list_equal(), osl_scop_equal(), and osl_statement_equal().
char* osl_relation_expression | ( | osl_relation_p | relation, | |
int | row, | |||
char ** | strings | |||
) |
osl_relation_expression function: this function returns a string corresponding to an affine expression stored at the "row"^th row of the relation pointed by "relation".
[in] | relation | A set of linear expressions. |
[in] | row | The row corresponding to the expression. |
[in] | strings | Array of textual names of the various elements. |
Definition at line 467 of file relation.c.
References osl_relation::nb_columns, and osl_relation_subexpression().
Referenced by osl_relation_sprint_comment().
osl_relation_p osl_relation_extend_output | ( | osl_relation_p | relation, | |
int | dim | |||
) |
osl_relation_extend_output function: this function extends the number of output dimensions of a given relation. It returns a copy of the input relation with a number of output dimensions extended to "dim" for all its union components. The new output dimensions are simply set equal to 0. The extended number of dimensions must be higher than or equal to the original one (an error will be raised otherwise).
[in] | relation | The input relation to extend. |
[in] | dim | The number of output dimension to reach. |
Definition at line 2269 of file relation.c.
References osl_relation::m, osl_relation::nb_columns, osl_relation::nb_input_dims, osl_relation::nb_local_dims, osl_relation::nb_output_dims, osl_relation::nb_parameters, osl_relation::nb_rows, osl_relation::next, OSL_error, osl_int_assign(), osl_int_set_si(), OSL_max, osl_relation_pmalloc(), osl_relation::precision, and osl_relation::type.
Referenced by osl_scop_normalize_scattering().
void osl_relation_free | ( | osl_relation_p | relation | ) |
osl_relation_free function: this function frees the allocated memory for an osl_relation_t structure.
[in] | relation | The pointer to the relation we want to free. |
Definition at line 1165 of file relation.c.
References osl_relation::next, and osl_relation_free_inside().
Referenced by osl_relation_concat_vector(), osl_relation_insert_vector(), osl_relation_list_free(), osl_scop_free(), osl_scop_normalize_scattering(), and osl_statement_free().
void osl_relation_free_inside | ( | osl_relation_p | relation | ) |
osl_relation_free_inside function: this function frees the allocated memory for the inside of a osl_relation_t structure, i.e. only m.
[in] | relation | The pointer to the relation we want to free internals. |
Definition at line 1136 of file relation.c.
References osl_relation::m, osl_relation::nb_columns, osl_relation::nb_rows, osl_int_clear(), and osl_relation::precision.
Referenced by osl_relation_free(), osl_relation_insert_blank_column(), osl_relation_insert_columns(), osl_relation_insert_constraints(), osl_relation_remove_column(), and osl_relation_remove_row().
osl_relation_p osl_relation_from_vector | ( | osl_vector_p | vector | ) |
osl_relation_from_vector function: this function converts a vector "vector" to a relation with a single row and returns a pointer to that relation.
[in] | vector | The vector to convert to a relation. |
Definition at line 1488 of file relation.c.
References osl_relation_pmalloc(), osl_relation_replace_vector(), osl_vector::precision, and osl_vector::size.
Referenced by osl_relation_concat_vector(), and osl_relation_insert_vector().
int osl_relation_get_array_id | ( | osl_relation_p | relation | ) |
osl_relation_get_array_id function: this function returns the array identifier in a relation with access type It returns OSL_UNDEFINED if it is not able to find it (in particular if there are irregularities in the relation).
[in] | relation | The relation where to find an array identifier. |
Definition at line 2064 of file relation.c.
References osl_relation::m, osl_relation::nb_columns, osl_relation::nb_rows, osl_relation::next, osl_int_divisible(), osl_int_get_si(), osl_int_zero(), osl_relation_is_access(), OSL_UNDEFINED, OSL_warning, and osl_relation::precision.
Referenced by osl_relation_get_attributes(), osl_relation_integrity_check(), osl_relation_sprint_comment(), and osl_relation_strings().
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_get_attributes function: this function returns, through its parameters, the maximum values of the relation attributes (nb_iterators, nb_parameters etc), depending on its type. HOWEVER, it updates the parameter value iff the attribute is greater than the input parameter value. Hence it may be used to get the attributes as well as to find the maximum attributes for several relations. The array identifier 0 is used when there is no array identifier (AND this is OK), OSL_UNDEFINED is used to report it is impossible to provide the property while it should. This function is not intended for checking, the input relation should be correct.
[in] | relation | The relation to extract attribute values. |
[in,out] | nb_parameters | Number of parameter attribute. |
[in,out] | nb_iterators | Number of iterators attribute. |
[in,out] | nb_scattdims | Number of scattering dimensions attribute. |
[in,out] | nb_localdims | Number of local dimensions attribute. |
[in,out] | array_id | Maximum array identifier attribute. |
Definition at line 2193 of file relation.c.
References osl_relation::nb_input_dims, osl_relation::nb_local_dims, osl_relation::nb_output_dims, osl_relation::nb_parameters, osl_relation::next, OSL_max, osl_relation_get_array_id(), osl_relation_is_access(), OSL_TYPE_ACCESS, OSL_TYPE_CONTEXT, OSL_TYPE_DOMAIN, OSL_TYPE_SCATTERING, OSL_UNDEFINED, and osl_relation::type.
Referenced by osl_relation_list_get_attributes(), osl_relation_names(), osl_scop_get_attributes(), and osl_statement_get_attributes().
void osl_relation_idump | ( | FILE * | file, | |
osl_relation_p | relation, | |||
int | level | |||
) |
osl_relation_idump function: this function displays a osl_relation_t structure (*relation) into a file (file, possibly stdout) in a way that trends to be understandable. It includes an indentation level (level) in order to work with others idump functions.
[in] | file | File where informations are printed. |
[in] | relation | The relation whose information has to be printed. |
[in] | level | Number of spaces before printing, for each line. |
Definition at line 164 of file relation.c.
References osl_relation::m, osl_relation::nb_columns, osl_relation::nb_input_dims, osl_relation::nb_local_dims, osl_relation::nb_output_dims, osl_relation::nb_parameters, osl_relation::nb_rows, osl_relation::next, osl_int_dump_precision(), osl_int_print(), osl_relation_print_type(), and osl_relation::precision.
Referenced by osl_relation_dump(), osl_relation_list_idump(), osl_scop_idump(), and osl_statement_idump().
void osl_relation_insert_blank_column | ( | osl_relation_p | relation, | |
int | column | |||
) |
osl_relation_insert_blank_column function: this function inserts a new column filled with zeros to an existing relation union part (it only affects the first union part). WARNING: this function does not update the relation attributes.
[in,out] | relation | The relation to add a column in. |
[in] | column | The column where to insert the blank column. |
Definition at line 1447 of file relation.c.
References osl_relation::m, osl_relation::nb_columns, osl_relation::nb_rows, OSL_error, osl_int_assign(), osl_relation_free_inside(), osl_relation_pmalloc(), and osl_relation::precision.
void osl_relation_insert_blank_row | ( | osl_relation_p | relation, | |
int | row | |||
) |
osl_relation_insert_blank_row function: this function inserts a new row filled with zeros o an existing relation union part (it only affects the first union part).
[in,out] | relation | The relation to add a row in. |
[in] | row | The row where to insert the blank row. |
Definition at line 1428 of file relation.c.
References osl_relation::nb_columns, osl_relation_insert_vector(), osl_vector_free(), osl_vector_pmalloc(), and osl_relation::precision.
void osl_relation_insert_columns | ( | osl_relation_p | relation, | |
osl_relation_p | insert, | |||
int | column | |||
) |
osl_relation_insert_columns function: this function inserts new columns to an existing relation union part (it only affects the first union part). The columns are copied out from the matrix of an input relation which must have the convenient number of rows. All columns of the input matrix are copied. WARNING: this function does not update the relation attributes of the modified matrix.
[in,out] | relation | The relation to add columns in. |
[in] | insert | The relation containing the columns to add. |
[in] | column | The column where to insert the new columns. |
Definition at line 1669 of file relation.c.
References osl_relation::m, osl_relation::nb_columns, osl_relation::nb_rows, OSL_error, osl_int_assign(), osl_relation_free_inside(), osl_relation_pmalloc(), and osl_relation::precision.
void osl_relation_insert_constraints | ( | osl_relation_p | r1, | |
osl_relation_p | r2, | |||
int | row | |||
) |
osl_relation_insert_constraints function: this function inserts the rows of the relation "r2" to the relation "r1", starting from the "row"^th row of "r1" (-1 is a shortcut to insert the "r2" constraints after the constraints of r1). It directly updates the relation union part pointed by "r1" and this part only. If "r2" (or "r1") is NULL, the relation is left unmodified.
[in,out] | r1 | The relation we want to extend. |
[in] | r2 | The relation to be inserted. |
[in] | row | The row where to insert the constraints (-1 to insert them after those of "r1"). |
Definition at line 1537 of file relation.c.
References osl_relation::m, osl_relation::nb_columns, osl_relation::nb_rows, OSL_error, osl_int_assign(), osl_relation_free_inside(), osl_relation_pmalloc(), osl_relation_replace_constraints(), and osl_relation::precision.
Referenced by osl_relation_insert_vector().
void osl_relation_insert_vector | ( | osl_relation_p | relation, | |
osl_vector_p | vector, | |||
int | row | |||
) |
osl_relation_insert_vector function: this function inserts a new row corresponding to the vector "vector" to the relation "relation" by inserting it at the "row"^th row of "relation" (-1 is a shortcut to insert the vector after the constraints of the relation). It directly updates the relation union part pointed by "relation" and this part only. If "vector" (or "relation") is NULL, the relation is left unmodified.
[in,out] | relation | The relation we want to extend. |
[in] | vector | The vector that will be added relation. |
[in] | row | The row where to insert the vector (-1 to insert it after the relation constraints). |
Definition at line 1389 of file relation.c.
References osl_relation_free(), osl_relation_from_vector(), and osl_relation_insert_constraints().
Referenced by osl_relation_insert_blank_row().
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 | |||
) |
osl_relation_integrity_check function: this function checks that a relation is "well formed" according to some expected properties (setting an expected value to OSL_UNDEFINED means that we do not expect a specific value) and what the relation is supposed to represent. It returns 0 if the check failed or 1 if no problem has been detected.
[in] | relation | The relation we want to check. |
[in] | expected_type | Semantics about this relation (domain, access...). |
[in] | expected_nb_output_dims | Expected number of output dimensions. |
[in] | expected_nb_input_dims | Expected number of input dimensions. |
[in] | expected_nb_parameters | Expected number of parameters. |
Definition at line 1879 of file relation.c.
References osl_relation::m, osl_relation::nb_columns, osl_relation::nb_input_dims, osl_relation::nb_local_dims, osl_relation::nb_output_dims, osl_relation::nb_parameters, osl_relation::nb_rows, osl_relation::next, OSL_debug, osl_int_one(), osl_int_zero(), osl_relation_check_attribute(), osl_relation_check_nb_columns(), osl_relation_dump(), osl_relation_get_array_id(), osl_relation_is_access(), OSL_TYPE_ACCESS, OSL_TYPE_CONTEXT, OSL_TYPE_DOMAIN, OSL_UNDEFINED, OSL_warning, osl_relation::precision, and osl_relation::type.
Referenced by osl_relation_list_integrity_check(), osl_scop_integrity_check(), and osl_statement_integrity_check().
int osl_relation_is_access | ( | osl_relation_p | relation | ) |
osl_relation_is_access function: this function returns 1 if the relation corresponds to an access relation, whatever its precise type (read, write etc.), 0 otherwise.
relation | The relation to check wheter it is an access relation or not. |
Definition at line 2160 of file relation.c.
References OSL_TYPE_ACCESS, OSL_TYPE_MAY_WRITE, OSL_TYPE_READ, OSL_TYPE_WRITE, and osl_relation::type.
Referenced by osl_relation_get_array_id(), osl_relation_get_attributes(), osl_relation_integrity_check(), osl_relation_list_filter(), osl_relation_sprint_comment(), and osl_relation_strings().
osl_relation_p osl_relation_malloc | ( | int | nb_rows, | |
int | nb_columns | |||
) |
osl_relation_malloc function: this function is equivalent to osl_relation_pmalloc() except that the precision corresponds to the precision environment variable or to the highest available precision if it is not defined.
Definition at line 1124 of file relation.c.
References osl_relation_pmalloc(), and osl_util_get_precision().
osl_relation_p osl_relation_nclone | ( | osl_relation_p | relation, | |
int | n | |||
) |
osl_relation_nclone function: this functions builds and returns a "hard copy" (not a pointer copy) of a osl_relation_t data structure such that the clone is restricted to the "n" first rows of the relation. This applies to all the parts in the case of a relation union.
[in] | relation | The pointer to the relation we want to clone. |
[in] | n | The number of row of the relation we want to clone (the special value -1 means "all the rows"). |
Definition at line 1197 of file relation.c.
References osl_relation::m, osl_relation::nb_columns, osl_relation::nb_input_dims, osl_relation::nb_local_dims, osl_relation::nb_output_dims, osl_relation::nb_parameters, osl_relation::nb_rows, osl_relation::next, OSL_error, osl_int_assign(), osl_relation_pmalloc(), osl_relation::precision, and osl_relation::type.
Referenced by osl_relation_clone().
osl_relation_p osl_relation_pmalloc | ( | int | precision, | |
int | nb_rows, | |||
int | nb_columns | |||
) |
osl_relation_pmalloc function: (precision malloc) this function allocates the memory space for an osl_relation_t structure and sets its fields with default values. Then it returns a pointer to the allocated space.
[in] | precision | The precision of the constraint matrix. |
[in] | nb_rows | The number of row of the relation to allocate. |
[in] | nb_columns | The number of columns of the relation to allocate. |
Definition at line 1079 of file relation.c.
References osl_relation::m, osl_relation::nb_columns, osl_relation::nb_input_dims, osl_relation::nb_local_dims, osl_relation::nb_output_dims, osl_relation::nb_parameters, osl_relation::nb_rows, osl_relation::next, osl_int_address(), osl_int_init_set_si(), osl_int_sizeof(), OSL_malloc, OSL_UNDEFINED, osl_relation::precision, and osl_relation::type.
Referenced by osl_relation_concat_constraints(), osl_relation_extend_output(), osl_relation_from_vector(), osl_relation_insert_blank_column(), osl_relation_insert_columns(), osl_relation_insert_constraints(), osl_relation_malloc(), osl_relation_nclone(), osl_relation_pread(), osl_relation_remove_column(), and osl_relation_remove_row().
void osl_relation_pprint | ( | FILE * | file, | |
osl_relation_p | relation, | |||
osl_names_p | names | |||
) |
osl_relation_pprint function: this function pretty-prints the content of an osl_relation_t structure (*relation) into a file (file, possibly stdout) in the OpenScop format.
[in] | file | File where informations are printed. |
[in] | relation | The relation whose information has to be printed. |
[in] | names | The names of the constraint columns for comments. |
Definition at line 866 of file relation.c.
References osl_relation_spprint().
Referenced by osl_relation_list_pprint_elts(), osl_relation_print(), osl_scop_print(), and osl_statement_pprint().
osl_relation_p osl_relation_pread | ( | FILE * | foo, | |
int | precision | |||
) |
osl_relation_pread function ("precision read"): this function reads a relation into a file (foo, posibly stdin) and returns a pointer this relation. The relation is set to the maximum available precision.
[in] | foo | The input stream. |
[in] | precision | The precision of the relation elements. |
Definition at line 963 of file relation.c.
References osl_relation::m, osl_relation::nb_columns, osl_relation::nb_input_dims, osl_relation::nb_local_dims, osl_relation::nb_output_dims, osl_relation::nb_parameters, osl_relation::nb_rows, osl_relation::next, OSL_error, osl_int_sread(), OSL_MAX_STRING, osl_relation_pmalloc(), osl_relation_read_type(), osl_util_skip_blank_and_comments(), and osl_relation::type.
Referenced by osl_relation_list_pread(), osl_relation_read(), and osl_scop_pread().
void osl_relation_print | ( | FILE * | file, | |
osl_relation_p | relation | |||
) |
osl_relation_print function: this function prints the content of an osl_relation_t structure (*relation) into a file (file, possibly stdout) in the OpenScop format.
[in] | file | File where informations are printed. |
[in] | relation | The relation whose information has to be printed. |
Definition at line 881 of file relation.c.
References osl_relation_pprint().
osl_relation_p osl_relation_read | ( | FILE * | foo | ) |
osl_relation_read function: this function is equivalent to osl_relation_pread() except that the precision corresponds to the precision environment variable or to the highest available precision if it is not defined.
Definition at line 1057 of file relation.c.
References osl_relation_pread(), and osl_util_get_precision().
osl_relation_p osl_relation_read_arrays | ( | FILE * | , | |
char *** | , | |||
int * | ||||
) |
void osl_relation_remove_column | ( | osl_relation_p | r, | |
int | column | |||
) |
osl_relation_remove_column function: this function removes a given column to the relation "r". It directly updates the relation union part pointed by "r" and this part only.
[in,out] | r | The relation to remove a column. |
[in] | column | The column number to remove. |
Definition at line 1625 of file relation.c.
References osl_relation::m, osl_relation::nb_columns, osl_relation::nb_rows, OSL_error, osl_int_assign(), osl_relation_free_inside(), osl_relation_pmalloc(), and osl_relation::precision.
void osl_relation_remove_row | ( | osl_relation_p | r, | |
int | row | |||
) |
osl_relation_remove_row function: this function removes a given row to the relation "r". It directly updates the relation union part pointed by "r" and this part only.
[in,out] | r | The relation to remove a row. |
[in] | row | The row number to remove. |
Definition at line 1585 of file relation.c.
References osl_relation::m, osl_relation::nb_columns, osl_relation::nb_rows, OSL_error, osl_int_assign(), osl_relation_free_inside(), osl_relation_pmalloc(), and osl_relation::precision.
void osl_relation_replace_constraints | ( | osl_relation_p | r1, | |
osl_relation_p | r2, | |||
int | row | |||
) |
osl_relation_replace_constraints function: this function replaces some rows of a relation "r1" with the rows of the relation "r2". It begins at the "row"^th row of "r1". It directly updates the relation union part pointed by "r1" and this part only.
[in,out] | r1 | The relation we want to change some rows. |
[in] | r2 | The relation containing the new rows. |
[in] | row | The first row of the relation r1 to be replaced. |
Definition at line 1509 of file relation.c.
References osl_relation::m, osl_relation::nb_columns, osl_relation::nb_rows, OSL_error, osl_int_assign(), and osl_relation::precision.
Referenced by osl_relation_concat_constraints(), and osl_relation_insert_constraints().
void osl_relation_replace_vector | ( | osl_relation_p | relation, | |
osl_vector_p | vector, | |||
int | row | |||
) |
osl_relation_replace_vector function: this function replaces the "row"^th row of a relation "relation" with the vector "vector". It directly updates the relation union part pointed by "relation" and this part only.
[in,out] | relation | The relation we want to replace a row. |
[in] | vector | The vector that will replace a row of the relation. |
[in] | row | The row of the relation to be replaced. |
Definition at line 1305 of file relation.c.
References osl_relation::m, osl_relation::nb_columns, osl_relation::nb_rows, OSL_error, osl_int_assign(), osl_vector::precision, osl_relation::precision, osl_vector::size, and osl_vector::v.
Referenced by osl_relation_from_vector().
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_set_attributes function: this functions sets the attributes of a relation (union) provided as a parameter. It updates the relation directly.
[in,out] | relation | The relation (union) to set the attributes. |
[in] | nb_output_dims | Number of output dimensions. |
[in] | nb_input_dims | Number of input dimensions. |
[in] | nb_local_dims | Number of local dimensions. |
[in] | nb_parameters | Number of parameters. |
Definition at line 2028 of file relation.c.
References osl_relation::next, and osl_relation_set_attributes_one().
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 | |||
) |
osl_relation_set_attributes_one function: this functions sets the attributes of a relation part provided as a parameter. It updates the relation directly.
[in,out] | relation | The relation (union part) to set the attributes. |
[in] | nb_output_dims | Number of output dimensions. |
[in] | nb_input_dims | Number of input dimensions. |
[in] | nb_local_dims | Number of local dimensions. |
[in] | nb_parameters | Number of parameters. |
Definition at line 2006 of file relation.c.
References osl_relation::nb_input_dims, osl_relation::nb_local_dims, osl_relation::nb_output_dims, and osl_relation::nb_parameters.
Referenced by osl_relation_set_attributes().
void osl_relation_set_type | ( | osl_relation_p | relation, | |
int | type | |||
) |
osl_relation_set_type function: this function sets the type of each relation union part in the relation to the one provided as parameter.
relation | The relation to set the type. | |
type | The type. |
Definition at line 2047 of file relation.c.
References osl_relation::next, and osl_relation::type.
char* osl_relation_spprint | ( | osl_relation_p | relation, | |
osl_names_p | names | |||
) |
osl_relation_spprint function: this function pretty-prints the content of an osl_relation_t structure (*relation) into a string in the OpenScop format, and returns this string.
[in] | relation | The relation whose information has to be printed. |
[in] | names | The names of the constraint columns for comments. |
Definition at line 833 of file relation.c.
References OSL_malloc, OSL_MAX_STRING, osl_relation_nb_components(), osl_relation_spprint_polylib(), osl_relation_sprint_type(), and osl_util_safe_strcat().
Referenced by osl_relation_pprint().
char* osl_relation_spprint_polylib | ( | osl_relation_p | relation, | |
osl_names_p | names | |||
) |
osl_relation_spprint_polylib function: this function pretty-prints the content of an osl_relation_t structure (*relation) into a string in the extended polylib format, and returns this string. This format is the same as OpenScop's, minus the type.
[in] | relation | The relation whose information has to be printed. |
[in] | names | The names of the constraint columns for comments. |
Definition at line 735 of file relation.c.
References osl_names::arrays, osl_relation::m, osl_relation::nb_columns, osl_relation::nb_input_dims, osl_relation::nb_local_dims, osl_relation::nb_output_dims, osl_relation::nb_parameters, osl_relation::nb_rows, osl_relation::next, osl_int_sprint(), OSL_malloc, OSL_MAX_STRING, osl_names_free(), osl_relation_column_string(), osl_relation_names(), osl_relation_nb_components(), osl_relation_sprint_comment(), osl_relation_strings(), osl_util_safe_strcat(), osl_relation::precision, and osl_strings::string.
Referenced by osl_relation_spprint().
void osl_relation_sub_vector | ( | osl_relation_p | relation, | |
osl_vector_p | vector, | |||
int | row | |||
) |
osl_relation_sub_vector function: this function subtracts the vector "vector" to the "row"^th row of a relation "relation. It directly updates the relation union part pointed by "relation" and this part only.
[in,out] | relation | The relation where to subtract a vector to a row. |
[in] | vector | The vector to subtract to a relation row. |
[in] | row | The row of the relation to subtract the vector. |
Definition at line 1357 of file relation.c.
References osl_relation::m, osl_relation::nb_columns, osl_relation::nb_rows, OSL_error, osl_int_assign(), osl_int_get_si(), osl_int_sub(), osl_vector::precision, osl_relation::precision, osl_vector::size, and osl_vector::v.
osl_relation_p osl_relation_union | ( | osl_relation_p | r1, | |
osl_relation_p | r2 | |||
) |
osl_relation_union function: this function builds a new relation from two relations provided as parameters. The new relation is built as an union of the two relations: the list of constraint sets are linked together.
[in] | r1 | The first relation. |
[in] | r2 | The second relation. |
Definition at line 1281 of file relation.c.
References osl_relation_add(), and osl_relation_clone().