Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/adt/hash.h

    r82cbf8c6 r26d8df3  
    4545         * Public domain.
    4646         */
    47         hash = ~hash + (hash << 15);
     47        hash = ~hash + (hash << 15); 
    4848        hash = hash ^ (hash >> 12);
    4949        hash = hash + (hash << 2);
    5050        hash = hash ^ (hash >> 4);
    51         hash = hash * 2057;
     51        hash = hash * 2057; 
    5252        hash = hash ^ (hash >> 16);
    53         return hash;
     53        return hash;   
    5454}
    5555
     
    6565        hash = hash ^ (hash >> 4);
    6666        hash = hash * 0x27d4eb2d;
    67         hash = hash ^ (hash >> 15);
    68         /*
     67        hash = hash ^ (hash >> 15);     
     68        /* 
    6969         * Lower order bits are mixed more thoroughly. Swap them with
    7070         * the higher order bits and make the resulting higher order bits
     
    105105         * http://burtleburtle.net/bob/c/lookup3.c
    106106         */
    107         seed ^= hash + 0x9e3779b9
     107        seed ^= hash + 0x9e3779b9 
    108108                + ((seed << 5) | (seed >> (sizeof(size_t) * 8 - 5)));
    109         return seed;
     109        return seed;   
    110110}
    111111
Note: See TracChangeset for help on using the changeset viewer.