3 #ifndef CDSLIB_USER_SETUP_CACHE_LINE_H
4 #define CDSLIB_USER_SETUP_CACHE_LINE_H
7 \brief Cache-line size definition
9 This file defines cache-line size constant. The constant is used many \p libcds algorithm
10 to solve false-sharing problem.
12 The value of cache-line size must be power of two.
13 You may define your cache-line size by defining macro -DCDS_CACHE_LINE_SIZE=xx
14 (where \p xx is 2**N: 32, 64, 128,...) at compile-time or you may define your constant
15 value just editing \p cds/user_setup/cache_line.h file.
17 The default value is 64.
22 #ifndef CDS_CACHE_LINE_SIZE
23 static const size_t c_nCacheLineSize = 64;
25 static const size_t c_nCacheLineSize = CDS_CACHE_LINE_SIZE;
30 #endif // #ifndef CDSLIB_USER_SETUP_CACHE_LINE_H