|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r72941 - sandbox/bloom_filter/trunk/boost/bloom_filter/hash
From: cpp.cabrera_at_[hidden]
Date: 2011-07-06 20:17:47
Author: alejandro
Date: 2011-07-06 20:17:47 EDT (Wed, 06 Jul 2011)
New Revision: 72941
URL: http://svn.boost.org/trac/boost/changeset/72941
Log:
Added __restrict__ keyword. May cause trouble on non-GCC compilers...
Text files modified:
sandbox/bloom_filter/trunk/boost/bloom_filter/hash/murmurhash3.hpp | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
Modified: sandbox/bloom_filter/trunk/boost/bloom_filter/hash/murmurhash3.hpp
==============================================================================
--- sandbox/bloom_filter/trunk/boost/bloom_filter/hash/murmurhash3.hpp (original)
+++ sandbox/bloom_filter/trunk/boost/bloom_filter/hash/murmurhash3.hpp 2011-07-06 20:17:47 EDT (Wed, 06 Jul 2011)
@@ -329,10 +329,10 @@
//-----------------------------------------------------------------------------
- void murmurhash3_x64_128(const void *const key, const size_t len,
- const size_t seed, const void * out )
+ void murmurhash3_x64_128(const void *const __restrict__ key, const size_t len,
+ const size_t seed, const void *__restrict__ out )
{
- const uint8_t * data = static_cast<const uint8_t*>(key);
+ const uint8_t *const __restrict__ data = static_cast<const uint8_t*>(key);
const int nblocks = len / 16;
uint64_t h1 = seed;
@@ -344,7 +344,7 @@
//----------
// body
- const uint64_t *const blocks = reinterpret_cast<const uint64_t *>(data);
+ const uint64_t *const __restrict__ blocks = reinterpret_cast<const uint64_t *>(data);
for(int i = 0; i < nblocks; i++)
{
@@ -363,7 +363,7 @@
//----------
// tail
- const uint8_t *const tail = static_cast<const uint8_t*>(data + nblocks*16);
+ const uint8_t *const __restrict__ tail = static_cast<const uint8_t*>(data + nblocks*16);
uint64_t k1 = 0;
uint64_t k2 = 0;
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk