From ebe533a67cad147bd9343b996b63a008bab4840f Mon Sep 17 00:00:00 2001 From: Sven Verdoolaege Date: Thu, 3 Jul 2014 12:23:10 +0200 Subject: [PATCH] add isl_obj_schedule Signed-off-by: Sven Verdoolaege --- include/isl/obj.h | 2 ++ isl_obj.c | 27 +++++++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/include/isl/obj.h b/include/isl/obj.h index 7c796f34..07c6bf38 100644 --- a/include/isl/obj.h +++ b/include/isl/obj.h @@ -43,6 +43,8 @@ extern struct isl_obj_vtable isl_obj_pw_qpolynomial_fold_vtable; #define isl_obj_pw_qpolynomial_fold (&isl_obj_pw_qpolynomial_fold_vtable) extern struct isl_obj_vtable isl_obj_union_pw_qpolynomial_fold_vtable; #define isl_obj_union_pw_qpolynomial_fold (&isl_obj_union_pw_qpolynomial_fold_vtable) +extern struct isl_obj_vtable isl_obj_schedule_vtable; +#define isl_obj_schedule (&isl_obj_schedule_vtable) struct isl_obj { isl_obj_type type; void *v; diff --git a/isl_obj.c b/isl_obj.c index 5bc26ce6..460c123e 100644 --- a/isl_obj.c +++ b/isl_obj.c @@ -1,6 +1,7 @@ /* * Copyright 2010 INRIA Saclay * Copyright 2014 Ecole Normale Superieure + * Copyright 2014 INRIA Rocquencourt * * Use of this software is governed by the MIT license * @@ -8,12 +9,15 @@ * Parc Club Orsay Universite, ZAC des vignes, 4 rue Jacques Monod, * 91893 Orsay, France * and Ecole Normale Superieure, 45 rue d'Ulm, 75230 Paris, France + * and Inria Paris - Rocquencourt, Domaine de Voluceau - Rocquencourt, + * B.P. 105 - 78153 Le Chesnay, France */ #include #include #include #include +#include #include static void *isl_obj_val_copy(void *v) @@ -333,3 +337,26 @@ struct isl_obj_vtable isl_obj_union_pw_qpolynomial_fold_vtable = { isl_obj_union_pw_qpf_print, isl_obj_union_pw_qpf_free }; + +static void *isl_obj_schedule_copy(void *v) +{ + return isl_schedule_copy((isl_schedule *) v); +} + +static void isl_obj_schedule_free(void *v) +{ + isl_schedule_free((isl_schedule *) v); +} + +static __isl_give isl_printer *isl_obj_schedule_print( + __isl_take isl_printer *p, void *v) +{ + return isl_printer_print_schedule(p, (isl_schedule *) v); +} + +struct isl_obj_vtable isl_obj_schedule_vtable = { + isl_obj_schedule_copy, + NULL, + isl_obj_schedule_print, + isl_obj_schedule_free +}; -- 2.11.4.GIT