gpu.c: update_may_persist_at_band: return isl_stat
[ppcg.git] / ppcg_options.h
blob56aa7cb781a52b59766aa191d049a34c2a45efea
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 /* Isolate full tiles from partial tiles. */
37 int isolate_full_tiles;
39 /* Take advantage of private memory. */
40 int use_private_memory;
42 /* Take advantage of shared memory. */
43 int use_shared_memory;
45 /* Maximal amount of shared memory. */
46 int max_shared_memory;
48 /* The target we generate code for. */
49 int target;
51 /* Generate OpenMP macros (C target only). */
52 int openmp;
54 /* Linearize all device arrays. */
55 int linearize_device_arrays;
57 /* Allow the use of GNU extensions in generated code. */
58 int allow_gnu_extensions;
60 /* Allow live range to be reordered. */
61 int live_range_reordering;
63 /* Allow hybrid tiling whenever a suitable input pattern is found. */
64 int hybrid;
66 /* Unroll the code for copying to/from shared memory. */
67 int unroll_copy_shared;
68 /* Unroll code inside tile on GPU targets. */
69 int unroll_gpu_tile;
71 /* Options to pass to the OpenCL compiler. */
72 char *opencl_compiler_options;
73 /* Prefer GPU device over CPU. */
74 int opencl_use_gpu;
75 /* Number of files to include. */
76 int opencl_n_include_file;
77 /* Files to include. */
78 const char **opencl_include_files;
79 /* Print definitions of types in kernels. */
80 int opencl_print_kernel_types;
81 /* Embed OpenCL kernel code in host code. */
82 int opencl_embed_kernel_code;
84 /* Name of file for saving isl computed schedule or NULL. */
85 char *save_schedule_file;
86 /* Name of file for loading schedule or NULL. */
87 char *load_schedule_file;
90 ISL_ARG_DECL(ppcg_debug_options, struct ppcg_debug_options,
91 ppcg_debug_options_args)
92 ISL_ARG_DECL(ppcg_options, struct ppcg_options, ppcg_options_args)
94 #define PPCG_TARGET_C 0
95 #define PPCG_TARGET_CUDA 1
96 #define PPCG_TARGET_OPENCL 2
98 void ppcg_options_set_target_defaults(struct ppcg_options *options);
100 #endif