[AMDGPU] Test codegen'ing True16 additions.
[llvm-project.git] / polly / lib / External / isl / print_templ.c
blob9ed93f1438533be165a654aa023bf88100dc36ff
1 #include <isl_printer_private.h>
3 #define xCAT(A,B) A ## B
4 #define CAT(A,B) xCAT(A,B)
5 #undef TYPE
6 #define TYPE CAT(isl_,BASE)
7 #define xFN(TYPE,NAME) TYPE ## _ ## NAME
8 #define FN(TYPE,NAME) xFN(TYPE,NAME)
10 #ifndef PRINT_DUMP_DEFAULT
11 #define PRINT_DUMP_DEFAULT 1
12 #endif
14 void FN(TYPE,dump)(__isl_keep TYPE *obj)
16 isl_printer *p;
18 if (!obj)
19 return;
20 p = isl_printer_to_file(FN(TYPE,get_ctx)(obj), stderr);
21 p = isl_printer_set_dump(p, PRINT_DUMP_DEFAULT);
22 p = FN(isl_printer_print,BASE)(p, obj);
23 p = isl_printer_end_line(p);
24 isl_printer_free(p);
27 #undef PRINT_DUMP_DEFAULT
29 __isl_give char *FN(TYPE,to_str)(__isl_keep TYPE *obj)
31 isl_printer *p;
32 char *s;
34 if (!obj)
35 return NULL;
36 p = isl_printer_to_str(FN(TYPE,get_ctx)(obj));
37 p = FN(isl_printer_print,BASE)(p, obj);
38 s = isl_printer_get_str(p);
39 isl_printer_free(p);
41 return s;