Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-30 10:01:46

0001 // Boost.Units - A C++ library for zero-overhead dimensional analysis and 
0002 // unit/quantity manipulation and conversion
0003 //
0004 // Copyright (C) 2014 Erik Erlandson
0005 //
0006 // Distributed under the Boost Software License, Version 1.0. (See
0007 // accompanying file LICENSE_1_0.txt or copy at
0008 // http://www.boost.org/LICENSE_1_0.txt)
0009 
0010 #ifndef BOOST_UNITS_SYSTEMS_INFORMATION_PREFIXES_HPP_INCLUDED
0011 #define BOOST_UNITS_SYSTEMS_INFORMATION_PREFIXES_HPP_INCLUDED
0012 
0013 #include <boost/units/make_scaled_unit.hpp>
0014 #include <boost/units/static_rational.hpp>
0015 #include <boost/units/scale.hpp>
0016 
0017 #include <boost/units/systems/information/byte.hpp>
0018 
0019 #define BOOST_UNITS_INFOSYS_PREFIX(exponent, name) \
0020     typedef make_scaled_unit<dimensionless, scale<2, static_rational<exponent> > >::type name ## _pf_type; \
0021     BOOST_UNITS_STATIC_CONSTANT(name, name ## _pf_type)
0022 
0023 namespace boost {
0024 namespace units {
0025 namespace information {
0026 
0027 // Note, these are defined (somewhat arbitrarily) against the 'byte' system.
0028 // They work smoothly with bit_information, nat_information, etc, so it is
0029 // transparent to the user.
0030 BOOST_UNITS_INFOSYS_PREFIX(10, kibi);
0031 BOOST_UNITS_INFOSYS_PREFIX(20, mebi);
0032 BOOST_UNITS_INFOSYS_PREFIX(30, gibi);
0033 BOOST_UNITS_INFOSYS_PREFIX(40, tebi);
0034 BOOST_UNITS_INFOSYS_PREFIX(50, pebi);
0035 BOOST_UNITS_INFOSYS_PREFIX(60, exbi);
0036 BOOST_UNITS_INFOSYS_PREFIX(70, zebi);
0037 BOOST_UNITS_INFOSYS_PREFIX(80, yobi);
0038 
0039 } // namespace information
0040 } // namespace units
0041 } // namespace boost
0042 
0043 #undef BOOST_UNITS_INFOSYS_PREFIX
0044 
0045 #endif // BOOST_UNITS_SYSTEMS_INFORMATION_PREFIXES_HPP_INCLUDED