CS321/HW2/sa2a.h
inline
int hash12(int n)
{
    n &= 0xfff;
    int a = rot12(n, 2) + 0xa4e9;
    int b = rot12(n, 5) + 0x71f2;
    int c = rot12(n, 9) + 0xde35;
    return (a ^ b ^ c) & 0xfff;
}
// hash12
// Simple 12-bit hash of given int.
// Helper function for sa2a.
hash12
Simple 12-bit hash of given int.
Helper function for sa2a.
hash12 Simple 12 - bit hash of given int . Helper function for sa2a .
inline
int hash12(int n)
{
    n &= 0xfff;
    int a = rot12(n, 2) + 0xa4e9;
    int b = rot12(n, 5) + 0x71f2;
    int c = rot12(n, 9) + 0xde35;
    return (a ^ b ^ c) & 0xfff;
}
inline int hash12 ( int n ) { n &= 0xfff ; int a = rot12 ( n , 2 ) + 0xa4e9 ; int b = rot12 ( n , 5 ) + 0x71f2 ; int c = rot12 ( n , 9 ) + 0xde35 ; return ( a ^ b ^ c ) & 0xfff ; }
hash12
Simple 12-bit hash of given int.
hash12 Simple 12 - bit hash of given int .