DriveHQ Start Menu
Cloud Drive Mapping
Folder Sync
True Drop Box
FTP/SFTP Hosting
Group Account
Team Anywhere
DriveHQ Start Menu
Online File Server
My Storage
|
Manage Shares
|
Publishes
|
Drop Boxes
|
Group Account
WebDAV Drive Mapping
Cloud Drive Home
|
WebDAV Guide
|
Drive Mapping Tool
|
Drive Mapping URL
Complete Data Backup
Backup Guide
|
Cloud-to-Cloud Backup
|
DVR/Camera Backup
FTP, Email & Web Service
FTP/SFTP Hosting
|
Email Hosting
|
Web Hosting
|
Webcam Hosting
Other Products & Services
Team Anywhere
|
Connect to Remote PC
|
Cloud Surveillance
|
Virtual CCTV NVR
Quick Links
Security and Privacy
Customer Support
Service Manual
Use Cases
Group Account
Online Help
Support Forum
Contact Us
About DriveHQ
Sign Up
Login
Features
Business Features
Online File Server
FTP Hosting
Cloud Drive Mapping
Cloud File Backup
Email Backup & Hosting
Cloud File Sharing
Folder Synchronization
Group Management
True Drop Box
Full-text Search
AD Integration/SSO
Mobile Access
Personal Features
Personal Cloud Drive
Backup All Devices
Mobile APPs
Personal Web Hosting
Sub-Account (for Kids)
Home/PC/Kids Monitoring
Other Features
Team Anywhere (Remote Desktop Service)
CameraFTP Cloud Surveillance
Software
DriveHQ Drive Mapping Tool
DriveHQ FileManager
DriveHQ Online Backup
DriveHQ Team Anywhere for Windows (Beta)
DriveHQ Mobile Apps
Pricing
Business Plans & Pricing
Personal Plans & Pricing
Price Comparison with Others
Feature Comparison with Others
Install Mobile App
Sign up
Creating account...
Invalid character in username! Only 0-9, a-z, A-Z, _, -, . allowed.
Username is required!
Invalid email address!
E-mail is required!
Password is required!
Password is invalid!
Password and confirmation do not match.
Confirm password is required!
I accept
Membership Agreement
Please read the Membership Agreement and check "I accept"!
Free Quick Sign-up
Sign-up Page
Log in
Signing in...
Username or e-mail address is required!
Password is required!
Keep me logged in
Quick Login
Forgot Password
Up
Upload
Download
Share
Publish
New Folder
New File
Copy
Cut
Delete
Paste
Rate
Upgrade
Rotate
Effect
Edit
Slide
History
// -------------------------------------------------- // // (C) Copyright Chuck Allison and Jeremy Siek 2001 - 2002. // (C) Copyright Gennaro Prota 2003 - 2006. // // 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/libs/dynamic_bitset/ for documentation. // // $Revision: 41316 $ $Date: 2007-11-23 12:03:14 -0500 (Fri, 23 Nov 2007) $ - $Name$ #ifndef BOOST_DETAIL_DYNAMIC_BITSET_HPP #define BOOST_DETAIL_DYNAMIC_BITSET_HPP #include
// for std::size_t #include "boost/config.hpp" #include "boost/detail/workaround.hpp" namespace boost { namespace detail { // Gives (read-)access to the object representation // of an object of type T (3.9p4). CANNOT be used // on a base sub-object // template
inline const unsigned char * object_representation (T* p) { return static_cast
(static_cast
(p)); } template
struct shifter { static void left_shift(T & v) { amount >= width ? (v = 0) : (v >>= BOOST_DYNAMIC_BITSET_WRAP_CONSTANT(amount)); } }; // ------- count function implementation -------------- namespace dynamic_bitset_count_impl { typedef unsigned char byte_type; enum mode { access_by_bytes, access_by_blocks }; template
struct mode_to_type {}; // the table: wrapped in a class template, so // that it is only instantiated if/when needed // template
struct count_table { static const byte_type table[]; }; template <> struct count_table
{ /* no table */ }; const unsigned int table_width = 8; template
const byte_type count_table
::table[] = { // Automatically generated by GPTableGen.exe v.1.0 // 0, 1, 1, 2, 1, 2, 2, 3, 1, 2, 2, 3, 2, 3, 3, 4, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 1, 2, 2, 3, 2, 3, 3, 4, 2, 3, 3, 4, 3, 4, 4, 5, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 2, 3, 3, 4, 3, 4, 4, 5, 3, 4, 4, 5, 4, 5, 5, 6, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 3, 4, 4, 5, 4, 5, 5, 6, 4, 5, 5, 6, 5, 6, 6, 7, 4, 5, 5, 6, 5, 6, 6, 7, 5, 6, 6, 7, 6, 7, 7, 8 }; // overload for access by bytes // template
inline std::size_t do_count(Iterator first, std::size_t length, int /*dummy param*/, mode_to_type
* ) { std::size_t num = 0; if (length) { const byte_type * p = object_representation(&*first); length *= sizeof(*first); do { num += count_table<>::table[*p]; ++p; --length; } while (length); } return num; } // overload for access by blocks // template
inline std::size_t do_count(Iterator first, std::size_t length, ValueType, mode_to_type
*) { std::size_t num = 0; while (length){ ValueType value = *first; while (value) { num += count_table<>::table[value & ((1u<
>= table_width; } ++first; --length; } return num; } } // dynamic_bitset_count_impl // ------------------------------------------------------- // Some library implementations simply return a dummy // value such as // // size_type(-1) / sizeof(T) // // from vector<>::max_size. This tries to get out more // meaningful info. // template
typename T::size_type vector_max_size_workaround(const T & v) { typedef typename T::allocator_type allocator_type; const typename allocator_type::size_type alloc_max = v.get_allocator().max_size(); const typename T::size_type container_max = v.max_size(); return alloc_max < container_max? alloc_max : container_max; } // for static_asserts template
struct dynamic_bitset_allowed_block_type { enum { value = T(-1) > 0 }; // ensure T has no sign }; template <> struct dynamic_bitset_allowed_block_type
{ enum { value = false }; }; } // namespace detail } // namespace boost #endif // include guard
dynamic_bitset.hpp
Page URL
File URL
Prev
15/61
Next
Download
( 5 KB )
Note: The DriveHQ service banners will NOT be displayed if the file owner is a paid member.
Comments
Total ratings:
0
Average rating:
Not Rated
Would you like to comment?
Join DriveHQ
for a free account, or
Logon
if you are already a member.