Files
TheRock/compiler/amd-llvm/polly/lib/External/isl/schedule_cmp.c
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

86 lines
1.8 KiB
C

/*
* 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;
}