#include <stdio.h>
Go to the source code of this file.
Typedefs | |
typedef void * | osl_int_p |
Functions | |
void | osl_int_dump_precision (FILE *, int) |
int | osl_int_sizeof (int) |
void * | osl_int_address (int, void *, int) |
void | osl_int_init (int, void *, int) |
void * | osl_int_malloc (int) |
void | osl_int_assign (int, void *, int, void *, int) |
void | osl_int_set_si (int, void *, int, int) |
int | osl_int_get_si (int, void *, int) |
void | osl_int_init_set_si (int, void *, int, int) |
void | osl_int_clear (int, void *, int) |
void | osl_int_free (int, void *, int) |
void | osl_int_print (FILE *, int, void *, int) |
void | osl_int_sprint (char *, int, void *, int) |
void | osl_int_sprint_txt (char *, int, void *, int) |
void | osl_int_sread (char **, int, void *, int) |
void | osl_int_increment (int, void *, int, void *, int) |
void | osl_int_decrement (int, void *, int, void *, int) |
void | osl_int_add (int, void *, int, void *, int, void *, int) |
void | osl_int_add_si (int, void *, int, void *, int, int) |
void | osl_int_mul (int, void *, int, void *, int, void *, int) |
void | osl_int_mul_si (int, void *, int, void *, int, int) |
void | osl_int_sub (int, void *, int, void *, int, void *, int) |
void | osl_int_oppose (int, void *, int, void *, int) |
int | osl_int_eq (int, void *, int, void *, int) |
int | osl_int_ne (int, void *, int, void *, int) |
int | osl_int_pos (int, void *, int) |
int | osl_int_neg (int, void *, int) |
int | osl_int_zero (int, void *, int) |
int | osl_int_one (int, void *, int) |
int | osl_int_mone (int, void *, int) |
int | osl_int_divisible (int, void *, int, void *, int) |
void osl_int_add | ( | int | precision, | |
void * | result_base, | |||
int | result_offset, | |||
void * | val1_base, | |||
int | val1_offset, | |||
void * | val2_base, | |||
int | val2_offset | |||
) |
result_base[result_offset] = val1_base[val1_offset]+val2_base[val2_offset];
Definition at line 541 of file int.c.
References OSL_error, osl_int_address(), OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
Referenced by osl_relation_add_vector(), and osl_vector_add().
void osl_int_add_si | ( | int | precision, | |
void * | result_base, | |||
int | result_offset, | |||
void * | value_base, | |||
int | value_offset, | |||
int | i | |||
) |
result_base[result_offset] = value_base[value_offset] + i;
Definition at line 574 of file int.c.
References OSL_error, osl_int_address(), OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
Referenced by osl_vector_add_scalar().
void* osl_int_address | ( | int | , | |
void * | , | |||
int | ||||
) |
Definition at line 125 of file int.c.
References OSL_error, OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
Referenced by osl_int_add(), osl_int_add_si(), osl_int_assign(), osl_int_clear(), osl_int_decrement(), osl_int_divisible(), osl_int_eq(), osl_int_free(), osl_int_get_si(), osl_int_increment(), osl_int_init(), osl_int_init_set_si(), osl_int_mone(), osl_int_mul(), osl_int_mul_si(), osl_int_neg(), osl_int_one(), osl_int_oppose(), osl_int_pos(), osl_int_set_si(), osl_int_sprint(), osl_int_sprint_txt(), osl_int_sread(), osl_int_sub(), osl_int_zero(), osl_relation_pmalloc(), and osl_relation_subexpression().
void osl_int_assign | ( | int | precision, | |
void * | val1_base, | |||
int | val1_offset, | |||
void * | val2_base, | |||
int | val2_offset | |||
) |
val1_base[val1_offset] = val2_base[val2_offset];
Definition at line 199 of file int.c.
References OSL_error, osl_int_address(), OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
Referenced by osl_relation_add_vector(), osl_relation_extend_output(), osl_relation_insert_blank_column(), osl_relation_insert_columns(), osl_relation_insert_constraints(), osl_relation_nclone(), osl_relation_remove_column(), osl_relation_remove_row(), osl_relation_replace_constraints(), osl_relation_replace_vector(), osl_relation_sub_vector(), and osl_vector_add_scalar().
void osl_int_clear | ( | int | precision, | |
void * | value_base, | |||
int | value_offset | |||
) |
value_base[value_offset] = 0; // Including cleaning for GMP
Definition at line 309 of file int.c.
References OSL_error, osl_int_address(), OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
Referenced by osl_int_free(), osl_relation_free_inside(), and osl_vector_free().
void osl_int_decrement | ( | int | precision, | |
void * | result_base, | |||
int | result_offset, | |||
void * | value_base, | |||
int | value_offset | |||
) |
result_base[result_offset] = value_base[value_offset] - 1;
Definition at line 507 of file int.c.
References OSL_error, osl_int_address(), OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
int osl_int_divisible | ( | int | precision, | |
void * | val1_base, | |||
int | val1_offset, | |||
void * | val2_base, | |||
int | val2_offset | |||
) |
((val1_base[val1_offset] % val2_base[val2_offset]) == 0)
Definition at line 898 of file int.c.
References OSL_error, osl_int_address(), OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
Referenced by osl_relation_get_array_id().
void osl_int_dump_precision | ( | FILE * | file, | |
int | precision | |||
) |
osl_int_dump_precision function: this function prints in a human readable fashion the precision corresponding to the "precision" parameter.
[in] | file | The file where to print the precision. |
[in] | precision | The precision to print. |
Definition at line 86 of file int.c.
References OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
Referenced by osl_relation_idump(), and osl_vector_idump().
int osl_int_eq | ( | int | precision, | |
void * | val1_base, | |||
int | val1_offset, | |||
void * | val2_base, | |||
int | val2_offset | |||
) |
(val1_base[val1_offset] == val2_base[val2_offset])
Definition at line 739 of file int.c.
References OSL_error, osl_int_address(), OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
Referenced by osl_int_ne().
void osl_int_free | ( | int | , | |
void * | , | |||
int | ||||
) |
Definition at line 333 of file int.c.
References osl_int_address(), and osl_int_clear().
int osl_int_get_si | ( | int | precision, | |
void * | value_base, | |||
int | value_offset | |||
) |
return value_base[value_offset];
Definition at line 257 of file int.c.
References OSL_error, osl_int_address(), OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
Referenced by osl_relation_add_vector(), osl_relation_get_array_id(), and osl_relation_sub_vector().
void osl_int_increment | ( | int | precision, | |
void * | result_base, | |||
int | result_offset, | |||
void * | value_base, | |||
int | value_offset | |||
) |
result_base[result_offset] = value_base[value_offset] + 1;
Definition at line 477 of file int.c.
References OSL_error, osl_int_address(), OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
void osl_int_init | ( | int | , | |
void * | , | |||
int | ||||
) |
Definition at line 144 of file int.c.
References OSL_error, osl_int_address(), OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
Referenced by osl_int_malloc().
void osl_int_init_set_si | ( | int | precision, | |
void * | value_base, | |||
int | value_offset, | |||
int | i | |||
) |
value_base[value_offset] = i; // including initialization for GMP
Definition at line 281 of file int.c.
References OSL_error, osl_int_address(), OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
Referenced by osl_relation_pmalloc(), and osl_vector_pmalloc().
void* osl_int_malloc | ( | int | ) |
Definition at line 168 of file int.c.
References OSL_error, osl_int_init(), OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
int osl_int_mone | ( | int | precision, | |
void * | value_base, | |||
int | value_offset | |||
) |
(value_base[value_offset] == -1)
Definition at line 874 of file int.c.
References OSL_error, osl_int_address(), OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
Referenced by osl_relation_expression_element(), and osl_relation_is_simple_output().
void osl_int_mul | ( | int | precision, | |
void * | result_base, | |||
int | result_offset, | |||
void * | val1_base, | |||
int | val1_offset, | |||
void * | val2_base, | |||
int | val2_offset | |||
) |
result_base[result_offset] = val1_base[val1_offset]*val2_base[val2_offset];
Definition at line 608 of file int.c.
References OSL_error, osl_int_address(), OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
void osl_int_mul_si | ( | int | precision, | |
void * | result_base, | |||
int | result_offset, | |||
void * | value_base, | |||
int | value_offset, | |||
int | i | |||
) |
result_base[result_offset] = value_base[value_offset] * i;
Definition at line 641 of file int.c.
References OSL_error, osl_int_address(), OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
Referenced by osl_vector_mul_scalar().
int osl_int_ne | ( | int | precision, | |
void * | val1_base, | |||
int | val1_offset, | |||
void * | val2_base, | |||
int | val2_offset | |||
) |
(val1_base[val1_offset] != val2_base[val2_offset])
Definition at line 766 of file int.c.
References osl_int_eq().
Referenced by osl_relation_equal(), and osl_vector_equal().
int osl_int_neg | ( | int | precision, | |
void * | value_base, | |||
int | value_offset | |||
) |
(value_base[value_offset] < 0)
Definition at line 802 of file int.c.
References OSL_error, osl_int_address(), OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
Referenced by osl_relation_expression_element().
int osl_int_one | ( | int | precision, | |
void * | value_base, | |||
int | value_offset | |||
) |
(value_base[value_offset] == 1)
Definition at line 850 of file int.c.
References OSL_error, osl_int_address(), OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
Referenced by osl_relation_expression_element(), osl_relation_integrity_check(), and osl_relation_is_simple_output().
void osl_int_oppose | ( | int | precision, | |
void * | result_base, | |||
int | result_offset, | |||
void * | value_base, | |||
int | value_offset | |||
) |
result_base[result_offset] = -value_base[value_offset];
Definition at line 704 of file int.c.
References OSL_error, osl_int_address(), OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
Referenced by osl_relation_subexpression().
int osl_int_pos | ( | int | precision, | |
void * | value_base, | |||
int | value_offset | |||
) |
(value_base[value_offset] > 0)
Definition at line 778 of file int.c.
References OSL_error, osl_int_address(), OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
Referenced by osl_relation_expression_element().
void osl_int_print | ( | FILE * | file, | |
int | precision, | |||
void * | value_base, | |||
int | value_offset | |||
) |
osl_int_print function: this function displays an integer value into a file (file, possibly stdout).
file | The file where the integer has to be printed. | |
precision | The precision of the integer. | |
value_base | Address of the base integer value. | |
value_offset | Offset in number of values from the base integer value. |
Definition at line 349 of file int.c.
References osl_int_sprint(), and OSL_MAX_STRING.
Referenced by osl_relation_idump(), and osl_vector_idump().
void osl_int_set_si | ( | int | precision, | |
void * | value_base, | |||
int | value_offset, | |||
int | i | |||
) |
value_base[value_offset] = i;
Definition at line 229 of file int.c.
References OSL_error, osl_int_address(), OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
Referenced by osl_relation_extend_output(), osl_vector_tag_equality(), and osl_vector_tag_inequality().
int osl_int_sizeof | ( | int | ) |
Definition at line 106 of file int.c.
References OSL_error, OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
Referenced by osl_relation_pmalloc(), and osl_vector_pmalloc().
void osl_int_sprint | ( | char * | string, | |
int | precision, | |||
void * | value_base, | |||
int | value_offset | |||
) |
osl_int_sprint function: this function prints an integer value into a string, it uses the OpenScop Library formats OSL_FMT_* to format the printing.
string | The string where the integer has to be printed. | |
precision | The precision of the integer. | |
value_base | Address of the base integer value. | |
value_offset | Offset in number of values from the base integer value. |
Definition at line 367 of file int.c.
References OSL_error, OSL_FMT_DP, OSL_FMT_MP, OSL_FMT_SP, osl_int_address(), OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
Referenced by osl_int_print(), and osl_relation_spprint_polylib().
void osl_int_sprint_txt | ( | char * | string, | |
int | precision, | |||
void * | value_base, | |||
int | value_offset | |||
) |
osl_int_sprint_txt function: this function is similar to osl_int_sprintf but it prints the value using OSL_TMT_TXT_* formats.
Definition at line 402 of file int.c.
References OSL_error, OSL_FMT_TXT_DP, OSL_FMT_TXT_MP, OSL_FMT_TXT_SP, osl_int_address(), OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
Referenced by osl_relation_expression_element().
void osl_int_sread | ( | char ** | , | |
int | , | |||
void * | , | |||
int | ||||
) |
Definition at line 431 of file int.c.
References OSL_error, OSL_FMT_TXT_DP, OSL_FMT_TXT_SP, osl_int_address(), OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
Referenced by osl_relation_pread().
void osl_int_sub | ( | int | precision, | |
void * | result_base, | |||
int | result_offset, | |||
void * | val1_base, | |||
int | val1_offset, | |||
void * | val2_base, | |||
int | val2_offset | |||
) |
result_base[result_offset] = val1_base[val1_offset]-val2_base[val2_offset];
Definition at line 671 of file int.c.
References OSL_error, osl_int_address(), OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
Referenced by osl_relation_sub_vector(), and osl_vector_sub().
int osl_int_zero | ( | int | precision, | |
void * | value_base, | |||
int | value_offset | |||
) |
(value_base[value_offset] == 0)
Definition at line 826 of file int.c.
References OSL_error, osl_int_address(), OSL_PRECISION_DP, OSL_PRECISION_MP, and OSL_PRECISION_SP.
Referenced by osl_relation_expression_element(), osl_relation_get_array_id(), osl_relation_integrity_check(), osl_relation_is_simple_output(), osl_relation_sprint_comment(), and osl_vector_is_scalar().