From 12dbb2a0d120835e8bef75bb8c14f4a57ab5ec0e Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Fri, 29 Nov 2013 12:38:37 +0100 Subject: [PATCH] export gpu_create_kernel The gpu specific version of hybrid tiling will be able to reuse this function. Signed-off-by: Sven Verdoolaege --- gpu.c | 4 ++-- gpu.h | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/gpu.c b/gpu.c index f5c374a..16a8eeb 100644 --- a/gpu.c +++ b/gpu.c @@ -3817,7 +3817,7 @@ static __isl_give isl_schedule_node *group_statements( * that the kernel does not get destroyed if the schedule node * is freed due to some error condition. */ -static __isl_give isl_schedule_node *create_kernel(struct gpu_gen *gen, +__isl_give isl_schedule_node *gpu_create_kernel(struct gpu_gen *gen, __isl_take isl_schedule_node *node, int scale, __isl_keep isl_multi_val *sizes) { @@ -4047,7 +4047,7 @@ static __isl_give isl_schedule_node *mark_outer_permutable( node = isl_schedule_node_parent(node); scale = gen->options->scale_tile_loops; - node = create_kernel(gen, node, scale, sizes); + node = gpu_create_kernel(gen, node, scale, sizes); isl_multi_val_free(sizes); free(tile_size); diff --git a/gpu.h b/gpu.h index ae6dce3..cd4e04b 100644 --- a/gpu.h +++ b/gpu.h @@ -321,7 +321,7 @@ struct ppcg_kernel_var { * core contains the spaces of the statement domains that form * the core computation of the kernel. It is used to navigate * the tree during the construction of the device part of the schedule - * tree in create_kernel. + * tree in gpu_create_kernel. * * expanded_domain contains the original statement instances, * i.e., those that appear in the domains of access relations, @@ -428,4 +428,8 @@ int generate_gpu(isl_ctx *ctx, const char *input, FILE *out, struct gpu_prog *prog, __isl_keep isl_ast_node *tree, struct gpu_types *types, void *user), void *user); +__isl_give isl_schedule_node *gpu_create_kernel(struct gpu_gen *gen, + __isl_take isl_schedule_node *node, int scale, + __isl_keep isl_multi_val *sizes); + #endif -- 2.11.4.GIT