Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 09:48:06

0001 /*
0002 Copyright Rene Ferdinand Rivera Morell 2020-2021
0003 Distributed under the Boost Software License, Version 1.0.
0004 (See accompanying file LICENSE_1_0.txt or copy at
0005 http://www.boost.org/LICENSE_1_0.txt)
0006 */
0007 
0008 #ifndef BOOST_PREDEF_OTHER_WORD_SIZE_H
0009 #define BOOST_PREDEF_OTHER_WORD_SIZE_H
0010 
0011 #include <boost/predef/architecture.h>
0012 #include <boost/predef/version_number.h>
0013 #include <boost/predef/make.h>
0014 
0015 /* tag::reference[]
0016 = `BOOST_ARCH_WORD_BITS`
0017 
0018 Detects the native word size, in bits, for the current architecture. There are
0019 two types of macros for this detection:
0020 
0021 * `BOOST_ARCH_WORD_BITS`, gives the number of word size bits
0022   (16, 32, 64).
0023 * `BOOST_ARCH_WORD_BITS_16`, `BOOST_ARCH_WORD_BITS_32`, and
0024   `BOOST_ARCH_WORD_BITS_64`, indicate when the given word size is
0025   detected.
0026 
0027 They allow for both single checks and direct use of the size in code.
0028 
0029 NOTE: The word size is determined manually on each architecture. Hence use of
0030 the `wordsize.h` header will also include all the architecture headers.
0031 
0032 */ // end::reference[]
0033 
0034 #if !defined(BOOST_ARCH_WORD_BITS_64)
0035 #   define BOOST_ARCH_WORD_BITS_64 BOOST_VERSION_NUMBER_NOT_AVAILABLE
0036 #elif !defined(BOOST_ARCH_WORD_BITS)
0037 #   define BOOST_ARCH_WORD_BITS 64
0038 #endif
0039 
0040 #if !defined(BOOST_ARCH_WORD_BITS_32)
0041 #   define BOOST_ARCH_WORD_BITS_32 BOOST_VERSION_NUMBER_NOT_AVAILABLE
0042 #elif !defined(BOOST_ARCH_WORD_BITS)
0043 #     define BOOST_ARCH_WORD_BITS 32
0044 #endif
0045 
0046 #if !defined(BOOST_ARCH_WORD_BITS_16)
0047 #   define BOOST_ARCH_WORD_BITS_16 BOOST_VERSION_NUMBER_NOT_AVAILABLE
0048 #elif !defined(BOOST_ARCH_WORD_BITS)
0049 #   define BOOST_ARCH_WORD_BITS 16
0050 #endif
0051 
0052 #if !defined(BOOST_ARCH_WORD_BITS)
0053 #   define BOOST_ARCH_WORD_BITS 0
0054 #endif
0055 
0056 #define BOOST_ARCH_WORD_BITS_NAME "Word Bits"
0057 #define BOOST_ARCH_WORD_BITS_16_NAME "16-bit Word Size"
0058 #define BOOST_ARCH_WORD_BITS_32_NAME "32-bit Word Size"
0059 #define BOOST_ARCH_WORD_BITS_64_NAME "64-bit Word Size"
0060 
0061 #endif
0062 
0063 #include <boost/predef/detail/test.h>
0064 BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_WORD_BITS,BOOST_ARCH_WORD_BITS_NAME)
0065 
0066 #include <boost/predef/detail/test.h>
0067 BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_WORD_BITS_16,BOOST_ARCH_WORD_BITS_16_NAME)
0068 
0069 #include <boost/predef/detail/test.h>
0070 BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_WORD_BITS_32,BOOST_ARCH_WORD_BITS_32_NAME)
0071 
0072 #include <boost/predef/detail/test.h>
0073 BOOST_PREDEF_DECLARE_TEST(BOOST_ARCH_WORD_BITS_64,BOOST_ARCH_WORD_BITS_64_NAME)