isl_map_simplify.c: eliminate_divs_eq: isl_basic_map_offset
[isl.git] / print_templ_yaml.c
blob50f7f1f04872fa3aafb376ecf07a8eb0d2706249
1 #define xCAT(A,B) A ## B
2 #define CAT(A,B) xCAT(A,B)
3 #undef TYPE
4 #define TYPE CAT(isl_,BASE)
5 #define xFN(TYPE,NAME) TYPE ## _ ## NAME
6 #define FN(TYPE,NAME) xFN(TYPE,NAME)
8 void FN(TYPE,dump)(__isl_keep TYPE *obj)
10 isl_printer *p;
12 if (!obj)
13 return;
15 p = isl_printer_to_file(FN(TYPE,get_ctx)(obj), stderr);
16 p = isl_printer_set_yaml_style(p, ISL_YAML_STYLE_BLOCK);
17 p = FN(isl_printer_print,BASE)(p, obj);
18 isl_printer_free(p);
21 /* Return a string representation of "obj".
22 * Print the object in flow format.
24 __isl_give char *FN(TYPE,to_str)(__isl_keep TYPE *obj)
26 isl_printer *p;
27 char *s;
29 if (!obj)
30 return NULL;
32 p = isl_printer_to_str(FN(TYPE,get_ctx)(obj));
33 p = isl_printer_set_yaml_style(p, ISL_YAML_STYLE_FLOW);
34 p = FN(isl_printer_print,BASE)(p, obj);
35 s = isl_printer_get_str(p);
36 isl_printer_free(p);
38 return s;