cuda.c: extract out copy_array_{to,from}_device
[ppcg.git] / ppcg_options.h
blob72b5f8f7b971dda21fe74ae5957648a442220faf
1 #ifndef PPCG_OPTIONS_H
2 #define PPCG_OPTIONS_H
4 #include <isl/arg.h>
6 struct ppcg_debug_options {
7 int dump_schedule_constraints;
8 int dump_schedule;
9 int dump_final_schedule;
10 int dump_sizes;
11 int verbose;
14 struct ppcg_options {
15 struct ppcg_debug_options *debug;
17 int scale_tile_loops;
18 int wrap;
20 char *ctx;
21 char *sizes;
23 int tile_size;
25 /* Take advantage of private memory. */
26 int use_private_memory;
28 /* Take advantage of shared memory. */
29 int use_shared_memory;
31 /* Maximal amount of shared memory. */
32 int max_shared_memory;
34 /* The target we generate code for. */
35 int target;
37 /* Generate OpenMP macros (C target only). */
38 int openmp;
40 /* Linearize all device arrays. */
41 int linearize_device_arrays;
43 /* Allow live range to be reordered. */
44 int live_range_reordering;
46 /* Options to pass to the OpenCL compiler. */
47 char *opencl_compiler_options;
48 /* Prefer GPU device over CPU. */
49 int opencl_use_gpu;
50 /* Number of files to include. */
51 int opencl_n_include_file;
52 /* Files to include. */
53 const char **opencl_include_files;
54 /* Print definitions of types in kernels. */
55 int opencl_print_kernel_types;
56 /* Embed OpenCL kernel code in host code. */
57 int opencl_embed_kernel_code;
59 /* Name of file for saving isl computed schedule or NULL. */
60 char *save_schedule_file;
61 /* Name of file for loading schedule or NULL. */
62 char *load_schedule_file;
65 ISL_ARG_DECL(ppcg_debug_options, struct ppcg_debug_options,
66 ppcg_debug_options_args)
67 ISL_ARG_DECL(ppcg_options, struct ppcg_options, ppcg_options_args)
69 #define PPCG_TARGET_C 0
70 #define PPCG_TARGET_CUDA 1
71 #define PPCG_TARGET_OPENCL 2
73 #endif