gpu backend: create single kernel for entire subtree without permutable bands
[ppcg.git] / ppcg_options.h
blobc2309c1c5621681a5bdede959b9f9b503eaf7305
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 live range to be reordered. */
52 int live_range_reordering;
54 /* Options to pass to the OpenCL compiler. */
55 char *opencl_compiler_options;
56 /* Prefer GPU device over CPU. */
57 int opencl_use_gpu;
58 /* Number of files to include. */
59 int opencl_n_include_file;
60 /* Files to include. */
61 const char **opencl_include_files;
62 /* Print definitions of types in kernels. */
63 int opencl_print_kernel_types;
64 /* Embed OpenCL kernel code in host code. */
65 int opencl_embed_kernel_code;
67 /* Name of file for saving isl computed schedule or NULL. */
68 char *save_schedule_file;
69 /* Name of file for loading schedule or NULL. */
70 char *load_schedule_file;
73 ISL_ARG_DECL(ppcg_debug_options, struct ppcg_debug_options,
74 ppcg_debug_options_args)
75 ISL_ARG_DECL(ppcg_options, struct ppcg_options, ppcg_options_args)
77 #define PPCG_TARGET_C 0
78 #define PPCG_TARGET_CUDA 1
79 #define PPCG_TARGET_OPENCL 2
81 void ppcg_options_set_target_defaults(struct ppcg_options *options);
83 #endif