aboutsummaryrefslogtreecommitdiff
path: root/lib/hash.h
AgeCommit message (Collapse)Author
2012-05-02Global replace of Nicira Networks.Raju Subramanian
Replaced all instances of Nicira Networks(, Inc) to Nicira, Inc. Feature #10593 Signed-off-by: Raju Subramanian <rsubramanian@nicira.com> Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-02-02hash: Convert macros to inline functions.Ben Pfaff
I always assumed that macros would generate better code. I was wrong. The generated code was identical with inline functions, with GCC version 4.4.5. Signed-off-by: Ben Pfaff <blp@nicira.com>
2011-08-04lib: Adapt headers for use in C++.Casey Barker
This commit makes several library headers suitable for inclusion in C++. It adds [extern "C"] guards and makes minor changes to fix casting and keyword issues.
2010-12-17hash: Make functions for hashing a few words easier to use.Ben Pfaff
It's easier for the client to pass in data directly than it is for the client to stuff it into an array. These functions will have new users in upcoming commits.
2010-01-20hash: Prevent warnings about strict aliasing rules.Jesse Gross
Some versions of GCC complain about violations of strict aliasing rules due to a cast between different pointer types. This avoids any aliasing by copying the value first.
2009-11-04hash: Improve hash function for integers.Ben Pfaff
As previously defined, the following both returned the same value for given values of 'basis': hash_int(0, hash_int(1, basis)) hash_int(1, hash_int(0, basis)) because hash_int(0, basis) evaluated to basis and hash_int(1, basis) evaluated to c + basis for some constant c. This commit fixes the problem, by eliminating any simple linear relationship between basis and the hash value. We should write some tests for hash function quality.
2009-11-04hash: Implement hash function for Boolean values.Ben Pfaff
This will be used by the configuration database, and it's generally useful to have around.
2009-11-04hash: Implement hash function for "double" values.Ben Pfaff
This will be used by the configuration database, which can store real numbers.
2009-11-04hash: Implement hash function for pointer values.Ben Pfaff
This will be used by an upcoming commit, and it's generally useful to have around.
2009-06-15Update primary code license to Apache 2.0.Ben Pfaff
2009-07-08Import from old repository commit 61ef2b42a9c4ba8e1600f15bb0236765edc2ad45.v0.90.0Ben Pfaff