-isl-0.18-809-gd5b4535
+isl-0.18-812-g565da6e
__isl_give isl_set *isl_aff_eq_set(
__isl_take isl_aff *aff1,
__isl_take isl_aff *aff2);
+ __isl_give isl_set *isl_aff_ne_set(
+ __isl_take isl_aff *aff1,
+ __isl_take isl_aff *aff2);
__isl_give isl_basic_set *isl_aff_le_basic_set(
__isl_take isl_aff *aff1,
__isl_take isl_aff *aff2);
__isl_give isl_basic_set *isl_aff_gt_basic_set(
__isl_take isl_aff *aff1,
__isl_take isl_aff *aff2);
+ __isl_give isl_set *isl_aff_gt_set(
+ __isl_take isl_aff *aff1,
+ __isl_take isl_aff *aff2);
__isl_give isl_set *isl_pw_aff_eq_set(
__isl_take isl_pw_aff *pwaff1,
__isl_take isl_pw_aff *pwaff2);
__isl_give isl_basic_set *isl_aff_eq_basic_set(__isl_take isl_aff *aff1,
__isl_take isl_aff *aff2);
+__isl_export
__isl_give isl_set *isl_aff_eq_set(__isl_take isl_aff *aff1,
__isl_take isl_aff *aff2);
+__isl_export
+__isl_give isl_set *isl_aff_ne_set(__isl_take isl_aff *aff1,
+ __isl_take isl_aff *aff2);
__isl_give isl_basic_set *isl_aff_le_basic_set(__isl_take isl_aff *aff1,
__isl_take isl_aff *aff2);
+__isl_export
__isl_give isl_set *isl_aff_le_set(__isl_take isl_aff *aff1,
__isl_take isl_aff *aff2);
__isl_give isl_basic_set *isl_aff_lt_basic_set(__isl_take isl_aff *aff1,
__isl_take isl_aff *aff2);
+__isl_export
__isl_give isl_set *isl_aff_lt_set(__isl_take isl_aff *aff1,
__isl_take isl_aff *aff2);
__isl_give isl_basic_set *isl_aff_ge_basic_set(__isl_take isl_aff *aff1,
__isl_take isl_aff *aff2);
+__isl_export
__isl_give isl_set *isl_aff_ge_set(__isl_take isl_aff *aff1,
__isl_take isl_aff *aff2);
__isl_give isl_basic_set *isl_aff_gt_basic_set(__isl_take isl_aff *aff1,
__isl_take isl_aff *aff2);
+__isl_export
+__isl_give isl_set *isl_aff_gt_set(__isl_take isl_aff *aff1,
+ __isl_take isl_aff *aff2);
__isl_constructor
__isl_give isl_aff *isl_aff_read_from_str(isl_ctx *ctx, const char *str);
__isl_give isl_set *isl_pw_aff_zero_set(__isl_take isl_pw_aff *pwaff);
__isl_give isl_set *isl_pw_aff_non_zero_set(__isl_take isl_pw_aff *pwaff);
+__isl_export
__isl_give isl_set *isl_pw_aff_eq_set(__isl_take isl_pw_aff *pwaff1,
__isl_take isl_pw_aff *pwaff2);
+__isl_export
__isl_give isl_set *isl_pw_aff_ne_set(__isl_take isl_pw_aff *pwaff1,
__isl_take isl_pw_aff *pwaff2);
+__isl_export
__isl_give isl_set *isl_pw_aff_le_set(__isl_take isl_pw_aff *pwaff1,
__isl_take isl_pw_aff *pwaff2);
+__isl_export
__isl_give isl_set *isl_pw_aff_lt_set(__isl_take isl_pw_aff *pwaff1,
__isl_take isl_pw_aff *pwaff2);
+__isl_export
__isl_give isl_set *isl_pw_aff_ge_set(__isl_take isl_pw_aff *pwaff1,
__isl_take isl_pw_aff *pwaff2);
+__isl_export
__isl_give isl_set *isl_pw_aff_gt_set(__isl_take isl_pw_aff *pwaff1,
__isl_take isl_pw_aff *pwaff2);
return isl_set_from_basic_set(isl_aff_ge_basic_set(aff1, aff2));
}
+/* Return a set containing those elements in the shared domain space
+ * of aff1 and aff2 where aff1 is greater than aff2.
+ *
+ * If either of the two inputs is NaN, then the result is empty,
+ * as comparisons with NaN always return false.
+ */
+__isl_give isl_set *isl_aff_gt_set(__isl_take isl_aff *aff1,
+ __isl_take isl_aff *aff2)
+{
+ return isl_set_from_basic_set(isl_aff_gt_basic_set(aff1, aff2));
+}
+
/* Return a basic set containing those elements in the shared space
* of aff1 and aff2 where aff1 is smaller than or equal to aff2.
*/
return isl_set_from_basic_set(isl_aff_eq_basic_set(aff1, aff2));
}
+/* Return a set containing those elements in the shared domain space
+ * of aff1 and aff2 where aff1 and aff2 are not equal.
+ *
+ * If either of the two inputs is NaN, then the result is empty,
+ * as comparisons with NaN always return false.
+ */
+__isl_give isl_set *isl_aff_ne_set(__isl_take isl_aff *aff1,
+ __isl_take isl_aff *aff2)
+{
+ isl_set *set_lt, *set_gt;
+
+ set_lt = isl_aff_lt_set(isl_aff_copy(aff1),
+ isl_aff_copy(aff2));
+ set_gt = isl_aff_gt_set(aff1, aff2);
+ return isl_set_union_disjoint(set_lt, set_gt);
+}
+
__isl_give isl_aff *isl_aff_add_on_domain(__isl_keep isl_set *dom,
__isl_take isl_aff *aff1, __isl_take isl_aff *aff2)
{
--- /dev/null
+/*
+ * Copyright 2017 Sven Verdoolaege
+ *
+ * Use of this software is governed by the MIT license
+ *
+ * Written by Sven Verdoolaege.
+ */
+
+#include <stdlib.h>
+
+#include <isl/arg.h>
+#include <isl/options.h>
+#include <isl/schedule.h>
+
+struct options {
+ struct isl_options *isl;
+ char *schedule1;
+ char *schedule2;
+};
+
+ISL_ARGS_START(struct options, options_args)
+ISL_ARG_CHILD(struct options, isl, "isl", &isl_options_args, "isl options")
+ISL_ARG_ARG(struct options, schedule1, "schedule1", NULL)
+ISL_ARG_ARG(struct options, schedule2, "schedule2", NULL)
+ISL_ARGS_END
+
+ISL_ARG_DEF(options, struct options, options_args)
+
+static void die(const char *msg)
+{
+ fprintf(stderr, "%s\n", msg);
+ exit(EXIT_FAILURE);
+}
+
+static FILE *open_or_die(const char *filename)
+{
+ FILE *file;
+
+ file = fopen(filename, "r");
+ if (!file) {
+ fprintf(stderr, "Unable to open %s\n", filename);
+ exit(EXIT_FAILURE);
+ }
+ return file;
+}
+
+/* Given two YAML descriptions of isl_schedule objects, check whether
+ * they are equivalent.
+ * Return EXIT_SUCCESS if they are and EXIT_FAILURE if they are not
+ * or if anything else went wrong.
+ */
+int main(int argc, char **argv)
+{
+ isl_ctx *ctx;
+ struct options *options;
+ FILE *input1, *input2;
+ isl_bool equal;
+ isl_schedule *s1, *s2;
+
+ options = options_new_with_defaults();
+ if (!options)
+ return EXIT_FAILURE;
+
+ ctx = isl_ctx_alloc_with_options(&options_args, options);
+ argc = options_parse(options, argc, argv, ISL_ARG_ALL);
+
+ input1 = open_or_die(options->schedule1);
+ input2 = open_or_die(options->schedule2);
+ s1 = isl_schedule_read_from_file(ctx, input1);
+ s2 = isl_schedule_read_from_file(ctx, input2);
+
+ equal = isl_schedule_plain_is_equal(s1, s2);
+ if (equal < 0)
+ return EXIT_FAILURE;
+ if (!equal)
+ die("schedules differ");
+
+ isl_schedule_free(s1);
+ isl_schedule_free(s2);
+ fclose(input1);
+ fclose(input2);
+ isl_ctx_free(ctx);
+
+ return EXIT_SUCCESS;
+}
--- /dev/null
+#!/bin/sh
+
+EXEEXT=@EXEEXT@
+GREP=@GREP@
+SED=@SED@
+srcdir=@srcdir@
+
+failed=0
+
+for i in $srcdir/test_inputs/schedule/*.sc; do
+ echo $i;
+ base=`basename $i .sc`
+ test=test-$base.st
+ dir=`dirname $i`
+ ref=$dir/$base.st
+ options=`$GREP 'OPTIONS:' $i | $SED 's/.*://'`
+ (./isl_schedule$EXEEXT $options < $i > $test &&
+ ./isl_schedule_cmp$EXEEXT $ref $test && rm $test) || failed=1
+done
+
+test $failed -eq 0 || exit
--- /dev/null
+# Check that the Feautrier schedule is not confused by
+# compressed nodes in a subgraph of the original dependence graph.
+# OPTIONS: --schedule-algorithm=feautrier
+domain: { A[]; B[0]; C[] }
+validity: { A[] -> B[0] }
--- /dev/null
+domain: "{ B[0]; C[]; A[] }"
+child:
+ set:
+ - filter: "{ B[i0]; A[] }"
+ child:
+ schedule: "[{ B[i0] -> [(1)]; A[] -> [(0)] }]"
+ child:
+ set:
+ - filter: "{ A[] }"
+ - filter: "{ B[i0] }"
+ - filter: "{ C[] }"