/*
* Copyright 2008-2009 Katholieke Universiteit Leuven
- * Copyright 2010 INRIA Saclay
+ * Copyright 2010-2011 INRIA Saclay
*
* Use of this software is governed by the GNU LGPLv2.1 license
*
return dim_map;
}
+void isl_dim_map_range(__isl_keep isl_dim_map *dim_map,
+ unsigned dst_pos, unsigned dst_stride,
+ unsigned src_pos, unsigned src_stride,
+ unsigned n, int sign)
+{
+ int i;
+
+ if (!dim_map)
+ return;
+
+ for (i = 0; i < n; ++i) {
+ unsigned d = 1 + dst_pos + dst_stride * i;
+ unsigned s = 1 + src_pos + src_stride * i;
+ dim_map->m[d].pos = s;
+ dim_map->m[d].sgn = sign;
+ }
+}
+
void isl_dim_map_dim_range(__isl_keep isl_dim_map *dim_map,
struct isl_dim *dim, enum isl_dim_type type,
unsigned first, unsigned n, unsigned dst_pos)
typedef struct isl_dim_map isl_dim_map;
__isl_give isl_dim_map *isl_dim_map_alloc(isl_ctx *ctx, unsigned len);
+void isl_dim_map_range(__isl_keep isl_dim_map *dim_map,
+ unsigned dst_pos, unsigned dst_stride,
+ unsigned src_pos, unsigned src_stride,
+ unsigned n, int sign);
void isl_dim_map_dim_range(__isl_keep isl_dim_map *dim_map,
struct isl_dim *dim, enum isl_dim_type type,
unsigned first, unsigned n, unsigned dst_pos);