Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/vowpal_wabbit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Langford <jl@hunch.net>2013-01-14 16:53:34 +0400
committerJohn Langford <jl@hunch.net>2013-01-14 16:53:34 +0400
commit5046679437b058e82e31f42be2a41a70e30e9d7a (patch)
tree5a0102ac3fa84dfe6caeb3642ed211bda0761a32 /vowpalwabbit/hash.cc
parent2970b9e5be46fd5956ccc934168e1588c802bc63 (diff)
fixed hash.cc for ubuntu 12.10 compile
Diffstat (limited to 'vowpalwabbit/hash.cc')
-rw-r--r--vowpalwabbit/hash.cc6
1 files changed, 2 insertions, 4 deletions
diff --git a/vowpalwabbit/hash.cc b/vowpalwabbit/hash.cc
index 52d62549..7b484a4a 100644
--- a/vowpalwabbit/hash.cc
+++ b/vowpalwabbit/hash.cc
@@ -30,14 +30,12 @@
#if defined(_MSC_VER) // Microsoft Visual Studio
# include <stdint.h>
-# define FORCE_INLINE __forceinline
# include <stdlib.h>
# define ROTL32(x,y) _rotl(x,y)
# define BIG_CONSTANT(x) (x)
#else // Other compilers
# include <stdint.h> /* defines uint32_t etc */
-# define FORCE_INLINE __attribute__((always_inline))
inline uint32_t rotl32 (uint32_t x, int8_t r)
{
@@ -53,7 +51,7 @@
// Block read - if your platform needs to do endian-swapping or can only
// handle aligned reads, do the conversion here
-FORCE_INLINE uint32_t getblock (const uint32_t * p, int i)
+static inline uint32_t getblock (const uint32_t * p, int i)
{
return p[i];
}
@@ -61,7 +59,7 @@ FORCE_INLINE uint32_t getblock (const uint32_t * p, int i)
//-----------------------------------------------------------------------------
// Finalization mix - force all bits of a hash block to avalanche
-FORCE_INLINE uint32_t fmix (uint32_t h)
+static inline uint32_t fmix (uint32_t h)
{
h ^= h >> 16;
h *= 0x85ebca6b;