gpu.c: remove_local_accesses_group: pass in prefix schedule
[ppcg.git] / ppcg_options.h
blob9912d5090ad3b25dca964e5c46d1799eecf7117b
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 /* Use isl to compute a schedule replacing the original schedule. */
20 int reschedule;
21 int scale_tile_loops;
22 int wrap;
24 /* Assume all parameters are non-negative. */
25 int non_negative_parameters;
26 char *ctx;
27 char *sizes;
29 /* Perform tiling (C target). */
30 int tile;
31 int tile_size;
33 /* Take advantage of private memory. */
34 int use_private_memory;
36 /* Take advantage of shared memory. */
37 int use_shared_memory;
39 /* Maximal amount of shared memory. */
40 int max_shared_memory;
42 /* The target we generate code for. */
43 int target;
45 /* Generate OpenMP macros (C target only). */
46 int openmp;
48 /* Linearize all device arrays. */
49 int linearize_device_arrays;
51 /* Allow the use of GNU extensions in generated code. */
52 int allow_gnu_extensions;
54 /* Allow live range to be reordered. */
55 int live_range_reordering;
57 /* Options to pass to the OpenCL compiler. */
58 char *opencl_compiler_options;
59 /* Prefer GPU device over CPU. */
60 int opencl_use_gpu;
61 /* Number of files to include. */
62 int opencl_n_include_file;
63 /* Files to include. */
64 const char **opencl_include_files;
65 /* Print definitions of types in kernels. */
66 int opencl_print_kernel_types;
67 /* Embed OpenCL kernel code in host code. */
68 int opencl_embed_kernel_code;
70 /* Name of file for saving isl computed schedule or NULL. */
71 char *save_schedule_file;
72 /* Name of file for loading schedule or NULL. */
73 char *load_schedule_file;
76 ISL_ARG_DECL(ppcg_debug_options, struct ppcg_debug_options,
77 ppcg_debug_options_args)
78 ISL_ARG_DECL(ppcg_options, struct ppcg_options, ppcg_options_args)
80 #define PPCG_TARGET_C 0
81 #define PPCG_TARGET_CUDA 1
82 #define PPCG_TARGET_OPENCL 2
84 void ppcg_options_set_target_defaults(struct ppcg_options *options);
86 #endif