示例#1
0
文件: aff.c 项目: realincubus/pet
/* Call isl_map_move_dims on "map" using the arguments in "data" and
 * add the result to data->res.
 */
static isl_stat map_move_dims(__isl_take isl_map *map, void *user)
{
	struct pet_union_map_move_dims_data *data = user;

	map = isl_map_move_dims(map, data->dst_type, data->dst_pos,
				data->src_type, data->src_pos, data->n);
	data->res = isl_union_map_add_map(data->res, map);

	return isl_stat_ok;
}
示例#2
0
/* Extend the dimension of the range of the given map to data->max_out and
 * then add the result to data->res.
 */
static isl_stat map_align_range(__isl_take isl_map *map, void *user)
{
    struct align_range_data *data = user;
    int i;
    isl_space *dim;
    isl_map *proj;
    int n_out = isl_map_dim(map, isl_dim_out);

    dim = isl_union_map_get_space(data->res);
    proj = isl_map_reverse(projection(dim, data->max_out, n_out));
    for (i = n_out; i < data->max_out; ++i)
        proj = isl_map_fix_si(proj, isl_dim_out, i, 0);

    map = isl_map_apply_range(map, proj);

    data->res = isl_union_map_add_map(data->res, map);

    return isl_stat_ok;
}