Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-09-17 08:35:01

0001 //  Copyright (C) 2009, 2016 Tim Blechmann
0002 //
0003 //  Distributed under the Boost Software License, Version 1.0. (See
0004 //  accompanying file LICENSE_1_0.txt or copy at
0005 //  http://www.boost.org/LICENSE_1_0.txt)
0006 
0007 #ifndef BOOST_LOCKFREE_PREFIX_HPP_INCLUDED
0008 #define BOOST_LOCKFREE_PREFIX_HPP_INCLUDED
0009 
0010 #include <boost/predef.h>
0011 
0012 /* this file defines the following macros:
0013    BOOST_LOCKFREE_PTR_COMPRESSION: use tag/pointer compression to utilize parts
0014                                    of the virtual address space as tag (at least 16bit)
0015 */
0016 
0017 namespace boost { namespace lockfree { namespace detail {
0018 
0019 #ifdef __cpp_inline_variables
0020 #    define inline_constexpr inline
0021 #else
0022 #    define inline_constexpr
0023 #endif
0024 
0025 #if BOOST_ARCH_SYS390
0026 inline_constexpr constexpr size_t cacheline_bytes = 256;
0027 #elif BOOST_ARCH_PPC
0028 inline_constexpr constexpr size_t cacheline_bytes = 128;
0029 #elif BOOST_ARCH_ARM && ( BOOST_OS_MACOS || BOOST_OS_IOS )
0030 // technically this is for apple's the M chips, but the A chip are probably similar
0031 inline_constexpr constexpr size_t cacheline_bytes = 128;
0032 #else
0033 inline_constexpr constexpr size_t cacheline_bytes = 64;
0034 #endif
0035 
0036 }}} // namespace boost::lockfree::detail
0037 
0038 #if BOOST_ARCH_X86_64 || ( ( BOOST_ARCH_ARM >= BOOST_VERSION_NUMBER( 8, 0, 0 ) ) && !BOOST_PLAT_ANDROID )
0039 #    define BOOST_LOCKFREE_PTR_COMPRESSION 1
0040 #endif
0041 
0042 #undef inline_constexpr
0043 
0044 #endif /* BOOST_LOCKFREE_PREFIX_HPP_INCLUDED */