diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2013-10-19 08:57:20 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2013-10-19 08:57:20 +0200 |
commit | ed6115361006240e3c7b02295599e4534cc55a13 (patch) | |
tree | 612f12d6c7c49421102041fceb7609db8ab8257e /cutl/details/boost/functional/hash/detail/hash_float_x86.hpp | |
parent | af8d1a0139ca105c6830f4ac7c320aca2e1c1f5e (diff) |
Update internal Boost subset to 1.54.0
Diffstat (limited to 'cutl/details/boost/functional/hash/detail/hash_float_x86.hpp')
-rw-r--r-- | cutl/details/boost/functional/hash/detail/hash_float_x86.hpp | 56 |
1 files changed, 0 insertions, 56 deletions
diff --git a/cutl/details/boost/functional/hash/detail/hash_float_x86.hpp b/cutl/details/boost/functional/hash/detail/hash_float_x86.hpp deleted file mode 100644 index 6a70556..0000000 --- a/cutl/details/boost/functional/hash/detail/hash_float_x86.hpp +++ /dev/null @@ -1,56 +0,0 @@ - -// Copyright 2005-2009 Daniel James. -// Distributed under the Boost Software License, Version 1.0. (See accompanying -// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) - -// A non-portable hash function form non-zero floats on x86. -// -// Even if you're on an x86 platform, this might not work if their floating -// point isn't set up as this expects. So this should only be used if it's -// absolutely certain that it will work. - -#if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_X86_HEADER) -#define BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_X86_HEADER - -#include <cutl/details/boost/cstdint.hpp> - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -namespace cutl_details_boost -{ - namespace hash_detail - { - inline void hash_float_combine(std::size_t& seed, std::size_t value) - { - seed ^= value + (seed<<6) + (seed>>2); - } - - inline std::size_t float_hash_impl(float v) - { - cutl_details_boost::uint32_t* ptr = (cutl_details_boost::uint32_t*)&v; - std::size_t seed = *ptr; - return seed; - } - - inline std::size_t float_hash_impl(double v) - { - cutl_details_boost::uint32_t* ptr = (cutl_details_boost::uint32_t*)&v; - std::size_t seed = *ptr++; - hash_float_combine(seed, *ptr); - return seed; - } - - inline std::size_t float_hash_impl(long double v) - { - cutl_details_boost::uint32_t* ptr = (cutl_details_boost::uint32_t*)&v; - std::size_t seed = *ptr++; - hash_float_combine(seed, *ptr++); - hash_float_combine(seed, *(cutl_details_boost::uint16_t*)ptr); - return seed; - } - } -} - -#endif |