src/server/HashIndex.cxx File Reference

#include <Index.h>
#include <CatalogTables.h>
#include <Lock.h>
#include <Debug.h>
#include <Table.h>
#include <TableImpl.h>
#include <Predicate.h>
#include <PredicateImpl.h>

Include dependency graph for HashIndex.cxx:

Go to the source code of this file.

Functions

unsigned int hashString (char *strVal)


Function Documentation

unsigned int hashString ( char *  strVal  ) 

Definition at line 29 of file HashIndex.cxx.

Referenced by HashIndex::computeHashBucket().

00030 {
00031     unsigned int hval, g;
00032     hval = 0;
00033     char *str =strVal;
00034     while (*str != '\0')
00035     {
00036         hval <<= 4;
00037         hval += (unsigned int) *str++;
00038         g = hval & ((unsigned int) 0xf << (32 - 4));
00039         if (g != 0)
00040         {
00041             hval ^= g >> (32 - 8);
00042             hval ^= g;
00043         }
00044     }
00045     return hval;
00046 }

Here is the caller graph for this function:


Generated on Mon Jun 9 22:41:38 2008 for csql by  doxygen 1.4.7