Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62414 - sandbox/SOC/2010/bits_and_ints/boost/integer/detail
From: muriloufg_at_[hidden]
Date: 2010-06-03 13:50:03


Author: murilov
Date: 2010-06-03 13:50:02 EDT (Thu, 03 Jun 2010)
New Revision: 62414
URL: http://svn.boost.org/trac/boost/changeset/62414

Log:
Deleted some files wich are no longer needed.
Removed:
   sandbox/SOC/2010/bits_and_ints/boost/integer/detail/bit_reversal.hpp
   sandbox/SOC/2010/bits_and_ints/boost/integer/detail/sign_extend.hpp
   sandbox/SOC/2010/bits_and_ints/boost/integer/detail/static_bit_reversal.hpp
   sandbox/SOC/2010/bits_and_ints/boost/integer/detail/static_sign_extend.hpp
   sandbox/SOC/2010/bits_and_ints/boost/integer/detail/utils.hpp

Deleted: sandbox/SOC/2010/bits_and_ints/boost/integer/detail/bit_reversal.hpp
==============================================================================
--- sandbox/SOC/2010/bits_and_ints/boost/integer/detail/bit_reversal.hpp 2010-06-03 13:50:02 EDT (Thu, 03 Jun 2010)
+++ (empty file)
@@ -1,72 +0,0 @@
-// Boost integer/detail/bit_reversal.hpp header file ------------------------------//
-
-// (C) Copyright Murilo Adriano Vasconcelos 2010.
-// 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
-
-// See http://www.boost.org for updates, documentation, and revision history.
-
-#ifndef BOOST_BIT_REVERSAL_INCLUDED
-#define BOOST_BIT_REVERSAL_INCLUDED
-
-#include <boost/utility/enable_if.hpp>
-#include <boost/type_traits.hpp>
-
-namespace boost
-{
-
-/*
- * Reverses the bits in data
- * For example if binary representation of data is:
- * 00000000000010001010101000001111
- * bit_reversal(data) is:
- * 11110000010101010000000000000000
- */
-
-
-#ifndef BOOST_NO_INT64_T
-// 64-bit version
-template <typename T>
-inline typename enable_if_c<is_integral<T>::type::value && sizeof(T) == 8, T>::type
-bit_reversal(T data)
-{
- // swap odd and even bits
- data = ((data >> 1) & 0x5555555555555555) | ((data & 0x5555555555555555) << 1);
- // swap consecutive pairs
- data = ((data >> 2) & 0x3333333333333333) | ((data & 0x3333333333333333) << 2);
- // swap nibbles
- data = ((data >> 4) & 0x0F0F0F0F0F0F0F0F) | ((data & 0x0F0F0F0F0F0F0F0F) << 4);
- // swap bytes
- data = ((data >> 8) & 0x00FF00FF00FF00FF) | ((data & 0x00FF00FF00FF00FF) << 8);
- // swap 2-byte long pairs
- data = ((data >> 16) & 0x0000FFFF0000FFFF) | ((data & 0x0000FFFF0000FFFF) << 16);
- // swap the halves
- data = (data >> 32 | data << 32);
-
- return data;
-}
-#endif
-
-// 32-bit version
-template <typename T>
-inline typename enable_if_c<is_integral<T>::type::value && sizeof(T) == 4, T>::type
-bit_reversal(T data)
-{
- // swap odd and even bits
- data = ((data >> 1) & 0x55555555) | ((data & 0x55555555) << 1);
- // swap consecutive pairs
- data = ((data >> 2) & 0x33333333) | ((data & 0x33333333) << 2);
- // swap nibbles
- data = ((data >> 4) & 0x0F0F0F0F) | ((data & 0x0F0F0F0F) << 4);
- // swap bytes
- data = ((data >> 8) & 0x00FF00FF) | ((data & 0x00FF00FF) << 8);
- // swap 2-byte long pairs
- data = (data >> 16) | (data << 16);
-
- return data;
-}
-
-} // boost
-
-#endif
\ No newline at end of file

Deleted: sandbox/SOC/2010/bits_and_ints/boost/integer/detail/sign_extend.hpp
==============================================================================
--- sandbox/SOC/2010/bits_and_ints/boost/integer/detail/sign_extend.hpp 2010-06-03 13:50:02 EDT (Thu, 03 Jun 2010)
+++ (empty file)
@@ -1,32 +0,0 @@
-// Boost integer/detail/sign_extend.hpp header file ------------------------------//
-
-// (C) Copyright Murilo Adriano Vasconcelos 2010.
-// 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)
-
-// See http://www.boost.org for updates, documentation, and revision history.
-
-#ifndef BOOST_SIGN_EXTEND_INCLUDED
-#define BOOST_SIGN_EXTEND_INCLUDED
-
-#include <boost/cstdint.hpp> // for intmax_t
-#include <boost/assert.hpp>
-
-namespace boost
-{
-
-typedef intmax_t Raw;
-
-// Extend data represented in 'b' bits to sizeof(T)*8 bits
-template <typename IntegralType>
-inline Raw sign_extend(IntegralType data, unsigned b)
-{
- data = data & ((Raw(1) << b) - 1);
- Raw const m = (Raw(1) << (b - 1));
- return (data ^ m) - m;
-}
-
-} // boost
-
-#endif
\ No newline at end of file

Deleted: sandbox/SOC/2010/bits_and_ints/boost/integer/detail/static_bit_reversal.hpp
==============================================================================
--- sandbox/SOC/2010/bits_and_ints/boost/integer/detail/static_bit_reversal.hpp 2010-06-03 13:50:02 EDT (Thu, 03 Jun 2010)
+++ (empty file)
@@ -1,70 +0,0 @@
-// Boost integer/detail/static_bit_reversal.hpp header file ------------------------------//
-
-// (C) Copyright Murilo Adriano Vasconcelos 2010.
-// 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
-
-// See http://www.boost.org for updates, documentation, and revision history.
-
-#ifndef BOOST_STATIC_BIT_REVERSAL_INCLUDED
-#define BOOST_STATIC_BIT_REVERSAL_INCLUDED
-
-#include <boost/utility/enable_if.hpp>
-#include <boost/type_traits.hpp>
-#include "utils.hpp" // is_bit_set<>
-
-/*
- * Reverses the bits in data in compile-time
- * For example if binary representation of data is:
- * 00000000000010001010101000001111
- * static_bit_reversal<type, data>::value is:
- * 11110000010101010000000000000000
- */
-
-namespace boost
-{
-
-namespace bits_and_ints_private {
-
-// Base container
-template <typename T, T data>
-struct static_bit_reversal_base
-{
- BOOST_STATIC_CONSTANT(T, value = data);
-};
-
-// Recursion implementation
-template <typename T, T data, std::size_t shift>
-struct static_bit_reversal_impl :
- public static_bit_reversal_base<T,
- ((is_bit_set<T, data, (sizeof(T) * 8 - shift)>::value << (shift - 1))
- + static_bit_reversal_impl<T, data, shift - 1>::value)
- >
-{};
-
-// Base case
-template <typename T, T data>
-struct static_bit_reversal_impl<T, data, 0> :
- static_bit_reversal_base<T, T(0)> {};
-
-} // bits_and_ints_private
-
-
-// If T is not an integral type, static_bit_reversal<T, data>::value call
-// will result an error.
-template <typename T, T data, class Enable = void>
-struct static_bit_reversal {};
-
-// If T is an integral type, static_bit_reversal<T, data>::value will
-// be `data' with the bits reversed
-template <typename T, T data>
-struct static_bit_reversal<T, data, typename enable_if<is_integral<T> >::type> {
- BOOST_STATIC_CONSTANT(T, value =
- (bits_and_ints_private::static_bit_reversal_impl<T, data, sizeof(T) * 8>::value)
- );
-};
-
-} // boost
-
-#endif
\ No newline at end of file

Deleted: sandbox/SOC/2010/bits_and_ints/boost/integer/detail/static_sign_extend.hpp
==============================================================================
--- sandbox/SOC/2010/bits_and_ints/boost/integer/detail/static_sign_extend.hpp 2010-06-03 13:50:02 EDT (Thu, 03 Jun 2010)
+++ (empty file)
@@ -1,32 +0,0 @@
-// Boost integer/detail/static_sign_extend.hpp header file ------------------------------//
-
-// (C) Copyright Murilo Adriano Vasconcelos 2010.
-// 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
-
-// See http://www.boost.org for updates, documentation, and revision history.
-
-#ifndef BOOST_STATIC_SIGN_EXTEND_INCLUDED
-#define BOOST_STATIC_SIGN_EXTEND_INCLUDED
-
-#include <boost/cstdint.hpp> // for intmax_t
-
-namespace boost
-{
-
-// Compile-time version of sign_extend
-template<typename IntegralType, Raw raw, unsigned B>
-struct static_sign_extend
-{
- typedef IntegralType T;
-private:
- BOOST_STATIC_CONSTANT(T, shift = (T(1) << (B - 1)));
- BOOST_STATIC_CONSTANT(T, m = ((T(1) << B) - 1));
-public:
- BOOST_STATIC_CONSTANT(Raw, value = ((raw & m) ^ shift) - shift);
-}; // boost::static_sign_extend
-
-} // boost
-
-#endif
\ No newline at end of file

Deleted: sandbox/SOC/2010/bits_and_ints/boost/integer/detail/utils.hpp
==============================================================================
--- sandbox/SOC/2010/bits_and_ints/boost/integer/detail/utils.hpp 2010-06-03 13:50:02 EDT (Thu, 03 Jun 2010)
+++ (empty file)
@@ -1,56 +0,0 @@
-// Boost integer/detail/utils.hpp header file ------------------------------//
-
-// (C) Copyright Murilo Adriano Vasconcelos 2010.
-// 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
-
-// See http://www.boost.org for updates, documentation, and revision history.
-
-#ifndef BOOST_INTEGER_UTILS_INCLUDED
-#define BOOST_INTEGER_UTILS_INCLUDED
-
-/*
- * Some utilities to handle integers.
- */
-namespace boost
-{
-
-// Sets the bit `pos' in data
-template <typename T, T data, unsigned char pos>
-struct set_bit
-{
- BOOST_STATIC_CONSTANT(T, value = data | (T(1) << pos));
-}; // set_bit
-
-// Clear the bit `pos' in data
-template <typename T, T data, unsigned char pos>
-struct clear_bit
-{
- BOOST_STATIC_CONSTANT(T, value = data & ~(T(1) << pos));
-}; // clear_bit
-
-// If the bit `pos' is 1 then it will be 0 if not the bit will be 1
-template <typename T, T data, unsigned char pos>
-struct flip_bit
-{
- BOOST_STATIC_CONSTANT(T, value = data ^ (T(1) << pos));
-}; // flip_bit
-
-// Test if the bit in `pos' positon is set or not
-template <typename T, T data, unsigned char pos>
-struct is_bit_set
-{
- BOOST_STATIC_CONSTANT(T, value = ((data >> pos) & T(1)) != T(0));
-}; // is_bit_set
-
-// Changes the value of bit in `pos' position
-template <typename T, T data, unsigned char pos, bool state>
-struct modify_bit
-{
- BOOST_STATIC_CONSTANT(T, value = ((data & ~(T(1) << pos)) | (-state & (T(1) << pos))));
-}; // modify_bit
-
-} // boost
-
-#endif
\ No newline at end of file


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