README: update latest release of clang
[ppcg.git] / ppcg_options.h
blob9709b5bc31e298ff4fed5d3d66b668d8cdd396e4
1 #ifndef PPCG_OPTIONS_H
2 #define PPCG_OPTIONS_H
4 #include <isl/arg.h>
5 #include <isl/options.h>
7 struct ppcg_debug_options {
8 int dump_schedule_constraints;
9 int dump_schedule;
10 int dump_final_schedule;
11 int dump_sizes;
12 int verbose;
15 struct ppcg_options {
16 struct isl_options *isl;
17 struct ppcg_debug_options *debug;
19 /* Group chains of consecutive statements before scheduling. */
20 int group_chains;
22 /* Use isl to compute a schedule replacing the original schedule. */
23 int reschedule;
24 int scale_tile_loops;
25 int wrap;
27 /* Assume all parameters are non-negative. */
28 int non_negative_parameters;
29 char *ctx;
30 char *sizes;
32 /* Perform tiling (C target). */
33 int tile;
34 int tile_size;
36 /* Take advantage of private memory. */
37 int use_private_memory;
39 /* Take advantage of shared memory. */
40 int use_shared_memory;
42 /* Maximal amount of shared memory. */
43 int max_shared_memory;
45 /* The target we generate code for. */
46 int target;
48 /* Generate OpenMP macros (C target only). */
49 int openmp;
51 /* Linearize all device arrays. */
52 int linearize_device_arrays;
54 /* Allow the use of GNU extensions in generated code. */
55 int allow_gnu_extensions;
57 /* Allow live range to be reordered. */
58 int live_range_reordering;
60 /* Options to pass to the OpenCL compiler. */
61 char *opencl_compiler_options;
62 /* Prefer GPU device over CPU. */
63 int opencl_use_gpu;
64 /* Number of files to include. */
65 int opencl_n_include_file;
66 /* Files to include. */
67 const char **opencl_include_files;
68 /* Print definitions of types in kernels. */
69 int opencl_print_kernel_types;
70 /* Embed OpenCL kernel code in host code. */
71 int opencl_embed_kernel_code;
73 /* Name of file for saving isl computed schedule or NULL. */
74 char *save_schedule_file;
75 /* Name of file for loading schedule or NULL. */
76 char *load_schedule_file;
79 ISL_ARG_DECL(ppcg_debug_options, struct ppcg_debug_options,
80 ppcg_debug_options_args)
81 ISL_ARG_DECL(ppcg_options, struct ppcg_options, ppcg_options_args)
83 #define PPCG_TARGET_C 0
84 #define PPCG_TARGET_CUDA 1
85 #define PPCG_TARGET_OPENCL 2
87 void ppcg_options_set_target_defaults(struct ppcg_options *options);
89 #endif