|
C Configuration Space and Tuning Library (CCS)
|
Interval define ranges over numeric values. More...

Go to the source code of this file.
Data Structures | |
| struct | ccs_interval_s |
| A structure defining an interval over numeric values. More... | |
Typedefs | |
| typedef struct ccs_interval_s | ccs_interval_t |
| A commodity type to represent CCS intervals. | |
Functions | |
| ccs_result_t | ccs_interval_empty (ccs_interval_t *interval, ccs_bool_t *empty_ret) |
| Check if an interval is empty. | |
| ccs_result_t | ccs_interval_intersect (ccs_interval_t *interval1, ccs_interval_t *interval2, ccs_interval_t *interval_res) |
| Compute the intersection of two intervals. | |
| ccs_result_t | ccs_interval_union (ccs_interval_t *interval1, ccs_interval_t *interval2, ccs_interval_t *interval_res) |
| Compute the union of two intervals. | |
| ccs_result_t | ccs_interval_equal (ccs_interval_t *interval1, ccs_interval_t *interval2, ccs_bool_t *equal_res) |
| Test the equality of two intervals. | |
| ccs_bool_t | ccs_interval_include (ccs_interval_t *interval, ccs_numeric_t value) |
| Test the inclusion of a numeric value into an interval. | |
Interval define ranges over numeric values.
|
extern |
Check if an interval is empty.
| [in] | interval | a pointer to the interval to check |
| [out] | empty_ret | a pointer to the variable that will contain the check result |
interval or empty_ret are NULL
|
extern |
Test the equality of two intervals.
| [in] | interval1 | a pointer to the first interval |
| [in] | interval2 | a pointer to the second interval |
| [out] | equal_res | a pointer to the variable that will contain the test result |
interval1 or interval2 or equal_res are NULL interval1 and interval2 are intervals over different data types
|
extern |
Test the inclusion of a numeric value into an interval.
The user must pass a numeric of the same type as the interval, else results are undefined.
| [in] | interval | a pointer to the interval |
| [in] | value | the value to check for inclusion in the interval |
interval is NULL
|
extern |
Compute the intersection of two intervals.
| [in] | interval1 | a pointer to the first interval |
| [in] | interval2 | a pointer to the second interval |
| [out] | interval_res | a pointer to the variable that will contain the intersection of interval1 and interval2 |
interval1 or interval2 orinterval_res are NULL interval1 and interval2 are intervals over different data types
|
extern |
Compute the union of two intervals.
| [in] | interval1 | a pointer to the first interval |
| [in] | interval2 | a pointer to the second interval |
| [out] | interval_res | a pointer to the variable that will contain the union of interval1 and interval2 |
interval1 or interval2 or interval_res are NULL interval1 and interval2 are intervals over different data types