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