2 * Copyright 2010-2011 INRIA Saclay
4 * Use of this software is governed by the GNU LGPLv2.1 license
6 * Written by Sven Verdoolaege, INRIA Saclay - Ile-de-France,
7 * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod,
11 #include "ppcg_options.h"
13 static struct isl_arg_choice target
[] = {
15 {"cuda", PPCG_TARGET_CUDA
},
19 ISL_ARGS_START(struct ppcg_options
, ppcg_options_args
)
20 ISL_ARG_BOOL(struct ppcg_options
, scale_tile_loops
, 0,
21 "scale-tile-loops", 1, NULL
)
22 ISL_ARG_BOOL(struct ppcg_options
, wrap
, 0, "wrap", 1, NULL
)
23 ISL_ARG_BOOL(struct ppcg_options
, use_shared_memory
, 0, "shared-memory", 1,
24 "use shared memory in kernel code")
25 ISL_ARG_BOOL(struct ppcg_options
, use_private_memory
, 0, "private-memory", 1,
26 "use private memory in kernel code")
27 ISL_ARG_STR(struct ppcg_options
, ctx
, 0, "ctx", "context", NULL
,
28 "Constraints on parameters")
29 ISL_ARG_INT(struct ppcg_options
, tile_size
, 'S', "tile-size", "size", 32, NULL
)
30 ISL_ARG_STR(struct ppcg_options
, sizes
, 0, "sizes", "sizes", NULL
,
31 "Per kernel tile, grid and block sizes")
32 ISL_ARG_INT(struct ppcg_options
, max_shared_memory
, 0,
33 "max-shared-memory", "size", 8192, "maximal amount of shared memory")
34 ISL_ARG_BOOL(struct ppcg_options
, openmp
, 0, "openmp", 0,
35 "Generate OpenMP macros (only for C target)")
36 ISL_ARG_CHOICE(struct ppcg_options
, target
, 0, "target", target
,
37 PPCG_TARGET_CUDA
, "the target to generate code for")