xref: /llvm-project/polly/lib/External/isl/doc/interface (revision 658eb9e14264d48888ade0e3daf0b648f76c3f0e)
1Design guidelines for the isl interfaces
2========================================
3
4# Constructors
5
6A function that constructs an isl object can be exposed in two ways, as
7an unnamed constructor or as a named static function. Aiming for an interface
8that is explicit and close to the isl C interface, all such functions
9are exported as named static functions, except in the following cases.
10Unnamed constructors are generated for functions where even without the
11function name an object is identified uniquely by its arguments. For
12example, there is a single isl_val that corresponds to a given integer
13(isl_val_int_from_si), but both a NaN or a zero value can be constructed
14from an isl_local_space (isl_aff_zero_on_domain and isl_aff_nan_on_domain).
15Only function that create objects that are fully constructed by the function
16and do not require further information to be added for typical use cases
17are exposed as unnamed constructors.
18Functions that commonly require more information to be provided
19(isl_union_access_info_from_sink, isl_schedule_constraints_on_domain)
20are exported as named static functions.
21Typical examples of function that are generated as unnamed constructors
22are the following:
23
24- Conversion constructors
25- Constructors from std::string
26- Constructors where all arguments by themselves uniquely identify
27  a complete object (e.g., isl_val_int_from_si)
28