add isl_id_to_pw_aff
authorSven Verdoolaege <skimo@kotnet.org>
Sat, 13 Jul 2013 06:42:43 +0000 (13 08:42 +0200)
committerSven Verdoolaege <skimo@kotnet.org>
Sat, 27 Jul 2013 09:04:01 +0000 (27 11:04 +0200)
Signed-off-by: Sven Verdoolaege <skimo@kotnet.org>
Makefile.am
doc/user.pod
include/isl/id_to_pw_aff.h [new file with mode: 0644]
isl_id_to_pw_aff.c [new file with mode: 0644]

index b72c835..8c866c0 100644 (file)
@@ -67,6 +67,7 @@ libisl_la_SOURCES = \
        isl_gmp.c \
        isl_hash.c \
        isl_id_to_ast_expr.c \
+       isl_id_to_pw_aff.c \
        isl_ilp.c \
        isl_ilp_private.h \
        isl_input.c \
@@ -220,6 +221,7 @@ pkginclude_HEADERS = \
        include/isl/flow.h \
        include/isl/id.h \
        include/isl/id_to_ast_expr.h \
+       include/isl/id_to_pw_aff.h \
        include/isl/ilp.h \
        include/isl/hash.h \
        include/isl/hmap.h \
index a4d55eb..893b2a1 100644 (file)
@@ -3291,8 +3291,9 @@ Lists can be printed using
 
 Associative arrays map isl objects of a specific type to isl objects
 of some (other) specific type.  They are defined for several pairs
-of types, including (C<isl_map>, C<isl_basic_set>) and
-(C<isl_id>, C<isl_ast_expr>).
+of types, including (C<isl_map>, C<isl_basic_set>),
+(C<isl_id>, C<isl_ast_expr>) and.
+(C<isl_id>, C<isl_pw_aff>).
 Here, we take associative arrays that map C<isl_id>s to C<isl_ast_expr>s
 as an example.
 
diff --git a/include/isl/id_to_pw_aff.h b/include/isl/id_to_pw_aff.h
new file mode 100644 (file)
index 0000000..e54fefb
--- /dev/null
@@ -0,0 +1,13 @@
+#ifndef ISL_ID_TO_PW_AFF_H
+#define ISL_ID_TO_PW_AFF_H
+
+#include <isl/id.h>
+#include <isl/aff_type.h>
+
+#define ISL_KEY_BASE   id
+#define ISL_VAL_BASE   pw_aff
+#include <isl/hmap.h>
+#undef ISL_KEY_BASE
+#undef ISL_VAL_BASE
+
+#endif
diff --git a/isl_id_to_pw_aff.c b/isl_id_to_pw_aff.c
new file mode 100644 (file)
index 0000000..2fce240
--- /dev/null
@@ -0,0 +1,11 @@
+#include <isl/id_to_pw_aff.h>
+#include <isl/aff.h>
+
+#define isl_id_is_equal(id1,id2)       id1 == id2
+
+#define KEY_BASE       id
+#define KEY_EQUAL      isl_id_is_equal
+#define VAL_BASE       pw_aff
+#define VAL_EQUAL      isl_pw_aff_plain_is_equal
+
+#include <isl_hmap_templ.c>