isl_test_cpp17-generic.cc: work around std::optional::value issue in older macOS
[isl.git] / isl_scheduler_clustering.h
blobbc003267ef59a50e402e3794eb97e3fc6b9f3576
1 #ifndef ISL_SCHEDULER_CLUSTERING_H
2 #define ISL_SCHEDULER_CLUSTERING_H
4 #include "isl_scheduler.h"
6 /* Clustering information used by isl_schedule_node_compute_wcc_clustering.
8 * "n" is the number of SCCs in the original dependence graph
9 * "scc" is an array of "n" elements, each representing an SCC
10 * of the original dependence graph. All entries in the same cluster
11 * have the same number of schedule rows.
12 * "scc_cluster" maps each SCC index to the cluster to which it belongs,
13 * where each cluster is represented by the index of the first SCC
14 * in the cluster. Initially, each SCC belongs to a cluster containing
15 * only that SCC.
17 * "scc_in_merge" is used by merge_clusters_along_edge to keep
18 * track of which SCCs need to be merged.
20 * "cluster" contains the merged clusters of SCCs after the clustering
21 * has completed.
23 * "scc_node" is a temporary data structure used inside copy_partial.
24 * For each SCC, it keeps track of the number of nodes in the SCC
25 * that have already been copied.
27 struct isl_clustering {
28 int n;
29 struct isl_sched_graph *scc;
30 struct isl_sched_graph *cluster;
31 int *scc_cluster;
32 int *scc_node;
33 int *scc_in_merge;
36 __isl_give isl_schedule_node *isl_schedule_node_compute_wcc_clustering(
37 __isl_take isl_schedule_node *node, struct isl_sched_graph *graph);
39 #endif