Edit

kc3-lang/angle/src/third_party/murmurhash/MurmurHash3.h

Branch :

  • Show log

    Commit

  • Author : Kimmo Kinnunen
    Date : 2015-08-07 15:01:04
    Hash : 19b890af
    Message : Import new MurmurHash3 to fix g++ 4.9.2 errors The code is from http://smhasher.googlecode.com/svn/trunk/ revision 152. Fixes error: ../../src/third_party/murmurhash/MurmurHash3.cpp:57:41: error: inlining failed in call to always_inline ‘uint32_t getblock(const uint32_t*, int)’: function body can be overwritten at link time FORCE_INLINE uint32_t getblock ( const uint32_t * p, int i ) The error was previously fixed by adding a pragma to ignore the warning. The problem the compiler is complaining is that the function is visible to outside of the compilation unit. This can be fixed by making the function inline (as in the new version of the MurmurHash3.cpp) or static. Change-Id: I7a1262964489d72de8b4707ca2284363c8b46e20 Reviewed-on: https://chromium-review.googlesource.com/291620 Tested-by: Kimmo Kinnunen <kkinnunen@nvidia.com> Reviewed-by: Jamie Madill <jmadill@chromium.org> Reviewed-by: Dongseong Hwang <dongseong.hwang@intel.com> Tested-by: Dongseong Hwang <dongseong.hwang@intel.com> Reviewed-by: Geoff Lang <geofflang@chromium.org>

  • src/third_party/murmurhash/MurmurHash3.h
  • //-----------------------------------------------------------------------------
    // MurmurHash3 was written by Austin Appleby, and is placed in the public
    // domain. The author hereby disclaims copyright to this source code.
    
    #ifndef _MURMURHASH3_H_
    #define _MURMURHASH3_H_
    
    //-----------------------------------------------------------------------------
    // Platform-specific functions and macros
    
    // Microsoft Visual Studio
    
    #if defined(_MSC_VER) && (_MSC_VER < 1600)
    
    typedef unsigned char uint8_t;
    typedef unsigned int uint32_t;
    typedef unsigned __int64 uint64_t;
    
    // Other compilers
    
    #else	// defined(_MSC_VER)
    
    #include <stdint.h>
    
    #endif // !defined(_MSC_VER)
    
    //-----------------------------------------------------------------------------
    
    void MurmurHash3_x86_32  ( const void * key, int len, uint32_t seed, void * out );
    
    void MurmurHash3_x86_128 ( const void * key, int len, uint32_t seed, void * out );
    
    void MurmurHash3_x64_128 ( const void * key, int len, uint32_t seed, void * out );
    
    //-----------------------------------------------------------------------------
    
    #endif // _MURMURHASH3_H_