From ed6115361006240e3c7b02295599e4534cc55a13 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sat, 19 Oct 2013 08:57:20 +0200 Subject: Update internal Boost subset to 1.54.0 --- .../functional/hash/detail/hash_float_generic.hpp | 91 ---------------------- 1 file changed, 91 deletions(-) delete mode 100644 cutl/details/boost/functional/hash/detail/hash_float_generic.hpp (limited to 'cutl/details/boost/functional/hash/detail/hash_float_generic.hpp') diff --git a/cutl/details/boost/functional/hash/detail/hash_float_generic.hpp b/cutl/details/boost/functional/hash/detail/hash_float_generic.hpp deleted file mode 100644 index 295b620..0000000 --- a/cutl/details/boost/functional/hash/detail/hash_float_generic.hpp +++ /dev/null @@ -1,91 +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 general purpose hash function for non-zero floating point values. - -#if !defined(BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_GENERIC_HEADER) -#define BOOST_FUNCTIONAL_HASH_DETAIL_HASH_FLOAT_GENERIC_HEADER - -#include -#include -#include - -#if defined(_MSC_VER) && (_MSC_VER >= 1020) -# pragma once -#endif - -#if defined(BOOST_MSVC) -#pragma warning(push) -#if BOOST_MSVC >= 1400 -#pragma warning(disable:6294) // Ill-defined for-loop: initial condition does - // not satisfy test. Loop body not executed -#endif -#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); - } - - template - inline std::size_t float_hash_impl2(T v) - { - cutl_details_boost::hash_detail::call_frexp frexp; - cutl_details_boost::hash_detail::call_ldexp ldexp; - - int exp = 0; - - v = frexp(v, &exp); - - // A postive value is easier to hash, so combine the - // sign with the exponent and use the absolute value. - if(v < 0) { - v = -v; - exp += limits::max_exponent - - limits::min_exponent; - } - - v = ldexp(v, limits::digits); - std::size_t seed = static_cast(v); - v -= static_cast(seed); - - // ceiling(digits(T) * log2(radix(T))/ digits(size_t)) - 1; - std::size_t const length - = (limits::digits * - cutl_details_boost::static_log2::radix>::value - + limits::digits - 1) - / limits::digits; - - for(std::size_t i = 0; i != length; ++i) - { - v = ldexp(v, limits::digits); - std::size_t part = static_cast(v); - v -= static_cast(part); - hash_float_combine(seed, part); - } - - hash_float_combine(seed, exp); - - return seed; - } - - template - inline std::size_t float_hash_impl(T v) - { - typedef BOOST_DEDUCED_TYPENAME select_hash_type::type type; - return float_hash_impl2(static_cast(v)); - } - } -} - -#if defined(BOOST_MSVC) -#pragma warning(pop) -#endif - -#endif -- cgit v1.1