diff srf2fastq/io_lib-1.12.2/io_lib/jenkins_lookup3.h @ 0:d901c9f41a6a default tip

Migrated tool version 1.0.1 from old tool shed archive to new tool shed repository
author dawe
date Tue, 07 Jun 2011 17:48:05 -0400
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/srf2fastq/io_lib-1.12.2/io_lib/jenkins_lookup3.h	Tue Jun 07 17:48:05 2011 -0400
@@ -0,0 +1,22 @@
+#ifndef _JENKINS_LOOKUP3_H_
+#define _JENKINS_LOOKUP3_H_
+
+#include <inttypes.h>     /* defines uint32_t etc */
+
+/*
+ * HashJenkins3: return 2 32-bit hash values
+ *
+ * This is identical to hashlittle(), except it returns two 32-bit hash
+ * values instead of just one.  This is good enough for hash table
+ * lookup with 2^^64 buckets, or if you want a second hash if you're not
+ * happy with the first, or if you want a probably-unique 64-bit ID for
+ * the key.  *pc is better mixed than *pb, so use *pc first.  If you want
+ * a 64-bit value do something like "*pc + (((uint64_t)*pb)<<32)".
+ */
+void HashJenkins3( 
+  const void *key,       /* the key to hash */
+  size_t      length,    /* length of the key */
+  uint32_t   *pc,        /* IN: primary initval, OUT: primary hash */
+  uint32_t   *pb);       /* IN: secondary initval, OUT: secondary hash */
+
+#endif