Changeset: d93524047979 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d93524047979
Modified Files:
gdk/gdk_group.c
Branch: Jul2017
Log Message:
Use GCC builtin function for pop count.
diffs (25 lines):
diff --git a/gdk/gdk_group.c b/gdk/gdk_group.c
--- a/gdk/gdk_group.c
+++ b/gdk/gdk_group.c
@@ -353,6 +353,13 @@ rev(oid x)
}
/* population count: count number of 1 bits in a value */
+#ifdef __GNUC__
+#if SIZEOF_OID == SIZEOF_INT
+#define pop(x) __builtin_popcount(x)
+#else
+#define pop(x) __builtin_popcountl(x)
+#endif
+#else
static inline int
pop(oid x)
{
@@ -373,6 +380,7 @@ pop(oid x)
#endif
return (int) x;
}
+#endif
#define GRP_create_partial_hash_table_core(INIT_1,HASH,COMP,ASSERT,GRPTST) \
do { \
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list