brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 8132b3f Raw
28 lines · plain
1Design guidelines for the isl interfaces2========================================3 4# Constructors5 6A function that constructs an isl object can be exposed in two ways, as7an unnamed constructor or as a named static function. Aiming for an interface8that is explicit and close to the isl C interface, all such functions9are exported as named static functions, except in the following cases.10Unnamed constructors are generated for functions where even without the11function name an object is identified uniquely by its arguments. For12example, there is a single isl_val that corresponds to a given integer13(isl_val_int_from_si), but both a NaN or a zero value can be constructed14from 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 function16and do not require further information to be added for typical use cases17are exposed as unnamed constructors.18Functions that commonly require more information to be provided19(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 constructors22are the following:23 24- Conversion constructors25- Constructors from std::string26- Constructors where all arguments by themselves uniquely identify27  a complete object (e.g., isl_val_int_from_si)28